https://github.com/llvm/llvm-project
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
There's no discussion about the quality of what Claude did, or even if that was investigated. It's "I see Claude, I call it slop". So look at the contributor list, notice there are ai agents in it, and it's therefore no good anymore.
The PDP-7 is the 18-bit machine the first version of Unix was written on. It turns out that the PDP-7 instruction set is perfect for Forth, and the "next" inner interpreter is only three instructions, the first being the "xct" execute indirect instruction. It's one of the most elegant implementations of Forth I've ever seen, and has an efficient threading model unique to the PDP-7 that I've never encountered anywhere else.
https://github.com/MitchBradley/pdp7forth
https://github.com/MitchBradley/pdp7forth/blob/main/src/kern...
" --- NEXT: the inner interpreter ---
" Only LAC/LAW-tag cells fall through to "dac i 012"; CAL/JMP-tag cells
" transfer control elsewhere and never reach it.
next: xct i 010 " pre-increment IP, execute the thread cell
dac i 012 " push AC (only reached by constant/variable cells)
jmp next
https://en.wikipedia.org/wiki/Threaded_code#Threading_modelsIt is a hybrid that Wikipedia’s list of threading models doesn’t name explicitly: instruction-encoded threading, with the behavior of indirect threading but without its usual code-field lookup. The project’s design notes describe it as:
Essentially ITC, but the code field is implied by tag bits in each thread cell rather than stored in the body.
The PDP-7 emulator that Claude and I made runs PDP-7 Forth like a bat out of hell. And the point is that if it's this good with antique esoteric PDP-7 assembly, then it's so much more proficient with modern assembly and high level languages that are orders of magnitude more widely represented in the training data like StackOverflow and GitHub, including TypeScript and Python.
https://youtu.be/lo8kdY-5i6c?t=867
OK, I held up my end of the bargain, and gave you the links to high quality AI generated code that you demanded, and even a video demo that shows and explains why it's so elegant and efficient and high quality. As you can see, the PDP-7 emulator also runs the original version of Unix flawlessly.
PDP-7 Forth is a small enough example to inspect, and I've explained the specific design choices I admire. If you think it's low-quality code, what is wrong with it? Can you optimize the inner loop any better, reducing it from 3 instructions to 2?
Before you complain you don't know PDP-7 assembly language: Neither did Mitch or I, but now thanks to Claude's help, we're learning a lot about it with hands-on experience, enough to make CPU and device emulators, an assembler, a disassembler, data visualization tools, improve and extend the Forth system itself, implement device emulators and drivers and apis and testers, and integrate PDP-7 assembly language libraries written in the late 1960's into it and run them. Can you do that yourself without AI in a couple of weeks, while having as much fun as Mitch and I did?
So why don't you review and criticize that code you asked for without using AI, tell me how you would have implemented it differently, then link me to some code you have written yourself without using AI that's at least as elegant as Mitch's PDP-7 Forth, and explain why.