Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   py2c - an open source Python to C/C++ is looking for developers (http://www.velocityreviews.com/forums/t948750-py2c-an-open-source-python-to-c-c-is-looking-for-developers.html)

maniandram01@gmail.com 07-30-2012 01:27 PM

py2c - an open source Python to C/C++ is looking for developers
 
I created py2c ( http://code.google.com/p/py2c )- an open source Python to C/C++ translator!
py2c is looking for developers!
To join create a posting in the py2c-discuss Google Group or email me!
Thanks
PS:I hope this is the appropiate group for this message.

andrea crotti 07-30-2012 03:08 PM

Re: py2c - an open source Python to C/C++ is looking for developers
 
2012/7/30 <maniandram01@gmail.com>:
> I created py2c ( http://code.google.com/p/py2c )- an open source Python to C/C++ translator!
> py2c is looking for developers!
> To join create a posting in the py2c-discuss Google Group or email me!
> Thanks
> PS:I hope this is the appropiate group for this message.
> --
> http://mail.python.org/mailman/listinfo/python-list


It looks like a very very hard task, and really useful or for exercise?

The first few lines I've seen there are the dangerous * imports and
LazyStrin looks like a typo..

from ast import *
import functools
from c_types import *
from lazystring import *
#constant data
empty = LazyStrin
ordertuple = ((Or,),(And

MaxTheMouse 07-30-2012 04:42 PM

Re: py2c - an open source Python to C/C++ is looking for developers
 
On Jul 30, 7:27*am, maniandra...@gmail.com wrote:
> I created py2c (http://code.google.com/p/py2c)- an open source Python to C/C++ translator!
> py2c is looking for developers!
> To join create a posting in the py2c-discuss Google Group or email me!
> Thanks
> PS:I hope this is the appropiate group for this message.


Out of curiosity.
What is the difference between this and Shedskin? Shedskin being a
(restricted) python-to-C++ compiler. (http://code.google.com/p/
shedskin/) Is the goal to be able to handle any python code or a
subset?

Cheers,
Adam

alex23 07-31-2012 12:16 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
On Jul 31, 2:42*am, MaxTheMouse <maxthemo...@googlemail.com> wrote:
> What is the difference between this and Shedskin? Shedskin being a
> (restricted) python-to-C++ compiler. (http://code.google.com/p/
> shedskin/) Is the goal to be able to handle any python code or a
> subset?


There's also Nuitka, which is an unrestricted compiler, I believe:
http://nuitka.net/pages/overview.html

Is this a completely independent project, or are there plans to
leverage off of PyPy's toolchain, for example?

Stefan Behnel 07-31-2012 05:23 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
alex23, 31.07.2012 02:16:
> On Jul 31, 2:42 am, MaxTheMouse wrote:
>> What is the difference between this and Shedskin? Shedskin being a
>> (restricted) python-to-C++ compiler. (http://code.google.com/p/
>> shedskin/) Is the goal to be able to handle any python code or a
>> subset?

>
> There's also Nuitka, which is an unrestricted compiler, I believe:
> http://nuitka.net/pages/overview.html


Not to forget Cython, which is the only Python-to-C compiler that is in
widespread use.


> Is this a completely independent project, or are there plans to
> leverage off of PyPy's toolchain, for example?


>From a look at the source code, it seems hard to bring it together with

anything. It looks very monolithic.

Stefan



Stefan Behnel 07-31-2012 12:46 PM

Re: py2c - an open source Python to C/C++ is looking for developers
 
Stefan Behnel, 31.07.2012 07:23:
> From a look at the source code, it seems hard to bring it together with
> anything. It looks very monolithic.


Hmm, sorry, I mixed it up with "2c.py", which is yet another of those
Python-to-C compilers with an all too similar name.

https://code.google.com/p/2c-python/

There are a couple of others here:

http://wiki.python.org/moin/PythonImplementations

Seeing the number of those compilers, almost none of which is commonly used
and/or still alive as a project, the question really is: why another one?

I mean, it's totally fine as a hobby educational project, sure, and I
really don't want to discourage anyone from going through this to have fun.

But apart from "just for fun", what is the goal that would make this
particular compiler different from the others? And also different enough to
merit its own source base, instead of basing it on one of the existing
projects? I don't consider "source is harder to read than to write" a good
answer to this in general.

Stefan



Ramchandra Apte 09-02-2012 03:15 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
On Tuesday, 31 July 2012 18:16:27 UTC+5:30, Stefan Behnel wrote:
> Stefan Behnel, 31.07.2012 07:23:
>
> > From a look at the source code, it seems hard to bring it together with

>
> > anything. It looks very monolithic.

>
>
>
> Hmm, sorry, I mixed it up with "2c.py", which is yet another of those
>
> Python-to-C compilers with an all too similar name.
>
>
>
> https://code.google.com/p/2c-python/
>
>
>
> There are a couple of others here:
>
>
>
> http://wiki.python.org/moin/PythonImplementations
>
>
>
> Seeing the number of those compilers, almost none of which is commonly used
>
> and/or still alive as a project, the question really is: why another one?
>
>
>
> I mean, it's totally fine as a hobby educational project, sure, and I
>
> really don't want to discourage anyone from going through this to have fun.
>
>
>
> But apart from "just for fun", what is the goal that would make this
>
> particular compiler different from the others? And also different enough to
>
> merit its own source base, instead of basing it on one of the existing
>
> projects? I don't consider "source is harder to read than to write" a good
>
> answer to this in general.


>
>
> Stefan


It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++

Ramchandra Apte 09-02-2012 03:15 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
On Tuesday, 31 July 2012 18:16:27 UTC+5:30, Stefan Behnel wrote:
> Stefan Behnel, 31.07.2012 07:23:
>
> > From a look at the source code, it seems hard to bring it together with

>
> > anything. It looks very monolithic.

>
>
>
> Hmm, sorry, I mixed it up with "2c.py", which is yet another of those
>
> Python-to-C compilers with an all too similar name.
>
>
>
> https://code.google.com/p/2c-python/
>
>
>
> There are a couple of others here:
>
>
>
> http://wiki.python.org/moin/PythonImplementations
>
>
>
> Seeing the number of those compilers, almost none of which is commonly used
>
> and/or still alive as a project, the question really is: why another one?
>
>
>
> I mean, it's totally fine as a hobby educational project, sure, and I
>
> really don't want to discourage anyone from going through this to have fun.
>
>
>
> But apart from "just for fun", what is the goal that would make this
>
> particular compiler different from the others? And also different enough to
>
> merit its own source base, instead of basing it on one of the existing
>
> projects? I don't consider "source is harder to read than to write" a good
>
> answer to this in general.


>
>
> Stefan


It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++

Michael Torrie 09-02-2012 05:27 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
On 09/01/2012 09:15 PM, Ramchandra Apte wrote:
> It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++


Sounds like a fun project for you. I hope you learn a lot doing it.
That's reason enough for it. Do you plan to port all the standard
python modules as well, though? Because Python modules, both in the
standard library and third-party, are the main reasons that I use
python. For example, PyGTK. Python is a great glue language. Since it
can seamlessly interact with C and be extended in C, speed has never
really been an issue for me.


Ramchandra Apte 09-02-2012 06:10 AM

Re: py2c - an open source Python to C/C++ is looking for developers
 
>That's reason enough for it. Do you plan to port all the standard
python modules as well, though?

Well, it should be quite easy because most of the _modules are either C accelerator (which there is no need to port) or a C wrapper (which should be trivial to port)


All times are GMT. The time now is 07:05 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57