Live data from Hacker News

Elm Compiler Written in Elm

github.com

51–60 of 84 posts

Re: Elm Compiler Written in Elm

#51
post #50

AFAIK Elm can't actually write to the filesystem, how does the compiler get around that? Or has Elm changed such that it can work outside the browser now?

I use ports to write to the filesystem. There is a small amount of JS that initializes Elm, which runs in Node and has the ability to write to the filesystem.

Of course if you'll be running elm-in-elm in the browser, you won't be able to do that. But there are more interesting things to do with a compiler in the browser :)

Re: Elm Compiler Written in Elm

#52
post #50

AFAIK Elm can't actually write to the filesystem, how does the compiler get around that? Or has Elm changed such that it can work outside the browser now?

Ports let you communicate with Elm from pure js, for example here’s the cli wrapper for node https://github.com/elm-in-elm/compiler/blob/master/cli/index...

Re: Elm Compiler Written in Elm

#54
eie.io would be an awesome domain name for this project. Too bad it's already parked by a squatter as a "premium name". (For non-native or non-Western English speakers, it's a line from the children's song "Old McDonald Had a Farm".)

Re: Elm Compiler Written in Elm

#55
post #39
post #33

Earlier quoted context omitted.

> Elm main team has been defensive against forks What does that mean? I know they have a strict vision of what features are better left out, and in a way I wish more langs'd be vocal about that. Go does the same and they seem to get a lot of praise for it. Just like in Go, the Elm team only allows some features to be used by their own (std-) libraries. This, again, is a design choice. No group was hurt enough to "for…

Go is open to forks and PRs though. It’s more “we’ve got a vision, but we’ll hear you out”. Elm is full cathedral, Elm comes down from the gods with no input or transparency into the decision process. The Elm developers have a history of ostracizing people who even mention the possibility of forks from the community; tester89 posted a link with a lot of good context. They take a very heavy handed and adversarial stan…

Sounds like Go's cathedral has a nice little bazaar in front, once a year, only for those who applied and were grated. In other words: better marketing.

I'm not defending Elm team members being rude. But when I look at Elm I see a much better designed language than Go, run by a much smaller team. Elm changes quite minor things in pre-1.0. Go forgot that polymorphism is cool, nulls are bad, etc. Now Go wants to fix some of that, but that would create a new notion of idiomatic Go that it's std lib is not in sync with.

To some extend this is a fate all popular languages befall. Look at Java for some sci-fi, or even better C++.

Re: Elm Compiler Written in Elm

#56
post #7

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.

I write Elm and I hire Elm (and Haskell) programmers. It works great for our business so we’re going to continue doing that.

Re: Elm Compiler Written in Elm

#57
post #39
post #33

Earlier quoted context omitted.

> Elm main team has been defensive against forks What does that mean? I know they have a strict vision of what features are better left out, and in a way I wish more langs'd be vocal about that. Go does the same and they seem to get a lot of praise for it. Just like in Go, the Elm team only allows some features to be used by their own (std-) libraries. This, again, is a design choice. No group was hurt enough to "for…

Go is open to forks and PRs though. It’s more “we’ve got a vision, but we’ll hear you out”. Elm is full cathedral, Elm comes down from the gods with no input or transparency into the decision process. The Elm developers have a history of ostracizing people who even mention the possibility of forks from the community; tester89 posted a link with a lot of good context. They take a very heavy handed and adversarial stan…

> basically breaking everything

This is unnecessarily dramatic, and far from the truth.

Re: Elm Compiler Written in Elm

#58

eie.io would be an awesome domain name for this project. Too bad it's already parked by a squatter as a "premium name". (For non-native or non-Western English speakers, it's a line from the children's song "Old McDonald Had a Farm".)

Premium names aren't squatted but designated as such by the central registry. For the TLDs .ac, .io, and .sh those are previously unavailable short domains that are now released to public and auctioned by Divido, the company that has set up the site you see.

Re: Elm Compiler Written in Elm

#59
post #9
post #7

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.

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 navigat…

> 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

#60

I really would love to have this compiler have a llvm backend. I like the idea of a small FP language with amazing error messages. Haskell is too big and complex for me.

I've briefly looked at LLVM and how to interface with it but back then I didn't find much else than some C++ Builder API. I'd hope for some textual format that I could give to LLVM as an input. I assume it exists and that I've just been googling wrong :) Would definitely appreciate some pointers in that regard. Other than that my best bet for native binaries is most likely compiling to C or GraalVM (which already exi…

As the other comment says, LLVM has a text based IR. But you may also want to look into QBE which is simpler and lighter weight than LLVM but has a similar text interface so you could start with that to get up and running, and then add support for llvm later.
Post reply on HN