Live data from Hacker News

Elm Compiler Written in Elm

github.com

41–50 of 84 posts

Re: Elm Compiler Written in Elm

#41
post #13

Earlier quoted context omitted.

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

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.

Looks like the language was created by elm-ui author.

Re: Elm Compiler Written in Elm

#43

Earlier quoted context omitted.

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.

Looks like the language was created by elm-ui author.

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

#44

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 exists as an experimental backend in elm-in-elm via Truffle!)

Re: Elm Compiler Written in Elm

#45
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…

There was a similar project to `go fix` with elm-upgrade (https://github.com/avh4/elm-upgrade). We migrated a ~100k LOC app at work from 0.18 to 0.19 and while it was tedious, the compiler really has your back and makes it easier.

We weren't bit by the removal of native/kernel code, but it definitely turned a lot of people away that may have been committed to Elm before.

Re: Elm Compiler Written in Elm

#46

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…

The textual representation is known as the LLVM IR (the reference is at https://llvm.org/docs/LangRef.html). My understanding (as purely an amateur enthusiast) is that generally using a higher-level builder, like the ones for C++ or OCaml, is recommended, but that it's entirely possible to generate the IR directly.

Re: Elm Compiler Written in Elm

#47
post #23

Earlier quoted context omitted.

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.

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...

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

#48
post #9

Earlier quoted context omitted.

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…

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.

Yup. Try https://fsbolero.io/ . Follows the Elm Architecture.

Re: Elm Compiler Written in Elm

#49

Earlier quoted context omitted.

To give a bit context, Elm main team has been defensive against forks. They are preventing development of features they don’t think worth to them. It’s not possible to publish packages with low-level access without Elm main team approval. The compiler even has built-in DRM about that. My point is more compilers is exactly what Elm needs to flourish. C has several compilers. Python has even”jython”. That doesn’t make…

> It’s not possible to publish packages with low-level access without Elm main team approval. The compiler even has built-in DRM about that. Not calling you out or anything, but could you give a reference on that? I'm curious about what they're doing with a "DRM" in the compiler.

This[0] is actually a better reference; the official post by Elm's creator on how accessing "native" code used to work, and how it now works.

Essentially, the compiler only allows packages published by two official Elm Github organizations to include native code. I'm not sure what the process is if a key "native" feature is missing, as this limitation also drove me away from the language.

[0] https://discourse.elm-lang.org/t/native-code-in-0-19/826

Post reply on HN