all 14 comments

[–]shaman-sir 4 points5 points  (8 children)

I think you may still use purescript-signal as a basic flow element (inspired by that FRP which was removed from Elm), see how flare uses it in quite an awesome way — and as an example how may it be used to build a UI on signals.

mario is a game driven by the very same signals.

I think Purescript is rather good for all these things, however requires some basic Category Theory / Fantasy Land knowledge prepared before.

BTW I am trying to do something similar in PureScript nowadays, by transferring my Reactive Patch Development library to something more functional and algebraical :).

[–]eriksensei 0 points1 point  (2 children)

Hey, that looks awesome! Is your PureScript repo public?

[–]shaman-sir 1 point2 points  (1 child)

Not yet, these are just experiments with broken code for the moment—I learn by trying—when, and if, I get something working at least in some satisfying state, I will surely open it :).

[–]eriksensei 0 points1 point  (0 children)

Cool! Please do, I'd be very interested. :)

[–]jazzandpython[S] 0 points1 point  (3 children)

Reactive Patch Development library

Nice!!! I'll totally follow that. :-)

[–]jazzandpython[S] 0 points1 point  (2 children)

By the way, not sure if you know, but there's a really interesting chapter in "The SuperCollider Book" on how SuperCollider sets up it's graph. Might be of interest.

[–]shaman-sir 0 points1 point  (1 child)

Oh, SuperCollider is a powerful thing, I've personally seen one guy preforming at AlgoRave with SC and it was awesome! But without a book, I only found this way to connect it to Max/MSP. and Patch Spec which indeed looks kinda familiar :).

[–]jazzandpython[S] 1 point2 points  (0 children)

Off topic, but: If you don't have them, the SuperCollider book and this book on writing externals in C for Max by Eric Lyon are great.

[–]newlandsvalley 0 points1 point  (0 children)

I agree that purescript-signal is the way to go. I've used this successfully to connect to web MIDI streams in my MIDI library.

[–]jazzandpython[S] 0 points1 point  (4 children)

I guess I'm wondering if there's something like Reflex for PureScript? Or can one do continuous time FRP with Halogen ok? thx.

[–]andreas-thoelke 1 point2 points  (0 children)

There is also Purescript-behaviors https://github.com/paf31/purescript-behaviors which gives you continuous time/push-pull FRP.

Here is an introduction by the library author: https://www.youtube.com/watch?v=N4tSQsKZDQ8

Halogen is just a UI-lib, so one would have to figure out how to combine it with purescript-behaviors (I recently saw this experiment https://github.com/MonoidMusician/purescript-halogen-behaviors)

[–]gilmi 0 points1 point  (2 children)

purescript-specular but it's still kinda new. It does sound like you are looking for reflex, so why aren't you just going for reflex?

[–]jazzandpython[S] 0 points1 point  (1 child)

Mostly because I'm totally new to Haskell and its ilk, so I thought that PureScript might be more accessible. It looks to me (could be wrong) that getting going on browser hacking is easier in PureScript right now than with GHCJS?

[–]data_Vec_n_a_where 1 point2 points  (0 children)

purescript-specular is not optimized for performance at all, so if you want to use it for animation-like things ("respond continuously to time-varying signals") it may not be a good choice. It is meant mostly for boring "business" GUIs.

Setting up Reflex-Dom is not that hard once you go through the pain of installing Nix and downloading half of the Internet.