ATS and functional reactive programming

I taught a bit of functional reactive programming (FRP) recently.

Since Bacon.js is getting quite popular these days, I built a tiny interface
in ATS for some functions in Bacon.js. Here are some links to several short
FRP
examples making use of this interface:

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/assignments/08
http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/code/lecture-04-06/Bacon.js/
https://github.com/githwxi/ATS-Postiats-contrib/blob/master/contrib/libatscc/libatscc2js/SATS/Bacon.js/baconjs.sats

Personally, I find doing this kind of FRP in ATS quite interesting.
Typechecking
in ATS can go a long way to detect potential coding errors, resulting in
the generated
JS code (from ATS source) being of quite high quality as far as
correctness is of the
main concern.

I taught a bit of functional reactive programming (FRP) recently.

I did not knew about this buzz before this thread. I’m reading this:
https://www.zweitag.de/en/blog/technology/functional-reactive-programming-frp

That’s not something new to me (I already did similar things). If this buzz
can help to define some common vocabulary for these idioms, then it may be
nice (naming idioms is often hard).

So BTW FYI there are actual nuances to Reactive engines, I think.
There are various flavours; there are various optimizations. That’s
all I know. I’m not experienced or smart enough to be able to explain
what they all are. I know some depend on the programming language used
e.g. Monads vs. Arrows in Haskell implementations of FRP. There’s Elm,
there’s RDP, etc. My point being that when I hear that somebody has
made a reactive engine, I am suspicious – did they do it RIGHT? Did
they know enough to do it right? Or to even know that they aren’t
doing it right? Do they have glitches, transient states, can they
handle cycles, do they have time/space leaks, etc.

Incidentally, I just got this in my email shortly after this message:

Though, it is in Scala.On Mon, Apr 6, 2015 at 10:48 PM, gmhwxi gmh...@gmail.com wrote:

I taught a bit of functional reactive programming (FRP) recently.

Since Bacon.js is getting quite popular these days, I built a tiny
interface
in ATS for some functions in Bacon.js. Here are some links to several
short FRP
examples making use of this interface:

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/assignments/08

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/code/lecture-04-06/Bacon.js/

https://github.com/githwxi/ATS-Postiats-contrib/blob/master/contrib/libatscc/libatscc2js/SATS/Bacon.js/baconjs.sats

Personally, I find doing this kind of FRP in ATS quite interesting.
Typechecking
in ATS can go a long way to detect potential coding errors, resulting in
the generated
JS code (from ATS source) being of quite high quality as far as
correctness is of the
main concern.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/702567eb-ecba-4aa5-beea-de0f11a3471c%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/702567eb-ecba-4aa5-beea-de0f11a3471c%40googlegroups.com?utm_medium=email&utm_source=footer
.

Brandon Barker
brandon...@gmail.com

Yep, lot of Scala and Akka. But some more generic stuff too. The only thing
is that I can’t follow Erik Meijer so easilyOn Tuesday, April 7, 2015 at 7:37:40 AM UTC+2, Brandon Barker wrote:

Incidentally, I just got this in my email shortly after this message:
https://www.coursera.org/course/reactive
Though, it is in Scala.

On Mon, Apr 6, 2015 at 10:48 PM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:

I taught a bit of functional reactive programming (FRP) recently.

Since Bacon.js is getting quite popular these days, I built a tiny
interface
in ATS for some functions in Bacon.js. Here are some links to several
short FRP
examples making use of this interface:

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/assignments/08

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Spring15/code/lecture-04-06/Bacon.js/

https://github.com/githwxi/ATS-Postiats-contrib/blob/master/contrib/libatscc/libatscc2js/SATS/Bacon.js/baconjs.sats

Personally, I find doing this kind of FRP in ATS quite interesting.
Typechecking
in ATS can go a long way to detect potential coding errors, resulting in
the generated
JS code (from ATS source) being of quite high quality as far as
correctness is of the
main concern.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/702567eb-ecba-4aa5-beea-de0f11a3471c%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/702567eb-ecba-4aa5-beea-de0f11a3471c%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com <javascript:>

You ask too many tough questions :slight_smile:

A claim often made by some proponents of FRP is that it can help
simplify reasoning involved in reactive programming. This may or may not
be true depending on whether you consider clearly understanding the
underlying
implementation of FRP is a prerequisite.

I think I do see some values of FRP. However, writing code in FRP style does
seem to require one’s ability to perform “mental acrobatics” from time to
time.