[HN Gopher] CMSC 430: Design and Implementation of Programming L...
       ___________________________________________________________________
        
       CMSC 430: Design and Implementation of Programming Languages
        
       Author : ingve
       Score  : 157 points
       Date   : 2022-10-05 10:43 UTC (12 hours ago)
        
 (HTM) web link (www.cs.umd.edu)
 (TXT) w3m dump (www.cs.umd.edu)
        
       | scottmsul wrote:
       | 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.
        
       | kensai wrote:
       | "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?!
        
         | medo-bear wrote:
         | they dont use a textbook. they have notes. it looks like the
         | course uses Racket lang
         | 
         | https://www.cs.umd.edu/class/fall2022/cmsc430/Notes.html
        
         | kfir wrote:
         | https://www.cs.umd.edu/class/fall2022/cmsc430/Texts.html
        
         | chrisseaton wrote:
         | Most compilers don't work anything like the Dragon book
         | describes. It's interesting as an historical artefact but not a
         | reference book.
        
           | pjmlp wrote:
           | In fact, even though it is an oldie by now, the Tiger book
           | provides much better overview of how to write a compiler, end
           | to end.
           | 
           | https://www.cs.princeton.edu/~appel/modern/
        
             | avgcorrection wrote:
             | Even though? It is much younger than the Dragon Book, as
             | you know.
        
               | pjmlp wrote:
               | Some would discard it given its age, even so.
        
               | vkazanov wrote:
               | The dragon book saw multiple revisions. The authors
               | always stayed on the theoretical, almost detached, side
               | of things. Most of the deeper material is dedicated to
               | things closer to theory of computation than practical
               | compiler building. Practical stuff is shallow at best.
               | 
               | The tiger book, otoh, does a great job of leading the
               | reader all the way from high level stuff to a realistic
               | functional language compiler. And Appel, by the way, is a
               | great technical writer - even his whitepapers are a
               | pleasure to read.
               | 
               | I have great respect for dragon book authors but... their
               | writing un the book and elsewhere is not a pinnacle of
               | clarity.
        
         | stefanos82 wrote:
         | They don't.
         | https://www.cs.umd.edu/class/fall2022/cmsc430/Texts.html
        
       | satvikpendem wrote:
       | 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.
        
       | atonse wrote:
       | 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 wrote:
         | 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!
        
           | jmct wrote:
           | Wonderful bit of history!
           | 
           | I'm one of the faculty that teach the current version of this
           | course.
           | 
           | Would you mind getting in contact with us? We would love to
           | learn more about PL/UM. It would mean a lot:
           | {jmct|dvanhorn}@umd.edu
        
         | schott12521 wrote:
         | 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.
        
       | zerr wrote:
       | No notes for the original course which used OCaml?
        
       | Entinel wrote:
       | Are the lectures available somewhere? This is one of those
       | courses I would love to audit.
        
         | papercrane wrote:
         | The schedule page has links to the lecture notes and recordings
         | of the lectures (hosted on YouTube.) It does look like a couple
         | of the last lectures are not on YouTube, but the lecture notes
         | look comprehensive.
         | 
         | https://www.cs.umd.edu/class/fall2022/cmsc430/Schedule.html
        
         | chrisseaton wrote:
         | You're going to audit their course?
        
           | medo-bear wrote:
           | i guess he means to attend the course without participating
           | in it
        
             | chrisseaton wrote:
             | And like report them to someone if they don't think it's
             | right? 'Audit' makes me think of those conspiracy theorists
             | who harass security guards.
        
               | CyberDildonics wrote:
               | Not sure if english is your first language but you could
               | audit language courses and get caught up.
        
               | nt591 wrote:
               | This might be an American term, but auditing a course is
               | simply taking one without registering and without intent
               | of grade or credit.
        
               | dooglius wrote:
               | https://www.merriam-webster.com/dictionary/audit
               | Definition 2 under the verb form
        
               | User23 wrote:
               | I don't know if it's still true, but it at least used to
               | be the case that one could ask a professor's permission
               | to just show up for lectures even without any formal
               | relationship with the school.
        
               | f1shy wrote:
               | AFAIK in many countries and universities around the world
               | this is no problem in 90% of the cases.
               | 
               | Good professors are more than happy to have you there.
               | One I even asked to take the exam, and get it corrected
               | (to test if I really learned the content). And they
               | allowed me to do that, I got the corrected exam at the
               | end. Of course, it was not written in any book in the
               | university.
        
               | dooglius wrote:
               | I'm sure it's still true that you can ask! Whether it
               | works I expect will depend on the professor.
        
               | f1shy wrote:
               | Comes from latin "audire" to hear.
        
           | chucksmash wrote:
           | This is a common term (in US colleges) for "take a college
           | course without receiving college credit."
           | 
           | So if you're in school (or in some places just a community
           | member) and you want to attend lectures but not do homework
           | or tests, you would audit the class. It's probably less
           | common now with MOOCs and everything that's available on
           | YouTube.
        
       | alexjplant wrote:
       | 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!
        
       | wirthjason wrote:
       | 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.
        
       | jasmaa wrote:
       | 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 wrote:
         | Those are my videos!
        
           | satvikpendem wrote:
           | Thank you Jose. Are these videos available for non-students?
           | 
           | Edit:
           | https://www.youtube.com/channel/UCfZ7HFoaeSA7zPoGelA3aiw
        
             | jmct wrote:
             | Looks like you found them, and yes. :D
             | 
             | They weren't made with the thought of being generally
             | consumed, but I do plan on making videos for the wider
             | CS/programming community in the future.
        
           | _benj wrote:
           | I'm enjoying those!
           | 
           | Honestly, I had a bit of impostor syndrome kick when you
           | mentioned that the 330 course was required, being self taught
           | and all... but I know OCaml so -\\_(tsu)_/-
           | 
           | Currently going through the Crafting Interpreters book and
           | this seems like an excellent supplement for my journey into
           | the world of language hacking.
           | 
           | Thanks a lot for posting those, they are very clear and
           | encouraging!
        
             | jmct wrote:
             | Apologies for causing a spike in your impostor syndrome!
             | 
             | 330 is 'required' in the sense that you're not allowed to
             | take 430 at UMD without having taken 330.
             | 
             | Perhaps a better way of phrasing it would have been to list
             | the things we assume students have retained from 330. One
             | of which is OCaml :D
             | 
             | I hope these videos provide some value to you! Always feel
             | free to reach out if there's anything you think I could do
             | better.
        
         | MisterTea wrote:
         | 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.
        
           | pjmorris wrote:
           | I love this idea. Do you have any specific courses you can
           | point to?
        
             | benrow wrote:
             | If you don't mind working with software emulation,
             | nand2tetris takes you from logic gates up to a CPU,
             | assembler, compiler. I'm working through the book:
             | https://www.nand2tetris.org/book. It doesn't focus on an
             | existing architecture like 6502 but focuses on simplicity
             | instead to make the ideas really clear.
             | 
             | If you'd like to work with real hardware, +1 to the Ben
             | Eater suggestion. He sells kits for all the components for
             | an 6502 machine so you don't get bogged down in sourcing
             | them. Great videos too.
             | 
             | (Quick edit, not 8086, showing my inexperience with
             | hardware!)
        
             | jgwil2 wrote:
             | Ben Eater has a video series called "'Hello, world' from
             | scratch on a 6502" that you might find interesting: https:/
             | /www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy...
        
             | a-dub wrote:
             | a good computer organization/design or intro computer
             | architecture course will have the same effect.
             | 
             | the classic text is computer organization and design by
             | patterson and hennessy.
        
               | pjmorris wrote:
               | I've got H&P on the bookshelf. It's the 'get down and
               | dirty with a breadboard an x86 chip and maybe a soldering
               | iron' aspect I am surfing for. 'Like Ben Eater but for
               | x86', preferably as a course, is what I'm aiming
               | at/curious about.
        
       | StayTrue wrote:
       | Looks fun. I only have positive nostalgia for a couple of my CS
       | courses and compiler construction is one of them.
        
       ___________________________________________________________________
       (page generated 2022-10-05 23:01 UTC)