Live data from Hacker News

PyPy 1.6 Released - Full Python 2.7.1 Implementation

morepypy.blogspot.com

41–50 of 57 posts

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#42
post #39

Earlier quoted context omitted.

It suggests that there aren't many production users, true. But it does prove that there are some.

Indeed. Though two-ish production users after 7 years of development hardly seems like a success. By way of contrast, (1) in the Ruby world, YARV went from an alternative implementation to the official implementation within two years, and (2) in the JavaScript world, node.js is similarly being used in production in tons of places after only two years. (Though I realize that those examples aren't exact parallels.) Thi…

I don't know about others but this article finally convinced me to take a serious look at it. It appears to finally be up to date and much faster.

As in everything a little bit better yet behind the curve isn't good enough to get people to switch.

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#43
post #31

Earlier quoted context omitted.

Instead of generating C code you might be able to generate LLVM IR and have it execute immediately, saved to disk, or both. I don't know how it will perform for you or how high level your generated C is though, it may not be realistic. Or use it to compile your C as it is pretty quick. It's not going to speed things up by orders of magnitude but every bit helps.

Awesome. Am I right in understanding that LLVM IR should be LLVM IF or LLVM assembly? The generated code is most extremely simplistic. An example would be: A[12800]=A[0] * A[6400]; A[12801]=A[1] * A[6480]; A[12802]=A[12800] + A[12801]; A[12803]=A[2] * A[6560]; A[12804]=A[12802] + A[12803]; A[12805]=A[3] * A[6640]; Which would be very easy to deal with. The only problem is that I sometimes call out to libraries for ex…

That's right it's a platform independent representation. I think LLVM assembly is really low level, I'm pretty sure you want to generate IR. You should be able to link the math lib.

py2llvm looks pretty interesting.

http://code.google.com/p/py2llvm/

http://code.google.com/p/py2llvm/source/browse/trunk/CodeGen...

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#44
post #9

Earlier quoted context omitted.

> but PyPy is one of the few things I envy Python developers for. Depending on your needs, there are others - numpy, scipy, matplotlib, nltk, gevent. > I wish something similar could be developed for Ruby. Isn't http://rubini.us/ supposed to be the PyPy for Ruby? It's not complete, but then neither is PyPy.

matplotlib and numpy make Python really awesome. If only there was a way to get matplotlib to work on Lion.

But they don't run on PyPy yet. Now that will be awesome!

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#45
post #39

Earlier quoted context omitted.

It suggests that there aren't many production users, true. But it does prove that there are some.

Indeed. Though two-ish production users after 7 years of development hardly seems like a success. By way of contrast, (1) in the Ruby world, YARV went from an alternative implementation to the official implementation within two years, and (2) in the JavaScript world, node.js is similarly being used in production in tons of places after only two years. (Though I realize that those examples aren't exact parallels.) Thi…

* Jython is a really nice alternative if you want to use Python-the-language in a Java environment. Its suboptimal speed and the fact that it's really easy to write Java code that can be used from Jython means that you'll probably use it more as a scripting language * The relation between IronPython and .NET is probably very similar * For CPython, people have always wrapped their favorite C library and started using it - with SWIG in the old times and nowadays with Cython, which is a compiler for a subset of Python extended with types. In fact, quite a lot of useful Python libraries use Cython (whether as a glue language or as an implementation language), and it's probably in production use at a lot of places.

One of the problems of PyPy is that, while targeting Python-the-language, it also gives up CPython compatibility by using their own PyPy VM (in the sense of, GC'd execution environment with a JIT that's not really compatible with other C/C++ code or even CPython). Because they're targeting their own execution environment, they cannot profit from either the plethora of C/C++ libraries that exist or even the very decent library support that exists on the JVM.

The PyPy people have recognized this and started to take care of the affair with a JNI-type version of CPython's ctypes library. The problem is that very few library wrappers (or even non-Python CPython extensions) are based on ctypes, so that it's not useful as a replacement for CPython for most of the people (especially those that need the speed improvements).

The reluctance of PyPy developers to start thinking about a solution for all the existing CPython extensions has severely limited the appeal for using PyPy in production use - having 10x gains for new code is not all that appealing once you realize that you need to rewrite the other couple thousand lines of (C++ or Cython) code and hope that you can optimize the PyPy code as well as you optimized the C++ or Cython code.

Having said that, I'm really excited by the idea of a Cython variant that can be used to wrap C/C++ code (or use Cython code) in PyPy's execution environment. (This is the GSoC project that was referred to earlier) Or even if I could use Cython to compile my C/C++ Python extensions for the JVM or .NET.

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#46
post #14

In general I'm very happy with my choice of Ruby/Rails instead of Python/Django, but PyPy is one of the few things I envy Python developers for. I wish something similar could be developed for Ruby.

What about Rubinius? Can you also elaborate on why you're happier with Ruby and Rails than Python and Django. Since I'm completely the other way around, while Ruby paid my bills, if there's a Python job offering I would have jumped onto it without much thought. One of few things I envy Ruby developers for is the HAML, SCSS, Jammit stuff. Apart from that, not so much, especially for documentations for Ruby modules. It…

As an alternative for scss and jammit, you can try django-css: https://github.com/dziegler/django-css

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#47

Can I take advantage of this thread to ask the HN crowd a technical question? Some time ago, I implemented an automatic differentiation tool. Using operator overloading on a special "autodouble" type the tool would trace the execution of a block of numerical code. Then, some calculus would automatically happen, and it would output and compile fast c-code that would compute the original function and derivatives in pur…

Theano (http://deeplearning.net/software/theano/introduction.html) might be worth a shot if you have closed-form expressions.

'''Theano is a Python library that lets you to define, optimize, and evaluate mathematical expressions, especially ones with multi-dimensional arrays (numpy.ndarray). Using Theano it is possible to attain speeds rivaling hand-crafted C implementations for problems involving large amounts of data. It can also surpass C on a CPU by many orders of magnitude by taking advantage of recent GPUs.'''

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#48
post #14

Earlier quoted context omitted.

What about Rubinius? Can you also elaborate on why you're happier with Ruby and Rails than Python and Django. Since I'm completely the other way around, while Ruby paid my bills, if there's a Python job offering I would have jumped onto it without much thought. One of few things I envy Ruby developers for is the HAML, SCSS, Jammit stuff. Apart from that, not so much, especially for documentations for Ruby modules. It…

As an alternative for scss and jammit, you can try django-css: https://github.com/dziegler/django-css

I use django-mediagenerator[1], I love it to bits.

[1]: http://www.allbuttonspressed.com/projects/django-mediagenera...

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#49
post #45

Earlier quoted context omitted.

Indeed. Though two-ish production users after 7 years of development hardly seems like a success. By way of contrast, (1) in the Ruby world, YARV went from an alternative implementation to the official implementation within two years, and (2) in the JavaScript world, node.js is similarly being used in production in tons of places after only two years. (Though I realize that those examples aren't exact parallels.) Thi…

* Jython is a really nice alternative if you want to use Python-the-language in a Java environment. Its suboptimal speed and the fact that it's really easy to write Java code that can be used from Jython means that you'll probably use it more as a scripting language * The relation between IronPython and .NET is probably very similar * For CPython, people have always wrapped their favorite C library and started using…

Thats the problem all scripting languages have. They start slow, then people want to be faster and start writting C code and that makes it really really hard to have alternativ implementations. The guy implmenting Erjang had the same problem he had to rewrite alot of C functions in Java. I think the python comunity should recognisse what an awesome technolagy pypy is and start making an widespreed effort and discurage C extentions. Pypy makes python-code so much faster that alot of C extentions are not really worth it anymore.

Re: PyPy 1.6 Released - Full Python 2.7.1 Implementation

#50
post #39

Earlier quoted context omitted.

It suggests that there aren't many production users, true. But it does prove that there are some.

Indeed. Though two-ish production users after 7 years of development hardly seems like a success. By way of contrast, (1) in the Ruby world, YARV went from an alternative implementation to the official implementation within two years, and (2) in the JavaScript world, node.js is similarly being used in production in tons of places after only two years. (Though I realize that those examples aren't exact parallels.) Thi…

Node's analogy in Python isn't PyPy, but Twisted, which has been in production since, oh, 2002 or so.
Post reply on HN