Live data from Hacker News

I told my 2nd year CS students to create a programming language

dovyski.com

31–40 of 67 posts

Re: I told my 2nd year CS students to create a programming language

#31
post #23

So, from what I understand, they have the flexibility to choose their own syntax. If they're interested in doing the least amount of work possible, they could either implement a Lisp-like language or Forth. (Smalltalk is pretty teeny as well. A basic Smalltalk-y language would weigh in at 1/6th the size of Python's grammar.)

One pair of students decided to create a stack-based language. I guess they noticed it would save several lines of code and make the interpretation process easier to do.

I see you have other students use the language at the end.

If you have a chance, it might be a rare opportunity to point out some of the innovative ideas, after all the projects are done.

Re: I told my 2nd year CS students to create a programming language

#32
post #26

I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.

That's jaw-dropping really... every student should have to experience the horrors of the dragon book. *edit: I say that firmly tongue in cheek. The Dragon book is one of the most important pieces of CS literature ever written. It's a fine book, the subject matter is just difficult:)

I was taught compilers by one of the authors of the Dragon Book. It was one of the best courses I ever took.

Re: I told my 2nd year CS students to create a programming language

#33

I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.

My high school guidance counsellor tried to dissuade me from taking a computer science undergraduate degree, stating that all the programs that are useful had already been written.

I can only imagine what he told the kids who wanted to become civil engineers.

Re: I told my 2nd year CS students to create a programming language

#34
post #31
post #23

Earlier quoted context omitted.

One pair of students decided to create a stack-based language. I guess they noticed it would save several lines of code and make the interpretation process easier to do.

I see you have other students use the language at the end. If you have a chance, it might be a rare opportunity to point out some of the innovative ideas, after all the projects are done.

Yeah, it's true. I will try to analyze and discuss the implementations at the end.

Re: I told my 2nd year CS students to create a programming language

#35
post #27

This is great. More professors need to be like you. With the exception of barely 2 projects in uni, all my homework/projects were short and small scale, meaning I already knew how to complete 90% of it, and just had to learn the content from the latest lecture to complete the rest. With this assignment I probably would have known ~40%, meaning I wold have to buckle down and actually get invested - figure out what I k…

Thank you!

You described my thoughts when I created the assignment :) Like I said, I was afraid to push them too hard. However I was denying them a real challenge, filled with surprises, learning experiences and fun.

Re: I told my 2nd year CS students to create a programming language

#36
post #26

I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.

That's jaw-dropping really... every student should have to experience the horrors of the dragon book. *edit: I say that firmly tongue in cheek. The Dragon book is one of the most important pieces of CS literature ever written. It's a fine book, the subject matter is just difficult:)

Agreed. I'm taking a class right now with the dragon book (taught by Aho, actually - one of the authors of the book), and it's easily the best and most important CS class I've taken[1]. The main project for the class is to design a language and write a working compiler/interpreter for it - in all the years he's taught the class, apparently no group has failed to do this. The really tricky part is making a language that other students in your class will want to use, though, and that goes beyond the 'simple' issue of compiler structure!

I half-wish that there would be a way to teach a compilers class as the second class in a CS track (ie, right after the intro class), but the problem is that it just requires too much familiarity with the details in order to impose upon most beginner/intermediate students, even if a few really interested ones could potentially handle it.

It might be easier if you started off with Scheme and then went from there (a la SICP), but even then, you'd miss a lot of the more fundamental concepts assumed in the Dragon book that really just need a lot of time to be digested.

[1] Alright, there's probably a three-way tie for 1st, but it still counts. My education would not have been complete without it; I highly recommend the Dragon book to anybody who has the time and interest.

Re: I told my 2nd year CS students to create a programming language

#39
post #18

I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.

Sounds like a terrible place to be honest. With that mentality, in 60 years (when current compile designers are dead), nobody will know anything about compiler architecture. On the third year at my university, there's a course centered around writing a Java compiler.

In 60 years, the best compiler writers will be computers. The singularity is near.

Re: I told my 2nd year CS students to create a programming language

#40

I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.

Whoaa that's pretty bad. I'm currently taking a computer architecture class in which we have to design and implement a working superscalar out of order processor in HDL. Even in that class, which is strictly focused on computer architecture, our professor stresses how important compilers are. Sure compilers have become pretty good at optimizing code but there is so much room for improvement especially as we increasingly move to multicore systems. Your professor really must be living under a rock...
Post reply on HN