[reactive] The current state of reactive (or: I would like to start experimenting but keep on hitting walls)

Mathijs Kwik bluescreen303 at gmail.com
Sun Jul 26 06:24:47 EDT 2009


Hi all,

I found the blogposts on
http://netsuperbrain.com/blog/posts/introducing-reactive-events and I
really like the semantics.
Most FRP stuff seems to have a strong focus on UI, but this seemed
more generic to me.
I have done some networking daemons in the past, handling threads and
channels myself, but found it to be quite error-prone, especially when
there's shared state involved.
This is probably mostly because I'm still just learning haskell and FP
in general, but abstracting stuff the way reactive tries to (defining
what stuff _is_ rather than how it should do it) seems to be a lot
clearer and more functional.

I wanted to get experimenting right away, so I needed a way to bind
reactive to IO.
For getting familiar, just interacting with console or a socket would be enough.
I found http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2109 that's
supposed to simply adapt stdin+stdout to reactive.
As others pointed out, makeEvent switched the event and the sink, and
I found I had to use exactNB instead of exact to make it compile with
reactive 0.11

Apart from compiling, running seems to be a problem.
Most examples I tried (especially metronome) will make 1 thread run
100% cpu and eat memory, while nothing happens.

After some googling and reading the mailing list, I noted that
reactive seems to be a very quickly moving target (breaking API every
release).
I'm ok with that, pre 1.0 stuff should break, as it allows radical
changes to be tried out.
I'm not gonna use anything for real projects yet, so moving along with
reactive's changes isn't an issue.

The thing is (for me, but probably for lots of other people who would
like to get more familiar with FRP), it's very hard to find examples
that just work.
Maybe just a simple getting-started application on the wiki that stays
up-to-date with the current release?

Anyway, about the problem I ran into.
I did some googling and IRCing and read about a bug that's hard to fix
(ghc bug).
Is my problem related to that bug or is there something else I need to change?

About the ghc bug itself, and other stuff being "fundamentally broken"
(as I read on the list), is there any progress? (as in: ghc 6.12 has
this fixed)
Or should I concider reactive to be more like a research project, that
won't be ready for real use (or experimental use) for at least a few
years?
I don't mean to be trolling here, just want to know if it's "safe" to
track reactive and try some non-critical apps on it, knowing it's goal
is to become stable and usable.

Anyway,
Thanks for all hard work, even if not directly usable, it gave me a
clearer view on how to think about interactive programs.
Mathijs


More information about the Reactive mailing list