News for hackers. Stuff that matters.
Re:SICP taught in Python 3 - UC Berkeley online by postfuturist on Friday January 20, 2012 @04:10PM (#3491239)
I like Python, but how do they plan on teaching recursion with a language that doesn't optimize tail recursion?

Oh, I see, just give them trivially small data sets: http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab8/lab8...

Re:SICP taught in Python 3 - UC Berkeley online by abecedarius on Friday January 20, 2012 @05:10PM (#3491442)
When I studied SICP I used XLisp under DOS (no tail recursion, 640k). OTOH Python's default recursion limit of 1000 is even more restrictive than that.

The question I had is how are they going to code a metacircular interpreter? Apparently they make a Scheme interpreter instead.

Re:SICP taught in Python 3 - UC Berkeley online by Jach on Saturday January 21, 2012 @01:57AM (#3492845)
What's so hard about using a decorator? You still get the magic, it's just explicit.

Just one possibility: http://code.activestate.com/recipes/474088/

Re:SICP taught in Python 3 - UC Berkeley online by babarock on Friday January 20, 2012 @05:29PM (#3491514)
I'm currently reading SICP (the original one). Even though it's LISP instead of Python, the syllabus seems to be very implementation-agnostic. Tail recursion optimization is nice and comes in handy, but I don't think it matters much in the choice of a language to teach this course.

Focus is naturally put on how a language looks on paper, more than how it executes on the machine.

My 2c.

Re:SICP taught in Python 3 - UC Berkeley online by tikhonj on Friday January 20, 2012 @05:44PM (#3491561)
I remember the text--and the old course--actually spent a good bit of time talking about proper tail calls and "iteration" vs "recursion". We talked about how the code behaves differently--e.g. space usage--and about how to identify the two types.

Also, it's the Structure and Interpretation of Computer Programs; naturally, the first bit talks about how programs look (structure), but the second bit (mainly chapters 4 and 5, if I remember correctly) talks about exactly that: how to execute code on the machine. The last chapter, in fact, introduces a register-based language not unlike assembly.

Re:SICP taught in Python 3 - UC Berkeley online by dman on Friday January 20, 2012 @04:19PM (#3491263)
Coming from lisp/scheme, this is my least favorite corner of Python.
Re:SICP taught in Python 3 - UC Berkeley online by reledi on Friday January 20, 2012 @05:02PM (#3491418)
Teaching recursion isn't an issue as long as they explain why you should avoid tail recursion in Python.