Re:Learn C, Then Learn Computer Science
by hobbyist on Sunday February 09, 2014 @05:48PM
(#7207734)
Could you elaborate more or give some references on the second and third part? I am done with the first. I seriously need some profound knowledge on second and third, which a lot of people like you talk about. I need to put a plan to get there too. Scheme to C looks fun though :-) . Where should I start first with?
[ Parent
| on HN ]
Re:Learn C, Then Learn Computer Science
by gamegoblin on Sunday February 09, 2014 @11:16PM
(#7209086)
If you want to implement Scheme in C, I'd take a look at Scheme From Scratch (http://michaux.ca/articles/scheme-from-scratch-bootstrap-v0_...)
It's pretty excellent for learning how to implement a simple language in C.
Do yourself a service and write the Scheme compiler in Scheme itself, doing direct assembly code generation.
http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf
Also a nice way to learn about bootstraping compilers.
Generating code code for another OS without Scheme support is just a matter of having your compiler cross-compile to the other OS. Then use the fresh backed compiler to re-compile your compiler in the new OS.