Been building predominantly with Elixir/OTP for a couple years now. Why isn't more of the BTC space using this stack...?
(FYI: Elixir compiles to Erlang bytecode and runs on the same BEAM VM. "Erlang," "OTP," "Elixir" are mostly interchangeable. It's the same runtime, same primitives underneath etc etc).
WhatsApp is famous for supporting >500M users with a small team of engineers, when Facebook acquired them, using Erlang. Discord's backend is Elixir. That's basically the exact shape most BTC teams look like. Small, high stakes, just has to work.
Phoenix LiveView is another one that's genuinely underappreciated. Real-time UI, minimal JS, works cleanly over Tor... feels tailor-made for the frontends we all want to build.
So what is it? Cultural inertia? Rust-maxi thing? Not enough Elixir-native on-chain libraries?
I dunno - am I missing something obvious?
afaik the main reason to reach for erlang is:
(1) is desirable but usually impractical as the majority of programmers fail to make the leap to functional/declarative thinking and, while it may be superior, it is often an unnatural fit for problems. Also, imperative languages allow you to do declarative/functional things without forcing you to do them and most popular languages have all the bells and whistles of functional languages now.
(2) rarely is there a need for real multithreading and multiprocess stuff that isn't better met by fibers/coroutines and RPCs.
WhatsApp launched in 2009, pre-golang and before rust had a stable release. At the time, Erlang might've given them a significant advantage over alternatives but I don't think that's true anymore.
Please show us your Elixir Bitcoin programs.
I looked into Elixir a couple of years ago and couldn't find good examples. (ACINQ using Scala was about as close as I could find .)
ACINQ (from memory) picked Scala for similar concurrency and fault-tolerance reasons. Elixir gets you the same properties on BEAM.
See my reply above to @optimism.
Are there any Bitcoin projects you're using this stack for? Got something to demo? If not, what would you suggest would be a good small project to demonstrate the oversight in stack selection?
Didn't come here to shill, but:
Currently working on a couple of other random (but fun) projects including:
My background is in distributed systems engineering (well before Bitcoin existed!).
Source code for
minted?Take a look at https://minted.is/open
These are all the Elixir (and a couple of Rust) libraries that MINTED uses, which I wrote and released as open source.
iirc River uses Elixir