@nelhage

931 Followers
164 Following
362 Posts
I write software and get mad at computers. Also bake bread and ride bikes.
pronounshttps://pronoun.is/he/him
bloghttps://blog.nelhage.com/

What do you call it when someone writes a dramatization of the trials and tribulations of a bold emacs session heroically handling a keypress which results in writing a single character into the current buffer?

`self-insert-command` fanfiction

🔥⏰

In light of the PSF's recent loss of an NSF grant and attendant funding shortfall, I will be matching donations up to $5000. Send me your receipts.

Very happy if you've already donated for similar reasons but the point is to motivate *new* donations so be sure the timestamp is after this toot 😉.

'Solving Regex Crosswords with Z3' - excellent blog post by @nelhage

https://blog.nelhage.com/post/regex-crosswords-z3/

Talks a lot about experiments with Z3 solver performance improvements by setting up the problem in different ways.

(the post uses qntm's greenery regular expression library to which I did a single pr at some point, fixing a performance problem. I'm still proud of that one 😅)

Solving Regex Crosswords with Z3

Adventures in solving regex crosswords using the SMT solver, Z3. Further adventures and misadventures in making the solver fast, in which I learn about far more Z3 features than I knew existed. Some reflections on Z3 and SMT solvers more broadly.

Made of Bugs

In honor of the late Robert Redford, "Sneakers", in high def ANSI with full subtitles:

ssh [email protected]

(needs a terminal with 24 bit color support)

If you're in the market for Sun Microsystems stuff, and you're in or can get to the Seattle area, the University of Washington's surplus store is auctioning off a bunch of it right now. https://www.govdeals.com/en/asset/6709/6794

After my earlier adventures benchmarking CPython, I ended up going deep down a rabbithole on CPU branch prediction and learning a bunch of interesting things, which I have attempted to write up and share:

https://blog.nelhage.com/post/ittage-branch-predictor/

The ITTAGE indirect branch predictor

Modern CPUs are actually pretty good at predicting the indirect branch inside an interpreter loop, _contra_ the conventional wisdom. We take a deep dive into the ITTAGE indirect branch prediction algorithm, which is capable of making those predictions, and draw some connections to some other interests of mine in the areas of fuzzing and reinforcement learning.

Made of Bugs
latest from @nelhage has way more plot twists than i expected! https://blog.nelhage.com/post/cpython-tail-call/
Performance of the Python 3.14 tail-call interpreter

A deep dive into the performance of Python 3.14's tail-call interpreter: How the performance results were confounded by an LLVM regression, the surprising complexity of compiling interpreter loops, and some reflections on performance work, software engineering, and optimizing compilers.

Made of Bugs

https://bughunters.google.com/blog/5424842357473280/zen-and-the-art-of-microcode-hacking

Shot: "This opens up the potential for hardware attacks (e.g., reading the key from ROM with a scanning electron microscope), side-channel attacks (e.g., using Correlation Power Analysis to leak the key during validation), or other [...] attacks"
Chaser: "We noticed that the key from an old Zen 1 CPU was the example key of the NIST SP 800-38B publication and was reused until at least Zen 4 CPUs."

Blog: Zen and the Art of Microcode Hacking

This blog post covers the full details of EntrySign, the AMD Zen microcode signature validation vulnerability recently discovered by the Google Security team.

@kees I found this because I was playing with the new tail-calling Python interpreter (https://github.com/python/cpython/pull/128718), and discovered that `-fzero-call-used-regs=used-gpr` has a ~3% cost for the tail-calling interpreter, but I believe it's much smaller on the old computed-goto one.