Live data from Hacker News

I Built a Scheme Compiler with AI in 4 Days

matthewphillips.info

11–20 of 34 posts

Re: I Built a Scheme Compiler with AI in 4 Days

#11

detractors of AI claim this stuff is in its training data so it could be a copy which is valid. The crazy thing is the fact that it can definitely build something that does not exist.

how many scheme compilers do you think have been written?

Re: I Built a Scheme Compiler with AI in 4 Days

#12
This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun.

Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait.

I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for learning.

Not judging people who use these tools, I use them too, but i just have been using them less for anything I am doing for fun.

Re: I Built a Scheme Compiler with AI in 4 Days

#13
post #12

This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun. Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait. I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for lear…

There is fun in what you use something for and doing the something.

I think there is a big divide between people who just love making different tools from scratch by hand and the rest who love being able to instantly whip up a new tool in minutes AND THEN use it to create something fun.

I literally would never ever in my existence be interested in making a compiler if I had nothing to use it for. If I ever wanted to make a cool program which uses that compiler then whether the compiler came into being thanks to a wizard, my enjoyment wouldn't change a single bit.

Re: I Built a Scheme Compiler with AI in 4 Days

#14
post #12

This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun. Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait. I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for lear…

We need a new pair of words to distinguish these two mindsets. Digging deep, finding abstractions, solutions that would say more with less .. is one kind of fun. Other people want to see the magic happen by doing few keystrokes it seems, they call it fun, i call it death.

Re: I Built a Scheme Compiler with AI in 4 Days

#15
post #12

This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun. Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait. I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for lear…

There is fun in what you use something for and doing the something. I think there is a big divide between people who just love making different tools from scratch by hand and the rest who love being able to instantly whip up a new tool in minutes AND THEN use it to create something fun. I literally would never ever in my existence be interested in making a compiler if I had nothing to use it for. If I ever wanted to…

Yeah no argument here.

In typical tombert fashion, when making an NES game I ended up getting much more obsessed with the tooling around the project than the core project, so when I got it to generate a Forth compiler, I fell down a rabbit hole of learning how compilers work and then feeling cheated out of the actual work.

That said, I'm not a complete luddite here; I wanted a proper comment system on my blog recently, and I don't care enough about web stuff to actually build it myself. I could have used an off the shelf thing but those usually come with a bunch of bullshit involving accounts and the like, so instead I got Codex to build one for me and deploy it and it works fine.

Re: I Built a Scheme Compiler with AI in 4 Days

#16
post #14
post #12

This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun. Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait. I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for lear…

We need a new pair of words to distinguish these two mindsets. Digging deep, finding abstractions, solutions that would say more with less .. is one kind of fun. Other people want to see the magic happen by doing few keystrokes it seems, they call it fun, i call it death.

I mean I guess it really depends on what you're interested in.

There are plenty of projects I have wanted to do that I don't because the "activation energy" is too high, and if I can get a machine to basically get past the boring crap then I can focus on the parts of the project that I think are fun.

Re: I Built a Scheme Compiler with AI in 4 Days

#17
post #12

This is cool, I got Codex to vibe code a Forth compiler for the NES and it worked fine, but I have to say that it is decidedly not fun. Instead of figuring out how to solve every bug and becoming intimately familiar with with the code, I just delegate all the work to virtual interns and I sit and wait. I decided to write my own Forth compiler without AI assistance as a result. Side projects should be fun and for lear…

There is fun in what you use something for and doing the something. I think there is a big divide between people who just love making different tools from scratch by hand and the rest who love being able to instantly whip up a new tool in minutes AND THEN use it to create something fun. I literally would never ever in my existence be interested in making a compiler if I had nothing to use it for. If I ever wanted to…

I agree there’s a big divide. I think I’m also team “let people do things they enjoy.”

I like using computers to solve problems. I’m more interested in the problem being solved than the journey most of the time, though I’ve also been on some lovely journeys. Sometimes that means I write a tool all by myself. Sometimes it means I download an existing open source tool. And sometimes it means I delegate the creation to an AI model.

Re: I Built a Scheme Compiler with AI in 4 Days

#18
> There’s probably more I built that I have already forgotten about.

This is a big gripe of mine at the moment. I rarely have any confidence that I know how the thing works, or what additional things it does / does not do but which I expect.

Recent example: all API endpoints should require a bearer token. Imagine my surprise when half of them didn’t enforce this effectively, 3 days later. A bearer token would work, but also providing no bearer token would also work. Over the course of time, tests were removed / things were modified to get to the goal and say “done, boss!”

I’ll note that for this project, “don’t look at the source code” was a requirement. Things have been corrected before release, but the amount of potential foot guns is so damn high.

Re: I Built a Scheme Compiler with AI in 4 Days

#19

> I run into bugs all the time so it’s probably not ready for anyone other than me to use, but I’ve managed to go pretty deep (if not wide) in just a few days of work. Having similar experience with my experimental code generator to Rust. Every time a yet another example does not work, Claude fixes it. However, I am curious whether it would converge to a bullet-proof solution, or I have to carefully read the code and…

if you're trying to write rust without thinking about the abstractions then yeah, its probably non-terminal. I would strongly suggest making the broad strokes yourself and letting it fill the details.

I have fixed the target data structures and also make Claude compare the generated code against a python reference via PBT. However, the vibe-coded code generator stumbles upon a missed clone/copy case every now and then. This is where I am less certain that it converges.

Re: I Built a Scheme Compiler with AI in 4 Days

#20

detractors of AI claim this stuff is in its training data so it could be a copy which is valid. The crazy thing is the fact that it can definitely build something that does not exist.

how many scheme compilers do you think have been written?

Probably many SICP or "Write Yourself A Scheme" readers have pushed basic scheme compilers to GH.
Post reply on HN