Why not a Python compiler?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carl Friedrich Bolz

    #16
    Re: Why not a Python compiler?

    Reedick, Andrew wrote:
    >-----Original Message-----
    >From: python-list-bounces+jr9445= att.com@python. org [mailto:python-
    >list-bounces+jr9445= att.com@python. org] On Behalf Of Luis M. González
    >Sent: Tuesday, February 05, 2008 6:44 PM
    >To: python-list@python.org
    >Subject: Re: Why not a Python compiler?
    >>
    >>
    >Pypy is a very ambitious project and it aims, amongst many other
    >goals, to provide a fast just-in-time python implementation.
    >They even say that the "secret goal is being faster than c, which is
    >nonsense, isn´t it?" (I still didn´t get the joke though...).
    >>
    >
    'c' is also the speed of light. And since nothing can travel faster than light...
    nice theory, but wrong: The PyPy home page uses a capital letter C:



    Cheers,

    Carl Friedrich Bolz

    Comment

    • Carl Friedrich Bolz

      #17
      Re: Why not a Python compiler?

      Reedick, Andrew wrote:
      >-----Original Message-----
      >From: python-list-bounces+jr9445= att.com@python. org [mailto:python-
      >list-bounces+jr9445= att.com@python. org] On Behalf Of Luis M. González
      >Sent: Tuesday, February 05, 2008 6:44 PM
      >To: python-list@python.org
      >Subject: Re: Why not a Python compiler?
      >>
      >>
      >Pypy is a very ambitious project and it aims, amongst many other
      >goals, to provide a fast just-in-time python implementation.
      >They even say that the "secret goal is being faster than c, which is
      >nonsense, isn´t it?" (I still didn´t get the joke though...).
      >>
      >
      'c' is also the speed of light. And since nothing can travel faster than light...
      nice theory, but wrong: The PyPy home page uses a capital letter C:



      Cheers,

      Carl Friedrich Bolz

      Comment

      • Carl Friedrich Bolz

        #18
        Re: Why not a Python compiler?

        Hi Luis,

        Luis M. Gonzalez wrote:
        Well, lets suppose that being faster than C is the real goal...
        How about we call it a very long-term dream?
        Are you confident that it will be reached?
        We have ideas how to get there, but it is really rather long-term. There
        will be a lot of research needed to achieve that for sure.
        How far is it at this moment?
        Since a year already we have a JIT that makes quite fast code for purely
        integer-type operations. Quite fast meaning about the speed of gcc -O0.
        So far it is not faster than Psyco (it supports generators, though). We
        are confident that the JIT will get substantially better this year
        (probably better than Psyco). Where exactly this will leave us we don't
        know.
        I've been following the project but the scarcity of news is getting me
        anxious...
        Read the blog: morepypy.blogsp ot.com :-)

        Cheers,

        Carl Friedrich

        Comment

        • Carl Friedrich Bolz

          #19
          Re: Why not a Python compiler?

          Hi Luis,

          Luis M. Gonzalez wrote:
          Well, lets suppose that being faster than C is the real goal...
          How about we call it a very long-term dream?
          Are you confident that it will be reached?
          We have ideas how to get there, but it is really rather long-term. There
          will be a lot of research needed to achieve that for sure.
          How far is it at this moment?
          Since a year already we have a JIT that makes quite fast code for purely
          integer-type operations. Quite fast meaning about the speed of gcc -O0.
          So far it is not faster than Psyco (it supports generators, though). We
          are confident that the JIT will get substantially better this year
          (probably better than Psyco). Where exactly this will leave us we don't
          know.
          I've been following the project but the scarcity of news is getting me
          anxious...
          Read the blog: morepypy.blogsp ot.com :-)

          Cheers,

          Carl Friedrich

          Comment

          • Jorge Godoy

            #20
            RE: Why not a Python compiler?

            Reedick, Andrew wrote:
            >-----Original Message-----
            >From: python-list-bounces+jr9445= att.com@python. org [mailto:python-
            >list-bounces+jr9445= att.com@python. org] On Behalf Of Grant Edwards
            >>
            >Nothing can travel faster than the speed of light
            >_in_a_vacuum _. There are situtaitons where things can (and
            >regularly do) travel faster than light:
            >http://en.wikipedia.org/wiki/Cherenkov_radiation
            >
            >
            Nope. It propagates, not travels, faster than light. Go ask a physicist
            to explain it. It's odd...
            So let me see if I understood this correctly: C travels, C++ propagates? :-)


            Comment

            • Stefan Behnel

              #21
              Re: Why not a Python compiler?

              Santiago Romero wrote:
              I'm impressed with python. I'm very happy with the language and I
              find Python+Pygame a very powerful and productive way of writing 2D
              games. I'm not, at this moment, worried about execution speed of the
              small game I'm working on (it runs at full 60 fps even in an old AMD-
              K6 450 Laptop computer), but I continue asking me the same question:
              >
              Why not a Python COMPILER?
              >
              It would be very nice to be able to output Linux, MAC or Windows
              binaries of compiled (not bytecompiled) code. It would run faster, it
              will be smaller in size (I think)
              Take a look at Cython. It's an optimising Python-to-C compiler for writing
              Python extensions. So you can basically take a Python module and compile it to
              C code that runs against the CPython runtime.



              and it will be easy to distribute to
              people not having python installed. Yes, I know about py2exe, but I'm
              not sure if that's the right aproach.
              That's a different focus, but then, there's "portable Python".



              Stefan

              Comment

              • Steve Holden

                #22
                Re: Why not a Python compiler?

                Ryszard Szopa wrote:
                On Feb 5, 9:30 am, cokofree...@gma il.com wrote:
                >
                >I don't know the exact details but I think the issue is the dynamic
                >nature of Python makes it impossible to correctly store the various
                >types and changes into compiled code. Someone else will probably be
                >able to provide a good reason as to why it isn't very feasible, nor a
                >good idea. If you want to speed up your python look at Psyco. http://psyco.sourceforge.net/
                >
                Yeah, but exactly what features make it so hard to write a compiler
                for Python?
                [...]
                a. People tell me writing a compiler for Python is hard.

                b. It's certainly way to hard for me.

                c. But hey, I've heard about this neat language called Common Lisp that
                has a compiler. It looks a lot like Python.

                d. So why can't you brainboxes write a compiler for Python?

                Please tell me if I'm missing anything from this summary of your thought
                processes.

                regards
                Steve
                --
                Steve Holden +1 571 484 6266 +1 800 494 3119
                Holden Web LLC http://www.holdenweb.com/

                Comment

                • Bjoern Schliessmann

                  #23
                  Re: Why not a Python compiler?

                  Ryszard Szopa wrote:
                  Of course, when writing Python extensions in C is fairly easy and
                  when rewriting just the critical part of the code is enough to get
                  acceptable performance, I really doubt I will see anybody willing
                  to invest serious amounts of money and time into writing a native
                  compiler for Python. Learning C cannot be so hard ;-).
                  Sure! Learning English also is not too hard. So everyone should be
                  capable of writing poetry of Shakespeare niveau.

                  Regards,


                  Björn

                  --
                  BOFH excuse #69:

                  knot in cables caused data stream to become twisted and kinked

                  Comment

                  • Stefan Behnel

                    #24
                    Re: Why not a Python compiler?

                    Bjoern Schliessmann wrote:
                    Learning English also is not too hard. So everyone should be
                    capable of writing poetry of Shakespeare niveau.
                    You're lucky that you can infer anything from a wrong statement.



                    Stefan

                    Comment

                    • Lou Pecora

                      #25
                      Re: Why not a Python compiler?

                      In article <87tzkko6dv.fsf @physik.rwth-aachen.de>,
                      Torsten Bronger <bronger@physik .rwth-aachen.dewrote:
                      a parsec was a unit of time.
                      >
                      The latter because it was corrected in the novelization.
                      >
                      Tschö,
                      Torsten.
                      Sounds like one. The reverse of light year that sounds like a unit of
                      time, but isn't. I've heard it used seriously like time in some movie.

                      --
                      -- Lou Pecora

                      Comment

                      • Steven D'Aprano

                        #26
                        Re: Why not a Python compiler?

                        On Thu, 07 Feb 2008 09:06:32 -0500, Steve Holden wrote:
                        Ryszard Szopa wrote:
                        >On Feb 5, 9:30 am, cokofree...@gma il.com wrote:
                        >>
                        >>I don't know the exact details but I think the issue is the dynamic
                        >>nature of Python makes it impossible to correctly store the various
                        >>types and changes into compiled code. Someone else will probably be
                        >>able to provide a good reason as to why it isn't very feasible, nor a
                        >>good idea. If you want to speed up your python look at Psyco.
                        >>http://psyco.sourceforge.net/
                        >>
                        >Yeah, but exactly what features make it so hard to write a compiler for
                        >Python?
                        >[...]
                        >
                        a. People tell me writing a compiler for Python is hard.
                        >
                        b. It's certainly way to hard for me.
                        >
                        c. But hey, I've heard about this neat language called Common Lisp that
                        has a compiler. It looks a lot like Python.
                        >
                        d. So why can't you brainboxes write a compiler for Python?
                        >
                        Please tell me if I'm missing anything from this summary of your thought
                        processes.

                        Be fair -- he's asking what specific features of Python make it hard.
                        That's a reasonable question.


                        --
                        Steven

                        Comment

                        • Steve Holden

                          #27
                          Re: Why not a Python compiler?

                          Steven D'Aprano wrote:
                          On Thu, 07 Feb 2008 09:06:32 -0500, Steve Holden wrote:
                          >
                          >Ryszard Szopa wrote:
                          >>On Feb 5, 9:30 am, cokofree...@gma il.com wrote:
                          >>>
                          >>>I don't know the exact details but I think the issue is the dynamic
                          >>>nature of Python makes it impossible to correctly store the various
                          >>>types and changes into compiled code. Someone else will probably be
                          >>>able to provide a good reason as to why it isn't very feasible, nor a
                          >>>good idea. If you want to speed up your python look at Psyco.
                          >>>http://psyco.sourceforge.net/
                          >>Yeah, but exactly what features make it so hard to write a compiler for
                          >>Python?
                          >>[...]
                          >a. People tell me writing a compiler for Python is hard.
                          >>
                          >b. It's certainly way to hard for me.
                          >>
                          >c. But hey, I've heard about this neat language called Common Lisp that
                          >has a compiler. It looks a lot like Python.
                          >>
                          >d. So why can't you brainboxes write a compiler for Python?
                          >>
                          >Please tell me if I'm missing anything from this summary of your thought
                          >processes.
                          >
                          >
                          Be fair -- he's asking what specific features of Python make it hard.
                          That's a reasonable question.
                          >
                          >
                          Bah, humbug. Maybe I should be getting more sleep ...

                          Fortunately someone less grumpy provided quite a decent answer.

                          regards
                          Steve
                          --
                          Steve Holden +1 571 484 6266 +1 800 494 3119
                          Holden Web LLC http://www.holdenweb.com/

                          Comment

                          • Arnaud Delobelle

                            #28
                            Re: Why not a Python compiler?

                            On Feb 7, 11:25 pm, Hrvoje Niksic <hnik...@xemacs .orgwrote:
                            Steven D'Aprano <st...@REMOVE-THIS-cybersource.com .auwrites:
                            Be fair -- he's asking what specific features of Python make it
                            hard.  That's a reasonable question.
                            >
                            Indeed.  The best explanation I've seen explained goes something like
                            this: imagine a hypothetical Python compiler that achieves native
                            compilation by compiling to Common Lisp and using the CL's compiler to
                            produce native code.  Upon encountering the expression such as:
                            >
                            a + b
                            >
                            the compiler could do little else except translate it to something
                            like:
                            >
                            (python:add a b)
                            [snip more interesting considerations about compiling python]

                            Please get back on topic. This discussion is about parsecs and
                            wookies now.

                            --
                            Arnaud

                            Comment

                            • Torsten Bronger

                              #29
                              Re: Why not a Python compiler?

                              Hallöchen!

                              Reedick, Andrew writes:
                              >-----Original Message-----
                              >From: python-list-bounces+jr9445= att.com@python. org [mailto:python-
                              >list-bounces+jr9445= att.com@python. org] On Behalf Of Torsten Bronger
                              >Sent: Thursday, February 07, 2008 3:32 PM
                              >To: python-list@python.org
                              >Subject: Re: Why not a Python compiler?
                              >>
                              >>I wonder if George Lucas intended it as a joke or if he thought
                              >>a parsec was a unit of time.
                              >>
                              >The latter because it was corrected in the novelization.
                              >
                              Errr... didn't one of the novels explain it away by describing the
                              kessel run as a region of space warped by black holes or other
                              objects? Bragging rights for crossing such a field thus centered
                              on shortest distance instead of time.
                              Well, in the link that Grant provided, it says

                              In the A New Hope novelization, Han says "standard time units"
                              rather than "parsecs". Therefore, the reduced distance of Solo's
                              Kessel Run is most likely a retcon to explain George Lucas's
                              confusion of time and distance units.

                              Tschö,
                              Torsten.

                              --
                              Torsten Bronger, aquisgrana, europa vetus
                              Jabber ID: bronger@jabber. org
                              (See http://ime.webhop.org for further contact info.)

                              Comment

                              • Grant Edwards

                                #30
                                Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]

                                On 2008-02-08, Dennis Lee Bieber <wlfraed@ix.net com.comwrote:
                                A Parsec is a fixed value (which, admittedly, presumes the culture
                                developed a 360degree circle broken into degrees =minutes =>
                                seconds... or, at least, some units compatible with the concept of an
                                "arc second", like 400 grads of, say, 100 "minutes", each of 100
                                "seconds")
                                It also presumes a standard diamter of that circle.

                                --
                                Grant Edwards grante Yow! Are you the
                                at self-frying president?
                                visi.com

                                Comment

                                Working...