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

2019-09-09 Thread Greg Ewing
Mark @pysoniq wrote: 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! Your blog posts about optimisation mostly talk about standard things that have been known for decades. E.g. "keep vari

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

2019-09-09 Thread Greg Ewing
Mark @pysoniq wrote: Translating a single language directly to assembly gives the best optimizations because most of the commonly used compilers, like GCC, LLVM and Clang, use an intermediate language intended for many languages, and compiles to a number of target architectures. To take advanta

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

2019-09-09 Thread Vinay Sharma via Python-ideas
Hi, I apologise for my poor explanation of what I mean. I should have been more comprehensive in describing the idea. First of all I am only concerned with synchronization across multiple processes only, and not threads. Therefore I never mentioned multi-threading in my original post. I am fam

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

2019-09-09 Thread Chris Angelico
On Mon, Sep 9, 2019 at 12:34 AM Vinay Sharma via Python-ideas wrote: > > 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. On Mon, Sep 9, 2019 at

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

2019-09-09 Thread Antoine Pitrou
On Sun, 08 Sep 2019 18:17: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

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

2019-09-09 Thread Joao S. O. Bueno
Oh, thanks! it is much more palpable now! On Mon, Sep 9, 2019, 05:23 Vinay Sharma wrote: > Hi, > I apologise for my poor explanation of what I mean. I should have been > more comprehensive in describing the idea. > > First of all I am only concerned with synchronization across multiple > process

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

2019-09-09 Thread David Mertz
It very much sounds like marketing hype to repeat this "direct to assembly" thing so much. Essentially it's claiming they are better at writing optimizers that are the more numerous authors of GCC, LLVM, etc. That's not inconceivable, but it's a hold claim requiring strong evidence. Thanks, Antoin

[Python-ideas] Re: Inspired by Scala, a new syntax for Union type

2019-09-09 Thread Philippe Prados
Hello, I try to implement a patch for ``isinstance()`` and ``issubclass()``. It's here (variation possible). I not patch mypy now # Without patch and Tuple $ ./python -m timeit

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

2019-09-09 Thread Andrew Barnert via Python-ideas
On Sep 9, 2019, at 01:23, Vinay Sharma wrote: > Also, I didn't mean simple variables to be atomic. I just mean that some > objects which are frequently being used across processes in multiprocessing > can have some atomic operations/methods. It sounds like all you want is an automatically-sync

[Python-ideas] Re: Conditional dict declarations

2019-09-09 Thread Rob Cliffe via Python-ideas
On 08/09/2019 19:34:33, Chris Angelico wrote: 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: Someti

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

2019-09-09 Thread Christopher Barker
I'm surprised no one has mentioned Psyco yet -- probably because it evolved into PyPy -- but IIRC, Psycho was pretty much the same as what the OP is talking about -- direct Python to machine code, and easy on the fly or ahead of time compilation. If I recall, the "magic" for dealing with a dynami

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

2019-09-09 Thread Antoine Pitrou
On Mon, 9 Sep 2019 11:04:22 -0700 Christopher Barker wrote: > I'm surprised no one has mentioned Psyco yet -- probably because it evolved > into PyPy -- but IIRC, Psycho was pretty much the same as what the OP is > talking about -- direct Python to machine code, and easy on the fly or > ahead of

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

2019-09-09 Thread Eric Snow
On Mon, Sep 9, 2019, 09:27 Vinay Sharma via Python-ideas < [email protected]> wrote: > Also, I didn't mean simple variables to be atomic. I just mean that > some objects which are frequently being used across processes in > multiprocessing can have some atomic operations/methods. > So, as A

[Python-ideas] Re: Conditional dict declarations

2019-09-09 Thread Steven D'Aprano
On Sat, Sep 07, 2019 at 08:22:58PM +0100, Rob Cliffe via Python-ideas wrote: > in which of the following is it easier to spot the mistake? > > # Version 1: >  if max_results > 0: querydata['max_results'] = max_results > if active is not None : querydata['active'] = active >

[Python-ideas] Re: Conditional dict declarations

2019-09-09 Thread Andrew Barnert via Python-ideas
On Sep 9, 2019, at 17:43, Steven D'Aprano wrote: > > But for me, I am not comfortable with this style and > would not use it because I have seen far too many people (including > myself) waste too much time farting about fixing formatting and > alignment issues instead of doing productive work.