Re: [pypy-dev] PyPy Benchmarks

2017-04-18 Thread Frank Wang
ely > tuned for PyPy and so you don't get best performance and results may be > unstable. > > Victor > > Le 16 avr. 2017 23:05, "Frank Wang" a écrit : > >> Hi, >> >> I was wondering if there were a "standard" set of PyPy benc

[pypy-dev] Socket Module

2017-04-18 Thread Frank Wang
Hi, I want to modify the definition of socket.socket() to include an extra parameter. I found this function (newsocket): https://bitbucket.org/pypy/pypy/src/8175c5e20480b2c8e1b95c7f758458db7193f1a8/pypy/module/_socket/interp_socket.py?at=default&fileviewer=file-view-default#interp_socket.py-613

[pypy-dev] PyPy Benchmarks

2017-04-16 Thread Frank Wang
Hi, I was wondering if there were a "standard" set of PyPy benchmarks that are commonly used. I'm currently using this: http://pyperformance.readthedocs.io/ Thanks, Frank ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/lis

[pypy-dev] Debugging SegFaults

2017-04-04 Thread Frank Wang
Hi, I made some modifications to pypy, but the new pypy-c binary results in a segfault on certain instructions. What's the easiest way to do a traceback to see what led to the segfault? Thanks, Frank ___ pypy-dev mailing list pypy-dev@python.org https:/

[pypy-dev] Disassembling methods called by LOOKUP_METHOD

2017-03-03 Thread Frank Wang
Hi, I'm trying to figure out the opcodes that the "append" function calls for arrays. When I use the dis tool, it just says that it looks up a method "append" using the LOOKUP_METHOD opcode. Is there a tool that allows me to disassemble built-in functions like "append", or what the best way to do

Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-02-06 Thread Frank Wang
lled by an application. Thanks, Frank On Fri, Jan 27, 2017 at 12:40 PM, Frank Wang wrote: > Hi Carl, > > Thanks for the information! I just have to do it for a specific attribute. > It is just a bit tedious as you said, making sure the semantics of the > parameter type and result

Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-01-27 Thread Frank Wang
do this for absolutely *every* > interpreter level attribute, there may be a way to achieve this effect > with some magic meta-programming, though I'd have to think a bit how. > > Cheers, > > Carl Friedrich > > On 27/01/17 16:45, Frank Wang wrote: > > Hi, > >

[pypy-dev] Modifying Interpreter-level Object from Application

2017-01-27 Thread Frank Wang
Hi, At the application level, I want to modify some interpreter-level attributes of an object. Right now, I have the interpreter level functions that allow me to modify the interpreter object. Is the easiest way to have an application access interpreter level attributes to use a Mixed Module with

[pypy-dev] Compiling PyPy without JIT

2017-01-19 Thread Frank Wang
Hi, When I compile PyPy in the "goal" folder, I compile it with the following options: pypy ../../rpython/bin/rpython --opt=2 Is this the proper way to compile pypy without JIT, or am I doing something wrong? Thanks, Frank ___ pypy-dev mailing list py

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2017-01-14 Thread Frank Wang
Hi Armin, Thanks for the help! It seems like the problem is that somewhere in my code, I called .set_rbflags(x), and it's not checked that x is a dict. Frank On Fri, Jan 13, 2017 at 6:36 AM, Armin Rigo wrote: > Re-hi, > > On 13 January 2017 at 12:34, Armin Rigo wrote: > > says: you are stor

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2017-01-11 Thread Frank Wang
3:00 PM, William ML Leslie < william.leslie@gmail.com> wrote: > On 12 January 2017 at 09:08, Frank Wang wrote: > > def binaryoperation(operationname): > > """NOT_RPYTHON""" > > def opimpl(self, *ignored): > > operat

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2017-01-11 Thread Frank Wang
v944 = newdict() v945 = setattr(self_268, ('rb_flags'), v944) --end-- Any thoughts on this? Frank On Mon, Dec 19, 2016 at 10:32 PM, Frank Wang wrote: > Hi Armin, > > It seems that with your suggestions, things have started to work! > > Thanks again for the help

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2016-12-19 Thread Frank Wang
Hi Armin, It seems that with your suggestions, things have started to work! Thanks again for the help! On Mon, Dec 19, 2016 at 5:57 PM Armin Rigo wrote: > Hi Frank, > > On 20 December 2016 at 01:29, Frank Wang wrote: > > This also seems to happen in a lot of classes becaus

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2016-12-19 Thread Frank Wang
but only for > RPython. > > Cheers, > > Carl Friedrich > > On December 19, 2016 5:42:12 PM GMT+01:00, Frank Wang > wrote: >> >> Hi Armin, >> >> If I modify the line to __slots__ = ('__weakref__', 'rb_flags',), I get >> the f

Re: [pypy-dev] Fwd: Re: Adding init/variables to W_Root

2016-12-19 Thread Frank Wang
This also seems to happen in a lot of classes because W_Root is the parent class for many classes. Is there a way to universally turn off this immutable flag (assuming it's okay) in all classes? Frank On Mon, Dec 19, 2016 at 3:55 PM, Frank Wang wrote: > Hi Carl, > > Thanks for

Re: [pypy-dev] Adding init/variables to W_Root

2016-12-19 Thread Frank Wang
, ('w_dict')) w_value_0 = simple_call(v0, v1, name_0) v2 = getattr(self_0, ('lazy')) v3 = bool(v2) --end-- I wonder what error in your opinion is easier to get around. Thanks for the help! Frank On Mon, Dec 19, 2016 at 2:26 AM, Armin Rigo wrote: > H

Re: [pypy-dev] Adding init/variables to W_Root

2016-12-18 Thread Frank Wang
> > Yes, you'll get an instance variable that way. > > Cheers, > > Carl Friedrich > > On December 16, 2016 6:05:56 PM GMT+01:00, Frank Wang > wrote: > >> Hi Armin, >> >> Thanks for the suggestion! I'll see if that works. Just t

Re: [pypy-dev] Adding init/variables to W_Root

2016-12-16 Thread Frank Wang
gt; > On 15 December 2016 at 21:06, Frank Wang wrote: > > Right now, I know W_Root has no __init__ function, and when I try to add > > one. I run into all sorts of problems because TypeDef calls > W_Root.__new__ > > with some parameters, but "new" function seems to be c

[pypy-dev] Adding init/variables to W_Root

2016-12-15 Thread Frank Wang
Hi, I don't know if this is the proper list to ask this question. I am trying to add a dictionary to W_Root. The reason for this is that I want all interpreter objects to contain this dictionary. This is for a research project to implement some form of information flow control in PyPy. Right now