Live data from Hacker News

Why MIT switched from Scheme to Python

wisdomandwonder.com

91–100 of 140 posts

Re: Why MIT switched from Scheme to Python

#91

Earlier quoted context omitted.

Libraries aren't the issue. I use Chicken Scheme for a few things, which has plenty of libraries and a fantastic package system called eggs. Sure, other languages like Perl and Python have more libraries now, but that's not what made them popular. What made them popular was the design of the core languages. I started using Ruby because it was faster to type and easier to remember how to do things than Perl, not becau…

> Libraries aren't the issue You say libraries aren't the issue, but the discussion is about a blog pst that said: "And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all." I'm sure your experience is grounded in a general reality. But the post you disagreed with was about a specific case: i.e. the one described in the blog post.

From the point of view of a person at an instant in time, libraries are a concern. But when we're talking about Scheme being displaced by Python at MIT, where Scheme was developed 30 years ago, we really ought to ask what's been happening to Scheme during that 30 years.

The problem, at MIT and elsewhere, is that hackers don't like hacking Scheme enough. Python has more libraries than Scheme now, but that's not the main thing that made more people use it. People use it because they prefer the language. This is something that Sussman and others at MIT should be trying to understand, but it doesn't strike me that they are trying to understand it. They're just saying "Python has a better robotics library -- oh well!" as if this were something completely random that they have no control over. That doesn't seem like the sort of attitude that produced Scheme in the first place.

My point of contention with the comment I replied to is the idea that fixing the problem is a question of writing more libraries for Scheme. Writing or interfacing to libraries for numerics, 3D graphics, etc. is a trivial task compared to making a language hackers love.

Now, maybe hackers' distaste for Scheme is Scheme's fault, or maybe it's hackers'; but in any case, the issue is with the core language, not the libraries. And based on my personal experience with Scheme I would say that enough of the fault lies on Scheme's side that it's worth fixing.

Re: Why MIT switched from Scheme to Python

#92

Earlier quoted context omitted.

Libraries aren't the issue. I use Chicken Scheme for a few things, which has plenty of libraries and a fantastic package system called eggs. Sure, other languages like Perl and Python have more libraries now, but that's not what made them popular. What made them popular was the design of the core languages. I started using Ruby because it was faster to type and easier to remember how to do things than Perl, not becau…

Clojure: user> (def h {:foo "hi"}) #'user/h user> (h :foo) "hi" user> (h :bar) nil The main difference with the Ruby is the immutable by default data structure, which is why I replaced the assignment with a literal definition of the map. In any case, I think this demonstrates how Clojure has stolen some of the good ideas from Ruby and Python in addition to stealing many of the best ideas from other Lisps.

That is a great demonstration that Scheme's problems are not Lisp problems. I'm hoping that we're about to see a lot more experimentation with new Lisp dialects.

Re: Why MIT switched from Scheme to Python

#93
post #85

Earlier quoted context omitted.

JSON is much more popular than s-expressions, and not just accidentally. Explicit, compact syntax for both lists and key-value pairs is The Right Thing in a language like this. { "x": [ { "y": "a", "z": 23, "q": [ 54, 32, 45 ] } ], "r": 43 }

JSON is a subset of s-expressions. (Yes, s-expressions provide explicit and compact representations for mappings. They also handle other kinds of objects.) The other difference is that there are JSON parsers and generators for more languages and they're not programmable.

Don't tell me. Show me. Please translate the example into s-expressions.

Re: Why MIT switched from Scheme to Python

#94
post #27
post #22

Earlier quoted context omitted.

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

Yeah, sure, I'm not saying it is in this case. Just that it's one of those words to watch for.

Re: Why MIT switched from Scheme to Python

#95
I read SICP when I was 14; this was a couple of years after I came across some pg/Lisp stuff. It would be absurd if MIT CS students remain ignorant of 6.001 given their institute's really hardcore hacker culture. Hence, I fail to see what this entire fuss is all about.

Re: Why MIT switched from Scheme to Python

#96
post #80
post #70

Earlier quoted context omitted.

Why can't we keep the indents and drop the parens?

1.hmm, well, if you try it you'll see that at least in the area of programming languages, after spending some time you'll see that you reinvented s-expressions. 2. can be very interesting to see for example this (sum of every vector-element) in json/yaml... (defn sum-vec [vec] (let [vec-len (count vec)] (loop [idx 0 acc 0] (if (< idx vec-len) (recur (inc idx) (+ acc (vec idx))) acc))))

I don't want that in my json/yaml.

If I have Javascript then I already have mobile code.

If I'm using json in a situation where I don't have a Javascript interpreter, then I probably don't have a Lisp interpreter around either.

Re: Why MIT switched from Scheme to Python

#97

Earlier quoted context omitted.

> Libraries aren't the issue You say libraries aren't the issue, but the discussion is about a blog pst that said: "And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all." I'm sure your experience is grounded in a general reality. But the post you disagreed with was about a specific case: i.e. the one described in the blog post.

From the point of view of a person at an instant in time, libraries are a concern. But when we're talking about Scheme being displaced by Python at MIT, where Scheme was developed 30 years ago, we really ought to ask what's been happening to Scheme during that 30 years. The problem, at MIT and elsewhere, is that hackers don't like hacking Scheme enough. Python has more libraries than Scheme now, but that's not the ma…

The prospect of Scheme as a potential mainstream programming language went down with the rest of the Lisp ship in the late-1980s AI winter - the same one that sank Symbolics and anyone who was remotely Lisp-guilty by association.

It is no accident that it survived almost exclusively in non-saltmine sanctuaries like MIT, where industry herdthink held less sway. In the linked article, Sussman directly admits that he is unable or unwilling to fight back against the intellectual decay that has consumed non-academic programming.

He has decided to "go with the flow" - namely, the flow of industrial sewage into students' heads.

Re: Why MIT switched from Scheme to Python

#98
post #85

Earlier quoted context omitted.

JSON is a subset of s-expressions. (Yes, s-expressions provide explicit and compact representations for mappings. They also handle other kinds of objects.) The other difference is that there are JSON parsers and generators for more languages and they're not programmable.

Don't tell me. Show me. Please translate the example into s-expressions.

I'm confused why you don't see this as obvious. (There are several possible ways to represent mappings. I picked one that was close to something that you're happy with.)

{ ("x" ( { ("y" "a") ("z" 23) ("q" ( 54 32 45 )) } )) ("r" 43) }

Re: Why MIT switched from Scheme to Python

#99
post #80

Earlier quoted context omitted.

1.hmm, well, if you try it you'll see that at least in the area of programming languages, after spending some time you'll see that you reinvented s-expressions. 2. can be very interesting to see for example this (sum of every vector-element) in json/yaml... (defn sum-vec [vec] (let [vec-len (count vec)] (loop [idx 0 acc 0] (if (< idx vec-len) (recur (inc idx) (+ acc (vec idx))) acc))))

I don't want that in my json/yaml. If I have Javascript then I already have mobile code. If I'm using json in a situation where I don't have a Javascript interpreter, then I probably don't have a Lisp interpreter around either.

A decent JSON parser is also only a day's worth of work or less in just about any language.

My experience is that it is as little as and possibly less initial development and maintenance as a custom flat-file format or a really robust csv parser.

Re: Why MIT switched from Scheme to Python

#100
post #7

Earlier quoted context omitted.

Python may not be a scheme, but it does have what they used to call functional programming, low-grade continuations with the generators, and some other stuff like that. Python may not stuff its academic credentials in your face, but I think it has one of the better balances between what you can use it to teach, and what you must teach to use it. (Referencing the common and IMHO justified complaint that the simplest p…

Python has some issues that can really interfere with doing Scheme-style FP in in it (no tail-call optimization, single-expression-only lambdas, closure/scope problems, general hostility from Guido), but IMHO it's a great general-purpose language, and well suited to teaching, particularly for introducing higher-order functions. Lua has much more Scheme influence than Python does (while being otherwise pretty similar)…

I didn't miss tail-call optimization much when I studied SICP using XLisp back in the 80s (with 640kb of memory) -- only a couple exercises blew the stack and made me add a while loop. Of course it matters more for real programming on real data, and I agree with your comment generally.
Post reply on HN