Elixir on FreeBSD
So, I deleted my blog. I deleted my sister-in-law's work-in-progress website. I also deleted my Miniflux instance with the PostgreSQL Database it was using. With no back-ups.
Accidentally.
It was all using a single Debian 12 VPS, which I accidentally deleted when I was trying to delete another VPS instead. Dumb me.
I tried my best to deploy everything again, but even though nothing was changed, once again, the Debian's old-is-good-because philosophy took another victim, and this time, it was me. The same problem also happened with Ubuntu. No surprises there. I am also wise enough to know nothing would be different with any of the RPM-based Linux distributions (CentOS, openSUSE, etc.).
A better OS
There was another option, one that boasted stability, and I was pleasantly surprised it wasn't because of the same stupid shit that Linux server OSes so direly suffer from. You guessed correctly, FreeBSD. I started using it. since the first ssh
login, everything was much smoother.
Elixir
I also took the opportunity to rewrite my blog in my new favorite language, Elixir. Yes. I rewrote my Rust blog in Elixir. To continue with the craziness, it is actually much more performant than the Rust version ever was 1.
Now I can absolutely go speak a day and night about how magnificent and wonderful Elixir is. And how, after experiencing Go and Rust, two statically-typed languages, I was surprised that a dynamically-typed language 2 could actually be more reliable than a static one 3. But, suffice it to say that there is hardly any use case on the server-side that I cannot imagine Elixir being the best solution by a huge margin.
Right now, if you inspect this site, you will see two web-sockets being opened, and afterwards, while you are browsing through the site, no additional HTTP requests being made. This is thanks to the power of the Phoenix framework's LiveView library. Did I need that? Probably not. Is it more environmentally-friendly to not establish yet another TCP connection for each interaction, and instead have a 100KB (uncompressed) JavaScript? I am not sure! Was it for practice purposes? Absolutely!
IMadeThisSite.com
I'm also sporting a new domain. IMadeThisSite.com. Why? Well ...:
-
The ownership of
.dev
does not put me at ease. Squarespace, as well as.dev
's previous owner, Google, are not the most reliable and least predatory providers of any service. So my prma.dev domain always feels at a cliff's edge. -
I think I would enjoy putting this URL at the top of my resume, without any further explanations.
-
I mean, it is true! Ain't it?
Some regressions
Along the way, there were a few compromises that I had to make:
-
I no longer use Djot. Why? Elixir does not have a good Djot parser, as of the time of this blog post, and I do not intend to write one for now.
-
I do not use FAMF for the post metadata. It is not because I lost faith in FAMF, I just wanted to see what fancy things I could do with it.
-
There are some speculations that it was because I was using MUSL instead of Glibc. Which I never found out. But it kinds of goes in the face of Rust's motto of "A language empowering everyone to build reliable and efficient software". Which seems only true, if everyone used a Glibc based Linux distribution, otherwise you might get a 10-second, CPU-at-100% load time for a fucking HTML at some unknown point in the code. ↩
-
Only for now. José Valim (the creator of Elixir), Guillaume Duboc (A PhD student), and Giuseppe Castagna (programming language researcher) are working on bringing about Set-Theoric Types to Elixir. And judging by the other design decisions that José made, it is going to be fantastic. ↩
-
It is absolutely not the case for any other dynamically typed language. The reliability comes, not because of the dynamic-ness, but despite it. ↩