Abelson and Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bearophileHUGS@lycos.com

    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:

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


    With slides and code from lectures:



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

    Bye,
    bearophile

  • mensanator@aol.com

    #2
    Re: Abelson and Python


    bearophileHUGS@ 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:

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

    >
    With slides and code from lectures:


    >
    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

    Comment

    • bearophileHUGS@lycos.com

      #3
      Re: Abelson and Python

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

      Comment

      • mensanator@aol.com

        #4
        Re: Abelson and Python


        bearophileH...@ lycos.com wrote:
        mensanator@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

        Comment

        • bearophileHUGS@lycos.com

          #5
          Re: Abelson and Python

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

          Comment

          • markscottwright

            #6
            Re: Abelson and Python


            bearophileHUGS@ 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:

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

            Comment

            • bearophileHUGS@lycos.com

              #7
              Re: Abelson and Python

              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

              Comment

              • Paddy

                #8
                Re: Abelson and Python


                bearophileHUGS@ 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:

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

                >
                With slides and code from lectures:


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

                Comment

                • mensanator@aol.com

                  #9
                  Re: Abelson and Python


                  Paddy wrote:
                  bearophileHUGS@ 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:

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


                  With slides and code from lectures:



                  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.

                  Comment

                  • bearophileHUGS@lycos.com

                    #10
                    Re: Abelson and Python

                    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

                    Comment

                    • Fredrik Lundh

                      #11
                      Re: Abelson and Python

                      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>

                      Comment

                      • markscottwright

                        #12
                        Re: Abelson and Python

                        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.

                        Comment

                        • Scott David Daniels

                          #13
                          Re: Abelson and Python

                          markscottwright wrote:
                          Fredrik Lundh wrote:
                          >markscottwrigh t 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
                          scott.daniels@a cm.org

                          Comment

                          • cfbolz@googlemail.com

                            #14
                            Re: Abelson and Python


                            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

                            Comment

                            • Chris Mellon

                              #15
                              Re: Abelson and Python

                              On 11/23/06, Scott David Daniels <scott.daniels@ 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.

                              Comment

                              Working...