news
Programming Leftovers
-
Max Bernstein ☛ The GDB JIT interface
GDB is great for stepping through machine code to figure out what is going on. It uses debug information under the hood to present you with a tidy backtrace and also determine how much machine code to print when you type disassemble.
This debug information comes from your compiler. Clang, GCC, rustc, etc all produce debug data in a format called DWARF and then embed that debug information inside the binary (ELF, Mach-O, …) when you do -ggdb or equivalent.
-
Farid Zakaria ☛ Huge binaries: papercuts and limits
This is a good example that only a select few are facing the size-pressure of massive binaries.
-
Marco Roth ☛ Glamorous Christmas: Bringing Charm to Ruby
Today, Ruby 4.0 was released. What an exciting milestone for the language!
This release brings some amazing new features like the experimental Ruby::Box isolation mechanism, the new ZJIT compiler, significant performance improvements for class instantiation, and promotions of Set and Pathname to core classes. It’s incredible to see how Ruby continues to thrive and be pushed forward 30 years after its first release.
-
Arpit Bhayani ☛ What are Blocking Queues and Why We Need Them
Concurrent programming is one of the most interesting and challenging aspects of software engineering. When multiple goroutines need to share data, coordinating access becomes critical.
One elegant solution to this is the blocking queue, a data structure that changes how we think about thread coordination. In this article, we will explore what blocking queues are, how they work, and why they’re essential for building robust concurrent systems.
-
LWN ☛ Stenberg: No strcpy either
Daniel Stenberg has written a blog post about the decision to ban the use strcpy() in curl: [...]
-
Python
-
Simon Willison ☛ TIL: Downloading archived Git repositories from archive.softwareheritage.org
Since this is taxpayer-funded open source software I saw it as my moral duty to try and restore access! It turns out a full copy had been captured by the Software Heritage archive, so I was able to restore the repository from there. My copy is now archived at simonw/sqlite-s3vfs.
-
Hugo van Kemenade ☛ Replacing python-dateutil to remove six
The dateutil library is a popular and powerful Python library for dealing with dates and times.
However, it still supports Python 2.7 by depending on the six compatibility shim, and I’d prefer not to install for Python 3.10 and higher.
Here’s how I replaced three uses of its relativedelta in a couple of CLIs that didn’t really need to use it.
-
-
Java/Golang
-
[Old] Efron Licht ☛ Golang Quirks & Intermediate Tricks, Pt 1: Declarations, Control Flow, & Typesystem
Go is secretly a C-like language that terminates statements with semicolons. The semicolons are actually inserted early in compilation (during lexing). This means you can put multiple statements on the same line by inserting semicolons!
Be warned: gofmt will usually break them up into multiple lines. In fact, you can never have a single-line conditional. (Sorry, ternary conditional fans.)
Still, it can be handy for really small two-statement functions, like in tests: [...]
-
[Old] Efron Licht ☛ Golang Quirks & Tricks, Pt 2
Go is generally considered a ‘simple’ language, but it has more edge cases and tricks than most might expect. In my last article, we covered intermediate topics, like declaration, control flow, and the type system. Now we’re going to get into more advanced topics: concurrency, unsafe, and reflect.
By their nature, these articles are somewhat of a grab-bag without unifying theme, but the extremely positive response to the last one has convinced me they’re worthwhile as a kind of whirlwind tour of more advanced topics.
As before, I’ll link to the Go spec where appropriate. Most code examples link to a demonstration on the go playground.
-
[Old] Efron Licht ☛ go quirks & tricks 3
Go is generally considered a ‘simple’ language, but it has more edge cases and tricks than most might expect. This is the third in a series of articles about intermediate-to-advanced go programming techniques. In part 1, we covered unusual parts of declaration, control flow, and the type system]. In part 2, we touched concurrency, unsafe, and reflect. Here in part 3, we’ll mostly talk about arrays, validation, and build constraints.
-