News for hackers. Stuff that matters.
Re:A Farewell to FRP by mswift42 on Tuesday May 10, 2016 @11:15AM (#11667793)
Does Elm have any nice interfaces for common JS frameworks? (like reagent / om in clojurescript, or angular2 for dart / typescript)
Re:A Farewell to FRP by callahad on Tuesday May 10, 2016 @11:56AM (#11668134)
In general, you're unlikely to need them.

Instead of cobbling together disparate libraries for a virtual dom (React), state (Redux), immutability (Immutable.js), and types (Flow / TypeScript), the entire language and its core libraries are developed as a holistic (but still modular) unit. In this way, Elm is the BSD to JavaScript's GNU/Linux.

Strong typing and immutability are baked directly into the core language, elm-lang/html includes an efficient Virtual DOM, and Redux-style action / reducer cycles tend to naturally arise from "The Elm Architecture," and don't need significant support beyond what's already in the core language.

If you've bought into the React/Redux paradigm, it's worth giving Elm a shot: the entire language and core libraries are intentionally designed to more cleanly, reliably, and maintainably implement the same structure.

Re:A Farewell to FRP by bakul on Tuesday May 10, 2016 @01:17PM (#11668825)
"In this way, Elm is the BSD to JavaScript's GNU/Linux."

Is there X such that X is the Plan9 to Elm's BSD?

Re:A Farewell to FRP by Crespyl on Wednesday May 11, 2016 @11:26AM (#11676159)
Perhaps Urbit could fit that description?
Re:A Farewell to FRP by uknowthen on Tuesday May 10, 2016 @11:35AM (#11667956)
Elm has JS interop via ports, which would allow you to mix or migrate towards elm.

https://evancz.gitbooks.io/an-introduction-to-elm/content/in...

Re:A Farewell to FRP by Ciantic on Tuesday May 10, 2016 @02:24PM (#11669360)
Emphasis on the migrate, you do not want to have app with both JS and Elm for a long term perhaps.

In the main article: "I do not expect to be compiling to JavaScript forever, especially with WebAssembly on the horizon. The smaller the interface between Elm and JS, the easier it will be to support other platforms."

While I don't want to sound doom and gloom, the JavaScript support according to article is anomaly of today's browsers. So if you want to rely on two parts JS and one parts Elm type of thing, it's good to know it maybe gone.

Re:A Farewell to FRP by snuxoll on Tuesday May 10, 2016 @11:23AM (#11667851)
Elm doesn't really "need" interfaces to react/angular/whatever, the Elm Architecture defines a standard way to write a reactive application in pure Elm (in a style similar to react/redux).
Re:A Farewell to FRP by drdaeman on Tuesday May 10, 2016 @11:28AM (#11667897)
So Elm is only usable for new projects (or rewrites from scratch) and can't be "tried out" if you have some existing mess of a code and want to replace some especially ugly chunk of it (or write a new feature) - just to see how it goes?
Re:A Farewell to FRP by zalmoxes on Tuesday May 10, 2016 @11:31AM (#11667919)
No that's not true. Richard from NRI wrote a great blog post about just "trying out" elm in your React app.

http://tech.noredink.com/post/126978281075/walkthrough-intro...

Re:A Farewell to FRP by seddona on Tuesday May 10, 2016 @04:17PM (#11670308)
We use Elm inside Angular in production. On https://circuithub.com/projects/ti/TIDA-00230 most of the drawing is Elm.
Re:A Farewell to FRP by skybrian on Tuesday May 10, 2016 @11:31AM (#11667923)
Ports were the way to do this in Elm. I don't know how it works in the new version.
Re:A Farewell to FRP by jmite on Tuesday May 10, 2016 @12:10PM (#11668245)
They do, and have been made much clearer: http://guide.elm-lang.org/interop/javascript.html
Re:A Farewell to FRP by jahewson on Tuesday May 10, 2016 @11:54AM (#11668116)
elm-html gives you a very nice interface to virtual-dom, which combined with the Elm Architecture is all you need.