I enjoyed this talk by Conal Elliott on Functional...

# linking-togethera

Alex McLean

11/09/2023, 11:45 AMI enjoyed this talk by Conal Elliott on Functional Reactive Programming (FRP)
and also enjoying some previous discussion about Conal's version of FRP here
• https://linen.futureofcoding.org/t/49387/does-anyone-know-the-current-state-of-the-art-in-functional-

Alex McLean

11/09/2023, 11:51 AMSome surprising things:
• Conal comes out really strongly against most FRP implementations as missing the point of FRP
• He came up with FRP before he new about fmap (functor map), applicative, monad etc?? Woah
• From **@Ivan Reese**: "he wants everything to be exactly precise real numbers, rather than approximations using rational numbers". I'm really scratching my head over this.. I guess the way I see it rational numbers *are* precise, and fit every use case I have very well. I can't think of a reason why you'd need to use an irrational number for e.g. an animation frame.

Alex McLean

11/09/2023, 11:56 AMI should ask him, but I think on the implementation side, Tidal (and Strudel) do largely meet his criteria for FRP. They use rationals to represent time though (which I think is a step up from the doubles in Fran), and behaviours (which I call patterns) aren't functions of time, but something more general - functions of timespans. This allows them to a) be queried without any possibility of missing values between samples b) return discrete events as well as continuously varying values.

Alex McLean

11/09/2023, 12:03 PMI found the twitter thread with **@Ivan Reese** https://twitter.com/spiralganglion/status/1141913756923912192

Alex McLean

11/09/2023, 12:13 PMHmm **@Ivan Reese** you seem to consider floating point and integral time, but not rational time. You do suggest "Represent time discretely—using ints—but with dynamic granularity." though which I guess is how rational numbers work? Storing a number as two integers, numerator and denominator.
I've not hit any real problems with rational time, apart from the cost of converting from floating point to rationals, which can usually be minimised/avoided.