By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,035 Members | 1,984 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,035 IT Pros & Developers. It's quick & easy.

Abelson and Python

P: n/a
While studying the SICP video lectures I have to twist my mind some to
completely understand the lessons. I implement the programs shown there
in both Python and Scheme, and I find the Python implementations
simpler to write (but it's not a fair comparison because I know very
little Scheme still).

Now some things are changing:
http://lambda-the-ultimate.org/node/1840
>The MIT is going to change its curriculum structure that was famous for teaching Scheme in introductory courses. One force behind the reform is no one else than Harold Abelson, famous for his marvelous Scheme opus SICP.<
The first four weeks of C1 will be a lot like the first four weeks of 6.001, Abelson said. The difference is that programming will be done in Python and not Scheme.<

Someone is translating the SIPC programs in Python too:
http://www.codepoetics.com/wiki/inde...nguages#Python

With slides and code from lectures:
http://courses.csail.mit.edu/6.01/
http://courses.csail.mit.edu/6.01/fall06/calendar.html

I like Scheme a bit too, but I consider this is a small victory for
Python :-)

Bye,
bearophile

Nov 22 '06 #1
Share this Question
Share on Google+
15 Replies


P: n/a

be************@lycos.com wrote:
While studying the SICP video lectures I have to twist my mind some to
completely understand the lessons. I implement the programs shown there
in both Python and Scheme, and I find the Python implementations
simpler to write (but it's not a fair comparison because I know very
little Scheme still).

Now some things are changing:
http://lambda-the-ultimate.org/node/1840
The MIT is going to change its curriculum structure that was famous for teaching Scheme in introductory courses. One force behind the reform is no one else than Harold Abelson, famous for his marvelous Scheme opus SICP.<
The first four weeks of C1 will be a lot like the first four weeks of 6.001, Abelson said. The difference is that programming will be done in Python and not Scheme.<


Someone is translating the SIPC programs in Python too:
http://www.codepoetics.com/wiki/inde...nguages#Python

With slides and code from lectures:
http://courses.csail.mit.edu/6.01/
http://courses.csail.mit.edu/6.01/fall06/calendar.html

I like Scheme a bit too, but I consider this is a small victory for
Python :-)
No surprise to anyone who's ever tried to use MIT Scheme.
>
Bye,
bearophile
Nov 22 '06 #2

P: n/a
me********@aol.com:
No surprise to anyone who's ever tried to use MIT Scheme.
Be careful, such assertions are often flamebait.

I am using DrPython (I think they were using it at MIT too lately), and
it is very very good IDE, it produces executables on the fly, it has a
visual debugger with some nice graphical things, it manages graphics,
and it has something that I have never seen in Python: it manages a
hierarchy of simpler Scheme languages, useful to learn for students.
Probably something similar may be useful to learn Python too (such
stripped down Python versions can forbid things like def foo(x=[]):
....). I am appreciating Scheme a bit because of such very good editor
that makes things possible for newbies of the language too.

Bye,
bearophile

Nov 23 '06 #3

P: n/a

bearophileH...@lycos.com wrote:
me********@aol.com:
No surprise to anyone who's ever tried to use MIT Scheme.

Be careful, such assertions are often flamebait.
Well, yeah, it's a warning to everyone to not
bother with the MIT implementation of Scheme which
is completely worthless.
>
I am using DrPython
Haven't heard of that one, although I've got DrScheme.
(I think they were using it at MIT too lately),
That's no surprise since the MIT implementation
of Scheme is worthless.
and
it is very very good IDE, it produces executables on the fly, it has a
visual debugger with some nice graphical things, it manages graphics,
and it has something that I have never seen in Python: it manages a
hierarchy of simpler Scheme languages, useful to learn for students.
Probably something similar may be useful to learn Python too (such
stripped down Python versions can forbid things like def foo(x=[]):
...).
I find that hierarchy extremely annoying. I don't see the need for it.
I never use OOP in Python yet there's no need for me to have a
stripped down version, I just don't use it.
I am appreciating Scheme a bit because of such very good editor
that makes things possible for newbies of the language too.
But those are implementation details, which you can't avoid.
A bad implementation spoils a language even if the language itself
is fabulous.
>
Bye,
bearophile
Nov 23 '06 #4

P: n/a
me********@aol.com:
Haven't heard of that one, although I've got DrScheme.
Right, sorry, I meant that one :-)

I find that hierarchy extremely annoying. I don't see the need for it.
I never use OOP in Python yet there's no need for me to have a
stripped down version, I just don't use it.
But Python too contains some things that can bite a newbie of the
language. (BTW, in some situations I too have had to access to the full
Scheme language, so you may be partially right).

But those are implementation details, which you can't avoid.
A bad implementation spoils a language even if the language itself
is fabulous.
And a good implementation like DrScheme makes the Scheme language
usable too :-)

Bye,
bearophile

Nov 23 '06 #5

P: n/a

be************@lycos.com wrote:
While studying the SICP video lectures I have to twist my mind some to
completely understand the lessons. I implement the programs shown there
in both Python and Scheme, and I find the Python implementations
simpler to write (but it's not a fair comparison because I know very
little Scheme still).

Now some things are changing:
http://lambda-the-ultimate.org/node/1840
The MIT is going to change its curriculum structure that was famous for teaching Scheme in introductory courses. One force behind the reform is no one else than Harold Abelson, famous for his marvelous Scheme opus SICP.<
The first four weeks of C1 will be a lot like the first four weeks of 6.001, Abelson said. The difference is that programming will be done in Python and not Scheme.<
I am shocked by this. I love Python as much as the next guy, but I
just don't see how SICP can be done in Python. Chapters 1-3, sure.
But chapter 4 has you writing a Scheme interpreter in Scheme, and
chapter 5 has you writing a Scheme compiler in Scheme. I don't see how
that can be done in Python - certainly not in one chapter of a
textbook. Am I to believe that students will be writing a Python
metacircular evaluator? If it were that easy, the PyPy guys would be
done by now.

Nov 23 '06 #6

P: n/a
markscottwright:
I love Python as much as the next guy, but I
just don't see how SICP can be done in Python.
The contents of the course are probably different, they work on
robotics...

Bye,
bearophile

Nov 23 '06 #7

P: n/a

be************@lycos.com wrote:
While studying the SICP video lectures I have to twist my mind some to
completely understand the lessons. I implement the programs shown there
in both Python and Scheme, and I find the Python implementations
simpler to write (but it's not a fair comparison because I know very
little Scheme still).

Now some things are changing:
http://lambda-the-ultimate.org/node/1840
The MIT is going to change its curriculum structure that was famous for teaching Scheme in introductory courses. One force behind the reform is no one else than Harold Abelson, famous for his marvelous Scheme opus SICP.<
The first four weeks of C1 will be a lot like the first four weeks of 6.001, Abelson said. The difference is that programming will be done in Python and not Scheme.<


Someone is translating the SIPC programs in Python too:
http://www.codepoetics.com/wiki/inde...nguages#Python

With slides and code from lectures:
http://courses.csail.mit.edu/6.01/
http://courses.csail.mit.edu/6.01/fall06/calendar.html

I like Scheme a bit too, but I consider this is a small victory for
Python :-)

Bye,
bearophile
Hi Bearophile.
(Is your name pronounced Beer-owe-file, or Bear-oh-fi-lee, just
wondered :-) ?

I too have heard about the MIT course changing to Python elsewhere and
wanted to know why it was talked about so much? I'm from England, I
know that MIT is a very prestigious university, but if Cambridge
changed a course, or better still, The Open University changed a
similar course to Python, I think I'd be hard pressed to hear about it.
Is the MIT course syndicated to Universities around America or
something?

Cheers, Paddy.

Nov 23 '06 #8

P: n/a

Paddy wrote:
be************@lycos.com wrote:
While studying the SICP video lectures I have to twist my mind some to
completely understand the lessons. I implement the programs shown there
in both Python and Scheme, and I find the Python implementations
simpler to write (but it's not a fair comparison because I know very
little Scheme still).

Now some things are changing:
http://lambda-the-ultimate.org/node/1840
>The MIT is going to change its curriculum structure that was famous for teaching Scheme in introductory courses. One force behind the reform is no one else than Harold Abelson, famous for his marvelous Scheme opus SICP.<
>The first four weeks of C1 will be a lot like the first four weeks of 6.001, Abelson said. The difference is that programming will be done in Python and not Scheme.<

Someone is translating the SIPC programs in Python too:
http://www.codepoetics.com/wiki/inde...nguages#Python

With slides and code from lectures:
http://courses.csail.mit.edu/6.01/
http://courses.csail.mit.edu/6.01/fall06/calendar.html

I like Scheme a bit too, but I consider this is a small victory for
Python :-)

Bye,
bearophile

Hi Bearophile.
(Is your name pronounced Beer-owe-file, or Bear-oh-fi-lee, just
wondered :-) ?

I too have heard about the MIT course changing to Python elsewhere and
wanted to know why it was talked about so much?
Scheme was invented at MIT. If Scheme is as fabulous as its adherents
claim, why would the institution that invented it drop it?

To me, the answer is obvious, but probably not to the press.
I'm from England, I
know that MIT is a very prestigious university, but if Cambridge
changed a course, or better still, The Open University changed a
similar course to Python, I think I'd be hard pressed to hear about it.
Is the MIT course syndicated to Universities around America or
something?

Cheers, Paddy.
Nov 23 '06 #9

P: n/a
Paddy:
Is the MIT course syndicated to Universities around America or something?
(Is your name pronounced Beer-owe-file, or Bear-oh-fi-lee,
I don't know.

I too have heard about the MIT course changing to Python elsewhere and
wanted to know why it was talked about so much?
I don't know why others have talked so much about it, I have posted the
links here because those CS courses were very good, and probably
originally they seemed more like science finction. The most important
link I have shown is among the last ones, to the slides of the
lectures, that can probably be used to learn some other CS.

Bye,
bearophile

Nov 23 '06 #10

P: n/a
markscottwright wrote:
If it were that easy, the PyPy guys would be done by now.
if the PyPy guys had focused on writing a Python interpreter in Python,
they'd been done by now.

</F>

Nov 23 '06 #11

P: n/a
Fredrik Lundh wrote:
markscottwright wrote:
If it were that easy, the PyPy guys would be done by now.

if the PyPy guys had focused on writing a Python interpreter in Python,
they'd been done by now.

</F>
Isn't that the point of PyPy? It's what their mission statement says
(http://codespeak.net/pypy/dist/pypy/...on-statement):

"PyPy is an implementation of the Python programming language written
in Python itself, flexible and easy to experiment with."

This is something that is amazingly easy to do in scheme, since the
language is so simple, but is typically pretty difficult to do in other
languages. I remember being blown away by how much I knew after
reaching the end of SICP - I wanted to go out and write my own scheme
compiler (and given the proliferation of scheme implementations, a lot
of other people must have felt the same way). I don't remember getting
to the end of a book on python and thinking, "that's easy. I could do
that!"

That said, I see now that the course we're talking about isn't the same
as the old 6.001 course, and presumably has different pedagogical goals.

Nov 23 '06 #12

P: n/a
markscottwright wrote:
Fredrik Lundh wrote:
>markscottwright wrote:
> If it were that easy, the PyPy guys would be done by now.

if the PyPy guys had focused on writing a Python interpreter in Python,
they'd been done by now.

</F>

Isn't that the point of PyPy? It's what their mission statement says
(http://codespeak.net/pypy/dist/pypy/...on-statement):

"PyPy is an implementation of the Python programming language written
in Python itself, flexible and easy to experiment with."

This is something that is amazingly easy to do in scheme, since the
language is so simple, but is typically pretty difficult to do in other
languages....

That said, I see now that the course we're talking about isn't the same
as the old 6.001 course, and presumably has different pedagogical goals.
There are a more than a few library functions in the Python code that
are written in C in CPython. Not only is PyPy trying to get the
_entire_ Python system into Python, it is trying to do so in a
friendly-to-translation-in-a-statically-typed-language way.

Besides, if you can freely use "eval" and "exec", how hard is a pure
python language interpreter?

--Scott David Daniels
sc***********@acm.org
Nov 23 '06 #13

P: n/a

Fredrik Lundh schrieb:
markscottwright wrote:
If it were that easy, the PyPy guys would be done by now.

if the PyPy guys had focused on writing a Python interpreter in Python,
they'd been done by now.

</F>
The "Python interpreter in Python" part of PyPy _is_ done. Since quite
a while even (something like July 2005) compilation to C works, and the
interpreter was more or less finished since quite a while before that.
There were some things missing at that point but interpretation of
Python code that didn't use any fancy builtin modules worked.

Cheers,

Carl Friedrich Bolz

Nov 24 '06 #14

P: n/a
On 11/23/06, Scott David Daniels <sc***********@acm.orgwrote:
markscottwright wrote:
Fredrik Lundh wrote:
markscottwright wrote:

If it were that easy, the PyPy guys would be done by now.

if the PyPy guys had focused on writing a Python interpreter in Python,
they'd been done by now.

</F>
Isn't that the point of PyPy? It's what their mission statement says
(http://codespeak.net/pypy/dist/pypy/...on-statement):

"PyPy is an implementation of the Python programming language written
in Python itself, flexible and easy to experiment with."

This is something that is amazingly easy to do in scheme, since the
language is so simple, but is typically pretty difficult to do in other
languages....

That said, I see now that the course we're talking about isn't the same
as the old 6.001 course, and presumably has different pedagogical goals.
There are a more than a few library functions in the Python code that
are written in C in CPython. Not only is PyPy trying to get the
_entire_ Python system into Python, it is trying to do so in a
friendly-to-translation-in-a-statically-typed-language way.

Besides, if you can freely use "eval" and "exec", how hard is a pure
python language interpreter?
It's pretty trivial, and thats why I've always been unimpressed by
"implemente a <xlanguage interpreter in <ylines" type statements.
It's a cute toy but what's the real learning opportunity there?

Now, writing a compiler/interpreter from the ground up is a more
valuable experience, but does it really matter if the language is the
same one you wrote the compiler in? It gets harder the more
complicated the syntax and semantics of the language are, but, say,
python 1.0 would probably be a suitable goal for coursework.
Nov 24 '06 #15

P: n/a
Chris Mellon wrote;
Now, writing a compiler/interpreter from the ground up is a more
valuable experience, but does it really matter if the language is the
same one you wrote the compiler in? It gets harder the more
complicated the syntax and semantics of the language are, but, say,
python 1.0 would probably be a suitable goal for coursework.
I'd pick mini-python plus basic classes:

http://hetland.org/python/mini-python.php

</F>

Nov 24 '06 #16

This discussion thread is closed

Replies have been disabled for this discussion.