Live data from Hacker News

Advanced Compilers: Self-Guided Online Course

cs.cornell.edu

81–90 of 90 posts

Re: Advanced Compilers: Self-Guided Online Course

#81
post #60

I hope I actually sit down and go through this because this seems like an excellent resource. I took a grad level (they just let us take them as undergrad) compilers course in college and it was the most fun I've had at Uni. It was all SML building a functional language that supported a solid type system with ADTs and parametric polymorphism and it was so interesting to see that it wasn't as complicated as it seemed…

Your comment seems as good a place as any to drop the requisite Yegge compiler evangelism piece: https://steve-yegge.blogspot.com/2007/06/rich-programmer-foo...

Re: Advanced Compilers: Self-Guided Online Course

#82
Thanks for this. His lecture on SSA was the best explanation I've found of SSA vs alternatives that I've found (building up a motivation for why you'd want to use SSA which is lacking in other explanations I've found) - and unfortunately, I'd lost track of where I'd seen it. Was looking for it again recently not having much luck (not on YouTube) And now here it is.

Re: Advanced Compilers: Self-Guided Online Course

#83
post #75

Adrian is a great guy and I highly recommend all his content. For undergrad level PL, I highly recommend Dan Grossman's MOOC[0] or recent class recorded lectures[1]. Dan's thesis work strongly influenced Rust's borrow checker. Disclosure: Dan advised me in undergrad and Adrian is a friend. [0] https://www.coursera.org/learn/programming-languages [1] https://courses.cs.washington.edu/courses/cse341/19sp/ (ctrl-f "Vide…

That sounded interesting. I think it's probably this Dan, https://homes.cs.washington.edu/~djg/publications/, making said thesis "Safe programming at the C level of abstraction", https://homes.cs.washington.edu/~djg/papers/grossman_thesis....

Re: Advanced Compilers: Self-Guided Online Course

#84

Are there any courses on creating a new language, interpreter, and compiler from scratch? Like not using LLVM or similar to generate intermediate representation but to literally pick an ISA and, well, compile for it.

I compiled a basic C program and then read the output of GCC -S to see the assembly. I used what I learned from GCC output Then I wrote a basic amd64 expression compiler with simple live ranges and linear register allocation and ANF (a normal form) for postorder AST traversal for code generation. It can only evaluate nested add and mul expressions. https://github.com/samsquire/compiler or on replit: https://replit.co…

Intel's documentation covers encoding. I remember it being relatively heavy going to decipher, been a few years since I've worked on x64 though.

Re: Advanced Compilers: Self-Guided Online Course

#85

Thanks for this. His lecture on SSA was the best explanation I've found of SSA vs alternatives that I've found (building up a motivation for why you'd want to use SSA which is lacking in other explanations I've found) - and unfortunately, I'd lost track of where I'd seen it. Was looking for it again recently not having much luck (not on YouTube) And now here it is.

This one? https://vod.video.cornell.edu/media/1_130pq2fh

SSA is functional programming (the paper) resonated with me, though I remain unconvinced by phi nodes relative to basic blocks taking arguments.

Re: Advanced Compilers: Self-Guided Online Course

#86
post #60

I hope I actually sit down and go through this because this seems like an excellent resource. I took a grad level (they just let us take them as undergrad) compilers course in college and it was the most fun I've had at Uni. It was all SML building a functional language that supported a solid type system with ADTs and parametric polymorphism and it was so interesting to see that it wasn't as complicated as it seemed…

> My prof developed a production SML compiler that's fairly widely used MLton? I've been playing around on-and-off with a non-production SML compiler and MLton is such a fantastic resource. This is just a hobby for me, but I have read (and own) several different compiler textbooks. What I really want is one that focuses on compiling functional languages down to assembly.

Yes! Professor Fluet was probably the most passionate professor I had. The man has three kids, a full time job as a professor at the university, and still works on MLton, it's incredible.

During our code gen lectures, he had told us that MLtons original (not sure if it's still the default) backend generated C and shipped it over to a C compiler to do the dirty work. I know they have an official x86 backend now too though.

I wish I had resource recommendations for what you're looking for (because it is a super interesting topic), but hopefully MLton can serve as a great resource . PolyML may also be a good resource - not sure though.

Re: Advanced Compilers: Self-Guided Online Course

#87
post #81
post #60

I hope I actually sit down and go through this because this seems like an excellent resource. I took a grad level (they just let us take them as undergrad) compilers course in college and it was the most fun I've had at Uni. It was all SML building a functional language that supported a solid type system with ADTs and parametric polymorphism and it was so interesting to see that it wasn't as complicated as it seemed…

Your comment seems as good a place as any to drop the requisite Yegge compiler evangelism piece: https://steve-yegge.blogspot.com/2007/06/rich-programmer-foo...

[deleted]

Re: Advanced Compilers: Self-Guided Online Course

#90

I wish my school offered something even half good as this. I've seen it like 2 years ago and it is well prepared course. >CS 6120 is a PhD-level Cornell CS course by Adrian Sampson on programming language implementation. I just dont understand why is this "PhD level"

At my school we used the course work of Stanford for the operating system class which was amazing: https://web.stanford.edu/class/cs140/projects/pintos/pintos_... It's really up to the professor.

[deleted]
Post reply on HN