First release of Shed Skin, a Python-to-C++ compiler.
Carl Friedrich Bolz
cfbolz at gmx.de
Sun Sep 11 10:46:44 EDT 2005
Hi!
adDoc's networker Phil wrote:
>>
>> experimental Python-to-C++ compiler.
>>
>> why that instead of Pypy?
>>
>
> . pypy compiles to llvm (low-level virtual machine) bytecode
> which is obviously not as fast as the native code coming from c++ compilers;
PyPy can currently compile Python code to C code and to LLVM bytecode.
Note that even for LLVM bytecode the argument is void since LLVM
(despite its name, which might lead one to think that it is Java-like)
compiles its bytecode to native assembler.
> but the primary mission of pypy
> is just having a python system that is
> written in something like python rather than c or c++
it's really just plain python (it completely runs on top of CPython
after all) together with some restrictions -- which seem similar to the
restictions that shedskin imposes btw.
> . there is no reason why the pypy project can't have a .NET architecture
> instead of the java-like arrangement I assume it has now
Sorry, I can't really follow you here. In what way does PyPy have a
Java-like arrangement?
> . without such a pypy.NET system,
> shedskin is offering a service that pypy can't yet provide:
> a ( python -> c++ )-conversion allows me to
> smoothly integrate python contributions
> with my already-staggering c++ library
> . I'm not suggesting that pypy should be another
> Mono rewritten in python,
> because the essential mission of the .NET architecture
> is being able to compile
> any language of the user`s choice,
> to some intermediate language designed to be
> far more efficiently compiled to
> any machine language of the user`s choice
> than any human-readable language such as c++
> . perhaps llvm bytecode can serve as such an intermediate language?
> then llvm could be the new c++ (our defacto IL (intermediate language))
> and shedskin (python -> IL=c++) could then be replaced by
> the combination of pypy (python -> IL=llvm)
> and some incentive for all target platforms
> to develope a highly optimized
> ( llvm -> native code)-compiler
> -- assuming also, that there is available
> a highly optimized ( c++ -> llvm bytecode )-compiler .
there is. look at the LLVM page for details: www.llvm.org
Cheers,
Carl Friedrich Bolz
More information about the Python-list
mailing list