3 ms·
This is well timed! I've been starting work on my own strongly-typed functional programming language using Go + LLVM, and this looks like a great reference for
by bitwalker 9y ago
This is well timed! I've been starting work on my own strongly-typed functional programming language using Go + LLVM, and this looks like a great reference for implementing some of the parts I hadn't yet thought out. Though I'm not going the OCaml/MinCaml route, it's still extremely useful to see some of the key compiler stages implemented, since it helps give me a guideline for what has worked for others. Thanks for posting!
- unboxed_type 9y agoWhat is your motivation behind that activity?
- bitwalker 9y agoMostly for my own edification/enjoyment. It's something I've wanted to do for a long time, and once you have that itch, it's just a matter of time. I've built some toy compilers before, but this project I'm aiming a lot higher to see if I can combine some recent research in type theory (algebraic subtyping as an extension of ML-style type inference, effects) and the bits of languages that I would really love to see meshed together (rich pattern matching, including pattern matching on binary data, macros, zero/low-cost abstractions, Erlang-style concurrency with actors/supervision/transparent distribution) and see if I can still find a sweet spot where the language is still approachable, has good tooling, etc. I've accumulated a lot of research and notes, but only recently started working on an actual implementation. At this point nothing is set in stone, since I'm not certain all of those things are actually compatible in a single language, but those are the goals I have in mind for now, so we'll see where it takes me. As for why I chose Go, I wanted something which was pretty portable, with decent performance, easy to build command line tooling in, but at a slightly higher level of abstraction than C; that way I could conceivably port it to C or C++ relatively easily if I felt like that was a better way to go down the road, but could mostly focus on getting things done in the short term. I'm not a huge fan of the OCaml toolchain, even though I like the language, and it's not very approachable for other people if they wanted to pitch in. Go isn't an ideal language to build a compiler in, but it's not bad either. I'm comfortable with it though, and that's all that really matters for a project like this.
- iagooar 9y agoAre you the same bitwalker, responsible for all those great Elixir libraries and Docker images? Wanted to say thank you :)
- bitwalker 9y agoI am! Thanks for the kind words! I don't hear from people using my stuff too often, so it's always good to get some positive feedback :)
- iagooar 9y agoYou're most welcome :) Thank you again for doing a great job, offering your time and brain to improve the Elixir community! I certainly benefit a lot from Distillery and the Docker images that you always keep up-to-date.
- jerf 9y agoYou may find this helpful for writing a compiler in Go: https://godoc.org/github.com/BurntSushi/go-sumtype https://godoc.org/github.com/BurntSushi/go-sumtype
- bitwalker 9y agoThis is great! Thanks :)