Paul Baker | 30 Jun 11:42 2016
Picon

Is it possible to make PyPy smaller?

I have a small command-line tool, written in Python, which I would
like to give to a few people to use on their own machines.

For performance reasons, I would like to distribute the tool with PyPy
rather than CPython. For this particular tool, PyPy runs 60 times
faster than CPython (and only 3 times slower than a less-capable C++
implementation).

My concern with distributing PyPy to end-users is size: Python27.dll
is 2.3MB while libpypy-c.dll is 41.9MB.

Why is PyPy so much bigger than CPython? Is it possible to build a
version of PyPy which is closer to CPython in size?
John Zhang | 28 Jun 09:23 2016
Picon
Picon

Passing an array to C in RFFI

Hi all,
Thanks for the help previously.

I have another question regarding passing an array value to C function using RFFI.
Suppose I have a function in C that’s like this:
void fn(void** array_of_voips, int length)
How do I in RPython call the function using RFFI passing an array value for it?
it seems that I can’t just do
fn([a, b, c], 3)

Help appreciated.

John Zhang
------------------------------------------------------
John Zhang
Research Assistant
Programming Languages, Design & Implementation Division
Computer Systems Group
ANU College of Engineering & Computer Science
108 North Rd
The Australian National University
Acton ACT 2601





_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev
John Zhang | 27 Jun 04:31 2016
Picon
Picon

Recursive struct definition in rffi?

Hi guys,
I’m using RFFI to reflect a C API interface that my colleague has developed.
During this process I encountered the problem of not knowing how to define a recursive struct definition.
e.g. How do I define a struct like the following:
typedef struct A A;
struct A {
void (*fn) (A*);
}

Help appreciated.

Regards,
John Zhang

------------------------------------------------------
John Zhang
Research Assistant
Programming Languages, Design & Implementation Division
Computer Systems Group
ANU College of Engineering & Computer Science
108 North Rd
The Australian National University
Acton ACT 2601





_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev
Richard Plangger | 26 Jun 08:33 2016
Picon
Gravatar

Micro NumPy & VecOpt 2.0

Hi,

in case you have not heard: I'm currently working on the PPC and S390X
port for micro numpy. Thanks to IBM for funding this work.

I'm ~50% through the ppc operations to implement. The goal is to turn
this optimization on (by default) in the micro numpy module.

I recently had the idea to enhance the jit driver by giving it more
information about parallel execution. I'm *not* talking about the main
interp. loop. Having a vectorized loop that executes parallel in threads
would certainly push micronumpy performance.

Has somebody already tried something similar? I think it is a challenge,
but it should be possible (with a reasonable amount of work) to get a
simple thread fork/join model such as OpenMP provides.

Cheers,
Richard

_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev
Nathaniel Smith | 25 Jun 06:56 2016
Picon

Any core devs want to come to the python compilers workshop next month?

Hi all,

This is super short notice but... you may be aware that I'm organizing
a workshop next month (July 11-12) in Austin, for some of the
different Python compiler projects to get together and compare notes
on how best to achieve world domination... or at least make the Python
ecosystem more friendly to non-CPython implementations:

  https://python-compilers-workshop.github.io/

Originally Maciej and Matti were going to represent PyPy, but
unfortunately Maciej had to cancel. Matti will still be there, so
that's awesome, but I find myself with a chunk of unused sponsorship
$$, and given how PyPy is currently by far the most successful of
these projects, I feel like it'd be even more awesome if we had even
more representation from the PyPy core devs :-). So if any of you are
interested in a free last minute trip to Austin + a chance to maybe
help influence future plans and funding in a more PyPy-friendly
direction, please get in touch ASAP...

-n

--

-- 
Nathaniel J. Smith -- https://vorpus.org
William ML Leslie | 24 Jun 04:54 2016
Picon
Gravatar

Re: pickle numpy array from pypy to cpython?

On 24 June 2016 at 12:14, Eli Stevens (Gmail) <wickedgrey <at> gmail.com> wrote:
> I'm trying to construct some data that includes numpy arrays in pypy,
> pickle it, then unpickle it in cpython (to use some
> non-pypy-compatible libs).
>
> However, the actual class of the pickled array is _numpypy.multiarray,
> which cpython doesn't have.
>
> Any suggestions?

Have you considered the tofile method and fromfile function?

http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tofile.html#numpy.ndarray.tofile

http://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html#numpy.fromfile

--

-- 
William Leslie

Notice:
Likely much of this email is, by the nature of copyright, covered
under copyright law.  You absolutely MAY reproduce any part of it in
accordance with the copyright law of the nation you are reading this
in.  Any attempt to DENY YOU THOSE RIGHTS would be illegal without
prior contractual agreement.
Eli Stevens (Gmail | 24 Jun 04:14 2016
Picon
Gravatar

pickle numpy array from pypy to cpython?

I'm trying to construct some data that includes numpy arrays in pypy,
pickle it, then unpickle it in cpython (to use some
non-pypy-compatible libs).

However, the actual class of the pickled array is _numpypy.multiarray,
which cpython doesn't have.

Any suggestions?

Thanks,
Eli
Katelyn McNair | 22 Jun 03:08 2016
Picon

fix libpypy-c.so needing certein versions

I have been trying to install PyPy locally for the last 3 days.  I didn't have Openssl, which install fine.  But then PyPy started not liking the new version (libssl.so.1.0.1), so I got the archive for 1.0.0, and installed.

But then PyPy didn't like that the .so files didn't have to correct version name in them.

[katelyn <at> anthill bin]$ ./pypy
./pypy: /home/katelyn/lib/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)
./pypy: /home/katelyn/lib/libssl.so.1.0.0: version `OPENSSL_1.0.0' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)
./pypy: /home/katelyn/lib/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)
./pypy: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)
./pypy: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)

It took me a day to find the hack here: http://stackoverflow.com/questions/18390833/no-version-information-available
Although I had to put both OPENSSL_1.0.0 and OPENSSL_1.0.1in the file.






Now I have to go build my own libc.so since libpypy.so doesn't like the one I have.

[katelyn <at> anthill openssl-1.0.0s]$ pypy
/home3/katelyn/opt/pypy2-v5.3.0-linux64/bin/pypy: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)
/home3/katelyn/opt/pypy2-v5.3.0-linux64/bin/pypy: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/katelyn/opt/pypy2-v5.3.0-linux64/bin/libpypy-c.so)

--
-katelyn
_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev
Omer Katz | 20 Jun 08:51 2016
Picon
Gravatar

PyParallel-style threads

Hi all,
There was an experiment based on CPython's code called PyParallel that allows running threads in parallel without STM and modifying source code of both Python and C extensions. The only limitation is that they disallow mutation of global state in parallel context.
I briefly mentioned it before on PyPy's freenode channel.
I'd like to discuss why the approach is useful, how it can benefit PyPy users and how can it be implemented.
Allowing to run in parallel without mutating global state can help servers use each thread to handle a request. It can also allow to log in parallel or send an HTTP request (or an AMQP message) without sharing the response with the main thread. This is useful in some cases and since PyParallel managed to keep the same semantics it (shouldn't) break CPyExt.
If we keep to the following rules:
  1. No global state mutation is allowed
  2. No new keywords or code modifications required
  3. No CPyExt code is allowed (for now)
I believe that users can somewhat benefit from this implementation if done correctly.
As for implementation, if we can trace the code running in the thread and ensure it's not mutating global state and that CPyExt is never used during the thread's course we can simply release the GIL when such a thread is run. That requires less knowledge than using STM and less code modifications.
However I think that attempting to do so will introduce the same issue with caching traces (Armin am I correct here?).

As for CPyExt, we could copy the same code modifications that PyParallels did but I suspect that it will be so slow that the benefit of running in parallel will be completely lost for all cases but very long threads.

Is what I'm suggesting even possible? How challenging will it be?

Thanks,
Omer Katz.
_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev
Matti Picus | 16 Jun 22:37 2016
Picon

bugfix PyPy 2.7 v5.3.1 ready for release

We fixed a few bugs and would like to release, please help us make sure 
everything is ready to go.
The downloads are here
https://bitbucket.org/pypy/pypy/downloads
the donwload page has been updated
http://pypy.org/download.html
and the release notice is ready to be posted to the blog
http://doc.pypy.org/en/latest/release-pypy2.7-v5.3.1.html
http://doc.pypy.org/en/latest/whatsnew-pypy2-5.3.1.html

Let me know if something needs fixing...
Thanks
Matti
Raffael Tfirst | 14 Jun 21:52 2016
Picon

Implementation of some Python 3.5 features for more PyPy 3.5 support

Hi,
I am Raffael Tfirst, currently working on PyPy 3.5 for the Google Summer of Code.

Since it might be of interest to some, I want to give you a short summary of what I do.

The Python 3.5 features I implement in PyPy are the <at> operator for matrix multiplications (PEP 465), additional unpacking generalizations (PEP 448) and coroutines with async and await syntax (PEP 492). A short description of each feature can be found here (at New Syntax Features): https://docs.python.org/3/whatsnew/3.5.html
It would be cool to have those features implemented in PyPy because they will most likely be used a lot in future Python 3.5 programs, that is why I want to close this gap and push PyPy a bit closer to Python 3.5 functionality.

I started working on this about a month ago. As things stand now, the <at> operator already works. The additional unpacking feature will be ready soon, too, since a great part is already implemented. There's just some nasty errors I need to fix before it can be tested.
In about two weeks progress will speed up a lot, because then I'm going to have way more time for this project.

For those who are interested, I work on the py3.5 branch.

You can also check out my progress on my blog: http://pypy35syntax.blogspot.co.at/
_______________________________________________
pypy-dev mailing list
pypy-dev <at> python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Gmane