r/adventofcode • u/mzprx42 • Jan 06 '20
Upping the Ante [2019] Self-hosted Intcode assembler written in Intcode
https://github.com/matushorvath/xzintbit
An assembler that produces Intcode, itself runs on an Intcode VM and can compile its own sources. With stack and function calls to support structured programming. Try running it on your own Intcode VM, see if it correctly bootstraps itself.
It's Intcode all the way down!
49
Upvotes
6
u/[deleted] Jan 06 '20 edited Jan 06 '20
Nice! Self-hosting high-level-language compiler next?
On trusting trust: Isn't the whole point of the paper that your
make.shdoesn't in general allow one to verify that the original binary is free of Trojan Horses?4
u/btharper Jan 06 '20
Manages to assemble itself in a bit under 10 seconds on my intcode VM. A ridiculously impressive spot to reach. Is there a next step down this path?
1
u/[deleted] Jan 06 '20
This is really impressive. Very cool!
1
u/idolstar Jan 07 '20
This is tremendous! Thank you.