News for hackers. Stuff that matters.
Re:Tiny-C Compiler by northernskys30 on Monday March 13, 2023 @09:18AM (#35135303)
I did my CS degree at umontreal and this was an assignment in a second year class. This was a pretty interesting introduction to compilers, and even if this is a toy subset of C, this was challenging, at least for me. We would get 0 if there were any memory leak, so we were pretty paranoid about it.

The second assignment was writing a Scheme interpreter.

Re:Tiny-C Compiler by ndiddy on Monday March 13, 2023 @09:51AM (#35135700)
That's kind of surprising they cared so much about memory use, a lot of one-shot C programs such as compilers don't bother freeing memory and let the OS clean up after them once they exit.
Re:Tiny-C Compiler by ComputerGuru on Monday March 13, 2023 @10:11AM (#35135944)
I was about to comment and say the same thing, but as a graded learning exercise there is certainly value in that approach.