HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hauleth

85 karmajoined 13 lat temu

Submissions

Guards Guards – small gotcha in Elixir guard expressions

hauleth.dev
1 points·by hauleth·18 dni temu·3 comments

How do I write Elixir tests?

hauleth.dev
2 points·by hauleth·2 miesiące temu·0 comments

My journey in optimising Elixir codebase

hauleth.dev
2 points·by hauleth·3 miesiące temu·0 comments

Who watches watchmen? – Integrating Elixir applications with systemd – part II

hauleth.dev
2 points·by hauleth·3 lata temu·0 comments

comments

hauleth
·11 dni temu·discuss
OP here

> Maybe they wanted to see if you would speak up and handle potential conflict. Or maybe they had a mixup between two candidates.

I did speak up during the call if that is really what they want me to do as I have literally 0 experience with that. It was literally my first action after I heard that. I pointed it out to them, that it is not what I was expecting from this position.

They didn't care. It was how they roll.
hauleth
·11 dni temu·discuss
What do you mean there? What is not short-circuited there?
hauleth
·3 miesiące temu·discuss
I agree that any company would struggle in such case. The thing is that everyone see that GH is pushing for more agents, their Copilot thingy, and AI everywhere, while basic functionality that people relies on is constantly failing.

If you push a lot of new features but your baseline is constantly failing, then something is wrong.
hauleth
·6 miesięcy temu·discuss
Author here - the goal from day 1 was to provide procfs/sysfs-like interface. The additional concepts that I would like to explore are bindings for Khepri[1] or Hobbes[2]. I see a lot of potential in such interface available from Erlang/Elixir/Gleam, as it can provide interesting use cases.

[1]: https://rabbitmq.github.io/khepri/

[2]: https://git.sr.ht/~garrisonc/hobbes
hauleth
·2 lata temu·discuss
Why use a knife when you can use our EveryThingCutter-9000 that requires a week of training to operate.
hauleth
·3 lata temu·discuss
It is using VM green thread, just more primitive one. Just to be more like other implementations (except anode) in original article that do bare minimum to run. Also, this isn't that unusual to use just `spawn/1` for simple and short "one-off" processes.
hauleth
·3 lata temu·discuss
Yes it is. Though until the last paragraph everything is done more or less to be an idiomatic approach to this task rather than "just optimisation". The VM flags part though is solely "optimizing for the benchmark, by cutting features that we would have needed in real-world scenarios". The "RemoteCall" code is pretty idiomatic approach to such problem.
hauleth
·3 lata temu·discuss
It is in the original article [1], though I was made aware that Go implementation is also incorrect as `defer` in it make the memory usage to substantially raise. So instead of:

        defer wg.Done()
        time.Sleep(10 * time.Second)
In original article it should be:

        time.Sleep(10 * time.Second)
        wg.Done()
And memory usage will drop about 2x. I am no Go nor Java developer so I cannot say anything more.

[1]: https://pkolaczk.github.io/memory-consumption-of-async/
hauleth
·3 lata temu·discuss
Author here. If you have any questions, here I am.
hauleth
·4 lata temu·discuss
But what would be a point of doing that?
hauleth
·4 lata temu·discuss
That section was removed as it was leftover from the early drafts.
hauleth
·4 lata temu·discuss
I have removed that part as it was accidental leftover from the early drafts that I forgot to remove.
hauleth
·4 lata temu·discuss
I know about Podman, I just wanted to focus on systemd without additional tooling.

Erlang VM startup is ok, but it is not ultra fast, and it can be easily slowed down with many modules in releases or slow applications. Additionally as it was said - Erlang works best in case of long-running instances where the VM is handling spawning and managing of short lived internal processes.

First draft of this article also included the socket activation and FD passing section, but these were making the article way to long, so I moved them to the Part 2 where I will have more space for them. With socket activation Erlang VM startup time is negligible problem.
hauleth
·4 lata temu·discuss
At the beginning I wanted to add all that information and options, but I thought that it can be overwhelming in this article. I wanted to focus on Erlang <-> systemd communication and basic options.

However it may be nice follow-up article where I will describe full hardening process.
hauleth
·4 lata temu·discuss
Oh, I didn't know about `SocketBindDeny=` and `SocketBindAllow=`. This option may be a little troublesome in case of Distributed Erlang, but in recent versions it can be circumvented. Thanks, I will add it as a better option than adding capabilities.
hauleth
·4 lata temu·discuss
This article? Not at all. Does you need to understand D-Bus to use systemd? Not at all. It is just implementation detail. I have an idea to leverage that in future to slap distributed service management on top of systemd, but in normal operations you will probably never spot that everything is D-Bus backed.
hauleth
·4 lata temu·discuss
Actually I am using Zola, not Hugo, but the theme I am using is modified port of Terminal.
hauleth
·4 lata temu·discuss
No, because these states are set on shutdown, and processes are killed in reverse order. So first the `draining` message will be set and then `drained`.