Top all-time · #25718
Ben Marx
Personal blog · bgmarx.comprogramming
Ben Marx's personal blog at bgmarx.com covers programming. Since 2019, 3 different Hacker News readers have linked it 3 times. No feed was found, so read it on the site itself.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
HN readers link Ben Marx's posts on Erlang/Elixir NIFs, mainly a 2018 post on using dirty schedulers with Rustler, to explain how long-running native code can block the BEAM scheduler. No commenter praises the writing directly.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- /2018/08/15/using-dirty-schedulers-with-rustler/3 people · 3 mentions · first linked 2019-09-16
What Hacker News says?
Nope, at least not by default or like one would expect from pure Erlang (when it comes to preempting). Been a while since I dug into this admittedly but I write Elixir daily for work (and have for about ten years now). They don’t do the record keeping necessary for the BEAM to interrupt. You need to make sure the “dirty scheduler” is enabled or you can end up blocking other processes on the same scheduler. Here’s a…
Comment linking /2018/08/15/using-dirty-schedulers-with-rustler/
on “Zigler: Zig NIFs in Elixir”They ought to point out the notion of dirty NIFs a bit more prominently: https://bgmarx.com/2018/08/15/using-dirty-schedulers-with-ru... Not crashing is good, but not sufficient to play nicely with the BEAM scheduler. You need to also ensure you're not using up a lot of time in some long-running operation, unless it's a "dirty NIF".
Comment linking /2018/08/15/using-dirty-schedulers-with-rustler/
on “Rustler is a library for writing Erlang NIFs in safe Rust code”I’m not expert here but I think most of that risk is mitigated these days since BEAM introduced Dirty Schedulers/Dirty NIFs for any NIFs that take over 1ms to execute… I think this isolates (or can isolate) their issues to only effecting other work on the same Dirty scheduler, aka other Dirty NIFs… Few quick links: https://www.erlang.org/doc/man/scheduler.html https://medium.com/@jlouis666/erlang-dirty-scheduler-ove…
Comment linking /2018/08/15/using-dirty-schedulers-with-rustler/
on “Bumblebee: GPT2, Stable Diffusion, and More in Elixir”