Programming Leftovers
-
Chris Wellons ☛ Slim Reader/Writer Locks are neato
I’m 18 years late, but Slim Reader/Writer Locks have a fantastic interface: pointer-sized (“slim”), zero-initialized, and non-allocating. Lacking cleanup, they compose naturally with arena allocation. Sounds like a futex? That’s because they’re built on futexes introduced at the same time. They’re also complemented by condition variables with the same desirable properties. My only quibble is that slim locks could easily have been 32-bit objects, but it hardly matters. This article, while treating Win32 as a foreign interface, discusses a paper-thin C++ wrapper interface around lock and condition variables, in my own style.
-
Sandor Dargo ☛ So shall we use static or dynamic linking?
Last week, we were talking about static vs dynamic linking from a binary size point of view. Around the end of the article, I wrote that I omitted other aspects.
Now let’s talk briefly about some of those omitted aspects.
-
Seth Godin ☛ The opposite of ‘perfect’
By definition, good enough is good enough. If the spec isn’t what you need, change the spec. But perfect is unattainable and perfect is a place to hide.
-
Fred Herbert ☛ Carrots, sticks, and making things worse
I've been in reviews where people stated things like "we know that we get yelled at more for delivering features late than broken code so we just shipped broken code since we were out of time," or who admitted ignoring execs who made a habit of coming down from above to scold employees into fixing things they were pressured into doing anyway. These can be hurtful for an organization to consider, but they are nevertheless a real part of how people deal with exceptional situations.
-
Tony Garnock-Jones ☛ Hot code reloading in Erlang without using an OTP release (eighty-twenty news)
“Erlang supports change of code in a running system.”
However, the details are a bit fiddly. Here’s a cheat-sheet I used recently for a simple TCP service written using Erlang.
My program was a single module, running outside of any OTP application context. The instructions here need minor emendation to either explicitly list modules to purge and reload or to discover all modules within a single application; see the places in server-reload below mentioning the atom my_server.
I did not use the -on_load() directive, because I wanted to be able to use multiple nodes rather than controlling reloads from a single node’s shell repl, and I couldn’t figure out how to make the two play nicely together.
-
Qt ☛ Qt for Android Automotive 6.7.3 is released
The latest patch release for Android Automotive 6.7.3 is just released. This release is based on Qt 6.7.3 with many bug fixes, security updates, and other improvements on the top of Qt 6.7 release.
-
Andy Wingo: preliminary notes on a nofl field-logging barrier
When you have a generational collector, you aim to trace only the part of the object graph that has been allocated recently. To do so, you need to keep a remembered set: a set of old-to-new edges, used as roots when performing a minor collection. A language run-time maintains this set by adding write barriers: little bits of collector code that run when a mutator writes to a field.
Whippet’s nofl space is a block-structured space that is appropriate for use as an old generation or as part of a sticky-mark-bit generational collector. It used to have a card-marking write barrier; see my article diving into V8’s new barrier, for more background.
-
Collabora ☛ Upping the Hey Hi (AI) game at the GStreamer Conference 2024
For the first time in over a decade, the GStreamer Conference will be taking place in North America, and we're prepped and ready with no less than 9 talks to share! Catch the latest developments and Hey Hi (AI) advancements for this multimedia framework.
-
Josef Strzibny: Upgrading from Kamal 1 to Kamal 2
Here's some possible steps to take and notes from upgrading a single server Kamal setup to the new Kamal 2.
-
Shell/Bash/Zsh/Ksh
-
Chris Done ☛ Hell: Shell scripting Haskell dialect
Hell is a shell scripting language that is a tiny dialect of Haskell that I wrote for my own shell scripting purposes. As of February, I’m using Hell to generate this blog, instead of Hakyll.1
-