ng0
How do you decide if Elixir is "right" for a job? (implementing Purely Functional Operating Systems)
I wasn’t sure where exactly to put this. On a mailinglist I would’ve just mailed it to the best ‘advisory’ related list. Move it if Q/H is not fitting.
Hi,
a couple years back I started out on the purely functional operating systems path. During my years of contributions to Guix and GuixSD I started designing a different approach. Guix is mostly Guile (Scheme) based with some (fading) remains of Nix daemon code.
It took a while (longer than I initially hoped for) to gather first hand, practical expertise about these OS and their managers (they manage more than just packages). So pretty close to releasing a first demo of plant (and infotropique OS), I have started an evaluation of Nix(OS) and Guix(SD). Their implementations and so on. Let’s say that the people I work with, including myself, would like to have a final check if there’s a better suited language than Guile.
I’m not looking at just Erlang and Elixir alone, but since I’m new to both languages there’s a certain appeal in them. I’m not sure if people are familiar with these (relatively) new Operating Systems (albeit ‘functional OS’ is not a completely new research field): https://grosskurth.ca/bib/2006/dolstra-thesis.pdf.
Finances play (almost) no role, but: is the idea of implementing the relevant parts of the thesis in Elixir an impossible act and it’s just my gut feeling playing tricks on me by making Elixir look like a tempting language?
I am biased by how it is all stitched together in Guix. My work so far outside of it is stripping it down into the smallest parts possible with a future focus on a modular OS building framework (with many extras). Obviously there are times when Elixir and the BEAM are not the best tools for the job. Other than gaining experience through reading and discussions with more experienced Elixir programmers, how do you figure out if Elixir is “right” or “wrong” before you can fully grasp the ways you’d need to rewrite (or start from scratch) your application/OS without sacrificing its core ideals and functionalities?
I just have ideas and experience outside of Elixir and Erlang, so I hope these rather general questions are not too early (I will probably have a document to point to in a couple months), too open.
For the casual by-passers who might be familiar with my name: this is mostly a theoretical question - my work, no matter how the evaluation ends up, is with an emphasis on collaboration and sharing of ideas, and extending ideas.
Most Liked
gregvaughn
I’m not at all familiar with Guix, so forgive me if my comment is completely naive.
I think of BEAM as nearly an OS itself. BEAM really just needs the OS to provide memory, a few threads, and do IO when asked. There’s even the Erlang on Xen project that runs a customized Erlang VM as a guest OS on the Xen hypervisor. Given that Elixir will give you the BEAM it almost seems like cheating to implement an OS with it.
As far as knowing when Elixir is “wrong” and needs a rewrite, I can only speak from an application perspective. If you have concurrent activities and want fault tolerance, it’s hard to beat Elixir (or any BEAM language to be fair). However, if you have CPU-heavy activities, you may want to write them in some other language and use Elixir to coordinate calls to them.
WildYorkies
Just adding Mirage (which uses OCaml) here: https://mirage.io/
ng0
Since my original design for the system has changed quiet a lot after the first experiments,
I am currently looking again into the past (which happens too rarely these days), and beyond that the possibility of using other languages.
Regardless of the result I might end up returning with more questions, so far I’m just reading books, papers, etc.
The combined living documentation of Elixir and Erlang communities and community-documentation like material is already far better than the specific Scheme implementation Guile Scheme which I have been using for the last couple of years.
mkunikow
There is also OS in Rust https://www.redox-os.org/
And
ng0
Okay, I appreciate the links although I know all of the software shared in the posts so far, but did you read the original post which was about Nix and Guix (and NixOS and GuixSD)?







