[00:31] cfbolz (~cfbolz@62.52.38.153) joined #pypy.
[00:35] cfbolz (~cfbolz@62.52.38.153) left irc: Remote closed the connection
[00:40] Nick change: Roey -> WorkRoey
----- silence for 28 minutes ----- [01:08] pedronis (~Samuele_P@c-358b70d5.022-54-67626719.cust.bredbandsbolaget.se) left irc: "Chatzilla 0.9.67 [Firefox 1.0.2/20050317]"
----- silence for 1 hr and 5 minutes ----- [02:13] _hannes (~yuuhu@i528C118D.versanet.de) left irc: "utz utz utz"
----- silence for 2 hr and 58 minutes ----- [05:11] el (~chily_141@201.254.39.88) joined #pypy.
[05:14] el (chily_141@201.254.39.88) left #pypy.
----- silence for 3 hr and 34 minutes ----- [08:48] idnar (mithy@idnar.user) joined #pypy.
----- silence for 33 minutes ----- [09:21] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) left irc: "BeOS - Because you don't eat soup with a fork!"
[09:27] Arafat (~bear@dialin-212-144-183-176.arcor-ip.net) joined #pypy.
[09:29] Nick change: Arafat -> Gromit
[09:34] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) joined #pypy.
----- silence for 21 minutes ----- [09:55] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) left irc: "BeOS - Because you don't eat soup with a fork!"
[10:04] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) joined #pypy.
----- silence for 1 hr and 28 minutes ----- [11:32] arigo (~arigo@134.99.112.244) joined #pypy.
[11:41] arigo (arigo@134.99.112.244) left #pypy ("Leaving").
[11:43] arigo (~arigo@134.99.112.244) joined #pypy.
----- silence for 30 minutes ----- [12:13] ludal (~ludal@logilab.net2.nerim.net) joined #pypy.
[12:23] pedronis (pedronis@ratthing-b246.strakt.com) joined #pypy.
----- silence for 39 minutes ----- [13:02] _hannes (haxtnf@i528C131C.versanet.de) joined #pypy.
----- silence for 36 minutes ----- [13:38] cfbolz (~bolz@zenon.physi.uni-heidelberg.de) joined #pypy.
[13:46] Gromit (~bear@dialin-212-144-183-176.arcor-ip.net) left irc: Read error: 54 (Connection reset by peer)
[13:53] yuuh (xgertgo@i528C131C.versanet.de) joined #pypy.
[13:54] _hannes (haxtnf@i528C131C.versanet.de) left irc: Read error: 113 (No route to host)
[13:58] <cfbolz> hi!
[13:59] <cfbolz> eval doesn't work perfectly in PyPy yet, right?
[14:06] <pedronis> what imperfection did you find?
[14:10] <cfbolz> if you give it a dict as a second argument, __builtins__ should be copied to it, if missing, right?
[14:10] <pedronis> that's an implmentation detail of CPython
[14:11] <cfbolz> ah. Ok.
[14:11] <cfbolz> and how do I recognize it as such?
[14:11] <cfbolz> :-)
[14:15] <pedronis> well, knowing what other implementations of python do is useful
[14:15] <pedronis> also knowing that the __builtins__ thing is related to restricted exectution
[14:15] <pedronis> this does not mean that we are not going to copy what CPython does for this
[14:16] <cfbolz> ok. I just noticed it because the CPython long test breaks because of it. It's not very important (for me).
[14:17] <cfbolz> The rest of it passes now. But it *lots* of time.
[14:20] <pedronis> which test breaks
[14:24] <cfbolz> the one with eval in it :-)
[14:24] <cfbolz> test_float_overflow
[14:24] <cfbolz> in test_long.py
[14:25] <cfbolz> the eval fails because "float" isn't found.
[14:28] <pedronis> ah, builtins are not found
[14:28] <pedronis> that's more meaty description of the problem
[14:28] <cfbolz> sorry
[14:39] gfunch (~chatzilla@breisfel-01.cvmbs.colostate.edu) joined #pypy.
[14:42] gfunch (~chatzilla@breisfel-01.cvmbs.colostate.edu) left irc: Client Quit
----- silence for 20 minutes ----- [15:02] Gromit (~bear@dialin-212-144-177-056.arcor-ip.net) joined #pypy.
[15:15] <cfbolz> thanks! test_long is working now. Should I add it to conftest? It takes several hours to finish, though.
[15:17] <arigo> I guess so, yes, with a comment about the several hours :-)
[15:17] <cfbolz> ok
[15:26] stakkars (~tismer@82.144.60.19) joined #pypy.
[15:26] <arigo> hi christian
[15:27] <cfbolz> hi!
[15:27] <stakkars> hi friends!
[15:28] <stakkars> I've read about theoretical problems about lists and annotation. Is this solved,
[15:28] <stakkars> or should I think about it?
[15:29] <arigo> yesterday's IRC ?
[15:29] <stakkars> yup
[15:30] <arigo> about lists and code generation, then
[15:30] <arigo> no, I have no clue about what to do
[15:31] <stakkars> yes, I meant the ambiguity. So I do think about it! :)
[15:31] <arigo> yes
[15:31] <stakkars> about tests which take several hours:
[15:32] <stakkars> In some cases, this was a reason for meto duplicate a standard test and comment the real time consumers out.
[15:33] <stakkars> Maybe there is a better way to do that, perhaps with a config file which lists loong tests, and we add a flag to the test script?
[15:33] <WorkRoey> hello
[15:33] <stakkars> hi
[15:33] <WorkRoey> stakkars: just wanted to say "hi", nice to meet you finally
[15:33] <arigo> hi
[15:33] <WorkRoey> stakkars: your name pops up all over
[15:33] <WorkRoey> arigo: hi!!
[15:34] <stakkars> WorkRoey: huh, really? Maybe I should change it, again? :-)
[15:34] <Gromit> stakkars: wouldn't it make more sense to add an estimated time to run to test itself?
[15:34] <WorkRoey> stakkars: hehe
[15:34] Nick change: WorkRoey -> Roey
[15:35] <cfbolz> stakkars: For test_long I could also just put the MAX_DIGITS parameter to a lower value which reduces the runtime quite a lot.
[15:35] <stakkars> Gromit: whatever, I would like to have a no-thoughts-needed-to-run way to run all tests in finite time (where finite is 1 cup of coffee)
[15:36] <Gromit> IC
[15:36] <stakkars> if testing is difficult, it would be used, less. If there is an algorithm that computes necessary time using different parameters, that's just convenient.
[15:37] <stakkars> s/used, less/useless
[15:37] <Gromit> i thought of something realy stupid, like "on an average machnine this test will run 300 seconds" or so
[15:39] <stakkars> cfbolz: sounds good. There could be some constants which make up for Qick/Medium/Slow on an average machine, and a script would set the default to quick, maybe.
[15:40] <cfbolz> yes, but it's not easy to do that for most tests
[15:40] <stakkars> for most long tests,or in general?
[15:40] <cfbolz> general
[15:42] <stakkars> well, if we are lucky, the first working genXXX output will be,say, 10 times faster than what we have now?
[15:42] <stakkars> That makes the problem almost vanish.
[15:42] <Gromit> genXXX si expected to be working in mid june, isn't it?
[15:43] <cfbolz> genXXX it's working right now, for some definitions of "working"
[15:43] <cfbolz> s/it's/is
[15:44] <Gromit> ok, let's define "working" as "able to run the test suite"
[15:44] <Gromit> I just won't to find out how mich time each developer will loose, if the tests run to long
[15:46] <pedronis> arigo, stakkars: well anyway we also need to start soon running the tests systematically because of the first deadline
[15:47] <stakkars> Gromit: this is of course a major drawback of the whole approach:
[15:47] <stakkars> a little slow is ok. But PyPy is veryslow, which turns testing into quite a problem,
[15:47] <stakkars> and it reminds me on the old days where I waited for my main frame output for hours.
[15:48] <stakkars> in that sense, meeting the deadline in some way is good for everybody.
[15:48] <stakkars> if that works with minimal testing... :)
[15:49] <Gromit> can the tessuite be run in paralell on many machines?
[15:49] <stakkars> pedronis: the deadline was for the tests, or the executable?
[15:49] <pedronis> the tests
[15:49] <Roey> heh, pypy slow?
[15:49] <stakkars> I guess it would be quite doableto set up a script that feeds single test files to different machines.
[15:50] <Roey> stakkars: what kind of source files are you feeding it?
[15:50] <dialtone> pedronis: if all you need is systematic testing after each commit then I suggest using buildbot
[15:51] <pedronis> no, we need to try to run "all" of the CPython tests
[15:52] <cfbolz> pedronis: couldn't we set up a machine that runs all the tests every night?
[15:52] <hpk> cfbolz: that's in preparation
[15:53] <cfbolz> cool
[15:53] <Gromit> hpk: That's what I meant
[16:02] ludal (ludal@logilab.net2.nerim.net) left #pypy.
[16:08] <stakkars> Roey: well, different. I use a shared drive and put a bulkof "todo" scripts into it, where each is a call to a single test file, standard test or whatsoever.
[16:09] <stakkars> Then, every client machine picks such a script,computes it, and writes its output to an output file.
[16:09] <stakkars> This is repeated untilall todo scripts are gone away. And all machines will be under full load and ready mostly at the same time.
[16:09] <stakkars> Did that 20 years ago with FFT computation and 20 machines.
[16:10] <Roey> ok
[16:10] <Roey> stakkars: what exactly is slow though?
[16:10] <Roey> >>>1 + 1 ?
[16:10] <stakkars> Should I order 20 machines at 39€ each per month, for one or two months? :-)
[16:10] <Roey> or importing a module from the standard python library?
[16:10] <stakkars> slow is running a regression test of the CPython test suite.
[16:11] <Roey> oh ok
[16:11] <Roey> stakkars: how much slower?
[16:11] <stakkars> didn't measure. 2000 or more.
[16:12] <cfbolz> 2 ** 99999 is slow.
[16:12] <stakkars> btw., did you try 9**9**9 in CPython?
[16:12] <cfbolz> no. why?
[16:13] <Gromit> stakkars: IC
[16:13] <Gromit> right now :)
[16:13] <stakkars> because it appears to be uncomputable, right now.Although it should fit into memory if you have a GIG.
[16:13] <stakkars> should be computable in 8 hours, if there is no swapping.
[16:13] <cfbolz> I'm not going to wait that long :-)
[16:14] <stakkars> but tiny tests let you estimate. I got until 9**9**7 in 5 minutes I think, and estimated the Karatsuba operations.
[16:15] <cfbolz> my long implemetation isn't even doing Karatsuba multiplication at the moment.
[16:16] <stakkars> naaah, I didn't read that! !-)
[16:17] <cfbolz> Feel free to implement it :-)
[16:18] <stakkars> sure I'll do (not urgent now, of course:-) ), simply because I proposed it for CPython, in the last millenium
[16:19] <cfbolz> no, just kidding. I can do it, of course.
[16:20] <stakkars> kidding too, here, of course we are fine without.
[16:20] <stakkars> Here the official stakkars PyPy benchmark of the day: My estimate was *very* good:
[16:20] <stakkars> This machine benchmarks at 22348.6 pystones/second
[16:21] <stakkars> This machine benchmarks at 10.7323 pystones/second
[16:21] <cfbolz> you mean pypystones/second, right?
[16:21] <stakkars> 2000+ is a good estimate. Yes, I shouldmodify my pystone version for that :-)
[16:22] <stakkars> I think it is even worse for certain operations which are implemented in applevel. PyStone touches almost interplevel, only I think.
[16:22] <cfbolz> maybe we can get an genXXX to translate it
[16:23] <stakkars> to translate what?
[16:23] <pedronis> pystone
[16:23] <cfbolz> yes
[16:23] <stakkars> pystone is a Python program, not meant to be translated.???
[16:23] <cfbolz> Has someone tried to annotate it?
[16:24] <cfbolz> doesn't look very applevel-ish to me
[16:24] <stakkars> well,maybe it is RPython compatible. But what sense would it make? Aah, you want to seehow good the generated
[16:24] <stakkars> XXX code is, good idea!
[16:25] <cfbolz> and you could boast a bit :-)
[16:25] <pedronis> just to remember: speed of translated pystone != speed of pystone on top of translated PyPy
[16:25] <stakkars> fine idea! we might set one translation goal to be pystone.
[16:25] <cfbolz> of course not
[16:25] <cfbolz> I meant "speed of translated pystone != speed of pystone on top of translated PyPy"
[16:25] <stakkars> surely not. But one first result of a translated program and its speed. Very nice!
[16:26] <stakkars> yes. But speed of translated PyStone compared to an hand-optimized C version makes very much sense.
[16:26] <cfbolz> and it gives a rough factor of how much we can expect translation to speed things up.
[16:27] <stakkars> let me see if it translates at all...
[16:27] <cfbolz> I think sys.time is a problem.
[16:28] <stakkars> Ijust ran it though geninterp. This is not RPython, because of undefined variables.
[16:29] <stakkars> this is une problem with flow space, which I hope can be healed at some time. Variable lifetime may not depend on block order.
[16:31] <stakkars> if nobody objects, I'll add some modified pystone.py to PyPy, with comments why changes were necessary.
[16:40] <hpk> don't we have a modified pystone.py somewhere already
[16:40] <hpk> ?
[16:40] <stakkars> do we? I took mine,fromstackless.
[16:40] <hpk> lib/test2/pystone.py
[16:40] <stakkars> OoOoPs
[16:40] <hpk> alex modified i to run reasonably on pypy
[16:40] <hpk> (he only changed the number of loops ASFAIK)
[16:40] <stakkars> great. Now let me see if it translates, too.
[16:41] <hpk> you can do diff lib-python-2.3.4/test/pystone.py lib/test2/pystone.py ...
[16:41] <stakkars> ok, what I added was the ability to pass LOOPS percmdline arg.
[16:41] <hpk> exactly what alex did :-)
[16:41] <Roey> stakkars: 2**2**7 is the same as 2**(2**7)... funny, I thought it would be (2**2)**7.. (this is with cpython 2.3.4)
[16:42] <stakkars> Roey: sure it is, what would you expect? ** binds right to left.
[16:43] <stakkars> hpk: well, quite verbose, but ok, I'll take this one :)
[16:43] <Roey> in math it's from left to right no?
[16:43] <stakkars> never!
[16:43] <Roey> hmm.
[16:44] <Roey> oh
[16:44] <Roey> in math it's not written as ** anyway
[16:44] <stakkars> the rule is: (simply write it down with stacked numbers):
[16:44] <Roey> it's written much clearer
[16:44] <stakkars> x**something: take x to the power of something.
[16:44] <Roey> ok
[16:44] <stakkars> if something is y**something else, this is computed first.
[16:44] <Roey> so x**something1**something2 is x**( something1**something2 )
[16:44] <Roey> got it.
[16:44] <Roey> ok thanks for telling me
[16:45] <stakkars> yes. The right-to-left rule is implied by the way you write it on paper (not really,but helps to remember)
[16:45] <idnar> (2**2)**7 is equal to 2**(2*7)
[16:45] <idnar> so it wouldn't be useful for it to group like that
[16:46] <Roey> idnar: that's not true
[16:46] <Roey> idnar: (2**2)**7 is 4**7
[16:46] <stakkars> idnar: this belongs to the endless weird special cases this special even prime number has for you :-)
[16:46] <idnar> >>> (2**2)**7 == 2**(2*7)
[16:46] <idnar> True
[16:46] <hpk> arigo: do you have a second on #pylib, i have a qustion about execnet
[16:47] <Roey> idnar: you're missing a *
[16:47] <Roey> oh
[16:47] <Roey> ohh you said 2*7
[16:47] <Roey> gotcha.
[16:47] <stakkars> that was the joke I guess
[16:47] <Roey> <idnar> (2**2)**7 is equal to 2**(2*7)
[16:47] <Roey> heh
[16:47] <idnar> yes, this gets confusing when your exponentiation operator is your multiplication operator repeated
[16:47] <stakkars> no other prime has addition and multiplication being so near to each other.
[16:48] <Roey> 3++2
[16:48] <Roey> 7--9
[16:48] <Roey> yeah
[16:48] <Roey> 4//2
[16:48] <Roey> well // is an operator
[16:49] <idnar> stakkars: well, in the general case, (x ** y) ** z == x ** (y * z)
[16:49] <stakkars> this is correct.
[16:49] <Roey> idnar: can you prove this
[16:50] <Roey> idnar: by induction or what
[16:50] <Roey> ?
[16:50] <stakkars> but for two, there are much more of these, when it comes to **, where the number of factors counts
[16:50] <stakkars> Roey: there is nothing to prove, but sure I can.
[16:51] <idnar> hrm, I can't recall the proof for that one, it's fairly basic algebra
[16:51] <stakkars> if you rewrite things with logarithms, it becomes obvious, as one way.
[16:52] <Roey> you mean if you take the log of both sides base... z?
[16:53] <idnar> log (x ** y) == y * log x
[16:54] <idnar> therefore log ((x ** y) ** z) == z * log (x ** y) == z * y * log x == (z * y) * log x == log (x ** (z * y))
[16:54] <Roey> *digesting
[16:55] <Roey> how do you take log base z of (x ** (y*z)) again?
[16:55] <Roey> oh
[16:55] <Roey> y * log x
[16:55] <Roey> ok
[16:55] <idnar> the base of the log is unimportant here
[16:55] <Roey> yeah that's standard manipulations of log (x**y)
[16:55] <Roey> ok
[16:56] <Roey> oh ok
[16:56] <stakkars> well done, kids. Let's now go to trigonometrics, complex numbers and Euler... :-)
[16:56] <Roey> now I get it.
[16:56] <Roey> :)
[16:56] <Roey> I'm so stupid these days :(
[16:56] <Roey> idnar: lemme guess you're like 20 or so?
[16:59] <idnar> Roey: spot on ;)
[17:00] <Roey> dah!! :)
[17:00] <Roey> also,
[17:00] <Roey> idnar is a Turkish name yes?
[17:01] <idnar> hrm, I don't know
[17:01] <Roey> oh, ok
[17:01] <Roey> idnar is your name too?
[17:01] <idnar> my nick was derived by taking 'mithrandi', reversing it, and removing the last four letters
[17:01] <Roey> aaaaah
[17:01] <Roey> hehe
[17:01] <Roey> you're Indian?
[17:01] <stakkars> randi I guessed, too, but not the rest.
[17:01] <idnar> nope, South African
[17:02] <idnar> 'mithrandi' is the nick I normally use, but on this network the presence of 'mithrandi' and 'Mithrandir' (who is someone completely different) would be rather confusing
[17:02] <idnar> my real name is in my /whois
[17:04] <Roey> ah ok.
[17:04] <Roey> idnar: have you ever heard of Mervis Diamonds?
[17:04] <Roey> they're a big place here in my area
[17:04] <Roey> they have their own mines in SA
[17:08] <idnar> hrm, the name doesn't ring any bells
[17:08] <Roey> ok
[17:09] <idnar> some googling seems to suggest they're more into import / distribution / etc. so whatever "presence" they have here is quite possibly under some different name
[17:09] <stakkars> ok, flow space is happywith local pystone names, but now is in an endless loop... probably due to printing
[17:10] <cfbolz> how much printing is there in pystone?
[17:11] <stakkars> two lines, I'm trying to change that.
[17:15] <stakkars> eek! the prints are out, but still I get an infinite loops !?!?!
[17:16] <stakkars> aahh, there are globals used. Maybe this is a problem?
[17:17] <pedronis> it mutates globals
[17:17] <stakkars> yes. Needs quite some re-write.
[17:18] <stakkars> is it ok to use a glob object which is a class or something? May I mutate attributes?
[17:19] <arigo> this part of R-Python is unclear, but you can probably mutate instance attributes
[17:19] Gromit (~bear@dialin-212-144-177-056.arcor-ip.net) left irc: Read error: 113 (No route to host)
[17:19] <stakkars> with this bulk of changes, I think it is better to check this in as pystone2.py, right?
[17:20] <stakkars> or maybe pypystone,l or rpystone.
[17:20] <arigo> yes :-)
[17:21] <stakkars> but you agree it makes sense to have it?
[17:22] <arigo> probably
[17:22] <arigo> it would be a translation test, yes
[17:23] <stakkars> so it would go into translator. I'm using genrpython at the moment, just to ensure it translates.
[17:24] <stakkars> not sure if it would be a direct genc target???
[17:24] <arigo> yes, it could be
[17:24] <arigo> then maybe put it in translator/test/
[17:24] <cfbolz> well, it is a "translation" from c, so it should be possible to translate it back
[17:25] <arigo> :-)
[17:25] <cfbolz> let's see whether the result is the same :-)
[17:25] <stakkars> great test, boohoo :-)
[17:26] <arigo> with luck, genllvm can handle it and give great performance!
[17:27] <cfbolz> I think it should be possible. I'll look into it after I finished targetpypy1
[17:27] <cfbolz> :-)
[17:27] <arigo> :-)
[17:28] <cfbolz> btw: samuele's PBC access sets are really a big help for that
[17:28] <cfbolz> It's more or less exactly what was needed.
[17:31] <pedronis> stakkars: yes you can use a global instance of a class to hold mutable attributes
[17:32] <stakkars> ok,already hacking
[17:35] <cfbolz> I gotta go. See you
[17:35] <arigo> see you!
[17:36] cfbolz (~bolz@zenon.physi.uni-heidelberg.de) left irc: "Leaving"
[17:36] <stakkars> interesting!!! rpystone in Python is almost 30 % faster!
[17:37] <stakkars> ah, no, sorry. I compared different versions.
[17:38] <stakkars> actually, it is 10 percent slower, what I expected.
[17:38] <arigo> :-)
[17:38] <arigo> rpystone/CPython is 10% slower than pystone/CPython?
[17:39] <stakkars> yes.
[17:39] <stakkars> because of all the new attribute lookups.
[17:39] <arigo> sure, makes sense.
[17:39] <pedronis> yes
[17:40] <stakkars> ok, now it translates, and I have an rpystoneinterp.py. now let me get this to run (I'm sure I get problems with stdout)
[17:40] <pedronis> you could compare (r)pystone/PyPy with rpystone/CPython
[17:40] <stakkars> pedronis: jaaa,but before I have tojust make it run :-D
[17:40] <pedronis> of course
[17:40] <stakkars> ah,oh,you meant rpystone as an application program? that will work,letme see!
[17:41] <pedronis> it should give an idea of how much geninterp is helping (?)
[17:43] <stakkars> woohoo, interesting code :-)
[17:44] <stakkars> arghh! all the zeroing code for initialization is compiled as predefinedconstant, and then my init code
[17:45] <stakkars> has one assignment for every zero :-(
[17:47] <stakkars> erhmm, how do we get at sys.stdout, right now?
[17:48] <stakkars> do I use a space attribiute, or do I use an exec_/eval thing?
[17:53] <stakkars> I see: space.wrap(sys.stdout)
----- silence for 16 minutes ----- [18:09] Gromit (~bear@dialin-212-144-177-091.arcor-ip.net) joined #pypy.
----- silence for 19 minutes ----- [18:28] <stakkars> pedronis: does space.wrap(sys) really return a fakemodule, not what a true import in space.exec would give?
[18:28] <arigo> stakkars: yes, I think so
[18:29] <arigo> our own sys module is available as space.wrap(space.sys)
[18:29] <stakkars> ahh, that's great! So that would have the right stdout stuff?
[18:29] <arigo> yes, as space.sys.get_w('stdout'), I believe
[18:30] <stakkars> are all builtin modules available like that?
[18:30] <arigo> no, currently only space.builtin and space.sys
[18:30] <arigo> for the other builtins there is a way to get at them too, and then you can use get_w()
[18:30] <stakkars> well, for the others I would write a helper that is eval'ed.
[18:31] <stakkars> so maybe I should do it once and that's it.
[18:32] Roey (Roey@Roey.sustaining.supporter.pdpc) left #pypy ("Leaving").
[18:34] <stakkars> arigo:no?
[18:35] <arigo> what other built-in modules do you need?
[18:35] <arigo> if it's faked ones like 'time' I guess you need some kind of eval-based hack, yes
[18:35] <stakkars> none but sys in this case, I just wanted to take the chance toclean this part of geninterp.
[18:35] <arigo> ah, ok
[18:36] <stakkars> oh well, I need time, too here.
[18:36] <stakkars> thx
[18:49] <stakkars> arigo: space.sys.get_w doesnotwork forme.
[18:49] <arigo> ups, it's called get()
[18:50] <arigo> (interpreter/lazymodule.py)
[18:50] <arigo> sorry
[18:50] <stakkars> ah, thanks!
[18:53] <stakkars> ouch, I get more trouble:
[18:53] <stakkars> translating sys.stdout.writelike so:
[18:53] <stakkars> gbltinmethod_write = space.getattr(space.sys.get("stdout"), gs_write)
[18:54] <stakkars> I get a traceback that says
[18:54] Gromit (~bear@dialin-212-144-177-091.arcor-ip.net) left irc: "happi happi"
[18:54] <stakkars> OperationError: [<W_TypeObject(AttributeError)>: W_StringObject("'instance' object has no attribute 'write'")]
[18:55] <stakkars> so this instance is porbably a faked file instance. howcomes?
[18:55] <arigo> I'm not quite sure why space.wrap(sys.stdout) didn't work in the first place
[18:55] <stakkars> hum. I don't remember,maybe it had the sameproblem: the write method.
[18:56] <arigo> actually both ways should indeed give you the same faked file
[18:56] <arigo> which should have a write method anyway
[18:56] <arigo> strange
[19:00] <arigo> I don't know what is going on,
[19:00] <arigo> at least in the interp-level console of "py.py Ctrl-C"
[19:00] <arigo> the expression
[19:00] <arigo> space.getattr(space.sys.get("stdout"), space.wrap('write'))
[19:00] <arigo> seems to work
[19:01] <stakkars> maybe I update svn...
[19:06] <stakkars> yeah, the expr worksfor me, too.
[19:08] <arigo> it must be the way you translate the sys.stdout constant, maybe
[19:08] <arigo> no, I don't understand
[19:09] <stakkars> I use nameof(sys) which generates
[19:09] <stakkars> no,crap, I use """ gbltinmethod_write = space.getattr(space.sys.get("stdout"), gs_write)
[19:09] <stakkars> """
[19:10] <stakkars> >>> from pypy.objspace.std import Space
[19:10] <stakkars> >>> space=Space()
[19:10] <stakkars> faking <type 'unicode'>
[19:10] <stakkars> faking <type 'module'>
[19:10] <stakkars> >>> x=initpystone(space)
[19:10] <stakkars> and then it crashes this way
[19:11] <stakkars> aaargh
[19:11] <stakkars> PythonWin
[19:11] <arigo> ?
[19:12] <stakkars> when I type this line in PyWin, it crashes.
[19:13] <stakkars> I'lltryfrom the console...
[19:15] <stakkars> yes, it is true. for PythonWin,we are producing something different.
[19:16] idnar (mithy@idnar.user) left irc: Nick collision from services.
[19:16] idnar_ (mithrandi@idnar.user) joined #pypy.
[19:16] idnar (mithy@idnar.user) joined #pypy.
[19:16] <arigo> ah
[19:22] <stakkars> woohaa!
[19:22] <arigo> :-) ?
[19:22] <stakkars> the translated benchmark runs at 27.2305 pystones/second
[19:23] <arigo> 2.7 times faster than on top of PyPy, then
[19:23] <stakkars> 9.30707
[19:23] <stakkars> yes!
[19:24] <arigo> but what about genc-ing it?
[19:24] <arigo> :-)
[19:24] <stakkars> I justhope that the generated code is correct.
[19:24] <stakkars> well, that's the next step, this was just to get it flowable.
[19:24] <arigo> it produces the correct result (i.e. none) so it is correct by definition :-)
[19:24] <stakkars> ROTFLMAO
[19:25] <arigo> WDYMEBT
[19:25] <arigo> What Do You Mean Exactly By That
[19:25] <stakkars> what do I mean by that? rolling on the flloor, laughing my ass off
[19:26] <arigo> :-)
[19:29] <stakkars> this result is quite remarkable. I didn't expect that much.
[19:29] <arigo> that's the 2 or 3x speed-up we get for removing the interpretation overhead, like Python2C vs CPython
[19:29] <stakkars> maybe you created a huge speedup by getting rid og globals in geninterp. I didn't check that.
[19:29] <stakkars> that alone used to be less than two.
[19:30] <arigo> ah, ok
[19:30] <arigo> the removal of the globals look-up might be a factor, yes
[19:30] <stakkars> and I measured something like 1.8 for geninterp.
[19:30] <pedronis> function call overhead
[19:30] <pedronis> ?
[19:30] <stakkars> oh well, in this application,probablyeverything was turned into a direct call.letme see...
[19:32] <stakkars> yes, I see quite a lot of fast_f calls.
[19:35] <stakkars> ok, I'll add a test_rpystone.py.Oh no, this isn't a test, should have a different name, right?
[19:36] <arigo> rpystone.py, simply (like we have snippet.py)
[19:36] <arigo> but then you can add test_rpystone, which really tries to compile and run it :-)
[19:36] <stakkars> ah, you mean I should make it translate and run itself?
[19:36] <stakkars> At the moment, I ran it through Samuele's script and started main by hand.
[19:36] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) left irc: Read error: 113 (No route to host)
[19:37] <arigo> yes, I mean if it's in a rpystone.py, then there should be another short test_rpystone.py which does that.
[19:37] <arigo> stakkars: something else, _interplevel_cache.py should be in the ignore-list of svn, ok if I do it?
[19:37] <stakkars> yes, absolutely!
[19:38] <arigo> ok
[19:38] <stakkars> erhm... as it is right now, it can be run by any Python, but nobody translates it.
[19:38] <stakkars> Do you say test_rpystone translates and executes it?
[19:39] <arigo> yes,
[19:39] <arigo> that would be similar to snippet.py containing normal Python code examples, and test_xyz translating and running them.
[19:40] <stakkars> ok. WHen I have that, we might try genc.
[19:40] <arigo> ok
[19:41] idnar_ (mithrandi@idnar.user) left irc: Read error: 110 (Connection timed out)
[19:41] <stakkars> can I find out whether I am PyPyand automatically set the default runs from 50000 to,say, 25?
[19:41] <arigo> for now, hasattr(sys, 'pypy_objspaceclass')
[19:41] <stakkars> thx
[19:42] <arigo> of course, the best fix is to figure out incrementally how many times it should run :-)
[19:43] <stakkars> hehe. If no cmdline arg, do one dry run and make it run for, say, 5 seconds.
[19:43] <arigo> yes, or probably even more subtle things like
[19:44] <arigo> run 1, 2, 5, 10, 20, 50, 100, 200, 500, etc. times
[19:44] <arigo> until the total elapsed time is a few seconds
[19:44] <arigo> but I'm carrying you away from genc-ing it :-)
[19:45] <stakkars> slightly :-)
[19:46] <stakkars> I'll do the simple thing, now, have to go, soon.
----- silence for 22 minutes ----- [20:08] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) joined #pypy.
----- silence for 26 minutes ----- [20:34] arigo (~arigo@134.99.112.244) left irc: "dinner"
[20:48] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) left irc: "BeOS - Because you don't eat soup with a fork!"
----- silence for 17 minutes ----- [21:05] <stakkars> arigo: we got a nice bug in flowspace I think.
[21:07] <stakkars> sys.argc gets evaluated too early (maybe I must change something)
[21:08] <stakkars> but this clause looses the exception handler:
[21:08] <stakkars> elif nargs == 1:
[21:08] <stakkars> try: loops = int(sys.argv[1])
[21:08] <stakkars> except ValueError:
[21:08] <stakkars> error("Invalid argument %r;" % sys.argv[1])
[21:08] <stakkars> gets translated into
[21:09] <stakkars> if goto == 4:
[21:09] <stakkars> w_9 = space.call_function(space.w_int, gs_translator__test__rpystone_py)
[21:09] <stakkars> w_7 = w_9
[21:09] <stakkars> goto = 6
[21:09] <stakkars> there is for one the malicious transformofsys.argv[1] into a constant.
[21:10] <stakkars> but then, this makes the translator think that the exception handler may be dropped?
[21:15] tic (~vision@c-996e73d5.019-35-67626717.cust.bredbandsbolaget.se) joined #pypy.
----- silence for 33 minutes ----- [21:48] <pedronis> stakkars: something strange is going on there
[21:48] <pedronis> I see
[21:56] <pedronis> stakkars: fixed
[22:06] stakkars (~tismer@82.144.60.19) left irc: Read error: 110 (Connection timed out)
[22:07] Action: pedronis leaving
[22:07] pedronis (pedronis@ratthing-b246.strakt.com) left irc: "Chatzilla 0.9.67 [Firefox 1.0.2/20050325]"
----- silence for 24 minutes ----- [22:31] CLI (opera@86.125.128.38) joined #pypy.
[22:34] CLI (opera@86.125.128.38) left #pypy.
[22:49] pedronis (~Samuele_P@c-358b70d5.022-54-67626719.cust.bredbandsbolaget.se) joined #pypy.
[22:52] yuuh (xgertgo@i528C131C.versanet.de) left irc: Read error: 60 (Operation timed out)
[22:53] _hannes (egkyfz@i528C131C.versanet.de) joined #pypy.
----- silence for 53 minutes ----- [23:46] pedronis (~Samuele_P@c-358b70d5.022-54-67626719.cust.bredbandsbolaget.se) left irc: Remote closed the connection
[00:00] --- Thu Apr 14 2005