radar
Writing an interpreter in Go (Elixir version)
Recently I’ve been reading Writing an interpreter in Go, but have been writing the code in Elixir instead, because I prefer Elixir’s syntax to Go’s.
I’d thought I share it here because others might be interested in what such a thing could look like in Elixir – although my code isn’t “perfect”. I’ve also been cribbing bits from a more complete implementation by fabrik42 too. But I’ve been trying to figure stuff out myself first.
I can imagine that you could possibly adapt this to things like writing a Markdown interpreter / parser too.
I don’t know how far I’ll get through the book, but it has been an interesting exercise so far to see how the code between the two languages translates, as well as it being my first time building anything like this. I usually spend my time in web-app land.
Anyway, thought it would be of interest to the forum ![]()
First Post!
zinclozenge
Last Post!
radar
The book has explained things pretty well so far in the 40 or so pages that I’ve read. He has a conversational writing style that I can appreciate. He writes some code and then explains what it all does.
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









