News for hackers. Stuff that matters.
Re:PyPy 2.6.0 released by joshuapants on Monday June 01, 2015 @01:26PM (#9640460)
> PyPy 2.6.0 uses the CPython 2.7.9 stdlib - pure python code is 100% compatible (barring bugs)

Is it possible to use PyPy with py2exe or freeze so that I can distribute a Python application to someone so that they don't have to go and install PyPy to get performance benefits?

Re:PyPy 2.6.0 released by mwcampbell on Monday June 01, 2015 @01:39PM (#9640598)
I'd like to propose a different approach to that problem, one that also addresses the issue of startup time: a boot image. I got the name from the Avian JVM (https://github.com/ReadyTalk/avian), but a similar concept can be seen at least as far back as GNU Emacs in the 90s. The idea is that as part of the build process, you load all of a program's code and initial data into memory, then dump the heap. Then at startup, you just have to map the heap back into memory, and possibly fix up pointers if you can't load everything at the same address as before. Of course, you'd have to make sure that none of the objects in the saved heap contain handles to external resources like files. Also, for PyPy, which is JIT-compiling a language that's not really amenable to static compilation, the boot image initialization process could include a custom script to run functions that are known to be hot, to warm up the JIT compiler and include the compiled code in the boot image.
Re:PyPy 2.6.0 released by lispm on Monday June 01, 2015 @05:30PM (#9642302)
Lisp did that in the 1960s. BBN Lisp for example...

Most Common Lisp implementations still do it today: SBCL, Clozure CL, LispWorks, Allegro CL, CLISP, ...

Yeah, filling caches before dumping and keeping caches filled is also common...

More advanced implemenations could write incremental image dumps, based on other image dumps, ...

Re:PyPy 2.6.0 released by chadzawistowski on Monday June 01, 2015 @02:47PM (#9641157)
Many Common Lisps seem to redistribute applications this way - great suggestion. Do you know of any tools that would help someone pull off a coredump for arbitrary Python code?
Re:PyPy 2.6.0 released by mwcampbell on Monday June 01, 2015 @03:58PM (#9641682)
Re: Common Lisps implementing this, yeah, I'd noticed that SBCL did this. Speaking of SBCL, a disadvantage of boot images is that the implementation is sometimes non-portable; for example, SBCL's Windows support is still experimental. To answer your question, I'm pretty sure that support for a boot image would have to be baked into PyPy, or whatever Python implementation you want to use.
Re:PyPy 2.6.0 released by sandGorgon on Monday June 01, 2015 @03:27PM (#9641452)
+1 on this - we distribute python code on legacy windows platforms and the ability to freeze an app is mandatory for us.