4 ms·
I really want to see a C compiler written in shell.
by emptyparadise 5y ago
I really want to see a C compiler written in shell.
- asdff 5y agohttps://github.com/otakuto/bashcc https://github.com/otakuto/bashcc
- mypalmike 5y agoNow can we unsee it?
- mmcdermott 5y agoIt isn't a good idea for a production system or anything, but the code itself seems pretty clean. I've seen infinitely worse bash scripts than this compiler.
- emptyparadise 5y agoI wonder if it's good enough to bootstrap better and better compilers until you can build full on GCC?
- eesmith 5y agoHere's a couple of projects along those lines. https://bootstrappable.org/projects/mes.html https://bootstrappable.org/projects/mes.html > Mes aims to create an entirely source-based bootstrapping path. https://savannah.nongnu.org/projects/stage0/ https://savannah.nongnu.org/projects/stage0/ > A class of minimal bootstrap binaries that has a reproducible build on all platforms. Providing a verifiable base for defeating the trusting trust attack. (and comments at https://news.ycombinator.com/item?id=20264848 https://news.ycombinator.com/item?id=20264848 ).