Live data from Hacker News

Lessons learned building a toy compiler

jaseemabid.github.io

21–23 of 23 posts

Re: Lessons learned building a toy compiler

#22
post #2

It's nice to have a small example of how to compile to LLVM, but the compiler is a bit more limited than what the blog post makes it appear. It's not quite `a compiler for simply typed lambda calculus', but only for a small fragment without higher-order functions. One currently cannot write lambda terms that take functions as arguments. I was curious how the compiler represents closures and manages memory, mainly bec…

You are right, the compiler cannot handle much of higher order functions and closures yet. I have hinted how to do that with lambda lifting and closure conversion and I might get it working in the next few weeks. Maybe a part 2 for the blog post.

Yeah, do it! :)

Re: Lessons learned building a toy compiler

#23
post #11

Author of the post here. AMA :)

Hello there! Great post :) I never took a course in writing compilers at University but have always been interested - where would be the best place to start for somebody interested in doing this? To dip their toes into the water if you will?

You can take Stanford's Compilers course for free as an online course from Stanford's Lagunita.
Post reply on HN