Live data from Hacker News

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

dovyski.com

51–60 of 67 posts

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

#51
Not sure what's unusual about this except for the fact that it was assigned to 2nd years. I had to create a compiler from scratch during my course work, and I'm sure many other CS programs require the same.

It is a great way to learn how a compiler works, but then again, in this day and age it seems less and less relevant to know that stuff, especially if you are going into a typical programming position.

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

#52
Will you be able to show off the results? I'd be really pretty interested to see what some 2nd year comp-sci students come up with.

The pipe dream part of me wants you to have them stick their results on github and work with each other, or start getting taught stuff by ... well, everyone.

My high-school comp-sci teacher is a large part of the reason why I can reason clearly about code, and he would push us in directions like this -- not as extreme, but similar in the "ok, here's an end goal that you can achieve by thinking about it and making combinations of what you know" sense.

I know a lot of programmers who don't grok compilers, even at a high level, and it's a shame -- a lot of things are a lot easier, and you open the doors to doing a lot more if you do.

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

#53
It's a neat idea, but I really want to hear an experience report on the results. I don't want to throw cold water on this, because I want it to work and I think it might, but I have a fair amount of experience here[0] and can think of a number of reasons why it might go poorly as well. All we see in the OP is, "here's an idea that's cool (and it is) and I'm optimistic that it will work."

[0]I have taught courses where intro-level students write Scheme interpreters (in Scheme, in Java) and courses where students implement interpreters for higher-level languages, and courses (well, one so far) where they implement an actual compiler (for a subset of C).

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

#54
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 did not like the Dragon book either. I feel like it taught me nothing and was difficult to read and comprehend. I had to find other sources of explanation at times when I was doing this. It seemed to be more a thought and theory book if I remember.

This was at least 6 years ago though, so my memories are a little cloudy.

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

#55

I did something like this once many years ago for one of my wife's students, a precocious high-schooler who needed to be challenged beyond the elementary Fortran she was teaching at the vocational school. So I outlined the steps it would take to translate a toy language into a toy computer's instruction set, and reviewed it with the young man one afternoon at my office - an abbreviated compiler theory class with an e…

Wow, great history! Thanks for sharing that.

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

#56
post #53

It's a neat idea, but I really want to hear an experience report on the results . I don't want to throw cold water on this, because I want it to work and I think it might, but I have a fair amount of experience here[0] and can think of a number of reasons why it might go poorly as well. All we see in the OP is, "here's an idea that's cool (and it is) and I'm optimistic that it will work." [0]I have taught courses whe…

I will share the results on a future post. I understand your point, but I think the assignment will enhance their skills related to objects, classes, methods and instantiation.

That's my goal, not teaching about compilers or language structure. About that they will learn empirically.

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

#57
post #26

Earlier quoted context omitted.

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 th…

I took that class from the other instructor, who had us use OCaml instead of Java (as I presume Aho still uses.) The Dragon book was interesting, but, for the most part, we were able to get on from the in-class slides.

I don't think there's anything wrong with having Discrete Math, Data Structures or Computer Science Theory as pre-requisites for PLT or a compiler class. However, I doubt the necessity of OO Programming & Design and (so-called) Advanced Programming.

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

#58
post #52

Will you be able to show off the results? I'd be really pretty interested to see what some 2nd year comp-sci students come up with. The pipe dream part of me wants you to have them stick their results on github and work with each other, or start getting taught stuff by ... well, everyone. My high-school comp-sci teacher is a large part of the reason why I can reason clearly about code, and he would push us in directi…

Sure, I will share the results on a future post. I think the same way your high-school comp-sci teacher does, but this time I decided to break the line.

About the github idea, I like it, but my students are not familiar with git yet. I will try to blog about their main ideas and language syntax in the future.

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

#59
post #34

Earlier quoted context omitted.

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

Could you keep us updated about that? Such a round-up post with interesting ideas could be marvelous!

Sure, I will blog about that in the future. Stay tuned :)

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

#60

Cool! I had a (mandatory) course on compiler construction in my second year of CS as well. It was one of the toughest subjects, but it also made me understand and appreciate programming languages so much better. Like everyone, we tried to create a language without the annoyances found in many modern languages. Like everyone, we found that those annoyances are actually really hard to avoid. It was tons of fun :)

I had the same fun when I created my own language during an also mandatory course on compilers :) Even though my goal is to enhance my student's skills about OOP, I hope they have fun creating a language.
Post reply on HN