Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
.. without backend (just for static sites). Comes with IDE support, and fast dev cycle. Make sure you use reflex-frp cache.
Let me know if anybody can get this working!
@TheMatten A reflex exercise for you: how would you rewrite this piece of code to push the dyn_ to as deep as possible? https://github.com/srid/reflex-stone/blob/0b3042ee31bcd077fdb0a609dc77fc53b49f519e/src/Main.hs#L13-L18 :nerd:
Hmmm, can it be pushed deeper at all? :sweat_smile:
Two levels. Outter dynamic that updates when 0 switches to 1. And for 1+, a separate inner dynamic that you pass straight ot dynTextso the heads! thing never refreshes.
Oh, I see
Now with GitHub Pages with build time under 5mins (not bad for GHCJS)
Takes ~4 mins to build.
"Write Haskell. Push to GitHub. Compile to JS, and deploy .. all in 4 minutes. Use whatever (pure) Haskell library your heart desires"
--the sound of GHCJS beating its chest in front of PureScript
Another illustration of 'pushing dynamic as deep as possible' pattern, this time using factorDyn which uses Compose to break GADTs (so you get a dynamic per constructor): https://github.com/srid/ka/commit/2cb621be8871bfa61ae39a7d739e11c0833474fd
Just had to directly deal with the #Haskell `Compose` type for first time in real code.
Wanted to "break" a reflex dynamic (for update performance), to get one dynamic per GADT constructor.
`factorDyn` to rescue, which does exactly that.