[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-19 Thread Antoine Pitrou
On Sun, 19 Jul 2020 05:01:48 -0400
Wes Turner  wrote:
> 
> Can't remember where I thought I read that libuv + CPython asyncio is
> actually faster than node + libuv.

"faster" is pretty much meaningless without specifics.  libuv + asyncio
will certainly be fast if you're mostly transferring packets around
(because most of the time will be spent in custom C code).  If you're
writing a complex protocol parser around that in pure Python, I'm not
sure it will still be "faster".

Regards

Antoine.

___
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://mail.python.org/archives/list/python-ideas@python.org/message/YHDIVEQ2JWBQDJAQIVHPODO6JSH2L5KP/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-19 Thread Wes Turner
On Thu, Jul 16, 2020, 1:33 PM David Mertz  wrote:

> On Thu, Jul 16, 2020 at 12:59 PM  wrote:
>
>> Recently I have been thinking about why `JavaScript` with it's horrible
>> type system and lots of edge cases has supported so many platform and is
>> very fast ...
>> First answer is simple, because big companies such as Google, Facebook
>> and so on evolve this language and run-time for it ...
>>
>
> Check out PyPy.  It is every bit as fast as the fastest Javascript engines
> like V8.
>

Does uvloop (libuv from NodeJS) work with PyPy?
https://github.com/MagicStack/uvloop

Can't remember where I thought I read that libuv + CPython asyncio is
actually faster than node + libuv.


> So is Numba, for that matter, but it's not language wide, so it's a
> slightly different beast.
>

FWIU, TypeScript (which compiles to ECMAscript (JS)) doesn't do any real
compiler optimizations with the optional type annotations either?
___
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://mail.python.org/archives/list/python-ideas@python.org/message/RU7PH2CK66RNBXEDB7JHDRXWBKNAAZFX/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-19 Thread Marco Sulla
I remember some years ago I compiled Python 3.4 on Kobo, using an ARM
virtual machine with qemu. Since the space on Kobo was little, I removed
the standard library.
But Python did not work. I had to include some stdlib modules too, like
encodings/ascii.py, because I was not able to even print an "Hello world"
to test it. It was not something very easy... I had to do some try-except :P
https://www.mobileread.com/forums/showthread.php?t=243542

On Thu, 16 Jul 2020 at 21:19, David Mertz  wrote:

> On Thu, Jul 16, 2020, 2:57 PM  wrote:
>
>> I know, I know that PyPy is fast as V8 but PyPy implement the whole
>> library inside and it is not easy to embed it somewhere
>>
>
> I have no idea what you mean by that. PyPy doesn't need its standard
> library to run. Just like in CPython, those are just a bunch of external
> files that you can import or not, as desired.
>
>>
>> ___
> 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://mail.python.org/archives/list/python-ideas@python.org/message/BW55H6V4JE2A3XY5XRYJJNXKRIC52WEG/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
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://mail.python.org/archives/list/python-ideas@python.org/message/LD3EMQDVIW7KYQGUKD3MTBQOCP7C7IYF/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-17 Thread Brett Cannon
On Thu, Jul 16, 2020 at 11:52 AM  wrote:

> CPython is portable but due to integrated standard library (builtin
> functionality) it is hard to evolve it,


How so? The stdlib is just a collection of packages we happen to ship with
Python. Think of it as if we ship blessed packages from PyPI with Python
itself. That's it. The stdlib very much is not a hindrance to performance.
Python's design as a language is what makes it tough. We could rip out the
stdlib tomorrow and it would not change how we optimize the CPython
interpreter.


> for examle to add JIT,


As someone who helped create a JIT for Python (Pyjion), I can tell you as a
fact that the stdlib in no way hindered our work. It was a lack of time and
simply the fact that Python is a very dynamic language.


> anyway it is just my thoughts
>

And that's fine, but what we are all trying to do is help educate you about
some statements you made which are not accurate.

-Brett


> ___
> 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://mail.python.org/archives/list/python-ideas@python.org/message/TX3XGC2THCJ3YL3X5LTL4YEDYZMH3JBH/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
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://mail.python.org/archives/list/python-ideas@python.org/message/22MDJ4SNMAVDGWKH434LGMVCWL5EHK5A/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread David Mertz
On Thu, Jul 16, 2020, 2:57 PM  wrote:

> I know, I know that PyPy is fast as V8 but PyPy implement the whole
> library inside and it is not easy to embed it somewhere
>

I have no idea what you mean by that. PyPy doesn't need its standard
library to run. Just like in CPython, those are just a bunch of external
files that you can import or not, as desired.

>
>
___
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://mail.python.org/archives/list/python-ideas@python.org/message/BW55H6V4JE2A3XY5XRYJJNXKRIC52WEG/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread redradist
I know, I know that PyPy is fast as V8 but PyPy implement the whole library 
inside and it is not easy to embed it somewhere
___
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://mail.python.org/archives/list/python-ideas@python.org/message/BPUJ4YW2B4OTBKO7LFBGKC4YBIM3D65V/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread redradist
My main point is that it would be nice to have just very fast execute engine 
and all library as integration layer
___
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://mail.python.org/archives/list/python-ideas@python.org/message/ISY56W7ZXSIOI4SOFOUNNRLLE7RM57YQ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread redradist
CPython is portable but due to integrated standard library (builtin 
functionality) it is hard to evolve it, for examle to add JIT, anyway it is 
just my thoughts
___
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://mail.python.org/archives/list/python-ideas@python.org/message/TX3XGC2THCJ3YL3X5LTL4YEDYZMH3JBH/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread Chris Angelico
On Fri, Jul 17, 2020 at 2:59 AM  wrote:
>
> Recently I have been thinking about why `JavaScript` with it's horrible type 
> system and lots of edge cases has supported so many platform and is very fast 
> ...
>
> First answer is simple, because big companies such as Google, Facebook and so 
> on evolve this language and run-time for it ...
>
> But it is only part of story, all this platforms would not be possible 
> without some good architecture that was done by this companies
>
> What is this architecture decision ? It is a splitting run-time and 
> infrastructure
>
> V8 is JavaScript engine that could very fast execute JavaScript and that is 
> all !!
> It has a reach API using which you can embed this run-time almost every where 
> ...
>
> What if we in Python will accomplish the same solution ?
> What if Python would have some very fast engine that could be integrate in 
> every environment ?
>
> Engine will be able only execute Python code and call some registered 
> callback (hooks) for `import` some module, for calling some registered 
> C-extension and so on
> If this engine will be very portable then Python would be embedded everywhere 
> !! ;)

There are lots of ways to embed Python, and there are a number of
valid Python interpreters. There's even interpreters (multiple!) that
are designed to work in web browsers.

Good architecture isn't what made JavaScript so successful. Being
successful is what made JavaScript so succesful.

https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript

ChrisA
___
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://mail.python.org/archives/list/python-ideas@python.org/message/IZCIOZLYG54DZ5732W3HVROLAG7UMXCC/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread David Mertz
On Thu, Jul 16, 2020 at 12:59 PM  wrote:

> Recently I have been thinking about why `JavaScript` with it's horrible
> type system and lots of edge cases has supported so many platform and is
> very fast ...
> First answer is simple, because big companies such as Google, Facebook and
> so on evolve this language and run-time for it ...
>

Check out PyPy.  It is every bit as fast as the fastest Javascript engines
like V8.

So is Numba, for that matter, but it's not language wide, so it's a
slightly different beast.


-- 
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
___
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://mail.python.org/archives/list/python-ideas@python.org/message/6D6WUAUHDO6WWCYWBXDOZQ2PBVSHXBOG/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread Rhodri James

On 16/07/2020 17:59, redrad...@gmail.com wrote:

Recently I have been thinking about why `JavaScript` with it's horrible type 
system and lots of edge cases has supported so many platform and is very fast 
...

First answer is simple, because big companies such as Google, Facebook and so 
on evolve this language and run-time for it ...

But it is only part of story, all this platforms would not be possible without 
some good architecture that was done by this companies


Um.  I think you should go and read up a bit more about the history of 
Javascript.  And then the history of PHP.




What is this architecture decision ? It is a splitting run-time and 
infrastructure

V8 is JavaScript engine that could very fast execute JavaScript and that is all 
!!
It has a reach API using which you can embed this run-time almost every where 
...

What if we in Python will accomplish the same solution ?


You can embed Python right now.  The API to do it exists, and a number 
of programs out in the world do exactly that.


--
Rhodri James *-* Kynesim Ltd
___
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://mail.python.org/archives/list/python-ideas@python.org/message/EXYHJ2NAYNSBGCPWMAED3EH3PKP3STQ5/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread Brett Cannon
CPython is already very portable thanks to it being implemented in C.

I don't see, though, how a lack of stdlib for JavaScript makes it fast?
Unless you're saying the Python core team should drop the stdlib so it has
more time to focus on the CPython interpreter itself?

On Thu, Jul 16, 2020 at 10:00 AM  wrote:

> Recently I have been thinking about why `JavaScript` with it's horrible
> type system and lots of edge cases has supported so many platform and is
> very fast ...
>
> First answer is simple, because big companies such as Google, Facebook and
> so on evolve this language and run-time for it ...
>
> But it is only part of story, all this platforms would not be possible
> without some good architecture that was done by this companies
>
> What is this architecture decision ? It is a splitting run-time and
> infrastructure
>
> V8 is JavaScript engine that could very fast execute JavaScript and that
> is all !!
> It has a reach API using which you can embed this run-time almost every
> where ...
>
> What if we in Python will accomplish the same solution ?
> What if Python would have some very fast engine that could be integrate in
> every environment ?
>
> Engine will be able only execute Python code and call some registered
> callback (hooks) for `import` some module, for calling some registered
> C-extension and so on
> If this engine will be very portable then Python would be embedded
> everywhere !! ;)
>
> Engine will not suport all builtin functions and it will not have any
> library embedded in it
> To add some buiiltin functionality you will need register the callbacks in
> engine, the same with libraries
> Engine will just call callback to import code and callback optionally will
> return Python script which will be executed
>
> To be continue ...
> ___
> 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://mail.python.org/archives/list/python-ideas@python.org/message/D7HOOBORH2FJOJO4PWBIRHNOOVIIFBXG/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
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://mail.python.org/archives/list/python-ideas@python.org/message/3YOGZEIPIVWVMCJPHYPB26PS4V7VXU45/
Code of Conduct: http://python.org/psf/codeofconduct/