Re: [pypy-dev] Is the built-in re.py supposed to translate?
On Wed, Mar 23, 2011 at 9:01 PM, Alex Perry wrote: > I'm confused then. I thought all imports were supposed to go through > the type emulation before they hit rpython and the nitty gritty of > translation. Do I have to get my target.py to load the type emulator > and then import re.py on top of it? > > On Wed, Mar 23, 2011 at 5:51 PM, Alex Gaynor > wrote: > > > > > > On Wed, Mar 23, 2011 at 8:50 PM, Alex Perry > wrote: > >> > >> $ ./pypy-c translate.py target.py > >> [...] > >> AnnotatorError: annotation of >> object at 0x04cd7a98> degenerated to SomeObject() > >> Simple call of incompatible family: > >> (KeyError getting at the binding!) > >> > >> Happened at file /usr/src/pypy/lib-python/2.7.0/re.py line 232 > >> > >> cachekey = (type(key[0]),) + key > >> ==> p = _cache.get(cachekey) > >> if p is not None: > >> > >> Previous annotation: > >> (none) > >> Processing block: > >> block@9 is a > >> in (re:229)_compile__star_2 > >> containing the following operations: > >>v0 = getitem(key_0, (0)) > >>v1 = type(v0) > >>v2 = newtuple(v1) > >>v3 = add(v2, key_0) > >>v4 = simple_call((method get), v3) > >>v5 = is_(v4, (None)) > >>v6 = is_true(v5) > >> --end-- > >> > >> $ cat target.py > >> #! /usr/bin/python2.6 > >> > >> def entry_point(argv): > >> import re > >> s = re.sub(r'[^a-fA-F\d]', '', str(argv[1])) > >> print s.decode('hex') > >> > >> def target(*args): > >> return entry_point, None > >> > >> if __name__ == '__main__': > >> import sys > >> entry_point(sys.argv) > >> ___ > >> pypy-dev@codespeak.net > >> http://codespeak.net/mailman/listinfo/pypy-dev > > > > Nope, basically nothing in the stdlib is RPython. > > > > Alex > > > > -- > > "I disapprove of what you say, but I will defend to the death your right > to > > say it." -- Evelyn Beatrice Hall (summarizing Voltaire) > > "The people's good is the highest law." -- Cicero > > > > > I'm not sure I follow, what is the type emulator? Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Is the built-in re.py supposed to translate?
On Wed, Mar 23, 2011 at 8:50 PM, Alex Perry wrote: > $ ./pypy-c translate.py target.py > [...] > AnnotatorError: annotation of object at 0x04cd7a98> degenerated to SomeObject() > Simple call of incompatible family: > (KeyError getting at the binding!) > > Happened at file /usr/src/pypy/lib-python/2.7.0/re.py line 232 > > cachekey = (type(key[0]),) + key > ==> p = _cache.get(cachekey) > if p is not None: > > Previous annotation: > (none) > Processing block: > block@9 is a > in (re:229)_compile__star_2 > containing the following operations: >v0 = getitem(key_0, (0)) >v1 = type(v0) >v2 = newtuple(v1) >v3 = add(v2, key_0) >v4 = simple_call((method get), v3) >v5 = is_(v4, (None)) >v6 = is_true(v5) > --end-- > > $ cat target.py > #! /usr/bin/python2.6 > > def entry_point(argv): > import re > s = re.sub(r'[^a-fA-F\d]', '', str(argv[1])) > print s.decode('hex') > > def target(*args): > return entry_point, None > > if __name__ == '__main__': > import sys > entry_point(sys.argv) > ___ > pypy-dev@codespeak.net > http://codespeak.net/mailman/listinfo/pypy-dev > Nope, basically nothing in the stdlib is RPython. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
[pypy-dev] Is the built-in re.py supposed to translate?
$ ./pypy-c translate.py target.py [...] AnnotatorError: annotation of degenerated to SomeObject() Simple call of incompatible family: (KeyError getting at the binding!) Happened at file /usr/src/pypy/lib-python/2.7.0/re.py line 232 cachekey = (type(key[0]),) + key ==> p = _cache.get(cachekey) if p is not None: Previous annotation: (none) Processing block: block@9 is a in (re:229)_compile__star_2 containing the following operations: v0 = getitem(key_0, (0)) v1 = type(v0) v2 = newtuple(v1) v3 = add(v2, key_0) v4 = simple_call((method get), v3) v5 = is_(v4, (None)) v6 = is_true(v5) --end-- $ cat target.py #! /usr/bin/python2.6 def entry_point(argv): import re s = re.sub(r'[^a-fA-F\d]', '', str(argv[1])) print s.decode('hex') def target(*args): return entry_point, None if __name__ == '__main__': import sys entry_point(sys.argv) ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] When translating pypy, how do I notify it of library locations?
On Wed, Mar 23, 2011 at 9:48 AM, Alexander Golec wrote: > I'm building pypy with the default JIT configuration, and I'm on a machine > where I do not have root access. I've installed the libraries that I need in > my ~/lib folder, but I can't get pypy to see them. I can neither see the > library files, nor the headers. > > I've tried setting the following options : > > --cflags=COMPILERFLAGS > --ldflags=LINKERFLAGS > > but to no avail... Can you explain exactly what didn't work? I think we honor those options. > > Alex > > ___ > pypy-dev@codespeak.net > http://codespeak.net/mailman/listinfo/pypy-dev > ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Pypy custom interpreter JIT question
On Tue, Mar 22, 2011 at 5:54 PM, Armin Rigo wrote: > can_enter_jit() is not correct. For it to work, it must be called > just before jit_merge_point(). It's wrong that there are two > intermediate instructions here: "pc+=1" and the "pc < len(program)" > condition. > Okay, I think I understand. I'm still learning how all this stuff works. Regardless... > > As a first attempt, you should just not call can_enter_jit() at all. > Nowadays, if can_enter_jit is never called, it's done automatically > for you; I did not know this. Good to know! I've removed the can_enter_jit() call from the two versions of my interpreter. However, the version that didn't work before still does not run correctly. It seems like I'm still left with the same problem as before. This works (version without Tape class and with can_enter_jit call removed) https://bitbucket.org/brownan/bf-interpreter/src/6c6c80397554/targetbf.py Incidentally, I think it may run slightly slower now, but I'm not sure. This version still does not (version *with* Tape class, and with can_enter_jit removed) https://bitbucket.org/brownan/bf-interpreter/src/1d16c3eed7e2/targetbf.py Any other ideas? I'm still at a loss. Thanks for taking a look! -Andrew ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] way to refer to our online doc
2011/3/23 Laura Creighton : > I guess the question is, do we want to refer to 'default' or to 'tip' ? "tip" refers to the last committed change, and may belongs to any development branch -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] way to refer to our online doc
In a message of Wed, 23 Mar 2011 19:12:57 +0100, "Amaury Forgeot d'Arc" writes: >Hi, >2011/3/23 Laura Creighton : >> over on bitbucket I am looking at >> >> https://bitbucket.org/pypy/pypy/src/04d276c92744/pypy/doc/ >> >> and I assume that the 04*44 is just some revision number. =A0How do >> we want to refer to the docs in general now that we have moved? > >I just replaced the rev number with "default": >https://bitbucket.org/pypy/pypy/src/default/pypy/doc/ > >Another branch name should work equally. > >Amaury Forgeot d'Arc I guess the question is, do we want to refer to 'default' or to 'tip' ? Laura ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] way to refer to our online doc
Hi, 2011/3/23 Laura Creighton : > over on bitbucket I am looking at > > https://bitbucket.org/pypy/pypy/src/04d276c92744/pypy/doc/ > > and I assume that the 04*44 is just some revision number. How do > we want to refer to the docs in general now that we have moved? I just replaced the rev number with "default": https://bitbucket.org/pypy/pypy/src/default/pypy/doc/ Another branch name should work equally. -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
[pypy-dev] way to refer to our online doc
over on bitbucket I am looking at https://bitbucket.org/pypy/pypy/src/04d276c92744/pypy/doc/ and I assume that the 04*44 is just some revision number. How do we want to refer to the docs in general now that we have moved? Laura ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] When translating pypy, how do I notify it of library locations?
Hi Alexander, On 23/03/11 16:48, Alexander Golec wrote: > I'm building pypy with the default JIT configuration, and I'm on a machine > where I do not have root access. I've installed the libraries that I need in > my ~/lib folder, but I can't get pypy to see them. I can neither see the > library files, nor the headers. which libraries are you talking about? Pure python modules/packages (i.e., the ones contained in lib-python and lib_pypy) or shared libraries? ciao, Anto ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
[pypy-dev] When translating pypy, how do I notify it of library locations?
I'm building pypy with the default JIT configuration, and I'm on a machine where I do not have root access. I've installed the libraries that I need in my ~/lib folder, but I can't get pypy to see them. I can neither see the library files, nor the headers. I've tried setting the following options : --cflags=COMPILERFLAGS --ldflags=LINKERFLAGS but to no avail... Alex ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] status of the graphviz server on codespeak?
On Wed, Mar 23, 2011 at 2:36 AM, Laura Creighton wrote: > In a message of Wed, 23 Mar 2011 09:02:25 +0100, Antonio Cuni writes: >>On 23/03/11 02:36, Maciej Fijalkowski wrote: >>> On Tue, Mar 22, 2011 at 7:17 PM, Laura Creighton wrote >>: getting-started-dev says: Download and install `Dot Graphviz`_ (optional if you have an internet connection: the flowgraph viewer then connects to codespeak.net and lets it convert the flowgraph by a graphviz serve >>r). What's going to happen to that when codespeak goes away? >>> >>> This one is defunct for ages now I think. >> >>no, I think it's still up: >>http://codespeak.net/pypy/convertdot.cgi >> >>we can either migrate it to some other machine (tannit?) or discontinue t >>he >>service. Nowadays, it's only useful for us developers, and (I think) we a >>ll >>have graphviz installed locally. > > I think discontinuation is the way to go. Running on tannit is a bad > idea, since it would impact our benchmarks, but running someplace else > is a possibility. I don't think it's worth it. I assumed it doesn't work because it never worked for me :) Crash on dot also crashed later on trying to run on codespeak. I would say just remove > > Laura > >> >>ciao, >>Anto > ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] status of the graphviz server on codespeak?
In a message of Wed, 23 Mar 2011 09:02:25 +0100, Antonio Cuni writes: >On 23/03/11 02:36, Maciej Fijalkowski wrote: >> On Tue, Mar 22, 2011 at 7:17 PM, Laura Creighton wrote >: >>> getting-started-dev says: >>> >>> Download and install `Dot Graphviz`_ (optional if you have an internet >>>connection: the flowgraph viewer then connects to >>>codespeak.net and lets it convert the flowgraph by a graphviz serve >r). >>> >>> What's going to happen to that when codespeak goes away? >> >> This one is defunct for ages now I think. > >no, I think it's still up: >http://codespeak.net/pypy/convertdot.cgi > >we can either migrate it to some other machine (tannit?) or discontinue t >he >service. Nowadays, it's only useful for us developers, and (I think) we a >ll >have graphviz installed locally. I think discontinuation is the way to go. Running on tannit is a bad idea, since it would impact our benchmarks, but running someplace else is a possibility. I don't think it's worth it. Laura > >ciao, >Anto ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] status of the graphviz server on codespeak?
On 23/03/11 02:36, Maciej Fijalkowski wrote: > On Tue, Mar 22, 2011 at 7:17 PM, Laura Creighton wrote: >> getting-started-dev says: >> >> Download and install `Dot Graphviz`_ (optional if you have an internet >>connection: the flowgraph viewer then connects to >>codespeak.net and lets it convert the flowgraph by a graphviz server). >> >> What's going to happen to that when codespeak goes away? > > This one is defunct for ages now I think. no, I think it's still up: http://codespeak.net/pypy/convertdot.cgi we can either migrate it to some other machine (tannit?) or discontinue the service. Nowadays, it's only useful for us developers, and (I think) we all have graphviz installed locally. ciao, Anto ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev