Live data from Hacker News

SBCL: the ultimate assembly code breadboard (2014)

pvk.ca

11–13 of 13 posts

Re: SBCL: the ultimate assembly code breadboard (2014)

#11
post #6
post #5

I’ve read this article every time it’s gotten posted here and it’s always gone a little over my head. I was able to follow how he used 8 x86_64 registers for the VM’s stack slots and how the VM instructions were implemented. How the padding and alignments of each version of the instructions was calculated is impressive and I can imagine how much of a chore it would be to figure out with a normal assembler. Using SBCL…

Try pair reading it with a good thinking LLM like GPT 5.5 or Claude Opus. I found it help me a lot. I have started learning SBCL internal from the beginning of this year with the help of GPT, and I really want to contribute to SBCL compiler someday in future.

They definitely do embrace merging AI slop now, so they might even take pull requests.

Re: SBCL: the ultimate assembly code breadboard (2014)

#12
post #8
post #5

I’ve read this article every time it’s gotten posted here and it’s always gone a little over my head. I was able to follow how he used 8 x86_64 registers for the VM’s stack slots and how the VM instructions were implemented. How the padding and alignments of each version of the instructions was calculated is impressive and I can imagine how much of a chore it would be to figure out with a normal assembler. Using SBCL…

> Using SBCL as a macro-assembler is extremely cool, and then allowing CL code to call into the VM is where it really blows my mind. Absolutely. I think TFA is hooking into the actual code emitter used by SBCL's evaluator-compiler, since it's not actually primitive, but implemented in Lisp and loaded into the image itself. My guess at context: from the earliest days of Lisp, I think there was an expectation that Lisp…

In the early 1990s I worked on a couple of different projects at Apple that were done mainly in Common Lisp. When I was working on one of those, another of them hired a guy named Dave Vronay a young skater and assembly-language game-machine hacker to work on graphics and UI stuff. The Lisp we were using is the one that started as Coral Lisp, became Macintosh Allegro Common Lisp, then Macintosh Common Lisp, then OpenMCL, and more recently Clozure Common Lisp.

I remember stopping with a friend to chat with Dave one day not too long after he joined the team and he was over the moon about how the Lisp exposed not just an assembler, but an interactive assembler: he could write assembly routines, evaluate them, and see them run immediately, and also inspect the in-memory data that they operated on. He seemed so happy.

Re: SBCL: the ultimate assembly code breadboard (2014)

#13
post #8

Earlier quoted context omitted.

> Using SBCL as a macro-assembler is extremely cool, and then allowing CL code to call into the VM is where it really blows my mind. Absolutely. I think TFA is hooking into the actual code emitter used by SBCL's evaluator-compiler, since it's not actually primitive, but implemented in Lisp and loaded into the image itself. My guess at context: from the earliest days of Lisp, I think there was an expectation that Lisp…

In the early 1990s I worked on a couple of different projects at Apple that were done mainly in Common Lisp. When I was working on one of those, another of them hired a guy named Dave Vronay a young skater and assembly-language game-machine hacker to work on graphics and UI stuff. The Lisp we were using is the one that started as Coral Lisp, became Macintosh Allegro Common Lisp, then Macintosh Common Lisp, then OpenM…

Oh wow – were you working under Larry Tesler? I've yet to grasp just the sheer diversity of projects that lived under him in his Apple tenure.
Post reply on HN