top | item 33093666

CMSC 430: Design and Implementation of Programming Languages

191 points| ingve | 3 years ago |cs.umd.edu | reply

52 comments

order
[+] scottmsul|3 years ago|reply
I took this exact class exactly one decade ago (Fall 2012) when it was taught by Jeff Foster! One of my all-time favorite classes. The main language used was OCaml, and we ended the course by writing a compiler for a made-up minimalistic OOP language.

Funny story, I mixed up the due dates for one of the projects and didn't realize the correct date until the day before. Somehow I managed to do the entire project in one sitting, working from about 3pm-midnight. I basically took over an unused room in the math building and scribbled all over the chalkboards until I internalized everything, then the coding wasn't too bad. I even remember ordering DP Dough about halfway through, those were the days haha.

OCaml was one of those languages where I would stare at the problem for an hour, then realize the solution in a sudden epiphany, and it would only require a couple lines of code.

[+] legerdemain|3 years ago|reply
Got a favorite 'zone from DP Dough? I used to get the Fancy Zone a lot.
[+] tomcam|3 years ago|reply
That overnight implementation is badass
[+] jasmaa|3 years ago|reply
This and computer networks were my two favorite courses from university. My first language was Python, so the connection between programming languages and the machine had always felt like magic. This was the one course that helped dispel some of that thinking for me.

Each module builds on top of the next and has you add increasingly complex features to a toy language. The course I remember was flipped classroom, so it's also entirely possible to do online. On top of that, Jose's video lectures are very well-made and engaging. I would recommend anyone with some free time and even a bit of interest to throw it at this. It's a fun and eye-opening experience if you were like me and knew nothing about compilers before.

[+] jmct|3 years ago|reply
Those are my videos!
[+] MisterTea|3 years ago|reply
Take a microprocessor class where you build a 8088/6800 board and program it in assembler. Then there is no more magic behind the computer and it becomes a pretty strait forward machine.
[+] satvikpendem|3 years ago|reply
I did not take this course but I took the predecessor CMSC 330, which was about interpreters, and it's fitting that the successor is about compilers. What I liked about 330 was the fact that we learned all three major paradigms of programming, imperative (Ruby), functional (OCaml) and declarative (Prolog). They've since changed the last one to Rust which I feel removes the declarative paradigm from being learned, but Rust is nice too, very similar to OCaml of course given its history.

Anecdotally, I think UMD has one of the strongest and most interesting CS academic curricula I've seen. One of our projects in a class, CMSC 420: Advanced Data Structures, required us to implement Google Maps' turn by turn navigation using octrees, which was unlike anything I've seen in other school's curricula. UMD also has student-led courses that cover things that the CS program doesn't cover, such as full stack apps with React and NodeJS I believe.

[+] wirthjason|3 years ago|reply
This is a great topic. I really like that many approachable and accessible (read: non-textbooks) have come out in recent years. Examples like Thorsten Ball’s Writing a Compiler/Interpreter in Go books and Bob Nystrom’s Crafting Interpreters. NoStarch Press has one coming up too.
[+] newsoul|3 years ago|reply
I hope more and more instructors create such high quality content and put it online for the world to collectively learn and create a better place out there.

I find many instructors in upper level courses do this. But for introductory courses, most materials are locked in. I don't understand why? Only MIT seems to do this consistently (they have huge amounts of money, it seems).

Another such course is : https://cs3110.github.io/textbook/cover.html. Still upper level.

A set of lower level core courses like intro to programming, intro to low level programming, discrete math, algorithm design, etc. will totally change the game. More and more people would be interested in upper level courses then and we would get more researchers and practitioners in the field to march forward.

[+] alexjplant|3 years ago|reply
Hands down my favorite college course. When I took this about a decade ago we used OCaml and associated tooling (ocamllex and ocamlyacc) to implement a toy subset of Ruby that targeted the Lua VM. Operational semantics really knocked me for a loop but I thought everything else was actually rather intuitive and tied together many of the disparate concepts I'd learned in other classes. Shouts out to you for being a great professor if you're reading this Dr. Foster!
[+] kensai|3 years ago|reply
"CMSC 430 is an introduction to compilers. Its major goal is to arm students with the ability to design, implement, and extend a programming language. Throughout the course, students will design and implement several related languages."

I wonder what textbook they use. Is the dragon book still relevant?!

[+] chrisseaton|3 years ago|reply
Most compilers don’t work anything like the Dragon book describes. It’s interesting as an historical artefact but not a reference book.
[+] atonse|3 years ago|reply
I remember taking 330 at UMD and first learning about programming language design, ASTs, different programming langauges.

It was soooo cool. I didn’t take 430 though, favored the classes on network security and protocol design instead.

[+] rootbear|3 years ago|reply
This posting brings back memories. I was a computer science major at the University of Maryland, College Park, in the late 70s. CMSC 330 was then taught by the late John Gannon, a demanding but excellent teacher. He tragically died in 1999 at only 51 years old. CMSC 430, subject of the OP, was also a fun course, but for the projects we had to use PL/UM, a local dialect of IBM's PL/I. The compiler (for our Univac 1108) was written by the professor teaching the class and it was buggy as hell. When we complained that our correctly written project code wouldn't compile or run correctly, the professor said that that was just training for the real world and we should find work-arounds!
[+] schott12521|3 years ago|reply
330 was my favorite non-400 class at umd, I took it with Anwar Mamat (excellent professor) whom, I was surprised to learn, is managing a team at Amazon now.

Learning OCaml was wonderful; learning Prolog was a hellish nightmare.

[+] StayTrue|3 years ago|reply
Looks fun. I only have positive nostalgia for a couple of my CS courses and compiler construction is one of them.
[+] zem|3 years ago|reply
hah, "We will use Racket which, for our purposes is like Ocaml but with nicer syntax." :)
[+] Entinel|3 years ago|reply
Are the lectures available somewhere? This is one of those courses I would love to audit.
[+] chrisseaton|3 years ago|reply
You’re going to audit their course?
[+] zerr|3 years ago|reply
No notes for the original course which used OCaml?