Committing @_ and %_ for rakudo. sleep now. % pfig has left pfig!~pfig@208-78-102-38.slicehost.net % pfig has joined #parrot % iblechbot has joined #parrot % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net % desertmax has left desertmax!~markus@212-183-121-153.adsl.highway.telekom.at % barney has joined #parrot % Ivatar has joined #parrot % turrepurre has left turrepurre!~chatzilla@90-229-128-103-no52.tbcn.telia.com % pfig has left pfig!~pfig@208-78-102-38.slicehost.net % Ademan has left Ademan!~dan@h-67-101-102-38.snfccasy.dynamic.covad.net % rdice has joined #parrot purl, tell jonathan I added some OO tests under spec/S12-*, hopefully I'll find tuits for a few more moritz: huh? no message but around? * barney is checking out the pgeupdates branch % masak has joined #parrot % Zaba_ has joined #parrot % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % NotFound has joined #parrot Hello. % tetragon has left tetragon!~seneca@216.126.67.44 % ambs has joined #parrot Hellows % tetragon has joined #parrot can I open a file for reading or writing with Rakudo? % barney has left barney!~bernhard@p549A1B34.dip0.t-ipconnect.de % ambs has left ambs!~ambs@255.92.54.77.rev.vodafone.pt % ambs has joined #parrot % Ivatar has left Ivatar!~graham@tu055.demon.co.uk % Ivatar has joined #parrot % rdice has left rdice!~richarddi@CPE001ff33cb98b-CM00159a01d44c.cpe.net.cable.rogers.com % wknight8111 has joined #parrot % Ivatar has left Ivatar!~graham@tu055.demon.co.uk % guru has joined #parrot ok, so it turns out I can followup question: is there a way to detect EOF in a file I've opened in Rakudo? % Ivatar has joined #parrot % wknight8111 has left #parrot % particle has left particle!~particle@c-24-19-3-148.hsd1.mn.comcast.net % mire_ has left mire_!~Frodo@79-172-222-85.adsl.verat.net % particle has joined #parrot hm. in PIR, what is the recommended way to detect EOF when reading from a file? I'm grepping through source code and poring over pdd22_io.pod, but find nothing about it There is this item in parrotio.pmc: =item C Returns whether at C or not. NotFound: thx I just found lin 162 in parrotio.pmc lines 162-166. those helped % mire_ has joined #parrot Looks usable, if you read by lines. but `readline` in Rakudo's IO.pir seems not to do this line 76 in languages/perl6/src/classes/IO.pir I find no way to detect an EOF through Rakudo's API I'm not fluent in pir, but looks like it returns the value obtainaed from parrot io. yes pdd22_io.pod mentions it on lines 193 and 201 apparently, it's an asynchronous read % davidfetter has joined #parrot % guru has left #parrot Rakudo's IO implementation is just a "draft", I tihnk *think but feel free to submit a rakudobug Can someone take an eye at #50894? pmichaud: I'll do that apparently pugs/docs/Perl6/Spec/IO.pod doesn't say much about .eof either just lists it under the 'Unfiled' heading. eof is usually a race condition waiting to happen % Zaba_ is now known as Zaba for me, it would be enough if a readline call returned undef (#50894) I'm not sure I understand the details well enough to comment intelligently I wonder if creating the debug segment will not defeat the purpose of optimizing. I also not understand, just traced the origin of the problem. "pmichaud" at 76.183.97.54 pasted "for masak: patch to have readline return undef on EOF" (14 lines) at http://nopaste.snit.ch/12934 masak: you might try that patch and see if it works pmichaud: gracias. will try afk for a while. % japhb has left japhb!~geoff@76-191-190-8.dsl.static.sonic.net % japhb has joined #parrot "masak" at 130.238.45.242 pasted "for pmichaud: patch doesn't seem to have any effect" (10 lines) at http://nopaste.snit.ch/12935 % tetragon has left tetragon!~seneca@gw-312-705.somanetworks.com There is a warning about two unused functions in compilers/imcc/optimizer.c However, looks like they are used :? I see, the definition is #if'ed, but the declation is not. % jan has left jan!~chatzilla@89-253-66-101.customers.ownit.se % jan has joined #parrot % tetragon has joined #parrot % AndyA has joined #parrot purl, seen coke coke was last seen on #parrot 2 days and 2 hours ago, saying: NotFound: Coke Zero. [May 9 07:40:24 2008] ambs: look for DietCoke LOL seen DietCoke DietCoke was last seen on #parrot 10 hours and 38 minutes ago, saying: or some ticket closin'. Coke++ (so he gets fatter) purl, coke? somebody said coke was mailto:will@coleda.com or just a figurehead. or http://coke-floats.blogspot.com/ purl, coke is also DietCoke okay, ambs. * ambs needs to follow Coke on a diet, unfortunately % masak has left masak!~user@130.238.45.242 Looks like masak's problem is not readline fault, the pir generated is incorrect. unless , while_22_end error:imcc:syntax error, unexpected COMMA (',') in file 'test.pir' line 37 % Zaba_ has joined #parrot % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % masak has joined #parrot NotFound: is that fixable? what generates the pir? masak: ./perl6 --target=pir test.pl * masak tries Looks like rakudo ignores the error result of imcc and runs the result anyway. what does 'unless , while_21_end' mean? I suppose that before the comma must be the register containing "$line" For some reason is not generated. so if either $P22 or $P24 stood before the comma, my code would likely work? is there a way I can run the pir code after making the change manually? masak: ./perl6 --target=pir test.pl > test.pir ; ../../parrot test.pir thanks Try ./perl6 --help , as i did ;) good idea, in retrospect :) though it wouldn't have answered my last question Nobody's perfect. ok, I tried running parrot on test.pir, but got back the error message "No such caller depth\ncurrent instr.: '_block10' pc 2 (test.pir:6)" not sure I understand that error. what's a caller depth? Don't know, I'm not fluent in pir. You don't need a use perl6; or something? use v6; same result not sure I would have got this far had Rekudo not assumed v6 I have never used rakudo, don't know. I'm awake! I remember readline working fine at some point in the past... so you're suggesting I svn up to an older version? :) looks like $a = =$fh is assigning the iterator itself to $a instead of reading from it. then how come I can actually read from the file? repeatedly How are you doing it? http://nopaste.snit.ch/12935 Oh, actually calling .readline() directly. I have vague memories of =$fh working. I'll try that It currently doesn't. readline seems to work, the problem is in code generation. $line = $file.readline(); if !defined $line { exit(); } say $line; Repeat this a bunch of times and you see that detects eof. Tene: no, Rakudo finds no prefix:<=> But not with the script as file input, of course :D NotFound: so, without the while loop? masak: yeah. why not with the script as file input? masak: because will have more lines than readed. I... ah, oh. nvm :) % ambs has left ambs!~ambs@255.92.54.77.rev.vodafone.pt Yeah, something weird is going on with PAST while nodes, it looks like. exit () unless defined $line; does not work. Is'nt that syntax supported? "masak" at 130.238.45.242 pasted "for NotFound: nope, I can't get it to detect eof" (36 lines) at http://nopaste.snit.ch/12937 NotFound: no, I haven't been able to get any `if` or `unless` modifiers to work that's why I had to write it forwards, with a block You are right, I don't counted well the lines. so it's not necessarily the loop Okay, it might have to do with the infix:= in the while Yeah, but the loop is also failing. I toyed around with the value I got from readline after the file is exhausted, and all indications pointed to it being an empty string Which is also a problem. okay, Tene. purl: which? rumour has it which is or a problem no, which is okay, Tene. Changing if ! defined $line to if ! $line aborts horribly at eof. Segmentation fault! :) I sense more than one bug report about this... Yes, one bug is that infix:= doesn't work in a while loop. Huh, this is weird: Is empty string defined to be true or false in Perl 6? I'd hope it's true... why? it's false in p5 In Parrot is false. At least get_bool says it is. Oh, right, nevermind. four things are false in p5, if I remember correctly: 0, '', () and undef In perl 6 you must add "Ready!" X-) The recommended way to loop over a file in p6 is: for =$f { ... } I should work on making that work. yes, please Tene++ I suspect the problem with assignment in the condition of a while failing is the :lvalue(1) That is to say, pct not doing the right thing in that situation. "tene" at 166.70.38.237 pasted "this works" (4 lines) at http://nopaste.snit.ch/12938 See, =$fh does work. It's: $l = =$fh; that doesn't, I guess. oh yes, that works fine Too idiomatic for me. Tene++ # again hohoho, even for $f -> $line { ... } works! % Zaba_ is now known as Zaba masak: $f, or =$f? ah, the latter, sorry So now the thing I need to figure out is whose job it is to make the item context version work. NotFound: so... how do you want to do it? Tene: whose job can it be? infix:= could try to detect item context, some sort of MMD on IO or IOIterator, IOIterator could have a get_string that kicks itself maybe, a few other places. Tene: was only a comment, I don't know almost nothing of perl6. infix:= requires special parsing -- see STD.pm NotFound: in all fairness, I also reacted like you did when I first saw the for loop applied to file reading in Perl 6 mostly because I'm used to connecting file reading to while loops I don't know if prefix:= is implemented yet (in a proper way). Iterators in general need work in rakudo and Parrot. I'm a poor lonesome c coder, not fluent in perl idioms. pmichaud: prefix:= returns an iterator. it works properly in: for =$f { ... } pmichaud: infix:= behaves very strangely in the target of a while loop, though. generates invalid PIR while $a = $b.foo() { ... } can I see an example? look for 'unless ,' in the --target=pir Or, I can pastebin something. NotFound: well, it _is_ a Perl 6 idiom, so more people than you and me are in for a surprise pastebin something, please (I'm at lunch at the moment) you've gotta respect people who can IRC while at lunch And clean his keyboards X-) "tene" at 166.70.38.237 pasted "pmichaud++" (54 lines) at http://nopaste.snit.ch/12939 looking pmichaud: look at line 28 yes, I see it IN addition, rakudo seems to ignore the error from imcc and runs the object anyway. there must be something wrong with the assignment node -- it's not giving a result value ...rakudo ignores the error from imcc? that seems.... odd. lemme also throw in the past At least in previous test program form masak does. "tene" at 166.70.38.237 pasted "pmichaud++" (189 lines) at http://nopaste.snit.ch/12940 well, time to go home I seem to have given you guys things to do :) pmichaud++, Tene++, NotFound++ % masak has left masak!~user@130.238.45.242 And in sunday... you are cruel X-) PCT doesn't know how to handle the copy opcode * Tene gone for a few hours. let's see if I can fix % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % Zaba has joined #parrot % paco has left paco!~chatzilla@139.Red-80-36-122.staticIP.rima-tde.net % jjore is now known as zz_jjore % paco has joined #parrot % zz_jjore is now known as jjore % ambs has joined #parrot the assignment in while bug should be fixed in r27448 pmichaud++ % rdice has joined #parrot I'm looking at #53978 and don't understand the issue... get_pmc_keyed_int converts the int to a PMC key. % rdice has left rdice!~richarddi@CPE001ff33cb98b-CM00159a01d44c.cpe.net.cable.rogers.com pmichaud: not working for me... may it need a realclean? % davidfetter has left davidfetter!~davidfett@start.fetter.org % donaldh has joined #parrot % jjore is now known as zz_jjore % zz_jjore is now known as jjore % desertmax has joined #parrot % peepsalot has left peepsalot!~peeps@cpe-67-9-161-48.austin.res.rr.com % desertmax_ has joined #parrot Yes, after realclean and recompiling works. % desertmax has left desertmax!~markus@62-47-160-98.adsl.highway.telekom.at % Psyche^ has joined #parrot % slightlyoff has joined #parrot % slightlyoff has left #parrot % ambs has left #parrot % Patterner has left Patterner!~Psyche@e177230038.adsl.alicedsl.de % Psyche^ is now known as Patterner * DietCoke returns, briefly. DietCoke: Can you take a look at #50894? NotFound: IANACP. I'd foist that one on chromatic. Your analysis seems like a reasonable first approximation, though. But I don't know if including the debug segment is not against optimization. Well, I expect cromathic comments. NotFound: I have no idea. =-) (#53978): The problem is that given something like set $P1[$P2], $P3 Parrot doesn't have a good way to distinguish set_pmc_keyed from set_pmc_keyed_int if $P2 happens to be an Integer, for example if an aggregate only uses integer keys (e.g., array), then it's no problem and if an aggregat only uses object keys (e.g., hash), then it's still no problem but if we have an aggregate that distinguishes between integer and object keys (e.g., Capture or Match), then it's a bit of an issue. But in that case, will not be the responsability of the aggregate to evaluate the PMC type? yes unfortunately, that's not always terribly efficient. :-) Yeah, but passing the work to the opcode will be less efficient to all aggregates. it just has to do with the current implementation of Capture -- I'm not looking for a core change. actually what I really want is someone to implement a good Capture PMC I'd do it myself, but as yet I don't understand PMC guts (or have a sufficient example) to make that happen myself What'a a Capture? A capture is an object that has an array component, a hash component, and a scalar component as a result, set $P0[...], $P1 will invoke different operations depending on the key type right now I have a PIR version implemented in runtime/parrot/library/Parrot/Capture_PIR.pir, which exhibits the int key problem there is a Capture PMC in src/pmc/capture.pmc, but the last few times I've tried it it has been broken aha! but it has been rewritten! % paco has left paco!~chatzilla@139.Red-80-36-122.staticIP.rima-tde.net (probably from the pdd17 changes) I'll look at that. His test passes. the current Capture PMC doesn't include the scalar component but I think I can make it work now. The new PMC code makes much more sense. first I'll fold in my branch updates. % cjfields has joined #parrot I can try, if you tell me what are the requirements. Or you can create a TODO ticket. okay I may just go ahead and implement it, since I understand this code now. (IAACP) Surely will be faster that way. I definitely hope so. I'll want to benchmark it as well :-) faster to have the code working, i mean :D yes, but I'm also hoping for faster code, too. % desertmax__ has joined #parrot So my confusion was to take the documentation of the default.pmc as the intended semantic for all pmc, right? The comments, I mean. sounds likely. % paco has joined #parrot % tetragon has left tetragon!~seneca@76-10-171-227.dsl.teksavvy.com % desertmax__ has left desertmax__!~markus@212-183-120-254.adsl.highway.telekom.at % IllvilJa has left IllvilJa!~jilves@emea-netcache1.oracle.co.uk % desertmax_ has left desertmax_!~markus@212-183-120-254.adsl.highway.telekom.at getting a bus error with Rakudo (r27449) with t/01-sanity/07-for.t cjfields: what platform? OS X, 10.5 Intel hmmm Reading capture perldoc, seems that it does no take into account a PMC that contains an integer. NotFound: correct -- it doesn't at present, but I can fix that % tetragon has joined #parrot worked earlier today cjfields: I don't have OS X, unfortunately. Best bet might be to file a ticket at rakudobug@perl.com . pmichaud: will do OS X? hmmm... OS X is not Unix. Unix doesn't hang. I can see about doing a test cjfields: you might also try running the test as parrot -G perl6.pbc t/01-sanity/07-for.t and see if it appears then also Okay, works using 'parrot -G perl6.pbc t/01-sanity/07-for.t'. Odd... that implies a "gc bug" there's some mysterious bug that floats around Parrot that we haven't been able to track down but running with -G often eliminates it it tends to show up in Rakudo because Rakudo exercises more of Parrot than a lot of other programs. The last set of commits (r27449 and maybe just prior) seems to have triggered it. Just tried one of Jonathan's example, getting a seg fault. The recent issue with hash shows that gc problems are not cached in tests because his objects live not enough time. r27448 changed the way we handle assignment a bit, and that could be the issue. Someone at 99.147.12.205 pasted "class Foo { has $.x; method bo" (16 lines) at http://nopaste.snit.ch/12941 nopaste was from me, BTW Someone with fast machines running the test suite with gcdebug maybe will help. in the nopaste, I get "Type check failed" % donaldh has left donaldh!~chatzilla@host213-123-171-12.in-addr.btopenworld.com anyway, the class/object stuff is jonathan++ 's doing for now, so I'm not sure how to look at fixing it yet. Same here. I still need to catch up with his code. used 'perl 6 test.p6' in that example with 'parrot -G perl6.pbc test.p6' getting 'get_pmc_keyed() not implemented in class 'Any'' hmm. this is gonna be one of those "I didn't do anything at all with parrot... every time I was just sitting down to start hacking, someone called and wanted to go sailing" weeks, for me. Infinoid: does it help if I call and say "want to Parrot hack?" while you're out sailing? ;-) cjfields: I suspect the segfault is a parrot bug -- I don't know when it will get fixed, but it will probably disappear by itself after a couple of updates cjfields: you could report the "parrot -G perl6.pbc ..." version to rakudobug or perl6-compiler@perl.org, and jonathan++ will likely look at it. pmichaud: my guess as well. I'll post the failed test to rakudobug and the 'parrot -G' stuff to perl6-compiler. cjfields++ my guess, of course, being the problem disappears! % cjfields_ has joined #parrot I suspect there is a flaw in the argument passing code, after inspecting several pendig bugs, but the code is too complex to catch it easily. Just so you know, on my OS X 10.5 system, I have no problems with that test (07-for.t) same svn revision? % cjfields has left cjfields!~cjfields@adsl-99-147-12-205.dsl.chmpil.sbcglobal.net cjfields_: Have you tried a make realclaen? r27449 With a realclean before building Non-standard settings are a patch to force it into doing a non-universal build, not detect editline as readline (and not link against either), and -mcpu=G4 I used r27449 % cjfields has joined #parrot trying r27451 Ran 'make realclean' prior to the r27449 build, just simple 'perl Configure.pl' with standard settings running realclean again JIC % cjfields_ has left cjfields_!~cjfields@vpn3-144176.near.uiuc.edu Parrot won't build on my box without the anti-universal-from-perl5-%Config patch And editline will trick the readline test, which results in "strange" runtime errors hmm... I don't have that problem And do you, by any chance, have readline installed in a somewhat standard location? I don't. But the linker options used by parrot put off missing symbol issues from link time to runtime I'm using the macports readline Never had problems with it I don't use darwinports or fink I tried them previously, but didn't like how I ended up with multiple copies of some large llibraries. So I got rid of them and do the installs by hand, from source. I have run into problems with that; in general I try to keep my use of macports to a minimum 'make test' passes, but I'm still getting the bus error with 'perl6 t/01-sanity/07-for.t' so it looks like the gc bug is still there Which OS X are you on? and the test script still seg faults tetragon: 10.5.2 (Leopard) Same release as I'm on. I'm using PPC * tetragon waits for the build to finish Intel here (older macbook, core duo) I have an old iMac core duo (yes the 32-bit one) But I do most of my builds and tests on my iBook G4 If it still doesn't crash on my iBook, I can try it on my (10.4) iMac % IllvilJa has joined #parrot Still no crash on 07-for.t * tetragon waits for the tree to finish copying to the iMac interesting difference when running the test script with 'parrot' 'parrot -G perl6.pbc test.p6' results in 'get_pmc_keyed() not implemented in class 'Any'' while 'parrot perl6.pbc test.p6' (no -G) results in 'get_pmc_keyed() not implemented in class 'Undef'' Don't know if that helps % paco has left paco!~chatzilla@139.Red-80-36-122.staticIP.rima-tde.net % radhios has joined #parrot My Intel isn't having any difficulty with 07-for.t 10.4 or 10.5? 10.4 Hrm... that's interesting... It failed when I ran it via "make test" But ran fine when I used "./perl6 t/01-sanity/07-for.t" I see the opposite (first 6 tests pass, then 'bus error') 'make test' everything passes I don't see a 'bus error' message printed to the console * tetragon checks the crash reporter logs It did leave some messages there (such as a stack trace) running 'parrot perl6.pbc' with or w/o '-G' passed fine; using 'perl6' failed of course, used r27451 here No crashes when running "../../parrot perl6.pbc" with or without the -G Only crashing when run via make test odd... I posted a report to perl6-compiler, will post something to RT (for perl6) * tetragon wonders about the precise invocation called by t/harness perl t/harness t/01-sanity/07-for.t also crashes (without running the other tests) Anyway, the stacktrace is deep into libparrot when it crashes hmm... not sure what to think. I may have to wait a day or two to see if additional commits fix the problem. * cjfields stepping out for a sec (dinner) "tetragon" at 216.126.67.44 pasted "Stack trace for the t/01-sanity/07-for.t crash" (174 lines) at http://nopaste.snit.ch/12942 get_attrib_index_keyed does an string_append with the result of get_string(parent_class) without checking for nullness. Mmmm.... but string_append allows it to be null. % mire_ has left mire_!~Frodo@52-175-222-85.adsl.verat.net Looks like is not the fault of this trace, the interpreter must be already corrupted. % mire_ has joined #parrot ../../parrot --runcore=gcdebug perl6.pbc t/01-sanity/07-for.t 5 minutes and still running. % Ivatar has left Ivatar!~graham@tu055.demon.co.uk Without the gcdebug core runs fine. % NotFound has left NotFound!~julian@50.Red-213-96-228.staticIP.rima-tde.net % mire_ has left mire_!~Frodo@36-175-222-85.adsl.verat.net % iblechbot has left iblechbot!~iblechbot@ppp-62-216-201-233.dynamic.mnet-online.de % cjfields_ has joined #parrot % cjfields has left cjfields!~cjfields@adsl-99-147-12-205.dsl.chmpil.sbcglobal.net % cjfields has joined #parrot % cjfields_ has left cjfields_!~cjfields@vpn3-144102.near.uiuc.edu added the odd test failures (as well as the example script problem) to RT under perl6. * DietCoke finally looks at the paper that allison posted on her blog. it's a .ps file. open it in preview on the mac. Converts to PDF... backwards. page 1 is the last page in the doc. Caught the Intel failure in gdb While using a debugging malloc library % wknight8111 has joined #parrot % wknight8111 has left #parrot "tetragon" at 216.126.67.44 pasted "Yay, gdb" (62 lines) at http://nopaste.snit.ch/12943 (and "p obj" gives me "$1 = (Parrot_Object * const) 0x1f8f1000") looks like r27448 (changes to languages/perl6/src/parser/grammar-oper.pg) is the source of the test script seg fault stepped up revisions and reran tests until it failed * cjfields calling it a night bye! % cjfields has left cjfields!~cjfields@adsl-99-147-12-205.dsl.chmpil.sbcglobal.net % rblackwe has left rblackwe!rblackwe@where.is.allmydata.net % Andy has joined #parrot % radhios has left radhios!~roberto@190.19.126.84 % teknomunk has joined #parrot % Andy has left Andy!~Andy@64.81.227.163 % Andy has joined #parrot % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net % Eevee has left Eevee!~eevee@c-67-160-3-54.hsd1.wa.comcast.net % particle has left particle!~particle@c-24-19-3-148.hsd1.wa.comcast.net % particle has joined #parrot % slightlyoff has joined #parrot % teknomunk has joined #parrot % Patterner has left Patterner!~Psyche@e177114215.adsl.alicedsl.de % Robrt has joined #parrot % Robrt has left #parrot % particl1 has joined #parrot % particle has left particle!~particle@c-24-19-3-148.hsd1.mn.comcast.net % slightlyoff has left slightlyoff!~slightlyo@204.14.154.209 % Zaba_ has joined #parrot % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % Patterner has joined #parrot DietCoke: you need to open your case and flip the endian switch on the cpu. % Andy has left Andy!~Andy@64.81.227.163 % AndyA has left AndyA!~andy@c-68-33-170-161.hsd1.md.comcast.net % AndyA has joined #parrot % particle has joined #parrot % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net % particl1 has left particl1!~particle@c-24-19-3-148.hsd1.wa.comcast.net