Re: [pypy-dev] translating with --sandbox fails on latest "default" branch.

2013-04-30 Thread Jonathan Slenders
Thank you Armin! 2013/4/30 Armin Rigo : > Hi Jonathan, > > On Mon, Apr 22, 2013 at 5:41 PM, Jonathan Slenders > wrote: >> Hi. Is it possible that the latest default branch does not translate a >> sandboxed pypy:? > > Indeed, fixe

[pypy-dev] translating with --sandbox fails on latest "default" branch.

2013-04-22 Thread Jonathan Slenders
Hi. Is it possible that the latest default branch does not translate a sandboxed pypy:? I do: python rpython/bin/rpython -O2 --sandbox pypy/goal/targetpypystandalone.py And get the traceback below after a bit of mandelbrot. Do we consider "default" the most stable branch? It is because I also ha

Re: [pypy-dev] about PyPy's sandbox

2013-04-08 Thread Jonathan Slenders
Hi 王衡, Normally you can use any library you want in the sandbox, as long as it doesn't use C-code; all the pure-python stuff should work. Add the library's parent directory to the virtual root in sandlib, and make sure that pypy will search for that directory. (Add it to sys.path in the sandbox, o

Re: [pypy-dev] a question about pypy-sandbox

2012-12-21 Thread Jonathan Slenders
Jep, threading would be really hard to do. Especially given that we are serializing system calls through the stdin/out. A blocking system call in the hypervisor process would make it impossible to switch to another thread. (unless you decide to still execute until the next system call in the other

[pypy-dev] Twisted sandbox library.

2012-12-20 Thread Jonathan Slenders
Hi all, me again :) As contributions for a better sandbox hypervisor library were welcome, I here contribute our Twisted Matrix hypervisor. https://github.com/jonathanslenders/twisted-sandlib/blob/master/sandlib.py If there is interest for adding this to Pypy's repository, surely I can add some

[pypy-dev] Await-keyword

2012-12-20 Thread Jonathan Slenders
Dear all, For my work, I needed a python sandbox which contained the 'await' keyword for asynchronous programming, just like c# does. I found it very easy to extend the 2.7 grammar and include this keyword. https://bitbucket.org/jonathanslenders/pypy Personally, I think this is a very clean solu

[pypy-dev] Javascript interpreter and r_uint

2012-12-06 Thread Jonathan Slenders
Hi all, Yesterday, I did some experiments with the existing javascript interpreter that was written in RPython. [1] It worked very well when interpreted by CPython, but failed to translate to C because of unsigned int issues. Quite a few times, unsigned and signed objects were compared or added,

Re: [pypy-dev] _marshal EOF error?

2012-08-09 Thread Jonathan Slenders
Merci Armin! Keep up the great work! 2012/8/9 Armin Rigo > Hi Jonathan, > > On Wed, Aug 8, 2012 at 11:27 PM, Jonathan Slenders > wrote: > > The patch, just add this one line to lib_pypy/_marshal.py (line 433) > > Thanks! Checked in this extra line together with a 2

[pypy-dev] _marshal EOF error?

2012-08-08 Thread Jonathan Slenders
newpos = pos + n * if newpos > len(self.bufstr): raise EOFError* ret = self.bufstr[pos : newpos] self.bufpos = newpos return ret This is the first bug that I found. Should I create a bug report or patch file for this? Thanks, Jonathan Slenders

Re: [pypy-dev] Circular reference when importing struct from a pypy sandbox.

2012-07-07 Thread Jonathan Slenders
andbox and it's hypervisor. Now I patched simplejson to not use the struct and decimal libraries. And that works wonderful, but it would be even better if I could use the plain original simplejson. :) Jonathan 2012/7/7 Amaury Forgeot d'Arc > 2012/7/7 Jonathan Slenders : >

[pypy-dev] Circular reference when importing struct from a pypy sandbox.

2012-07-07 Thread Jonathan Slenders
Hi everyone, Not sure whether this is sandbox related, but I get a circular reference when I want to import struct.py The problem seems to be in the MixedModule import which get to import himself somehow... Anyone here who likes to take a look at the trackback below? Actually, I'm not entirely su