Live data from Hacker News

Why MIT switched from Scheme to Python

wisdomandwonder.com

131–140 of 140 posts

Re: Why MIT switched from Scheme to Python

#131

Earlier quoted context omitted.

>I think it's an acceptance of reality. All of technological progress consists of refusing to roll over and "accept reality" - instead, attacking it and modifying it to suit our needs. >There is a phase change when systems become too complex for a single human to ever understand them in their entirety. This is how innovation dies. The disease is preventable: http://naggum.no/erik/complexity.html > To them, MySql is t…

I believe I categorically disagree with every point you make. You are pissing in the wind if you think you can treat a system with 100M LOC the same way you wrote assembly on a 6502. They are different beasts, with totally different emergent properties. It's like claiming that you can understand the weather if you just stick to thinking about individual molecules. [edit:] I believe the xkcd strip can be read two ways…

> you are pissing in the wind if you think you can treat a system with 100M LOC the same way you wrote assembly on a 6502

I would be, if I actually believed that it is possible given current technology. However, I believe that the problem is technological rather than fundamental, and that we can arrive at a solution. Let me give you an example of a problem that was once thought to be fundamental and inescapable yet ceased to be viewed as such. Before the advent of high-quality structural steel, no building (save a pyramid) could exceed five stories or so in height. Towards the end of the 19th century, metallurgy advanced, and the limit vanished. I believe that we are facing a similar situation with knowledge. The conventional wisdom is that the era of "encyclopedic intellects" (and now, human-comprehensible software) is gone forever due to the brain's limited capacity for handling complexity. Yet I believe that the computer could do for mental power what steam engines did for muscle power. I am not alone in this belief - here are some pointers to recommended reading, by notables such as Doug Engelbart:

http://en.wikipedia.org/wiki/Intelligence_amplification

Additionally: why do you assume that any system built to date necessarily must contain 100M LOC? Does this not in itself suggest that we are doing something wrong?

> clinging to the idea that it is reducible and manageable

All of technological civilization rests on the assumption that the universe is ultimately "reducible" to knowable facts and "manageable" in the sense of being amenable to manipulation (or at least, understanding). The alternative is the capricious and anthropomorphic universe imagined by primitive tribes, run according to the whim of the gods rather than physical law.

> We don't rely on quantum mechanics to build bridges

I must disagree here. QM is entirely relevant to the science of material strength, which is ultimately a branch of metallurgy - arguably a discipline of applied chemistry. In any legitimate science, there really are "turtles all the way down." And when there is a discontinuity in the hierarchy of understanding - say, the situation in physics with the need to reconcile general relativity and QM - it is viewed as a situation to be urgently dealt with, rather than a dismal fate to accept and live with forever.

A computer, unlike the planet's atmosphere, is a fully deterministic system. It is an epic surrender to stupidity if we start treating programming the way we treat weather prediction - as something that is not actually expected to reliably work in any reasonable sense of the word, or to obey any solid mathematical principles. It is a disaster, to be fought.

Re: Why MIT switched from Scheme to Python

#132
post #118

Earlier quoted context omitted.

"You also might have better luck running dynamics simulations with PhysX than with ODE." I worked on the simulator at Anybots, and I'm pretty much convinced a different physics engine isn't going to magically make things better (in terms of using simulations to predict real robot behavior). The problem is more about getting every little physical detail of the actual robot -- and its interactions with the environment…

Yeah, after giving it some thought, it would be very tough to repurpose a realtime physics simulator like PhysX or ODE to be useful to Anybots. But that doesn't necessarily mean that it isn't practical to create a simulator suited for rapid prototyping of robots. (I'm just brainstorming ideas in the rest of this post; I'm not sure whether they'll work, but it's a fun problem to think about.) Perhaps it would be usefu…

It's not that PhysX or ODE aren't good enough, it's that they only solve part of the problem. We did do some empirical analysis to get the pneumatic models.

"Brute force the problem by using large amounts of real-world data, is what I'm getting at."

Absolutely, that is Trevor's viewpoint, and I agree. Turns out to be somewhat difficult in practice. It's hard to even know what all the parameters should be, much less do all the work necessary to tune them. And all the while, the robot itself is changing. Joints get loose; servos get replaced. It's a constant battle.

There is a feeling among hard-core robotics folks that this level of simulation is either impossible or not worth the trouble. I tend to disagree. I think we got pretty far with the Anybots simulator; we did manage to evolve a neural network that balances on the simulator, and also balances the real robot. It's definitely a 'hard' problem to get a simulator good enough to be usefully predictive.

Re: Why MIT switched from Scheme to Python

#133
post #128

Earlier quoted context omitted.

"AWT is about the most prejudiced example imaginable - it was rushed out, disowned by its authors, and quickly replaced." Ahh yes -- replaced with Swing. Do I need to spell it out?

Please elaborate.

swing sucks almost as hard as AWT.

Re: Why MIT switched from Scheme to Python

#134

Earlier quoted context omitted.

I believe I categorically disagree with every point you make. You are pissing in the wind if you think you can treat a system with 100M LOC the same way you wrote assembly on a 6502. They are different beasts, with totally different emergent properties. It's like claiming that you can understand the weather if you just stick to thinking about individual molecules. [edit:] I believe the xkcd strip can be read two ways…

> you are pissing in the wind if you think you can treat a system with 100M LOC the same way you wrote assembly on a 6502 I would be, if I actually believed that it is possible given current technology. However, I believe that the problem is technological rather than fundamental, and that we can arrive at a solution. Let me give you an example of a problem that was once thought to be fundamental and inescapable yet c…

I think we're talking past each other, though there is still a fundamental disagreement in principle. Of course I believe that science 'works', in the sense that in theory, everything should be reducible to a lower level description. High-level source code reduces to machine code; weather reduces to quantum mechanics. However, there's a critical decision about what level you choose to work at when you attack a problem. While you may know that QM has something to do with why certain steel alloys are strong and light, when you build a bridge or a building you don't work at the QM level.

In the practical world of software development today, we do indeed have tens of millions of lines of code 'under' the application level most of the time. Even on Linux, where every one of those lines of code is theoretically accessible as source, the practical fact is nobody has the resources to read, comprehend, and manage all of that code during the lifetime of a typical project. Therefore, you are necessarily in a position where you have to deal with most of that codebase as black boxes, which have a statistical likelihood of doing what they are intended to do. You have to program defensively, hoping for the best but assuming the worst. You have to rely on your pattern recognition skills and your intuition to guide you. You have to treat the chaotic complexity you sit on top of like a surfer riding a wave. You cannot afford to take a fully reductionist approach. It's just not possible anymore, full stop.

The exception to this would be a small, embedded system with a minimal operating core and limited memory. But wait -- that system today is almost sure to be networked up to the bigger, chaotic systems that populate the metaverse. So again, at the level of communications, you have to treat the components you communicate with as black boxes.

If you disagree, give me a feasible scenario in which you could in fact take control of the situation in a reductionist fashion. I propose that any such scenario is a toy problem, that will not scale to real-world deployment.

The cat is already out of the bag.

Re: Why MIT switched from Scheme to Python

#135

Earlier quoted context omitted.

> you are pissing in the wind if you think you can treat a system with 100M LOC the same way you wrote assembly on a 6502 I would be, if I actually believed that it is possible given current technology. However, I believe that the problem is technological rather than fundamental, and that we can arrive at a solution. Let me give you an example of a problem that was once thought to be fundamental and inescapable yet c…

I think we're talking past each other, though there is still a fundamental disagreement in principle. Of course I believe that science 'works', in the sense that in theory, everything should be reducible to a lower level description. High-level source code reduces to machine code; weather reduces to quantum mechanics. However, there's a critical decision about what level you choose to work at when you attack a proble…

I don't disagree with the necessity for fundamental elements ("black boxes") on top of which to build. My only complaint is with the universally shoddy state of these black boxes. Specifically:

http://www.loper-os.org/?p=37

The modern computer is the first time mankind has built a system which is actually capable of perfection. You are more likely to have a spontaneous heart attack and die at any given moment than the CPU is to perform a multiplication incorrectly. All of the "hairiness" which your computer's behavior exhibits is purely a result of programmer stupidity. It is theoretically possible for the entire stack to work exactly as expected, and for each element to seem as inevitable and obvious-in-retrospect as Maxwell's equations.

It is possible to build a system where the black boxes aren't fully black and can be forced to state their actual function on a whim. It is possible to expose the entire state of the machine to programmer manipulation and comprehension in real time:

http://groups.google.com/group/comp.lang.lisp/msg/b2c0190dc3...

http://www.sts.tu-harburg.de/~r.f.moeller/symbolics-info/dev...

>The cat is already out of the bag.

The Lisp Machines existed, and were capable of everything modern, "hairy" systems are capable of, plus much more. You cannot un-create them. They are proof that the entire software-engineering universe is currently "smoking crack" - and I sincerely wish that it would stop doing so.

Re: Why MIT switched from Scheme to Python

#136

Earlier quoted context omitted.

I think we're talking past each other, though there is still a fundamental disagreement in principle. Of course I believe that science 'works', in the sense that in theory, everything should be reducible to a lower level description. High-level source code reduces to machine code; weather reduces to quantum mechanics. However, there's a critical decision about what level you choose to work at when you attack a proble…

I don't disagree with the necessity for fundamental elements ("black boxes") on top of which to build. My only complaint is with the universally shoddy state of these black boxes. Specifically: http://www.loper-os.org/?p=37 The modern computer is the first time mankind has built a system which is actually capable of perfection. You are more likely to have a spontaneous heart attack and die at any given moment than th…

we don't need lisp to know the state of the machine -- in the Linux case, we have source code. We can _theoretically_ debug everyone else's code and know exactly what is going on.

"It is theoretically possible for the entire stack to work exactly as expected, and for each element to seem as inevitable and obvious-in-retrospect as Maxwell's equations."

Yes, and it is theoretically possible according to the laws of physics for broken glasses to spontaneously reassemble. But they don't.

This is basically an issue of entropy.

Re: Why MIT switched from Scheme to Python

#137

Earlier quoted context omitted.

I don't disagree with the necessity for fundamental elements ("black boxes") on top of which to build. My only complaint is with the universally shoddy state of these black boxes. Specifically: http://www.loper-os.org/?p=37 The modern computer is the first time mankind has built a system which is actually capable of perfection. You are more likely to have a spontaneous heart attack and die at any given moment than th…

we don't need lisp to know the state of the machine -- in the Linux case, we have source code. We can _theoretically_ debug everyone else's code and know exactly what is going on. "It is theoretically possible for the entire stack to work exactly as expected, and for each element to seem as inevitable and obvious-in-retrospect as Maxwell's equations." Yes, and it is theoretically possible according to the laws of phy…

Have you ever actually used a Lisp Machine? There is an emulator available (ask around.) All of these things were actually possible there - not merely theoretically.

Re: Why MIT switched from Scheme to Python

#138

Earlier quoted context omitted.

we don't need lisp to know the state of the machine -- in the Linux case, we have source code. We can _theoretically_ debug everyone else's code and know exactly what is going on. "It is theoretically possible for the entire stack to work exactly as expected, and for each element to seem as inevitable and obvious-in-retrospect as Maxwell's equations." Yes, and it is theoretically possible according to the laws of phy…

Have you ever actually used a Lisp Machine? There is an emulator available (ask around.) All of these things were actually possible there - not merely theoretically.

Maybe I'm not making myself clear. I realize you can in principle debug everything, know the state of the machine completely, etc. What I am trying to point out is that it is too much information to handle at that level of detail. It doesn't matter if it's written in Lisp or Swahili. And the fact remains that even if you convinced 90% of the next generation of programmers to use Lisp, you still have 50 years of legacy code lying around in other langauges. These are practical facts that can't be washed away with a new (or old) programming paradigm.

Re: Why MIT switched from Scheme to Python

#139

Earlier quoted context omitted.

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…

[deleted]

Re: Why MIT switched from Scheme to Python

#140
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.…

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…

Ease of programming isn't the issue, at least not when it comes to writing libraries that must interface with C code (as a robot-interfacing library is likely to). Most Schemes and Lisps can interface to C by means of a few simple declarations, while Python requires the C code to accept and return Python's internal data structures (and convert them to a form that can be used by C code), and requires it to register those functions that are to be made visible to Python.

Scheme (PLT)

  (require scheme/foreign)
  (unsafe!)
  (define my-c-lib (ffi-lib "libmylib")) ;; loads libmylib.so
  (define my-c-func (get-ffi-obj 'my_c_func my-c-lib (_fun _long -> _long)))
  ;; The C code does not need to take Scheme into account--
  ;; Existing C libraries can be interfaced with Scheme
  ;; with a trivial amount of effort.
C (to be linked against Python code-- Python can load the resulting shared library as if it was written in Python). Notice that all this code does is interface Linux's htonl function to Python:

  #include 
  #include 
    
  static PyObject *
  py_htonl(PyObject *self, PyObject *args) {
     long my_arg;
 
     if(!PyArgParseTuple(args, "l", &my_arg))
         return NULL;
     return PyBuildValue("l", htonl(my_arg));
  }
  
  static PyMethodDef methods[] = {
      {"htonl", py_htonl, METH_VARARGS,
       "Demonstrate Python's C interface\n"}
  };
  
  static char module_doc[] = "Demonstration";  
  
  PyMODINIT_FUNC
  initfunc(void) {
    PyInitModule3("mylib", methods, module_doc);
  }
Post reply on HN