Elm on FreeBSD
Elm is a purely functional, strongly typed language for building web-apps. I recently started playing with elm1 and so far love it!
There was a small bit of trouble though, Elm doesnt officially support FreeBSD. The compiler is written in Haskell and couple of people have made it work on freebsd by compiling from source.
That’s where I started, and soon gave up because compiling
elm 0.19 needs
ghc-8.2.2. That particular ghc version is no longer in binary packages. Stack ghcs are still broken on FreeBSD to try that route. All of the solutions I encountered builds ghc from source and that was going take an eternity on my thinkpad.
Luckily elm project provides binaries for Linux - and FreeBSD can pretend to be linux pretty well. Thats what I ended up doing!
- Load the kernel module for linux emulation.
- Get elm linux binary from github.
- Then brand the ELF binary as type
Linux. Kernel uses this information check decide runtime to use, in our case Linux emulation.
..and there we have it
Shout-out to Tenor and Liz for introducing me to Elm.↩︎