Live data from Hacker News

Ask HN: Anyone Using Elm in Production?

news.ycombinator.com

51–60 of 74 posts

Re: Ask HN: Anyone Using Elm in Production?

#51
post #50

We've been using Elm in production for the last year to power an app used by 100,000 public school students in the US, and it's been fantastic. The Elm language and framework really do live up to their promise: it's a delightful development experience. Despite rewriting our entire 4-year-old UI we've had remarkably few bugs despite multiple large refactors. The whole team was new to Elm when we started, and now every…

Also also, if you're interested in meeting the Elm community in person, we've just announced the speaker lineup for Elm in the Spring, a new 1-day conference in Chicago in April -- we're really excited :D :D :D

https://www.elminthespring.org/

Re: Ask HN: Anyone Using Elm in Production?

#52
I was part of the team that built an editorial admin panel for the most read news site in my country. The initial development phase ended around three years ago and it's been in a sort of continuous development mode since then. A whole bunch of people have added features to the codebase (and upgraded it from 0.16 to 0.17 and 0.18) after me and the other original devs left.

It is still going strong and is so reliable that there's no need for dedicated developer for that project. I honestly can't imagine any sort of JavaScript project could have survived through the years that well.

Re: Ask HN: Anyone Using Elm in Production?

#53
I'm using elm 0.19 for an internal company wide tool, backed up by elixir with a graphQL api.

You have to see the implementation of libraries like https://package.elm-lang.org/packages/dillonkearns/elm-graph... to really appreciate what elm is trying to do. Maybe even read this https://package.elm-lang.org/help/design-guidelines

So every package is documented and quiet easily understandable. So whenever I need to go back into angular land - most times dependencies don't even have any docs maybe a readme if your lucky...

Re: Ask HN: Anyone Using Elm in Production?

#54
post #7

I'm curious what Elm offers that cannot be done in TypeScript.

Could you do the following in TypeScript? Can you, for any button in your interface, at any point in time, reliably calculate at runtime what your page's data model would look like, and if there were going to be any side effects, if you were to click on that button - but without clicking on it or invoking its callbacks (which could potentially change all kinds of things)? You can do that with Elm (more info here - ht…

I think most of the Intl api could work reasonably well with ports and custom elements. The formatters in particular, which make up most of the API, would probably work quite nicely as custom elements. It's really only string comparison that I can imagine needing ports for, outside of some particularly unusual use case.

Re: Ask HN: Anyone Using Elm in Production?

#55
Here at https://legalstart.fr, we have been using Elm for a few months now, and this experience has been quite positive.

What we liked:

- the compiler: not only does it prevent a lot of bugs, it allows us to refactor large portions of the code base fearlessly. Also, the compiler messages are often very easy to understand.

- the documentation: the guide is excellent.

- The Elm architecture: the fact that this is the only framework that you can use makes things easier, notably for junior developers who are not lost into a sea of choices.

- The Slack community is very responsive, notably via its Slack record channel: https://elmlang.slack.com/. I also found it to be quite friendly.

What we struggled with:

- In our experience, the hardest part has been to deal with JSON Encoders / Decoders. But it got smoother when we got used to it.

- The fact that the 0.19 version was new had some negative effects, eg obsolete docs or unavailable tools. It has gotten much better by know.

If you're new to functional programming Elm will require some getting used too, but we quickly got 4 developers of various experience / backgrounds up to speed. I believe having one developer who already knew Elm and advocated / taught it the beginning helped speedup this process a lot.

About nested components: as stated before, they are much less necessary than one might think; but otherwise this post might be helpful: https://medium.com/@alex.lew/the-translator-pattern-a-model-...

Last but not least: if you are interested in working in Elm (or React), we are looking for creative frontend developers !: https://jobs.smartrecruiters.com/Legalstart/743999665887249-...

Re: Ask HN: Anyone Using Elm in Production?

#56
post #29
post #13

Earlier quoted context omitted.

I think “deeply nesting components” means dropping a stateful component (view+behaviour+state) anywhere in your app without anything else changing. That’s not possible in Elm since the only place to store state is the central state storage. Which makes perfect sense, but often freaks people out, since it’s an uncommon design constraint.

With only one store, how do you keep your state reasonably organized when you get up to hundreds of pieces of data to manage? And what do you do about generic reusuable components that need state? Say a typeahead search that needs to track the input string and the list of results from the server?

Your state can be a tree, if it needs to be, so you can nest.

A normal practice is to have a model per page. For e.g. https://github.com/rtfeldman/elm-spa-example/blob/master/src...

And you can have another item next to it for global state if you need to. https://github.com/ohanhi/elm-shared-state explains one way to do this

Re: Ask HN: Anyone Using Elm in Production?

#57
We've been using Elm since Nov 2016 right after the 0.18 release to rewrite an old B2B web app.

- The system has 150+ users that was migrated over night and has been online for about 2 years now.

- No runtime exceptions in production. In testing the only thing we had was "Stack size exceeded" in Internet Explorer due to a poorly written time zone module.

- Translation was solved with one build for each language to avoid passing down the model everywhere.

- Coding takes more time but things don't gradually turn into spaghetti and refactoring is a breeze.

After the initial functional struggles it feels like writing "the code of your life". Overall, a very positive and fun experience and I don't regret us betting on this new fairly untested technology. And none in the team had lots of prior SPA experience so we had to learn new stuff anyway. Almost as good a tech choice as when we decided to use gevent or MongoDB but for a very different problem.

This was for a custom client project and not our main 46elks service which is an API that mostly uses Python.

Re: Ask HN: Anyone Using Elm in Production?

#58

Yes. The deeply nested components thing isn’t an issue at all. You build “components” as stateless views. It’s fundamentally the same as building an application out of all stateless components in redux. Your model (the central state) becomes larger and more complex, but the size of your update function doesn’t expand as much as you’d think. Meanwhile, the benefits from type-safety, pure functions, and extremely well-…

What is meant by "deeply nested components" and why can't you do them in Elm?

This has to do with state partitioning.

The official Elm Architecture tutorial used to contain some examples of encapsulating functionality into modules that would then be reused. The pattern presented there was abused by some folks and some problems that were introduced by state partitioning started to appear. There was a lot of talk about boilerplate and inter-component communication. A lot of these problems could have been avoided by not being so aggressive with the partitioning and so, "thinking in terms of components" has been discouraged ever since.

You can still define components by implementing the model/update/view triplet pattern but the main recommendation is to do it only when this is unavoidable (e.g. Pages or highly complex widgets).

Re: Ask HN: Anyone Using Elm in Production?

#60
post #3

What exactly does elm offer?

Adding to others, with disclaimer that I haven't built a large application yet so these are relative newbie comments: 1. An amazingly helpful compiler. The best I've come across for identifying problems, describing them in a meaningful way, and suggesting how to fix. 2. A wonderful synergy between language and architecture. Various others have copied Elm's model-view-update architecture (React, F# SAFE) but as they'r…

What about good IDE?
Post reply on HN