2015-07-04 08:34:39 +0000joco42(~joco42@dsl-hkibrasgw4-58c03a-80.dhcp.inet.fi) (Remote host closed the connection)
2015-07-04 09:12:55 +0000joco42(~joco42@dsl-hkibrasgw4-58c03a-80.dhcp.inet.fi)
2015-07-04 09:29:51 +0000bennofs(~benno@ipb2186cc7.dynamic.kabel-deutschland.de)
2015-07-04 11:12:39 +0000saulzar_(~oliver@121-74-230-192.telstraclear.net)
2015-07-04 11:28:01 +0000joco42(~joco42@dsl-hkibrasgw4-58c03a-80.dhcp.inet.fi) ()
2015-07-04 11:57:07 +0000joco42(~joco42@dsl-hkibrasgw4-58c03a-80.dhcp.inet.fi)
2015-07-04 11:58:48 +0000 <joco42> I am thinking about making a simple Reflex only (not reflex-dom) intro into reflex, something that can be run from the command line and only requires the IO monad. How would I get started with that ?
2015-07-04 11:59:44 +0000 <joco42> I would like to do the same kind of basic intro to Reflex as I did with Sodium in this lecture : https://www.youtube.com/watch?v=CjEDmJMLEGE
2015-07-04 12:01:45 +0000 <joco42> So the question is how can I set up Reflex in a way that I set up Sodium at 3 min 25 second in the above video.
2015-07-04 12:03:15 +0000 <Haskellfant> are you looking for something like this? https://github.com/ryantrinkle/try-reflex/blob/master/examples/host.hs
2015-07-04 12:04:23 +0000 <joco42> thanks Haskellfant, I think something like that
2015-07-04 12:07:11 +0000 <joco42> I would like to write the simplest non trivial Reflex code that works, without reflex-dom. In other words, how would I translate this Sodium code to Reflex ? http://snag.gy/n0j2c.jpg
2015-07-04 12:07:47 +0000 <joco42> How do I create the Reflex FRP Engine and How do I hook it up to the world ?
2015-07-04 12:08:17 +0000 <Haskellfant> that's exactly what the code I linked you shows
2015-07-04 12:08:21 +0000 <joco42> I would like to make a little screencast intro to Reflex during the Hackathon, that would lower the barrier of entry to reflex.
2015-07-04 12:08:28 +0000 <joco42> Haskellfant: many thanks, excellent
2015-07-04 12:09:08 +0000 <joco42> output is pulled
2015-07-04 12:09:08 +0000 <joco42> via periodic sampling in a render function.
2015-07-04 12:09:13 +0000 <joco42> the only difference is this
2015-07-04 12:09:37 +0000 <joco42> that in that code the output is pulled, while in the code I wrote, it is pushed
2015-07-04 12:10:18 +0000 <joco42> So the idea would be to push events on one end => Reflex => trigger callbacks .
2015-07-04 12:10:53 +0000 <joco42> https://gist.github.com/anonymous/ffd865c75929bb017628
2015-07-04 12:11:35 +0000 <joco42> So the only remaining question is, how can I subscribe to an event firing in Reflex ?
2015-07-04 12:12:42 +0000 <bennofs> joco42: normally, you have to build an event loop
2015-07-04 12:12:43 +0000 <joco42> http://snag.gy/WTHTs.jpg
2015-07-04 12:12:53 +0000 <joco42> this is the crucial line
2015-07-04 12:12:59 +0000 <joco42> bennofs: event loop ?
2015-07-04 12:13:09 +0000 <bennofs> joco42: every time that any input event is firing (say the user pressed a key), you use fireEventsAndRead
2015-07-04 12:13:22 +0000 <joco42> bennofs: I see.
2015-07-04 12:13:29 +0000 <bennofs> joco42: in the read part of fireEventsAndRead, you can use readEvent to check any event
2015-07-04 12:13:31 +0000 <joco42> I have a look at that.
2015-07-04 12:14:23 +0000 <bennofs> joco42: so that will give you "push" based event handling. If you want to avoid the cost of checking many events, you can use `merge` to merge all output events into a single output event that contains the response action to perform
2015-07-04 12:14:48 +0000 <joco42> interesting
2015-07-04 12:15:37 +0000 <saulzar_> reflex-dom actually does a lot more than binding the dom interface
2015-07-04 12:17:14 +0000 <joco42> https://gist.github.com/anonymous/89c8d858a4a715ce21c6