News for hackers. Stuff that matters.
Re:PyPy gets funding from Mozilla for Python 3.5 support by brianwawok on Tuesday August 09, 2016 @04:43PM (#12257577)
Doesn't seem that way to me.

For actual real world apps with a lot of IO, your PyPy benefit is kinda small.

For actual number crunching, I guess. Which is the whole scientific side of Python.

Python is weird that it is 50% webapp hipsters ala Ruby, and 50% scientists in lab coats sitting in the lab crunching.

Re:PyPy gets funding from Mozilla for Python 3.5 support by rjeli on Tuesday August 09, 2016 @06:23PM (#12258136)
Well, PyPy does not actually help much with raw number crunching -- a scientist will use numpy for native matrix math, or numba to JIT a tight loop that can't be writted in numpy easily. PyPy really helps in the in-between cases: a few weeks ago I had to write a script to pull a few million rows from a database, process them nontrivially, and dump them to a file. What do I use here? CPython and Ruby will take days. Perl will probably take days, unless I am just doing text processing which perl is optimized for. I can write C or C++, and have the headache of debugging memory errors in a script that will only run once. Or, I can write PyPy and have immensely convenient syntax that will run reasonably quickly (Luajit also occupies this space for me).
Re:PyPy gets funding from Mozilla for Python 3.5 support by brianwawok on Tuesday August 09, 2016 @08:16PM (#12258633)
Well if this task is trivial to parallelize.. I would spin up 100 GCE machines for 1 penny each per hour after today's price drop (combined total of $1 per hour for 100 CPUs of action).. and pull those few million files and dump to a cloud drive in 1 hour flat.

It's a tricky sweet spot PyPy has. Certain tasks that need CPU power but not too much CPU power and you want to spend time to make it run in parallel but not too much time to make it run across many machines.

(By no means am I a PyPy or CPython expert. Just toyed with them and want to understand the bounds...)

Re:PyPy gets funding from Mozilla for Python 3.5 support by zardeh on Tuesday August 09, 2016 @08:34PM (#12258698)
But now you have to manage that deployment which is also nontrivial.
Re:PyPy gets funding from Mozilla for Python 3.5 support by brianwawok on Wednesday August 10, 2016 @09:41AM (#12261616)
Depends on your setup I guess? I have a a GCE cluster setup where I can:

1) Point a metadata variable at my git repo

2) Spin up 100 GCEs

3) Each will pip install requirements.txt from the git checkout

4) Each will read a metadata to get the command and run it. (Could hardcode run.py or something).

Realize not everyone has this sitting around, but you can do it in an afternoon. Then gives you instant Python supercomputer for anything you want across many projects.

Re:PyPy gets funding from Mozilla for Python 3.5 support by zardeh on Wednesday August 10, 2016 @01:10PM (#12263286)
The setup for that sounds significantly nontrivial, although interesting.
Re:PyPy gets funding from Mozilla for Python 3.5 support by dr_zoidberg on Tuesday August 09, 2016 @06:32PM (#12258178)
Scientific Python benefits more from (properly) vectorized numpy code, Cython, Numba and Numexpr than what it gains from PyPy.

From my experience, one of the biggest issues with PyPy is that it's not a magic pill you take and suddenly all your Python code runs faster -- that's how they "sell" it. But in many cases, the idiomatic code for CPython results in slow PyPy execution, and idiomatic PyPy code results in slow(er) CPython execution.

That means that you have to refactor your code, and whereas you won't be breaking compatibility with CPython, your CPython performance will (most often) suffer. So, unless you're the sole user of your code, or you have control or decision power over most of your users, (or you just don't care to keep good CPython performance) your project might not benefit: "yeah, in PyPy it runs 2x faster, but 80% of our clients use CPython and are complaining over a 5x slow down -- ditch that code and get back to the previous version" may end up being the feedback from someone above you in hierarchy.

Re:PyPy gets funding from Mozilla for Python 3.5 support by eeZi on Tuesday August 09, 2016 @07:11PM (#12258338)
> Python is weird that it is 50% webapp hipsters ala Ruby, and 50% scientists in lab coats sitting in the lab crunching.

Don't forget about the ops guys using it for automation!

Re:PyPy gets funding from Mozilla for Python 3.5 support by brianwawok on Tuesday August 09, 2016 @08:17PM (#12258639)
Oh yes my ansible brothers and their lack of Python3 support ;)
Re:PyPy gets funding from Mozilla for Python 3.5 support by kasey_junk on Tuesday August 09, 2016 @09:41PM (#12258964)
Where brothers == inbred cousins
Re:PyPy gets funding from Mozilla for Python 3.5 support by brianwawok on Wednesday August 10, 2016 @09:38AM (#12261593)
Hahaha kinda.. but if Ansible brothers are inbred cousins, Puppet and Chef brothers are certified insane asylum.