News for hackers. Stuff that matters.
Re:Elm: declarative language that compiles to HTML, CSS and JS by mcmire on Monday December 10, 2012 @02:43PM (#4901129)
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?

Re:Elm: declarative language that compiles to HTML, CSS and JS by wheatBread on Monday December 10, 2012 @03:15PM (#4901263)
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

Re:Elm: declarative language that compiles to HTML, CSS and JS by scarmig on Monday December 10, 2012 @06:11PM (#4902125)
Briefly, how would you summarize the semantics of FRP in your language as compared to Yampa in Haskell?
Re:Elm: declarative language that compiles to HTML, CSS and JS by wheatBread on Monday December 10, 2012 @08:33PM (#4902632)
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).

Re:Elm: declarative language that compiles to HTML, CSS and JS by michaelsbradley on Monday December 10, 2012 @03:09PM (#4901239)
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