2 ms·
A couple of weeks ago I made an absurdly efficient arithmetic expression language compiler in python, complete with a RD/pratt parser, control flow graph IR , o
by vkazanov 4y ago
A couple of weeks ago I made an absurdly efficient arithmetic expression language compiler in python, complete with a RD/pratt parser, control flow graph IR , optimizer (dead code elimination, algebraic, etc) and a simple x86 codegen. Chatgpt wrote most of it.
Then I asked chatgpt to port it piece by piece to C.
Took a while to get a hang of gpt4's token length limitations, as well as fixes here and there... 1.5 hours.
But damn... Most programmers are just not capable of doing this at all.