Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A couple of questions:

1) Is this a subset of Haskell, or a brand new language inspired by Haskell?

2) It appears that FRP (which by the way is a cool idea) isn't necessarily language-specific, is this true? My guess is that Elm just brings FRP to the forefront in the same way Lisp brings FP to the forefront?



1) Brand new language inspired by Haskell's syntax, but it is really much closer to ML (strict evaluation, no type classes). More info: http://www.testblogpleaseignore.com/2012/06/21/why-elm/

2) That is totally true! The idea is quite general. I think it works best in a strongly typed language like OCaml or Haskell, but it could work anywhere. FrTime is a Scheme/Lisp/Racket version of FRP. My personal opinion is that it works best in Elm though :P


Briefly, how would you summarize the semantics of FRP in your language as compared to Yampa in Haskell?


A generalization. Arrowized FRP (as introduced in Yampa) can be entirely embedded in Elm.

The Automaton library is the beginnings of such an embedding: http://elm-lang.org/docs/Automaton.elm

To be more concrete, in Elm you can work directly with signals if you want. In Yampa you cannot; you only get "signal functions" (which Elm has as well in the form of Automatons).


Flapjax[1], an FRP library for JavaScript, has been around for several years and can be used purely as a JS library[2], or you can use its compile-to-js DSL to build page/app templates[3]:

[1] https://github.com/brownplt/flapjax

[2] http://www.flapjax-lang.org/docs/

[3] http://www.cs.brown.edu/~sk/Publications/Papers/Published/mg...

A couple of years ago, I began (somewhat naively, on my own) hacking together a "next gen" version which was intended to generalize the functionality of Flapjax-as-a-library. I learned a lot, and ended up coming face-to-face with monads and monad transformers (though I didn't realize it at the time) and the limitations and complications that mutable data structures (as opposed to immutable ones) imply for dataflow/FRP frameworks. My work on that library stopped when I shifted from NodeJS to Clojure/ClojureScript for my day-to-day work. Now that I'm a bit more experienced with functional programming, monads, etc., I hope to find some time to restart that effort, using ClojureScript (and protocol-monads[4]?) as the foundation.

[4] https://github.com/michaelsbradleyjr/protocol-monads




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: