News for hackers. Stuff that matters.
Re:Elm Compiler Written in Elm by yladiz on Tuesday July 13, 2021 @06:21AM (#27819323)
Serious question: how popular is Elm? I've recently seen some tutorials showing up and anecdotally know some friends that have played around with it, but I haven't seen any job postings for it and so I'm wondering if it's just hyped up or if there is real demand for Elm developers professionally.
Re:Elm Compiler Written in Elm by toastal on Tuesday July 13, 2021 @06:42AM (#27819464)
There was a sizable rift after Elm’s 0.19 version. Removing synchronous FFI, especially to existing browser APIs that haven’t been rewrapped with a new API by the core team caused a lot of individuals and businesses to migrate mainly to PureScript, Reason, and/or Typescript—myself included. Couple with community hierarchy issues, lack of development/roadmap transparency, rotting merge requests to the core libraries (security, bugfix, and performance issues), and community libraries, Git hosting, and identity tied solely to Microsoft’s GitHub accounts, it’s not something I personally could recommend. I do however think it’s a great learning language—especially for first-time functional programming—but I would be very hesitant in your assessment for production if you need to scale to use browser APIs, i18n, l10n, etc. or like/need the ability to fork and contribute to the core.
Re:Elm Compiler Written in Elm by toastal on Tuesday July 13, 2021 @01:37PM (#27823758)
For more context, I believe Luke Plant summed it up best in "Why I’m Leaving Elm" (https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/). This title should be searchable on Hacker News for even more discussion.
Re:Elm Compiler Written in Elm by brainbag on Tuesday July 13, 2021 @08:56AM (#27820332)
I've been a fan of mint-lang; although it's early, it's clearly intended to be like Elm: The Good Parts. Also fearing a small but helpful community that welcomes contributions, which is the polar opposite of my experience with Elm.
Re:Elm Compiler Written in Elm by myth_drannon on Tuesday July 13, 2021 @09:10AM (#27820482)
Looks like the language was created by elm-ui author.
Re:Elm Compiler Written in Elm by jfmengels on Tuesday July 13, 2021 @09:20AM (#27820583)
There are several things named elm-ui. It's the author of a different library than what is usually understood when someone refers to elm-ui (which is https://package.elm-lang.org/packages/mdgriffith/elm-ui/late...)
Re:Elm Compiler Written in Elm by pd-andy on Tuesday July 13, 2021 @06:29AM (#27819375)
Neither, really. I'd say it has the largest community out of the various compile-to-js statically typed FP langs, at least with an explicit front-end focus.

- PureScript has a small but passionate community, one of the biggest players in that community laid off their whole ps team so that doesn't bode well.

- ReasonML fractured into ReScript but left half the Reason community behind, it's a confusing space to navigate now.

- GHCJS...

Most (perhaps even all) of the job postings end up on the elm slack (rather than, say, reddit or other more visible places).

There was some controversy with the release of 0.19 a couple of years ago, and general contempt (in the wider community, not inside Elm) for the way the language is developed and run which means there isn't a great deal of buzz about it outside of those already using it.

Re:Elm Compiler Written in Elm by aranchelk on Tuesday July 13, 2021 @11:13AM (#27821974)
> PureScript has a small but passionate community, one of the biggest players in that community laid off their whole ps team so that doesn't bode well.

I wouldn’t let that dissuade anyone. Even if support diminishes, the language is feature complete, and FFI is so stupidly easy you can freely co-opt JS libs as needed.

Re:Elm Compiler Written in Elm by egeozcan on Tuesday July 13, 2021 @07:23AM (#27819674)
If you don't have the urge to jump off a hill when you see heavy pragmatism, Typescript is very popular and well maintained. My experience is only positive.

I was also wondering, does Blazor work with F#? That could also be an option. Not a front-end focused language but a front-end focused framework, so, there's that.

Re:Elm Compiler Written in Elm by pd-andy on Tuesday July 13, 2021 @07:38AM (#27819768)
Oh yeah I knew I was forgetting one, F#/Fable seems really popular among F# devs, but it doesn't seem like it's picking up any traction for FE devs that aren't already in that community.

Typescript encourages and is generally more conducive to a different style of programming. That's OK (in fact, clearly it's more than OK given its popularity) but it's not really the sort of thing I want to be writing. I think it's worse if you commit to something like fp-ts or the fantasyland stuff, personally.

Re:Elm Compiler Written in Elm by johnday on Tuesday July 13, 2021 @07:35AM (#27819745)
I truly believe TypeScript is the only true way forward for frontend web programming.

Now what we really need is a functional dialect which compiles to TypeScript...

Re:Elm Compiler Written in Elm by toastal on Tuesday July 13, 2021 @09:37AM (#27820775)
TypeScript has a bunch of holes in it because it needs tight compatibility with JavaScript. While a pure functional style may be possible, it isn’t first-class or ergonomic or as expressive, and won't cut it for many. Are there first-class function composition infix operators? Is pattern matching algebraic data types often the easiest way to write code? Is IO managed? With a language like Elm and others in the ML family, functional style is the only game in town, not just the in-house convention, and it's easier to have people using a similar style if it’s ergonomic. Even if you’re willing to give up managed IO OCaml and Reason are going to suit this programmer better than TypeScript. I would not be surprised if a lot of the fp-ts crowd is merely tolerating this as a comprise.
Re:Elm Compiler Written in Elm by johnday on Tuesday July 13, 2021 @03:38PM (#27825290)
I didn't say we should use Typescript, I was suggesting a FP dialect which compiles to typescript.
Re:Elm Compiler Written in Elm by cnasc on Tuesday July 13, 2021 @08:45AM (#27820209)
> Now what we really need is a functional dialect which compiles to TypeScript...

Why would it be beneficial to have TS as an intermediate representation? It turns into JS anyway, and there are already statically typed functional languages that compile to JS.

Re:Elm Compiler Written in Elm by johnday on Tuesday July 13, 2021 @03:39PM (#27825305)
It would massively simplify the job of proving the upper language more correct. It may also be possible to proxy the type system in order to make use of existing tooling.
Re:Elm Compiler Written in Elm by fpoling on Tuesday July 13, 2021 @11:40AM (#27822298)
TypeScript or Flow for that matter sucks at using functional style with immutable data types. There are ESLint plugins that allows to enforce immutability with plain JS objects, but still lack of syntactic sugar or union types makes the experience much worse then in functional languages.
Re:Elm Compiler Written in Elm by RobertKerans on Tuesday July 13, 2021 @02:13PM (#27824217)
https://github.com/tc39/proposal-record-tuple

Only stage 2, so whether it'll get through to next stage is up in the air, will depend on interest (compare to Temporal which started fairly slow but has gained huge momentum recently and is now at stage 3 and engine testing level) but it's encouraging.

Re:Elm Compiler Written in Elm by johnday on Tuesday July 13, 2021 @03:40PM (#27825321)
Perhaps what we need is a dialect which compiles to typescript and supports (or better, enforces) the immutability you suggest.
Re:Elm Compiler Written in Elm by sanatgersappa on Tuesday July 13, 2021 @09:48AM (#27820915)
Yup. Try https://fsbolero.io/ . Follows the Elm Architecture.
Re:Elm Compiler Written in Elm by xfer on Tuesday July 13, 2021 @12:15PM (#27822791)
There is also clojurescript which is fairly popular. I am not a large fan of using these for websites since they have their own heavy runtime that needs to be shipped. ReasonML did fairly well in this aspect but there is still a baggage.
Re:Elm Compiler Written in Elm by samhh on Tuesday July 13, 2021 @06:36AM (#27819420)
Oh damn, who laid off their PS team? First I've heard of that.
Re:Elm Compiler Written in Elm by pd-andy on Tuesday July 13, 2021 @06:44AM (#27819478)
Re:Elm Compiler Written in Elm by mrweasel on Tuesday July 13, 2021 @06:45AM (#27819483)
There where an article recently regarding Humios use of Elm: https://www.humio.com/whats-new/blog/why-we-chose-elm-for-hu...

Using job postings isn't really that useful. If they where any indication then the two only language in existence would be Java and C#. That depends on where you live of cause. E.g. there are plenty of Python jobs around where I live, but they aren't frequently posted on the regular job sites. I'd suspect that Elm jobs are posted where Elm developers are to be found.

Re:Elm Compiler Written in Elm by gampleman on Tuesday July 13, 2021 @06:25AM (#27819342)
I write Elm full time, so there are definitely jobs out there.

That said, I suspect that given how fun the language is to write, supply probably outpaces demand a bit. Which is actually good, in the sense that for many companies adopting a somewhat less mainstream language one of the main concerns is "will I be able to hire for this?", which generally the answer is "yes, especially for more senior positions".

Re:Elm Compiler Written in Elm by wolfadex on Tuesday July 13, 2021 @11:50AM (#27822452)
We have a team at Square that uses Elm and I've made a few commits. They've been working on their app for around 18 months now.

I find it slightly funny because I also write Svelte at work and that app is public facing so it gets public attention but the Elm app is internal facing so the public will never see it. Also helps that Svelte uses its own name in the code it generates. Which is why I try to promote Elm myself. To semi-quote @SvelteSociety "@Square, a >$100 billon company, uses @elmlang."

Re:Elm Compiler Written in Elm by girishso on Tuesday July 13, 2021 @06:44AM (#27819480)
I’ve been writing Elm professionally for the past 2.5 years on a large project. The language is a pure joy to use, unparalleled refactoring experience. Yes it’s a small community, but there’s many jobs posted on Elm slack.
Re:Elm Compiler Written in Elm by onethought on Tuesday July 13, 2021 @07:18AM (#27819656)
It’s quite parallel to typescript (strict) refactoring, isn’t it?
Re:Elm Compiler Written in Elm by razze on Tuesday July 13, 2021 @09:01AM (#27820397)
Honestly, it's nothing alike. Refactoring in Elm is different, as the compiler will tell you if you did the correct thing when refactoring. The typescript compiler can only do a fraction of that, even if you type your stuff correctly.

Needing to type stuff in elm is mostly optional too. The compiler will still check it for you anyway.

Re:Elm Compiler Written in Elm by weavie on Tuesday July 13, 2021 @08:53AM (#27820298)
I suspect not. With Typescript even with strict typing, mutating state is still possible (I believe, correct me if I'm wrong..). This adds an extra layer of complexity to the refactoring process.

With Elm, mutation is impossible - everything goes through the update loop. There are no escape hatches. This does mean you have to jump through a number of hoops to use FFI. It can be a pain at times, but does make for much easier refactoring.

Re:Elm Compiler Written in Elm by piaste on Wednesday July 14, 2021 @07:08AM (#27831770)
> This does mean you have to jump through a number of hoops to use FFI.

TBH, I thought the pain of FFI in ports (the only mechanism available in Elm 0.19) was kinda overblown. Function input goes into a command, function output comes back as a message. That's just a few extra lines of standard code.

I think they become annoying if you do lots of small, synchronous, safe calls, like using a JS math library. In that case I suspect I would prefer writing a larger JS function instead of having an Elm function full of JS calls, even if I could use a more permissive unsafe FFI, because every JS invocation is still a chance at runtime errors due to type conversions (even with ports).

Re:Elm Compiler Written in Elm by mjaniczek on Tuesday July 13, 2021 @07:11AM (#27819633)
The #jobs section on the Elm Slack is quite alive.

Can't speak for the community as whole, but there is at least some demand: the company I'm working for is actively hiring Elm devs for at least two teams at this moment :)

Re:Elm Compiler Written in Elm by yakshaving_jgt on Tuesday July 13, 2021 @10:59AM (#27821804)
I write Elm and I hire Elm (and Haskell) programmers. It works great for our business so we’re going to continue doing that.