Live data from Hacker News

Why MIT switched from Scheme to Python

wisdomandwonder.com

21–30 of 140 posts

Re: Why MIT switched from Scheme to Python

#21
post #17

Earlier quoted context omitted.

But the above examples are taken straight from SICP. Wasn't that the textbook for 6.001 before they switched to Python?

Which sort of wanders back around to begging the question; is that still the best way to start teaching, as Sussman talks about? I ask myself, "how would I teach my son to program?", and for all my copious academic and practical experience, "start with re-implementing car and cdr from lambda functions" isn't even remotely in the running. Sure, I'd introduce such things earlier than most people and SICP is still firml…

Yeah, I think I actually agree with the overall point. I got my first experience of programming using BASIC to get various Sinclair computers to paint stuff on the screen and make funny beeping noises. I'm all for instant gratification.

On the other hand that was when I was 9. By 12 I was learning Lisp, and by college age I'd written my own little Lisp compiler.

I've always had this image of MIT students that doesn't quite mesh with them needing a gentle introduction to programming, but maybe that's not really the case?

Re: Why MIT switched from Scheme to Python

#22
post #3

I think there's something else here, implicit in Sussman's comment, that's important. MIT was founded on a philosophy of practicality, and everything else is secondary. If you couple that with the belief that fundamental computer science is the most efficient way to enhance practical software engineering, Scheme was a wonderful choice. Java and C++ may have been more directly practical to software engineers, but they…

My concern is that "practicality" is often just a code word for "resembles Java or whatever else I was comfortable with so I can continue on doing what I've always done before." (With the result that the student learns less than if they were required to do something truly different.) Reminds me of this post that came up on HN not too long ago: http://funcall.blogspot.com/2009/03/not-lisp-again.html

When it's not a code word for that it's often a code word for something bad. Not always, but often.

People defending what's right can say one should do it because it's right. But people defending something they know is basically wrong can't say one should do it because it's wrong. So they look around for another word, and "practical" is usually the first they find.

Re: Why MIT switched from Scheme to Python

#23
post #17

Earlier quoted context omitted.

Which sort of wanders back around to begging the question; is that still the best way to start teaching, as Sussman talks about? I ask myself, "how would I teach my son to program?", and for all my copious academic and practical experience, "start with re-implementing car and cdr from lambda functions" isn't even remotely in the running. Sure, I'd introduce such things earlier than most people and SICP is still firml…

Yeah, I think I actually agree with the overall point. I got my first experience of programming using BASIC to get various Sinclair computers to paint stuff on the screen and make funny beeping noises. I'm all for instant gratification. On the other hand that was when I was 9. By 12 I was learning Lisp, and by college age I'd written my own little Lisp compiler. I've always had this image of MIT students that doesn't…

"I've always had this image of MIT students that doesn't quite mesh with them needing a gentle introduction to programming, but maybe that's not really the case?"

6.001 from my experience does not in any way imply a student's focus on computer programming or software development. I've heard horror stories about people in completely unrelated majors ending up in that class and having their brains thoroughly melted. In my personal opinion, Python will be considerably more humane in that department.

Re: Why MIT switched from Scheme to Python

#24
post #17

Earlier quoted context omitted.

Which sort of wanders back around to begging the question; is that still the best way to start teaching, as Sussman talks about? I ask myself, "how would I teach my son to program?", and for all my copious academic and practical experience, "start with re-implementing car and cdr from lambda functions" isn't even remotely in the running. Sure, I'd introduce such things earlier than most people and SICP is still firml…

Yeah, I think I actually agree with the overall point. I got my first experience of programming using BASIC to get various Sinclair computers to paint stuff on the screen and make funny beeping noises. I'm all for instant gratification. On the other hand that was when I was 9. By 12 I was learning Lisp, and by college age I'd written my own little Lisp compiler. I've always had this image of MIT students that doesn't…

> I've always had this image of MIT students that doesn't quite mesh with them needing a gentle introduction to programming, but maybe that's not really the case?

If it leads to more (non-CS) students taking a programming class, I'd call it a big win. Other fields can benefit greatly from programming skills. I'd almost go as far as calling it a new form of literacy.

Re: Why MIT switched from Scheme to Python

#25
post #13

Earlier quoted context omitted.

Clojure is still something of a small hype. Python is a 18 year-old programming language.

Clojure is a Lisp. Lisp is 50 years old.

Don't you think that's a bit disingenuous? Clojure is still changing with a fair amount of frequency. As far as I'm aware, they have not even hit a 1.0 release yet (releases are currently referred to by their release date, which tells me it's still in the pre-final stages).

It's a great language, but there is nothing to gain here by claiming it somehow is mature because Lisp is 50.

Re: Why MIT switched from Scheme to Python

#26
post #19

Earlier quoted context omitted.

My concern is that "practicality" is often just a code word for "resembles Java or whatever else I was comfortable with so I can continue on doing what I've always done before." (With the result that the student learns less than if they were required to do something truly different.) Reminds me of this post that came up on HN not too long ago: http://funcall.blogspot.com/2009/03/not-lisp-again.html

I think here, "practicality" means "has a library for controlling robots". Also a good numeric library, a good matlab-like graphing library, good 3D graphics, good real-time performance, easy C++ embedding, etc. Rather than complaining about how everyone else is a bonehead for not using Lisp, write some libraries to make it useful for more things in the real world. Also, Python does pretty well for real-time control.…

Just curious, which library are you referring to when you say "good 3D graphics"? I'm writing a graphics engine using PyOpenGL, but that's just a minimalist wrapper over the standard OpenGL API that's available for dozens of languages.

Re: Why MIT switched from Scheme to Python

#27
post #22

Earlier quoted context omitted.

My concern is that "practicality" is often just a code word for "resembles Java or whatever else I was comfortable with so I can continue on doing what I've always done before." (With the result that the student learns less than if they were required to do something truly different.) Reminds me of this post that came up on HN not too long ago: http://funcall.blogspot.com/2009/03/not-lisp-again.html

When it's not a code word for that it's often a code word for something bad. Not always, but often. People defending what's right can say one should do it because it's right. But people defending something they know is basically wrong can't say one should do it because it's wrong. So they look around for another word, and "practical" is usually the first they find.

In this particular case of Gerry Sussman choosing Python over Scheme, I don't think he's using "practical" to mean "I know it's wrong, but I'm comfortable with Java so Python seems more familiar".

I think "practical" often means choosing your battles. Sussman's choosing to fight the battle of explaining some syntax to his students rather than the battle of implementing a real-time robot control library from scratch in a language where no implementation supports real-time very well. Sun-Tzu would approve.

Re: Why MIT switched from Scheme to Python

#28
post #26
post #19

Earlier quoted context omitted.

I think here, "practicality" means "has a library for controlling robots". Also a good numeric library, a good matlab-like graphing library, good 3D graphics, good real-time performance, easy C++ embedding, etc. Rather than complaining about how everyone else is a bonehead for not using Lisp, write some libraries to make it useful for more things in the real world. Also, Python does pretty well for real-time control.…

Just curious, which library are you referring to when you say "good 3D graphics"? I'm writing a graphics engine using PyOpenGL, but that's just a minimalist wrapper over the standard OpenGL API that's available for dozens of languages.

Yes, I use PyOpenGL in GTK (with GTKGLExt). People have said good things about Gazebo, but I haven't used it.

Most of the 3D stuff is performance-critical, so I typically prototype in Python and then convert to C++, which for graphics code isn't too painful. The Boost.Python interface makes it pretty easy.

Also, the Cairo graphics interface is wonderful for drawing charts, animated robot stick figures, and many other visualizations. It has a full Postscript rendering model with alpha blending.

It looks like PLT Scheme has an OpenGL binding too, though I haven't seen it used. It looks very low-level, for instance it has separate methods named: gl.Vertex3d gl.Vertex3dv gl.Vertex3f gl.Vertex3fv gl.Vertex3i gl.Vertex3iv gl.Vertex3s gl.Vertex3sv

Re: Why MIT switched from Scheme to Python

#29
post #19

Earlier quoted context omitted.

My concern is that "practicality" is often just a code word for "resembles Java or whatever else I was comfortable with so I can continue on doing what I've always done before." (With the result that the student learns less than if they were required to do something truly different.) Reminds me of this post that came up on HN not too long ago: http://funcall.blogspot.com/2009/03/not-lisp-again.html

I think here, "practicality" means "has a library for controlling robots". Also a good numeric library, a good matlab-like graphing library, good 3D graphics, good real-time performance, easy C++ embedding, etc. Rather than complaining about how everyone else is a bonehead for not using Lisp, write some libraries to make it useful for more things in the real world. Also, Python does pretty well for real-time control.…

Rather than complaining about how everyone else is a bonehead for not using Lisp, write some libraries to make it useful for more things in the real world.

Thank you. Cannot stress this enough. (Making said libraries portable helps, too!)

Re: Why MIT switched from Scheme to Python

#30

"And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all." I can confirm this is true. The Python Robotics module (Pyro) inspired MIT's internal library, SoaR, which was developed at first by a highly motivated TA. What does SoaR stand for? Snakes on a Robot, of course.

Pyro is great. We don't use it because I started our robotics code base in 2001, but if I were starting from scratch I'd use many pieces of it.

I believe the main reason why robotics has progressed so slowly in the last 30 years is that getting the damn hardware and firmware working together takes 90% of the available time and students barely get beyond that. So libraries that abstract away most of that and enable plug-in real-time control modules are going to give the field a huge kick in the pants.

Post reply on HN