[Python-ideas] Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hello to the list, I have an idea for Python that is non-traditional in that it doesn’t extend or modify existing Python language structure. The idea uses Python to translate Python, entirely under program control, directly to optimized assembly language .dll or .so files, called “extensions

[Python-ideas] Add gamma function to cmath module

2019-09-08 Thread davidgmorillop
Since the gamma function (see https://en.wikipedia.org/wiki/Gamma_function) is defined for complex numbers too, wouldn't it be normal to have it implemented on the `cmath` module? The `math` module has this function, but it doesn't support complex numbers (as expected). I know that others librar

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Anders Hovmöller
This isn't the place for ads for commercial products. > On 7 Sep 2019, at 22:19, Mark @pysoniq wrote: > > Hello to the list, > > I have an idea for Python that is non-traditional in that it doesn’t extend > or modify existing Python language structure. > > The idea uses Python to translate

[Python-ideas] Support for atomic types in Python

2019-09-08 Thread Vinay Sharma via Python-ideas
Currently, C++ has support for atomic types, on which operations like add, sub, xor, etc can be done atomically, thereby avoiding data races. Having such a support will be very helpful in Python. For instance users won't have to use Locks for synchronising shared variables in case of multiproces

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Guido van Rossum
I don't know, but maybe you can look into submitting a PR that adds cmath.gamma? (I would first create an issue on bugs.python.org where you can have more discussion about the PR.) Maybe when implementing it you'll find the reason why it isn't defined yet... On Sun, Sep 8, 2019 at 1:45 PM wrote:

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread David García
Since cmath module is implemented on C, and my C level is really basic, I do not feel confident enough to submit a PR, but I encourage a more experienced developer to do it. I must say too that I'm new to the python community, therefore I don't know the following steps I should take. Thanks in a

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, Anders, The availability of a free extension every 30 days is a big benefit to the Python community that may not be immediately obvious. That’s not your standard freemium, as it has all the “features” of the paid product -- full registers, multicore, SIMD and other optimizations – so when

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
I forgot to mention that I received private feedback that was useful with respect to the technical discussion: The core technologies used are discussed in detail in the first five blog entries -- that is the heart of the project. Mark ___ Python-id

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Antoine Pitrou
How is your approach different from, say, Cython, Nuitka or Pythran? Regards Antoine. On Sun, 08 Sep 2019 15:56:04 - "Mark @pysoniq" wrote: > Hi, Anders, > > The availability of a free extension every 30 days is a big benefit to the > Python community that may not be immediately obviou

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Chris Angelico
On Sun, Sep 8, 2019 at 10:47 PM Mark @pysoniq wrote: > > Hello to the list, > > I have an idea for Python that is non-traditional in that it doesn’t extend > or modify existing Python language structure. > > The idea uses Python to translate Python, entirely under program control, > directly to

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread David Mertz
I think the "proposal" is "people should give us money." :-) Yes, ads for commercial software do not belong on this list. On Sun, Sep 8, 2019, 12:08 PM Chris Angelico wrote: > On Sun, Sep 8, 2019 at 10:47 PM Mark @pysoniq wrote: > > > > Hello to the list, > > > > I have an idea for Python that

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread David Mertz
Also PyPy and Numba. Cython actually seems a bit different. Without annotations in a superset language, Cython programs mostly just use the same CPython runtime libraries. However, with a few type annotations sprinkled in (but not actual Python syntax), it can get big speedups). PyPy actually tri

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Guido van Rossum
For example mypyc does this. On Sun, Sep 8, 2019 at 17:29 David Mertz wrote: > Also PyPy and Numba. > > Cython actually seems a bit different. Without annotations in a superset > language, Cython programs mostly just use the same CPython runtime > libraries. However, with a few type annotations

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Guido van Rossum
Maybe you can start by publishing a Python implementation? On Sun, Sep 8, 2019 at 16:48 David García wrote: > Since cmath module is implemented on C, and my C level is really basic, I > do not feel confident enough to submit a PR, but I encourage a more > experienced developer to do it. I must s

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, Antoine, Cython requires the end user to rewrite the module to be compiled in a pseudo-C language. With PysoniQ, there is no need to rewrite Python source code. Nutika compiles to a C program, and there is more workflow instrusion. With Nutkia, you will need to install a C compiler an

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Antoine Pitrou
I have only read the posts on this thread, but the description sounded more like a AOT compiler (like Cython, Pythran, Nuitka) than a JIT compiler (like PyPy or Numba). Regards Antoine. PS : PyPy has its own codegen AFAIK, it doesn't use LLVM. On Sun, 8 Sep 2019 12:28:45 -0400 David Mertz wr

[Python-ideas] Re: Python-ideas Digest, Vol 154, Issue 27

2019-09-08 Thread Brian O'Neill
Oh gosh, that's great but it's great++ with the dream-within-a-dream frame :D :* On Sep 8, 2019, at 12:29 PM, python-ideas-requ...@python.org wrote: > Send Python-ideas mailing list submissions to > python-ideas@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Antoine Pitrou
With all due respect, your description sounds more like marketing than actual technical data. You should provide a detailed technical of your solution, otherwise this is off-topic on this mailing-list. Also, performance numbers without a detailed description of what's exactly measured (includin

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
With respect to Pythran: Pythran is "for a subset of the Python language, with a focus on scientific computing." PysoniQ is not a subset of the Python language. Currently Pythran is for Python 2.7 and "has decent Python 3 support." PysoniQ is Python 3.x only, and goes through the most recen

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Antoine, In response to your comment: "Finally, Cython does not require any rewriting, and annotations are optional." With Cython the end user does need to modify the code by inserting C type definitions like this: def primes(int nb_primes): cdef int n, i, len_p cdef int p[1000] Mark

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Antoine, In response to "You should provide a detailed technical of your solution." The automatically created ctypes wrapper is one of the keys of the project. Blog entries 1 & 2 are a very detailed and technical discussion of the ctypes wrapper. If you go to Speed Metrics and read over the f

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Antoine Pitrou
On Sun, 08 Sep 2019 17:20:30 - "Mark @pysoniq" wrote: > Antoine, > > In response to your comment: "Finally, Cython does not require any > rewriting, and annotations are > optional." > > With Cython the end user does need to modify the code by inserting C type > definitions like this: No.

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Antoine Pitrou
On Sun, 08 Sep 2019 17:27:27 - "Mark @pysoniq" wrote: > Antoine, > > In response to "You should provide a detailed technical of your solution." > > The automatically created ctypes wrapper is one of the keys of the project. > Blog entries 1 & 2 are a very detailed and technical discussion

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Most of the examples I have seen in the Cython documentation have a cdef header and many also have cdefs for typing. Although optional, here is a quote from "https://www.quora.com/How-fast-is-Cython"; which indicates that typing will make a big difference in Cython performance: "Just simply

[Python-ideas] Re: Conditional dict declarations

2019-09-08 Thread Rob Cliffe via Python-ideas
On 07/09/2019 18:59:49, Chris Angelico wrote: On Sat, Sep 7, 2019 at 11:27 PM Rob Cliffe via Python-ideas wrote: A chance for me to bang the drum on one of my pet themes: Sometimes the readability of code is improved by breaking the sacred taboo of 1 statement per line, if it allows similar c

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
"I don't think the ctypes wrapper in itself is very interesting." Well, we disagree on that! I think that automatic generation of a ctypes wrapper to connect Python to assembly is interesting and a huge timesaver. "I don't know where to find those blog entries." The blogs can be reached di

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, David, In several other posts here, I have distinguished PysoniQ from the open source projects mentioned. It has much better ease of use and faster published metrics than the other projects mentioned. The faster metrics should not be surprising when technologies like LLVM are cut out of t

[Python-ideas] Re: Conditional dict declarations

2019-09-08 Thread Chris Angelico
On Mon, Sep 9, 2019 at 4:13 AM Rob Cliffe via Python-ideas wrote: > > On 07/09/2019 18:59:49, Chris Angelico wrote: > > On Sat, Sep 7, 2019 at 11:27 PM Rob Cliffe via Python-ideas > > wrote: > >> A chance for me to bang the drum on one of my pet themes: > >> Sometimes the readability of code is i

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Paul Moore
On Sun, 8 Sep 2019 at 18:14, Mark @pysoniq wrote: > Pythran is "for a subset of the Python language, with a focus on scientific > computing." PysoniQ is not a subset of the Python language. So, to confirm, your product runs the full Python test suite without any errors, and can run the pyperfo

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread David Mertz
I read those two blog posts, and found very few technical details. On Sun, Sep 8, 2019, 1:30 PM Mark @pysoniq wrote: > Antoine, > > In response to "You should provide a detailed technical of your solution." > > The automatically created ctypes wrapper is one of the keys of the > project. Blog e

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
David, It would be most helpful if you could provide an example of how they contain "few technical details." I ask because I was afraid they were too technical! Thanks, Mark ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Chris Angelico
On Mon, Sep 9, 2019 at 4:12 AM Mark @pysoniq wrote: > > "I don't think the ctypes wrapper in itself is very interesting." > > Well, we disagree on that! I think that automatic generation of a ctypes > wrapper to connect Python to assembly is interesting and a huge timesaver. > > "I don't know wh

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Paul, We are just going into beta, so we are not yet in a position to run the tests you mentioned. When we go to release 1.0, we will be able to do that. You can verify one of the metrics with the posted Complex Calc assembly code, which is a pdf at the Resources link. Shortly I will be blo

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Chris Angelico
On Mon, Sep 9, 2019 at 5:06 AM Mark @pysoniq wrote: > PysoniQ is not currently a commercial product, so this was not intended as an > advertisement. I wanted to get technical feedback, bearing in mind that for > reasons stated earlier it's not open source and the source is not published. > As

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Brendan Barnwell
On 2019-09-08 11:17, Mark @pysoniq wrote: Hi, David, In several other posts here, I have distinguished PysoniQ from the open source projects mentioned. It has much better ease of use and faster published metrics than the other projects mentioned. The faster metrics should not be surprising whe

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, Guido, I will distinguish PysoniQ from mypyc, based on what's available from mypyc at this time (at GitHub). Mypyc "compiles mypy-annotated, statically typed Python modules into CPython C extensions" whereas PysoniQ does not require any static typing. "Mypyc compiles what is essential

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Paul Moore
On Sun, 8 Sep 2019 at 20:05, Mark @pysoniq wrote: > > Paul, > > We are just going into beta, so we are not yet in a position to run the tests > you mentioned. When we go to release 1.0, we will be able to do that. Your claims are (currently) inaccurate, then. I suggest that you avoid making the

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, Brendan, In another post I said we considered making this open source, but our approach is new and unique and we don't think there is a rich volunteer community with the skills to translate Python directly to assembly language. I also talked about the unfortunate funding problems for open

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Hi, Chris, That sounds great to me! Mark ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https:

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Mark @pysoniq
Chris, In the ctypes wrapper we perform this test on entry: if (type(main_loop[0]) != float): #return an error message That's an imperfect test because lists can contain mixed types. To test an entire array would be a large performance penalty, so the developer must be sure that data pas

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Andrew Barnert via Python-ideas
On Sep 7, 2019, at 18:07, davidgmoril...@gmail.com wrote: > > Since the gamma function (see https://en.wikipedia.org/wiki/Gamma_function) > is defined for complex numbers too, wouldn't it be normal to have it > implemented on the `cmath` module? The `math` module has this function, but > it doe

[Python-ideas] Re: Conditional dict declarations

2019-09-08 Thread Andrew Barnert via Python-ideas
On Sep 8, 2019, at 11:34, Chris Angelico wrote: > > You're right that the triple repeated name is not caused by your > style. However, your suggestion also doesn't solve it. What I'd > probably want to do, here, is build the dictionary with everything, > and then have a separate pass that removes

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Guido van Rossum
That's a question for Tim Peters. On Sun, Sep 8, 2019 at 9:48 PM Andrew Barnert via Python-ideas < python-ideas@python.org> wrote: > On Sep 7, 2019, at 18:07, davidgmoril...@gmail.com wrote: > > > > Since the gamma function (see > https://en.wikipedia.org/wiki/Gamma_function) is defined for compl

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Tim Peters
More a question for Mark Dickinson - he added math.gamma, not me ;-) There was a bpo issue opened about this over 8 years ago, but it was closed 6 years ago "due to lack of interest": https://bugs.python.org/issue11012 In general, adding hairy stuff to cmath is painful, and just minimizing t

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Greg Ewing
Mark @pysoniq wrote: Finally, with both of these, you need to do more than just point and click. I don't want to have to point and click. I want a command that I can put into my Makefile. Can I do that with your product? -- Greg ___ Python-ideas ma

[Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Greg Ewing
Antoine Pitrou wrote: Also, performance numbers without a detailed description of what's exactly measured (including code for the benchmark) are useless. Benchmarks are great -- you can find one that proves whatever you want! -- Greg ___ Python-ideas

[Python-ideas] Re: Add gamma function to cmath module

2019-09-08 Thread Andrew Barnert via Python-ideas
On Sep 8, 2019, at 14:44, Tim Peters wrote: > > From my POV, the audience for complex gamma is relatively tiny Agreed. Especially people who need complex gamma who aren’t dealing with arrays (in which case you’d have to use scipy anyway). Also, I suspect different uses might actually need diff

[Python-ideas] Re: Support for atomic types in Python

2019-09-08 Thread Joao S. O. Bueno
May I ask how acquainted you ar with parallel code, including multi-threading, in Python? Because as far as I can perceive none of the types or operations you mention have any race conditions in multi-threaded Python code, and for multi-process or async code that is not a problem by design but for