News for hackers. Stuff that matters.
Re:A minimal C compiler in x86 assembly by mypalmike on Tuesday May 03, 2022 @01:19AM (#31244930)
That an inexperienced C programmer wrote what appears to be 5000 lines of assembly in 24 hours implementing a fully working C compiler seems... a rather extraordinary claim. The file size of around 130K would indicate typing non-stop for 24 hours at something like 100 characters per minute.
Re:A minimal C compiler in x86 assembly by tralarpa on Tuesday May 03, 2022 @02:36AM (#31245374)
> typing non-stop for 24 hours at something like 100 characters per minute

Not only that. It would be typing at that speed without testing anything. In assembly. Haha. In reality what would happen is that you would type 24 hours (not in one day, I assume) and then spend the next days finding the places where you wrote R5 instead of R4.

And, of course, without losing any time on refactoring already written code (changing order of parameters, finding a better name for a function, etc.)

Re:A minimal C compiler in x86 assembly by rscho on Tuesday May 03, 2022 @04:53AM (#31246147)
Inexperienced C programmer probably doesn't mean inexperienced ASM programmer in this particular case.
Re:A minimal C compiler in x86 assembly by kragen on Tuesday May 03, 2022 @08:03AM (#31247277)
People normally touch-type between 300 and 800 characters per minute (50–130 wpm), so even if all of that was typed by hand we're only talking about five hours or so of typing, but you've forgotten about copy and paste.
Re:A minimal C compiler in x86 assembly by a9h74j on Tuesday May 03, 2022 @01:59AM (#31245162)
Maybe GitHub Copilot is that good already.
Re:A minimal C compiler in x86 assembly by Taniwha on Tuesday May 03, 2022 @02:33AM (#31245360)
I think they are talking about the later stages of boot strapping 'stage2' where they are writing a more functional, but still small, C compiler in a C subset that can be compiled by this one