473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Abelson and Python

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
15 1895

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

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

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

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

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

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: legere | last post by:
This is a follow up to an earlier thread about working through "Structure and Interpretation of Computer Programs" (Abelson, Sussman, and Sussman) using Python. Inspired by that thread, and as I...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
7
by: Robert Dodier | last post by:
Hello, I have an idea, thus far half-baked, to create a language called Ephemeral, for "flexible modeling & reasoning language". I'd like some advice about how to go about implementing it. ...
176
by: Thomas Reichelt | last post by:
Moin, short question: is there any language combining the syntax, flexibility and great programming experience of Python with static typing? Is there a project to add static typing to Python? ...
17
by: Will Stuyvesant | last post by:
Here is a question for people who are more comfortable than I am with new Python stuff like generators. I am having fun implementing things from the Wizard book (Abelson, Sussman, "Structure and...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
65
by: Amol Vaidya | last post by:
Hi. I am interested in learning a new programming language, and have been debating whether to learn Ruby or Python. How do these compare and contrast with one another, and what advantages does one...
852
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for...
33
by: NicolasG | last post by:
Hi, I want to be a professional python programmer, unfortunately I'm working on technical support and don't have the time/patience to start making projects my self. I tried to apply to some...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.