Live data from Hacker News

A Farewell to FRP

elm-lang.org

81–90 of 246 posts

Re: A Farewell to FRP

#81
post #69

Has anyone upgraded a non-trivial app from 0.16 to 0.17? Is it pretty simple to rewrite moving from Signals to Subscriptions? Any advice?

It took me about a day and half to upgrade a good sized project, and most of that time was spent sorting out native code. If you don't use native code and are using StartApp then its a fairly trivial/methodical upgrade process.

Re: A Farewell to FRP

#82
post #29

Just out of curiosity. I'm trying to decide which client-side framework/language to dive into, and it seems that many people consider Om Next a really nice step forward, away from "giant blob of state". My (uninformed) observation is that Elm does things the way Om (previous) did it: is that correct? Is Elm aiming to incorporate Om Next's advantages?

As far as I understand Om.next still uses a "giant blob of state" - a global atom. It differs from re-frame/reagent in how you access this state, the global atom.

Re: A Farewell to FRP

#83

I moved from React/Redux/Typescript to Elm a few months ago, and I'm now on my second serious project with it, making mobile application with Cordova. I've found it an absolute pleasure to use, and I especially like that you can be pragmatic about it; if there is something that is annoying to do in Elm then you can simply drop into Javascript/Typescript using ports. Coming from languages like Actionscript/Javascript/…

> if it compiles, then it just seems to work

That's exactly been my experience with Elm.

For example, on a web project I had been working on I decided to add the 'search' feature; the very first change[1] actually worked! This is generally not possible with JavaScript.

[1] https://github.com/srid/chronicle/commit/4a6c18147bf1596b234...

Re: A Farewell to FRP

#84
post #8

Does Elm have any nice interfaces for common JS frameworks? (like reagent / om in clojurescript, or angular2 for dart / typescript)

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, e…

"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

#85
post #75
post #60

Earlier quoted context omitted.

Elm is typed, Clojurescript is homoiconic. 2 great features. Wondering if you could make a lisp where `lambda` or `fn` required type annotations, such as (defn add [int -> int -> int] ;; type annotation [x y] ;; arguments list (+ x y)) Then it would be homoiconic - something that has saved me hundreds of lines of code (and the less code, the less bugs as a rule of thumb). Then every function down to the very basic li…

There's Typed Racket [1] and for Clojure there's core.typed [2]which do pretty much that. For Clojure there's also Schema [3], which is a bit lighter weight (it's not a full type system), but still gets you some of the benefits like validation and documentation. [1] https://docs.racket-lang.org/ts-guide/ [2] https://github.com/clojure/core.typed [3] https://github.com/plumatic/schema

Neither fit the bill though - because not every function ever written in the language is annotated. To be nice to use, it should be an all-or-nothing affair.

I say this as a huge clojure fan - my clojure programs with dynamic types work great. I rely on predicates (functions ending in -?) in I/O, otherwise I'm sure things work.

Re: A Farewell to FRP

#86
post #38

Earlier quoted context omitted.

Yep every 'native' library needed arduous review process via github issues. I waited for over a month for elm overlords to approve my 'native use' library , they simply closed the issue. Dropped elm for react and co. Now I have serverside rendering, code splitting, working debugger ect which was impossible with elm. This was last year though so not sure if it is still the process. YMV.

It has changed, in that the language is moving away from Native code, and instead is trying to provide the web-platform as part of the language/core libs. And for everything else, there's Ports. You can't use them in libraries, but for your own projects they're a much better JS FFI.

>And for everything else, there's Ports.

Ports are extremely tedious to use if you are doing anything even moderately complicated .

Re: A Farewell to FRP

#87
post #36
post #5

As someone who is just getting started with frontend development, I decided to go with Elm instead of learning JS and React. I found the whole experience very pleasant, even as a beginner. Not only is the elm code I write reliable, but I've found that adding more features does not bloat my code. Refactoring a codebase as it grows in elm is pleasant, and following the Elm Architecture guides me on the correct structur…

Nice to read. Last time I tried Elm, (1 or 1 1/2 years ago) tutorials and docs were kinda outdated. Got errors in this REPL thing they got for beginners on the webpage and nothing from the examples worked :\

I came back to it recently after a year and a half long break and it has improved dramatically. It's starting to feel like something I'd be comfortable using in production.

Re: A Farewell to FRP

#88
post #4

> A web handler threw an exception. Details: > gen/pages/blog/farewell-to-frp.html: getFileStatus: does not exist (No such file or directory) Some caching problem, it seems?

I reloaded and it worked.

Re: A Farewell to FRP

#89

I got into studying FRP around 3 years ago for my senior project. Aside from a decent, clear explanation, there were hardly any actual implementations of this allegedly good paradigm (something Evan covered in his thesis, and the basis for Elm). It seemed like a paradigm that was full of promise and potential but failed to deliver in any worthwhile way. (Such was the case for my senior project, studying the viability…

I'm similarly ambivalent. Though Elm and it's flavour of FRP were more of a hobby (I never turned into an academically valuable thing :) ), I was still very interested in the roots of the system and how to use and improve it. I know the change was happening already, that signals were not used much in the Elm Architecture; I also understand and applaud the simplification. But I'm still a little sad to see FRP go, it's an interesting idea and does have potential IMHO.
Post reply on HN