Programming Leftovers
-
Packing a string of digits into an integer quickly
A problem remains: Intel and AMD processors are little endian, which means that if I load the string in memory, the first byte becomes the least significant, not the most significant. Thankfully, Intel and AMD can handle this byte order during the load process.
-
Observability Driven CI
Tracking where the time goes in your CI pipeline is an important step towards being able to make it go even faster. Up until somewhat recently, the only way of tracking how long tasks took in CI was either hoping people had wrapped all their commands in time ..., or by reading a timestamped build log and calculating the difference between numbers. Which isn’t great or fun, if we’re being honest.
What if we could create graphs of what parts of the build took time? Something like this?
-
Compressed arbitrary sections
This article describes SHF_ALLOC|SHF_COMPRESSED sections in ELF and a proposed linker option --compress-sections to compress arbitrary sections.
-
Array Languages: R vs APL
I’ve been learning at least one new programming language a month through Exercism which has been really fun and interesting. I frequently say that “every language you learn teaches you something about all the others you know” and with nearly a dozen under my belt so far I’m starting to worry about the combinatorics of that statement.
APL isn’t on the list of languages but I’ve seen it in codegolf solutions often enough that it seemed worth a look.
-
Porting the Portable C Compiler (PCC) to Illumos
Hot off the heels of getting Oracle Developer Studio 12.6 running on Illumos, I am back with more Illumos compiler support. I got the Portable C Compiler running on my OpenIndiana machine.
-
My Problem With the Four-Document Model
The 4doc model says that user-facing documentation should fall into four categories: [...]
-
Avoiding Footguns
Footguns are features or designs more likely to be misused, often leading to self-inflicted problems or bugs (“shooting yourself in the foot”). See a list of C functions banned in the git codebase for being footguns. Some more examples: [...]
-
Test Against Reality
This post is about how to test modern web applications that have complex external dependencies.
-
What chocolatiering taught me about programming
Chocolatiering is considered an advanced cooking subject because chocolate is a bastard of an ingredient. Cocoa butter is a polymorphic crystal, meaning it forms different types of crystals at different temperatures. When chocolate only has type V crystals, it's smooth and shiny and snaps cleanly. When you have other crystals, it looks like this: [...]
If you want just type V crystals, you need to temper the chocolate. First you get the pot to 50 °C1 to melt out all the crystals, then you let it cool to about 32 °C2, then you agitate it or add seed crystals, and then finally you can work with it until it hits about 27 or so °C3, when it starts to harden.
-
Poor Dude’s Janky Bluesky Feed Reader CLI Via R & Python
Longtime readers know I am most certainly not going to use Python directly, as such practice has been found to cause early onset dementia. But, that module is so well done that I’ll gladly use it from within R.
-
Security Developer-in-Residence – Weekly Report #2
The kicker is that those bundled libraries can have vulnerabilities too! An example of this happening is when pdftopng contained vulnerable versions of libpng (among other libraries) bundled in their wheel. There's also this related issue for the PyPI Advisory database about vulnerabilities in shared libraries.
These bundled libraries don't show up in your requirements.txt or pip freeze so it's tougher for you and your audit tooling to know what libraries and versions are in use.