ng0

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.

#os

Most Liked

gregvaughn

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

WildYorkies

Just adding Mirage (which uses OCaml) here: https://mirage.io/

ng0

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

mkunikow

There is also OS in Rust https://www.redox-os.org/

And

https://www.functionalgeekery.com/episode-61-susan-potter/

ng0

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)?

Where Next?

Popular in Questions Top

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New

Other popular topics Top

William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New

We're in Beta

About us Mission Statement