Damus
note1n4v7c...
Laurent Bercot profile picture
@Haelwenn /элвэн/ :triskell: I kinda disagree with that. You could write a C compiler, down to the asm generation, in any existing language (that themselves would likely need a C compiler to bootstrap, but that's not the point). The really interesting part is the assembler. Once you have asm, you need to translate it into machine language, and although you could write an assembler in any language, you really want to be able to bootstrap one, so ideally you'd have a micro-asm hand-written in machine language to build your assembler with.

It's the last step that's problematic. Anything above the asm is reading a text file, manipulating some data structures, and outputting a text file. It's a filter, and that can be written in any language.
1
mid_kid · 15w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq0jkeeqdl7q22gw8ax79e4r84e6smhz2wk3ew80ph06nljukle83ql7euty nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqysufjjd485tftr4wy2a83fqyqvtfq0yn820gl8vl6hcsdz8uv2hsu08m52 There's no reason for a C compiler to not compile straight to machine co...