Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'extensions': 0.04; '(python': 0.05; 'compiler': 0.07; 'used.': 0.07; 'python': 0.07; '+0200,': 0.09; 'compiler.': 0.09; 'generators': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'x86': 0.09; '>>>': 0.12; 'c++': 0.12; 'wrote:': 0.14; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:84.153': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:t-dialin.net': 0.16; 'specialising': 0.16; 'unchanged,': 0.16; 'unmodified': 0.16; 'static': 0.16; 'code.': 0.18; 'suggest': 0.19; 'compile': 0.19; 'code,': 0.20; 'language': 0.20; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'right.': 0.22; 'subject:code': 0.23; 'mainly': 0.24; "didn't": 0.25; 'received:84': 0.25; "doesn't": 0.28; 'supports': 0.29; 'fri,': 0.29; 'certainly': 0.29; 'stefan': 0.29; 'compiling': 0.31; 'does': 0.31; 'to:addr:python-list': 0.32; '(including': 0.33; 'minor': 0.33; 'header:X-Complaints-To:1': 0.34; 'actually': 0.34; 'header:User-Agent:1': 0.35; 'widely': 0.35; 'list,': 0.36; 'think': 0.36; 'problem.': 0.36; 'two': 0.37; 'machine': 0.37; 'either': 0.37; 'apr': 0.38; 'execute': 0.38; 'steven': 0.38; 'user': 0.38; 'but': 0.38; 'used': 0.38; 'received:org': 0.38; 'ok,': 0.39; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'except': 0.39; 'header:Received:5': 0.40; 'allows': 0.40; '2011': 0.62; 'play': 0.64; 'exclude': 0.77; 'claims': 0.83; 'compiles': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Stefan Behnel Subject: Re: a basic bytecode to machine code compiler Date: Sat, 02 Apr 2011 12:30:10 +0200 References: <4j7lp.5204$sS4.1784@newsfe11.iad> <4d95cba6$0$29992$c3e8da3$5496439d@news.astraweb.com> <4d96f49b$0$29992$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: p5499b3c9.dip.t-dialin.net User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 In-Reply-To: <4d96f49b$0$29992$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301740231 news.xs4all.nl 81474 [::ffff:82.94.164.166]:60463 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2448 Steven D'Aprano, 02.04.2011 12:04: > On Fri, 01 Apr 2011 17:45:39 +0200, Stefan Behnel wrote: > >> Steven D'Aprano, 01.04.2011 14:57: >>> I suggest you check out the competitors: >>> >>> Shedskin is a Python to C++ compiler; Psyco is a JIT specialising >>> compiler; Nuitka claims to be a C++ implementation that compiles to >>> machine code; Berp claims to be a Haskell implementation that does the >>> same; Compyler claims to be a native x86 assembly compiler; UnPython >>> claims to be an experimental Python to C compiler. >>> >>> >>> Of the six, as far as I know only Shedskin and Psyco are widely used. >> >> Erm, yes, right. If you want to exclude Cython, which arguably is the >> only static Python compiler that actually has a large user base, then >> those may really be the only two that are widely used. Except that Psyco >> is certainly being used a lot more often than Shedskin, mainly because >> it actually allows you to execute Python code. > > My apologies, I thought about including Cython in the list, but my > understanding of it is that it is a derivative of Pyrex, and used for > writing C extensions in a Python-like language (Python + type > annotations). We were talking about talking ordinary, unmodified Python > code and compiling it to machine code, and I didn't think either Pyrex or > Cython do that. Ok, no problem. Pyrex certainly doesn't play in the same league. Cython actually supports most Python language features now (including generators in the development branch), both from Python 2 and Python 3. Chances are that the next release will actually compile most of your Python code unchanged, or only with minor adaptations. Stefan