Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26252 > unrolled thread
| Started by | maniandram01@gmail.com |
|---|---|
| First post | 2012-07-30 06:27 -0700 |
| Last post | 2012-09-01 20:15 -0700 |
| Articles | 18 — 9 participants |
Back to article view | Back to comp.lang.python
py2c - an open source Python to C/C++ is looking for developers maniandram01@gmail.com - 2012-07-30 06:27 -0700
Re: py2c - an open source Python to C/C++ is looking for developers andrea crotti <andrea.crotti.0@gmail.com> - 2012-07-30 16:08 +0100
Re: py2c - an open source Python to C/C++ is looking for developers MaxTheMouse <maxthemouse@googlemail.com> - 2012-07-30 09:42 -0700
Re: py2c - an open source Python to C/C++ is looking for developers alex23 <wuwei23@gmail.com> - 2012-07-30 17:16 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Stefan Behnel <stefan_ml@behnel.de> - 2012-07-31 07:23 +0200
Re: py2c - an open source Python to C/C++ is looking for developers Stefan Behnel <stefan_ml@behnel.de> - 2012-07-31 14:46 +0200
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 20:15 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Michael Torrie <torriem@gmail.com> - 2012-09-01 23:27 -0600
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 23:10 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Stefan Behnel <stefan_ml@behnel.de> - 2012-09-02 08:27 +0200
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 23:10 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 23:16 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-02 09:43 +0100
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 23:16 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Serhiy Storchaka <storchaka@gmail.com> - 2012-09-02 10:23 +0300
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-02 06:46 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-02 06:46 -0700
Re: py2c - an open source Python to C/C++ is looking for developers Ramchandra Apte <maniandram01@gmail.com> - 2012-09-01 20:15 -0700
| From | maniandram01@gmail.com |
|---|---|
| Date | 2012-07-30 06:27 -0700 |
| Subject | py2c - an open source Python to C/C++ is looking for developers |
| Message-ID | <16816fd5-c6b4-49df-baf0-e0bfb0d999df@googlegroups.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.
[toc] | [next] | [standalone]
| From | andrea crotti <andrea.crotti.0@gmail.com> |
|---|---|
| Date | 2012-07-30 16:08 +0100 |
| Message-ID | <mailman.2734.1343660926.4697.python-list@python.org> |
| In reply to | #26252 |
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
[toc] | [prev] | [next] | [standalone]
| From | MaxTheMouse <maxthemouse@googlemail.com> |
|---|---|
| Date | 2012-07-30 09:42 -0700 |
| Message-ID | <c1fc3a25-cfe5-424d-aab7-9ea3edf20095@nw7g2000pbb.googlegroups.com> |
| In reply to | #26252 |
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
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2012-07-30 17:16 -0700 |
| Message-ID | <1409e6f3-b265-4329-9618-c06f8098fef3@t1g2000pbl.googlegroups.com> |
| In reply to | #26265 |
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?
[toc] | [prev] | [next] | [standalone]
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2012-07-31 07:23 +0200 |
| Message-ID | <mailman.2756.1343712249.4697.python-list@python.org> |
| In reply to | #26277 |
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
[toc] | [prev] | [next] | [standalone]
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2012-07-31 14:46 +0200 |
| Message-ID | <mailman.2774.1343738809.4697.python-list@python.org> |
| In reply to | #26277 |
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
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 20:15 -0700 |
| Message-ID | <9cf4820c-25a2-45a7-af47-cb3e06d30707@googlegroups.com> |
| In reply to | #26306 |
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++
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2012-09-01 23:27 -0600 |
| Message-ID | <mailman.56.1346564917.27098.python-list@python.org> |
| In reply to | #28233 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 23:10 -0700 |
| Message-ID | <6b2b2379-c382-4338-9a10-18e1a63cfbee@googlegroups.com> |
| In reply to | #28236 |
>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)
[toc] | [prev] | [next] | [standalone]
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2012-09-02 08:27 +0200 |
| Message-ID | <mailman.61.1346567249.27098.python-list@python.org> |
| In reply to | #28238 |
Ramchandra Apte, 02.09.2012 08:10: >> 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) Nope, not at all. They use the CPython C-API internally, so in order to port them, you'll have to reimplement that first. That's a huge amount of work, as proven by the incompleteness of all other Python implementations in that regard. If you think you can do better here then IronPython or PyPy, please go ahead. Stefan
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 23:10 -0700 |
| Message-ID | <mailman.58.1346566262.27098.python-list@python.org> |
| In reply to | #28236 |
>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)
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 23:16 -0700 |
| Message-ID | <33c248e3-06fe-4929-b617-392d7122d6e0@googlegroups.com> |
| In reply to | #28236 |
On Sunday, 2 September 2012 11:18:38 UTC+5:30, Michael Torrie wrote: > 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. I am writing py2c for my OS written in Python (planned) . >Sounds like a fun project for you. More fun with more developers. (I need developers)
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2012-09-02 09:43 +0100 |
| Message-ID | <mailman.65.1346575399.27098.python-list@python.org> |
| In reply to | #28240 |
On 02/09/2012 07:16, Ramchandra Apte wrote: > On Sunday, 2 September 2012 11:18:38 UTC+5:30, Michael Torrie wrote: >> 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. > > I am writing py2c for my OS written in Python (planned) . >> Sounds like a fun project for you. > More fun with more developers. (I need developers) > Your earlier quote "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)" means that I won't be touching the project with a 10 foot long disinfected barge pole. -- Cheers. Mark Lawrence.
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 23:16 -0700 |
| Message-ID | <mailman.59.1346566579.27098.python-list@python.org> |
| In reply to | #28236 |
On Sunday, 2 September 2012 11:18:38 UTC+5:30, Michael Torrie wrote: > 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. I am writing py2c for my OS written in Python (planned) . >Sounds like a fun project for you. More fun with more developers. (I need developers)
[toc] | [prev] | [next] | [standalone]
| From | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| Date | 2012-09-02 10:23 +0300 |
| Message-ID | <mailman.62.1346570614.27098.python-list@python.org> |
| In reply to | #28233 |
On 02.09.12 06:15, 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++ How is it implemented long integers?
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-02 06:46 -0700 |
| Message-ID | <d3dc7e95-89e5-4cf6-b5cb-fce72de73241@googlegroups.com> |
| In reply to | #28244 |
On Sunday, 2 September 2012 12:53:35 UTC+5:30, Serhiy Storchaka wrote: > On 02.09.12 06:15, 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++ > > > > How is it implemented long integers? py2c has been just started (long integer multiplacation might use the Python internal multiplication code) (it uses the karatsuba algorithm)
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-02 06:46 -0700 |
| Message-ID | <mailman.86.1346593599.27098.python-list@python.org> |
| In reply to | #28244 |
On Sunday, 2 September 2012 12:53:35 UTC+5:30, Serhiy Storchaka wrote: > On 02.09.12 06:15, 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++ > > > > How is it implemented long integers? py2c has been just started (long integer multiplacation might use the Python internal multiplication code) (it uses the karatsuba algorithm)
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-09-01 20:15 -0700 |
| Message-ID | <mailman.55.1346555723.27098.python-list@python.org> |
| In reply to | #26306 |
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++
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web