enter the dragon
a wild GPT appears
Around the start of 2023, I ran into a brick wall with my prototype interpreter. It worked, after a fashion, but I found that I couldn’t make changes to it without breaking things : the code was too convoluted, there was no documentation, and there weren’t enough tests. As a workbench to let me experiment with language ideas, it was a failure; it was time to throw it away and write the “real” version, zinc (the zero incremental compiler).
If the prototype was the Kitty Hawk, zinc would be the F-16 Falcon : well-engineered, well-documented, and fast as a bat. Its job was to demonstrate, in the clearest way possible, what it would feel like to be able to write fast code in a simple language with instantaneous compilation.
always read the instructions
Since I knew that at some point I was going to hire a coder, it made sense to consider their on-boarding experience and write proper human-readable documentation from the get-go. So I adopted a “documentation-first” approach, writing the instruction manual for each new piece of code before I wrote the code itself. The documentation looked something like this:
Counter-intuitively, writing the documentation first made the code better. If the description was convoluted, it was a sign that the code would be, too; simplifying the documentation forced me to think about the problem more deeply, and the code improved.
I also rigged up a fancy little build script that would hoover up the code snippets from the documentation and turn them into actual test code, which would run whenever I changed something, and alert me if I broke something by accident. I was rather pleased with myself - I’d reduced two onerous jobs to one fun one.
In the back of my mind, a prototype was hatching: a little web editor that would let me edit code as if I was writing a blog post. It would run the code snippets automatically, and show me the result of each line of code, right there on the page, rather than in a spew of text in a console readout somewhere.
A nice idea, but I knew it was a distraction, so I stuck the course and ploughed all my efforts into making zinc the best compiler it could possibly be.
if we took a holiday
In March 2023 (the start of cherry blossom season), we set off for a month-long adventure in Japan, starting with a side trip to a little island in the Philippines called Palawan.
We checked in to find, to my delight, that the room had excellent wifi. Sitting on the balcony after dinner with nothing to do, I decided I needed a distraction.
“I know,” I thought, “I’ll have a go at writing that little web editor I was thinking about, and see if GPT 4 is any good as a coding assistant.”
So I sat there under the stars, and began. First with skepticism, then with grudging admiration, and finally with flat out, jaw-on-the-floor disbelief. By the time 10am rolled around, I’d finished the first version and started on the second. I ended up not sleeping for four days straight.
The result was zerp : a new, and radically simpler, way of writing code.
ice skates for coders
Over the next week, I found myself writing version after version of zerp, each time getting better and better. With each version, I accomplished in a day what would have previously taken me weeks, if not months.
It wasn’t that GPT 4 was writing all my code for me, far from it - it could handle writing small functions, but stumbled over anything more complicated. Instead, its use was as a replacement for normal documentation.
One of the reasons I’m so hugely effective as a C++ coder (if I do say so myself) is that over the last twenty-five years, my brain has pretty much soaked up everything I need to know. So I can just sit down and, you know, write code.
And that means I stay in flow state - that exalted state where my mind is at one with the code, my eyes are closed, my fingers move so fast they blur, nearby household objects and pets levitate, sugar cubes in teacups immediately dissolve, lightbulbs dim across the city, that sort of thing.
With web coding in Javascript or Python, I don’t have the benefit of that experience. So even the simplest tasks have me scouring whatever documentation exists on the web - which at that time meant a combination of web manuals, and a website called Stack Overflow. That takes me out of flow, and so instead of gliding over the frozen fjords, I’m back swimming through treacle.
With GPT 4, if I needed to know how to do something, I just asked - and would immediately get the correct code back, and stay in flow state. Over time, I began to internalise that knowledge, and gradually get faster and more effective.
It was as if I was reborn as a programmer - I felt an incredible surge of power, the feeling that once again I could do anything I set my mind to.
Only one little problem: it called into question the entire project.
I mean, if Large Language Models are this powerful already, everyone’s just going to be writing programs in English, right? Well, except the Chinese, obviously, and the Germans and the French and the Spanish, but you get my drift. In fact, nobody’s going to be writing code at all, are they?
So what’s the point of a programming language like zero? Or a feature-modular operating system and computer?







