Live data from Hacker News

Advanced Compilers: Self-Guided Online Course

cs.cornell.edu

51–60 of 90 posts

Re: Advanced Compilers: Self-Guided Online Course

#51

> I wish my school offered something even half good as this. Me too. In my school, we had great introduction/mid-level classes but at the graduate level, I found our classes underwhelming. Mostly Prof/Researchers teaching their narrow specialties and trying to recruit PhD students, but without putting much time in their lectures as they didn't care about teaching. Bunch of slides, research papers to read. They wouldn…

I'm in a Master's (and possibly jumping to PhD) program at a Big Tech School that you've probably heard of -- and that's my feeling as well. Fairly underwhelming. Lots of online resources to chase after to catch up to the state of the art, but a lot of the courses are things like the history of, and developments of, the technology. Worth knowing, but I don't need multiple, year-long adventures in this stuff -- get me…

I used to think like this until I actually spent some time with the modern things after learning a lot of the historical development paths. A lot of research is stitching together disparate ideas that have developed in their own little community silos. The best skills you can learn as a researcher are to appreciate, recognize (non-surface level) similarities between, and how to synthesize existing research.

There's an awful lot of cult of the new that goes on in modern research.

Re: Advanced Compilers: Self-Guided Online Course

#52
post #24
post #19

Earlier quoted context omitted.

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.

Is that true? I think of C# and Java as compiled languages and they run on the CLR/JVM which are both virtual machines.

Both have JITs. So someone wrote a compiler from CIL/JVM bytecode into native code.

Re: Advanced Compilers: Self-Guided Online Course

#53
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…

Again this is not necessarily for someone doing compiler research, but foundational knowledge for anyone at the PhD level.

Someone doing compiler research this might be a first graduate level course to get them used to the technique and concepts used in more recent research for the might have two or three additional courses getting closer and closer to state of the art.

Re: Advanced Compilers: Self-Guided Online Course

#54
post #7

Earlier quoted context omitted.

Check out https://mitpress.mit.edu/9780262047760/essentials-of-compila... Author has made complete draft PDFs for both the Racket and Python versions available here. https://wphomes.soic.indiana.edu/jsiek/

Thanks, highly appreciated. I tend to be biased towards what Jeremy Siek himself markets as "Proven in the classroom" when it comes to book authors in CS. Many book authors lack this experience and simply write for themselves, which is ok, but can result in bad didactics. Good teachers and authors from academia are invaluable.

That's a great point about experience teaching the topic. (I've written a few articles where I certainly wished for that experience.)

I just wish textbooks didn't have their own bad tendencies: they have pablum as an attractor, because on average students just want to get through the class, not doing too much worse than average among the other students. Even without this problem, there's a more basic one: like with enterprise software, the decision to buy the book is not typically up to the user. "Will people actually want to read this on their own time?" is a strong driver of quality, even though it has pitfalls too.

Re: Advanced Compilers: Self-Guided Online Course

#55
post #43

Earlier quoted context omitted.

An important component of credit courses is the time limitness so this seems unlikely to happen.

> An important component of credit courses is the time limitness Huh? Why would that be an important component? I mean I know that it's typical for courses that come with credit, but in my mind it's just a side effect of the administrative side of providing courses, not something that's at all central to accreditation. I.e. if you build up the knowledge over a longer period (which you can still do with e.g. resits) t…

Mostly because self-paced = doesn’t finish.

Read any of the research on MOOCs and it becomes clear that we don’t have a clue how to write a self-paced course people finish with any regularity.

Re: Advanced Compilers: Self-Guided Online Course

#56

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"

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 quick detour to talk about predicate logic, Hoare logic, dynamic logic, and Kleene algebra, before deriving a typed variant of the lambda calculus as an illustrative pathway into the latter half of the course featuring algebraic datatypes, unification, type inference, and the duality between formal logic propositions and typing systems. We explored subtype polymorphism, bisimulation, equirecursive equality, and closed on a gentle introduction to monads (of all things) and a teaser of category theory (which IMO should have been taught first but oh well).

As more of a math course than a computer engineering course, 6120 was a first-semester Ph.D. level class, and I certainly wouldn't recommend taking it unless you really wanted to dive deep into the depths of programming language implementation. Incoming students were expected to be fluent in discrete mathematics and formal proofwriting skills. I wasn't, so I found myself falling behind at the start even though I had some familiarity with lambda calculus and algebraic datatypes. You definitely benefit from a strong math background.

Re: Advanced Compilers: Self-Guided Online Course

#57

Earlier quoted context omitted.

I'm in a Master's (and possibly jumping to PhD) program at a Big Tech School that you've probably heard of -- and that's my feeling as well. Fairly underwhelming. Lots of online resources to chase after to catch up to the state of the art, but a lot of the courses are things like the history of, and developments of, the technology. Worth knowing, but I don't need multiple, year-long adventures in this stuff -- get me…

I used to think like this until I actually spent some time with the modern things after learning a lot of the historical development paths. A lot of research is stitching together disparate ideas that have developed in their own little community silos. The best skills you can learn as a researcher are to appreciate, recognize (non-surface level) similarities between, and how to synthesize existing research. There's a…

> modern things after learning a lot of the historical development paths

While not research, it is nontheless interesting to watch every generation of programmers (including mine) re-discover RDBMS after tripping over all the pitfalls with the hot new stuff.

Re: Advanced Compilers: Self-Guided Online Course

#59

Earlier quoted context omitted.

This does not cover compilers. I know because I specifically asked munificent (the author) about this before and he mentioned some other books to look at.

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.

Re: Advanced Compilers: Self-Guided Online Course

#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 to implement (although time consuming to iron out bugs).

My prof developed a production SML compiler that's fairly widely used, so he was the best resource I could have asked for. Such a humble guy as well. The thing that was most interesting to me was the use of ADTs on the implementation end. I couldn't imagine how much more tedious it would be dealing with the many types of trees a compiler deals with without them.

The class's impact on my overall career isn't direct, as I don't work near the compiler space at all (unfortunately), but there were so many good type level concepts I got out of that course. Plus, it was just a blast. Late nights with a bunch of tmux panes ironing out bugs to rack up test coverage - such fond memories :)

I highly recommend playing with compiler implementation for anyone that's unfamiliar. There are a lot of good introductory resources out there and they're just such a fascinating part of our industry. A beautiful cross roads between CS theory and practical application.

Post reply on HN