Live data from Hacker News

Advanced Compilers: Self-Guided Online Course

cs.cornell.edu

61–70 of 90 posts

Re: Advanced Compilers: Self-Guided Online Course

#61

When am I going to be able to do self-paced for credit courses from good schools online without the crazy price tag?

Why should online classes be any cheaper? I'm not talking about self-paced, certificate only classes, where you never interact with a real human. You can already find plenty of these for free from any number of top schools. I'm talking about a real class, for real credit, with a real professor and assignments graded by real humans. Online students end up consuming the same resources as regular students (with the exception of occupying space in a physical classroom). What's more, online students require _extra_ accommodations, since they can't just stop by the professor's office for office hours. They have to setup online meetings for that, etc.

Re: Advanced Compilers: Self-Guided Online Course

#62
post #19

Earlier quoted context omitted.

What do you mean exactly by "compilers"? Because the book features a chapter on how to compile source code to virtual machine byte code.

Most of the time when people talk about compiled languages/compilers, they mean languages that compile to native machine code, not languages that compile to a bytecode/run on a virtual machine.

There's literally no difference in the theory or technique of compiling for a virtual machine or a real one. Real machines are just messier and have a bunch of edge cases and weirdness that require you to read those multi-kilopage manuals to figure out. Having one or more intermediate steps is useful for portability and optimization though, so it's probably a good idea to target a virtual machine unless you only intend to ever target one specific architecture that you know inside and out.

Re: Advanced Compilers: Self-Guided Online Course

#63

Earlier quoted context omitted.

Compiling to machine code is not that hard once you get to the IR or bytecode phase, check out this toy compiler: https://github.com/byo-books/pretty_laughable_lang/

Is that really true? I would expect that going from IR to native code would be the hardest part because you have to worry about architecture and supporting different ISA’s. IR can be simple because it is abstract and hides lots of the dirty details of the hardware.

Generating code is not all that hard. Generating fast code is a challenge. Decoding instructions on some architectures is hard. If you have a nice general IR naively generating native code can be just a table lookup with a register tracking/allocation routine.

Re: Advanced Compilers: Self-Guided Online Course

#64
post #56

Earlier quoted context omitted.

I’d guess “PhD level” just means it’s intended for graduate students in a PhD program. For example, they read and discuss papers rather than just working out of a textbook.

I took this course when it was PL-focused in 2015ish! It starts with an in-depth exploration of the untyped lambda calculus (with the usual fixins like Church numerals, various combinators, etc), spending half a week or so on semantic expansion rules, reduction strategies, recursion, fixpoints, continuations, how one might encode state with only lexical closures, etc. After maybe the tenth lecture, the class takes a…

You’re thinking of 6110 (advanced programming languages) not 6120

Re: Advanced Compilers: Self-Guided Online Course

#65
post #38

Earlier quoted context omitted.

I mean a lot of programming language design goes back decades; it's better to focus a course on the basics that every language will have vs the most recent developments that haven't fully crystallized yet either.

There is a critical difference between programming language design and compiler design. You are right when it comes to programming language design and somewhat wrong when it comes to compiler design. If you are doing compiler research/development, you have to be familiar with the latest and greatest research because the margins for improving things are fairly slim. It’s usually fine to be not familiar with how things…

> If you are doing compiler research/development, you have to be familiar with the latest and greatest research because the margins for improving things are fairly slim. It’s usually fine to be not familiar with how things worked ~30 years ago.

On the other hand, if the margins for improving compiler quality are slim they can be ignored without great consequences: it makes sense to study state of the art research only in the niches that turn out to be relevant for a specific need of a specific project, not blindly and at the expense of important general principles and techniques (i.e. mostly the problems of 75 years ago and the solutions of 25 years ago).

Re: Advanced Compilers: Self-Guided Online Course

#66
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.

Re: Advanced Compilers: Self-Guided Online Course

#67

Love the recommendations people are giving out here, not an exaggeration to say that HN gave me a better CS education than my M.S.

Whenever I need to learn about any topic even non-tech I search it on hn.algolia.com

Same here! well curated resource

Re: Advanced Compilers: Self-Guided Online Course

#68
post #19

Earlier quoted context omitted.

What do you mean exactly by "compilers"? Because the book features a chapter on how to compile source code to virtual machine byte code.

Most of the time when people talk about compiled languages/compilers, they mean languages that compile to native machine code, not languages that compile to a bytecode/run on a virtual machine.

Plot twist - the developer then runs the code in qemu for rapid iteration and ease of debugging... ;)
Post reply on HN