Camelia, the Perl 6 bug

IRC log for #parrot, 2008-05-11

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 rafl is there a semantic difference?
00:01 pmichaud is there a difference in     (1, 2, (3, 4), 5, 6) ?
00:01 pmichaud versus  [1, 2, [3, 4], 5, 6]
00:01 rafl ah, ok.
00:01 rafl then i guess it should be []
00:01 pmichaud I still need to get list context straight in my head
00:01 pmichaud well, what does pugs output?
00:01 pmichaud that might also be a good indication
00:02 rafl i thought pugs doesn't build these days.
00:03 pmichaud I think pugs still works on #perl6
00:03 pmichaud pugs came back with square brackets for
00:03 pmichaud pugs:  my @a = <1 2 3>; say @a.perl;
00:04 pmichaud but with parens for
00:04 pmichaud say <1 2 3>.perl;
00:04 pmichaud which means that we need to get the List vs. Array distinction correct.
00:05 pmichaud I need a crash course on list context, mutable values, and immutable values
00:05 rafl what should [[1, 2]].elems return?
00:06 pmichaud I would think 1.
00:06 Tene pmichaud: the question of what .perl should return is what would eval to return the same structure.
00:06 pmichaud Tene: I understand that in the abstract -- I don't completely understand list structures in Perl 6 yet
00:06 Tene I remember a big issue in pugs (that was never resolved, happened after pugsdeath) about my @a = [1, 2, 3];
00:06 Tene Pugs does something about that wrong.
00:07 Tene Should @a after that have .elems=1 or .elems=3?
00:07 pmichaud exactly.
00:07 pmichaud that's where I get all fuzzy at the moment.
00:07 Tene see, rhs of assigning to @a is in list context, and that's a single item, so @a.elems=1, as I recall
00:07 Tene because you'd say @a = 1, 2, 3;
00:08 Tene Which is the same as @a = (1, 2, 3);
00:08 Tene ()s are nullops in lists.
00:08 pmichaud .elems == 1 is what I would expect
00:08 Tene (1, 2, (3, 4, 5), 6) is the same as without the parens.
00:09 Tene so, @a = 1 is the same as @a := [1]
00:09 pmichaud because   my @a = [1, 2], 3;    should result with @a.elems == 2
00:09 Tene Right.
00:12 Tene I remember confusion about whether pugs had it right or not.
00:12 pmichaud well, I'll read up on list context some more and then we can ask on p6l or somewhere appropriate
00:13 Tene If we're all confused about this, is this a sign that this design might be a common source of errors?
00:13 pmichaud I think it may simply be that it's not explained well enough
00:13 Tene Okay.
00:13 pmichaud I'm pretty sure TimToady has it straight.
00:13 Tene Now to go implement an insertion sort in NQP.
00:14 Tene I haven't done these by hand in ages.
00:14 pmichaud we may need 'splice' for that
00:14 pmichaud although it can certainly be done w/o splice
00:14 Tene splice might be nice, but we can get away without it for now, I think.
00:15 pmichaud $i := +@($whatever);
00:15 pmichaud while ($i > 1 && ...key comparison...) { $whatever[$i] := $whatever[$i-1]; }
00:15 Tene Of course, rakudo needs splice, and if rakudo has it, we can use it in actions.pm.
00:16 pmichaud $whatever[$i] := ...thing to be inserted...;
00:16 pmichaud I guess that should be $i > 0 above
00:17 pmichaud and we need a $i--
00:17 Tene The list is going to contain only items inserted by us, so we know it's sorted coming in, so it's an insertion sort into a sorted list.
00:17 pmichaud exactly.
00:17 pmichaud so just start at the end of the list and move elements from i-1 to i until you find the spot where the new one should go
00:18 Tene My plan was just to make a new PAST::Stmts, and push things into it in order, then replace $?BLOCK[0] with it.
00:18 Tene That works too.
00:19 pmichaud insertion seems a bit easier to me
00:19 * Tene nods.
00:19 Tene I'll commit in a bit.
00:20 pmichaud that will be quite impressive
00:20 Tene ?
00:20 pmichaud (having working placeholder vars)
00:27 Tene Only because the rest of you have done all the hard work for me. :)
00:27 Tene my first draft already committed was ~6 lines, iirc.
00:39 dalek r27425 | pmichaud++ | trunk:
00:39 dalek : [rakudo]:
00:39 dalek : * (Test.pm) refactor 'proclaim' to mark TODO tests in output as
00:39 dalek :       not ok 123 # TODO reason - test description
00:39 dalek :   instead of
00:39 dalek :       not ok - test descriptionTODO reason
00:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27425
00:41 dalek r27426 | chromatic++ | trunk:
00:41 dalek : [config] Made rpms target in root Makefile use rpmbuild to build RPM (Gerd
00:41 dalek : Pokorra, RT #53552).
00:41 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27426
00:47 dalek r27427 | chromatic++ | trunk:
00:47 dalek : [install] Allowed installation of runtime/ directory during make reallyinstall
00:47 dalek : (Gerd Pokorra, RT #53738).
00:47 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27427
00:56 dalek r27428 | chromatic++ | trunk:
00:56 dalek : [OO] Added class name to attribute re-adding exception (NotFound, RT #53850).
00:56 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27428
00:56 particle joined #parrot
01:02 Tene pmichaud:
01:02 Tene $block[+$i] := $var;
01:02 Tene is resulting in:
01:02 Tene <4> => PMC 'PAST::Var'  {
01:02 Tene <name> => "$^a"
01:02 Tene <scope> => "parameter"
01:02 Tene }
01:03 Tene Any ideas?
01:03 * purl burps
01:04 * Patterner pets purl
01:04 * purl purrrrrs
01:04 pmichaud looking
01:05 Tene Looks like prefix:+ generates a 'Float' pmc.
01:05 pmichaud yes, it does.
01:05 * purl stays quiet
01:05 pmichaud this is kinda ugly, but you might try    @($block)[+$i]
01:06 * Tene tries.
01:06 pmichaud did you try   $block[$i]   ?
01:06 Tene Yes, that's what I tried first.
01:06 pmichaud the + prefix shouldn't be necessary, since $i is already numeric
01:06 Tene Method 'viviself' not found for invocant of class 'PAST::Op'
01:06 Tene Method 'viviself' not found for invocant of class 'PAST::Op'
01:07 pmichaud that's with $block[$i] ?
01:07 Tene No, that's with @($block)[+$i]
01:07 Tene Doesn't compile.
01:08 pmichaud okay.
01:08 Tene Let me check what's generated without the prefix:+
01:09 dalek r27429 | chromatic++ | trunk:
01:09 dalek : [t] Fixed typos in t/op/sysinfo.t (Brad Gilbert, RT #53924).
01:09 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27429
01:10 Tene just find_lex, find_lex, set $PX[$PX], $PX
01:11 Tene And $i is an Integer pmc.
01:12 pmichaud hmmmm
01:12 pmichaud oh.
01:12 * pmichaud checks.
01:13 pmichaud so, set $PX[$PX], $PX   is calling set_pmc_keyed even when [$PX] is an Integer
01:13 Tene Looks like.
01:14 purl looks like is tne only usage, yes.
01:14 pmichaud I thought I had checked that it wouldn't do that. hrm.
01:14 pmichaud purl, forget looks like
01:14 purl pmichaud: I forgot looks like
01:14 pmichaud just a sec, writing a test
01:19 pmichaud ....very interesting.
01:20 nopaste "pmichaud" at 76.183.97.54 pasted "get_pmc_keyed_int doesn't match set_pmc_keyed_int" (32 lines) at http://nopaste.snit.ch/12929
01:21 dalek r27430 | chromatic++ | trunk:
01:21 dalek : [pbc_merge] Added DOES_NOT_RETURN annotation to header of help() function to
01:21 dalek : fix MSVC build (Andrew Whitworth, RT #53934).
01:21 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27430
01:22 pmichaud I'll make another clearer example.
01:29 dalek r27431 | chromatic++ | trunk:
01:29 dalek : [PMC] Added a custom mark() vtable entry for OrderedHash, as it can have GCable
01:29 dalek : keys in its hash that are null (RT #53890).
01:29 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27431
01:31 pmichaud okay.
01:31 pmichaud $P1[$P2]  always invokes  get_pmc_keyed and never get_pmc_keyed_int
01:31 pmichaud that's a bit of a problem for aggregates that have both hash keys and int keys
01:32 Tene It's times like these that make me wonder whether PHP got it right all along.  That's very disorienting.
01:33 Eevee heresy
01:33 pmichaud well, I could just do everything as string keys
01:33 Tene That seems less than ideal.
01:34 pmichaud yes, because it complicates 'push' and 'pop' a fair bit
01:34 pmichaud I'm a bit surprised that @(block)[$i]  didn't work
01:34 pmichaud maybe (@($block))[$i]  ?
01:34 Tene Sure, I'll try that.
01:35 pmichaud unfortunately I have to go attend to some family stuff now.  But I'll think about it some more.
01:35 pmichaud it also may be that the work I'm doing in the pgeupdate branch may clean it up and/or fix it
01:35 Tene Nope, same viviself not found failure on compile.
01:36 Tene Looks like it would work fine, too.
01:36 Tene I guess I could insert some inline PIR for now.
01:36 pmichaud oh yes, that would do it.  file an RT ticket at parrotbug if you do that, though
01:36 pmichaud then I can track it and remember to come back and fix it.
01:37 pmichaud anyway, gotta run. bbl.
01:38 Tene seeya
01:38 dalek joined #parrot
01:52 Zaba joined #parrot
01:58 Tene Okay, now I'm running into $block[$i-1]<name> apparently not returning anything.
02:01 Tene Which works if I alter the pir to use $I0 instead of $PX for the lookup corresponding to [$i-1]
02:01 Theory joined #parrot
02:13 Tene It works.  :)
02:27 Tene Ack, no more dalek!
02:27 Tene purl: dalek?
02:27 purl dalek is probably dha's distributed perl community badger badger badger attack or http://ourworld.compuserve.com/hom​epages/grahamwalters/dalek_fr.htm or 'Dalek' for the language, and 'dalek' for the program or http://www.daleklinks.co.uk/ or a Dr Who baddie or {see: dalek meme} or at http://www.deviantart.com/deviation/20016573/ or http://www.asciiartfarts.com/20020615.html or http://xrl.us/2doh
02:28 Tene purl: rakudobug?
02:28 purl hmmm... rakudobug is mailto:rakudobug@perl.org
03:24 tetragon joined #parrot
03:28 * DietCoke yawns.
03:29 pmichaud Tene++  # placeholder vars in rakudo
03:29 pmichaud DietCoke: up late, eh?
03:30 Tene oh, maybe I should also remove that ___HAVE_A_SIG symbol.
03:32 pmichaud DietCoke: last night I went through and found about a dozen RT tickets that I think ought to close... but I'm not convinced enough to close them myself.
03:32 pmichaud any suggestions?  should I just tack on my comments to each ticket and hope someone else catches them, or ... ?
03:40 Tene purl: parrotbug?
03:40 purl it has been said that parrotbug is mailto:parrotbug@parrotcode.org or http://svn.perl.org/parrot/​trunk/docs/submissions.pod or see also "rakudobug"
03:42 Tene pmichaud: I've seen people post a list of "I'll close these if nobody objects.  Please speak up if I'm mistaken." to the list a few times, iirc.
03:42 pmichaud Tene:  yes, I may do that as well.
03:43 pmichaud thanks.
03:43 Tene pmichaud: is there enough information in http://rt.perl.org/rt3/Tic​ket/Display.html?id=53978 ?
03:43 pmichaud looking...
03:43 pmichaud it's enough for me, yes.
03:48 Tene Hm.  I guess the placeholder spec also mentions @_ and %_
03:48 Tene I didn't do those.
03:48 pmichaud partial implementations are still welcome :-)
03:49 Andy joined #parrot
03:51 Andy I have a crazy idea.
03:51 Tene Those are the best kind.
03:51 Andy Look at Stack_Chunk_t
03:51 Andy in stacks.h
03:52 Andy See that union?
03:52 Andy What if we move data to the first field, and then we can get rid of the union?
03:54 pmichaud why does 'data' have to be aligned in the first place, ooc?
03:54 Andy Dunno.
03:54 pmichaud that in itself might be historical.
03:54 pmichaud I'd be curious as to what breaks if we just eliminated the union.
03:57 pmichaud (and on what platforms.)
03:58 pmichaud aha
03:59 tetragon Arm would be a possibility (going by what Infinoid said a few days ago)
03:59 pmichaud I bet the 'data' field has to be aligned because the first thing in Stack_Entry_t is itself a UnionVal
03:59 pmichaud and that possibly requires alignment
03:59 pmichaud so then the question becomes, at what point can we eliminate the UnionVal from Stack_Entry_t?  ;-)
04:00 pmichaud because stacks.c no longer has to hold floats or strings
04:02 pmichaud the only UVal_* items in stacks.c are  UVal_int, UVal_pmc, and UVal_ptr
04:03 pmichaud we'd be much better off simply placing a pointer and an int into Stack_Entry than using a union
04:04 pmichaud (the current union likely requires >= the amount of space that a pointer+int would require)
04:04 DietCoke pmichaud: I would recommend commenting on the ticket and cc'ing the list.
04:05 pmichaud DietCoke: thx
04:11 DietCoke hurm. trying to merge trunk into the type_ids branch, getting an issue that ops.num ends up having an op in it that is also in ops.skip, so the build fails.
04:12 DietCoke (which chromatic removed in trunk; I regen the ops file and it's still there; on trunk, it's missing. wtf.)
04:12 * DietCoke tries a re-remerge to get all the changes since last he tried this.
04:24 pmichaud afk # sleep
04:27 pmichaud ..oops, back for a bit
04:27 pmichaud Tene:  I figured out how to resolve the keyed_int problem -- I'll add it to PCT tomorrow.
04:27 pmichaud (and to NQP as well.)
04:28 pmichaud and now I'm afk :-)
04:30 Psyche^ joined #parrot
04:37 TimToady joined #parrot
04:53 Tene Now I need to find something to work on tomorrow.
04:53 Tene Maybe more cardinal...
05:35 Psyche^ joined #parrot
06:18 desertmax joined #parrot
06:22 DietCoke or some ticket closin'.
06:23 Tene Oh, I guess that's an option.
07:45 Tene Committing @_ and %_ for rakudo.
07:55 Tene sleep now.
08:53 pfig joined #parrot
09:08 iblechbot joined #parrot
09:52 barney joined #parrot
10:17 Ivatar joined #parrot
11:09 rdice joined #parrot
11:28 moritz purl, tell jonathan I added some OO tests under spec/S12-*, hopefully I'll find tuits for a few more
11:28 purl moritz: huh?
11:28 moritz no message but around?
11:46 * barney is checking out the pgeupdates branch
11:47 masak joined #parrot
11:50 Zaba_ joined #parrot
12:24 NotFound joined #parrot
12:24 NotFound Hello.
12:50 ambs joined #parrot
12:51 ambs Hellows
12:56 tetragon joined #parrot
13:37 masak can I open a file for reading or writing with Rakudo?
14:01 ambs joined #parrot
14:16 Ivatar joined #parrot
14:17 wknight8111 joined #parrot
14:26 guru joined #parrot
14:30 masak ok, so it turns out I can
14:31 masak followup question: is there a way to detect EOF in a file I've opened in Rakudo?
14:31 Ivatar joined #parrot
14:38 wknight8111 left #parrot
15:27 particle joined #parrot
15:33 masak hm. in PIR, what is the recommended way to detect EOF when reading from a file?
15:38 masak I'm grepping through source code and poring over pdd22_io.pod, but find nothing about it
15:40 NotFound There is this item in parrotio.pmc:
15:40 NotFound =item C<INTVAL get_bool()>
15:40 NotFound Returns whether at C<EOF> or not.
15:41 masak NotFound: thx
15:41 masak I just found lin 162 in parrotio.pmc
15:41 masak lines 162-166. those helped
15:42 mire_ joined #parrot
15:42 NotFound Looks usable, if you read by lines.
15:43 masak but `readline` in Rakudo's IO.pir seems not to do this
15:43 masak line 76 in languages/perl6/src/classes/IO.pir
15:43 masak I find no way to detect an EOF through Rakudo's API
15:45 NotFound I'm not fluent in pir, but looks like it returns the value obtainaed from parrot io.
15:46 masak yes
15:47 masak pdd22_io.pod mentions it on lines 193 and 201
15:47 masak apparently, it's an asynchronous read
15:50 davidfetter joined #parrot
15:56 guru left #parrot
15:56 pmichaud Rakudo's IO implementation is just a "draft", I tihnk
15:56 pmichaud *think
15:57 pmichaud but feel free to submit a rakudobug
15:58 NotFound Can someone take an eye at #50894?
15:59 masak pmichaud: I'll do that
15:59 pmichaud apparently pugs/docs/Perl6/Spec/IO.pod doesn't say much about .eof either
16:00 pmichaud just lists it under the 'Unfiled' heading.
16:01 TimToady eof is usually a race condition waiting to happen
16:01 masak for me, it would be enough if a readline call returned undef
16:01 pmichaud (#50894)  I'm not sure I understand the details well enough to comment intelligently
16:02 NotFound I wonder if creating the debug segment will not defeat the purpose of optimizing.
16:03 NotFound I also not understand, just traced the origin of the problem.
16:07 nopaste "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
16:08 pmichaud masak:  you might try that patch and see if it works
16:08 masak pmichaud: gracias. will try
16:10 pmichaud afk for a while.
16:13 japhb joined #parrot
16:26 nopaste "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
16:35 NotFound There is a warning about two unused functions in compilers/imcc/optimizer.c
16:37 NotFound However, looks like they are used :?
16:39 NotFound I see, the definition is #if'ed, but the declation is not.
16:43 jan joined #parrot
16:44 tetragon joined #parrot
16:57 AndyA joined #parrot
16:59 ambs purl, seen coke
16:59 purl coke was last seen on #parrot 2 days and 2 hours ago, saying: NotFound: Coke Zero.  [May  9 07:40:24 2008]
17:00 NotFound ambs: look for DietCoke
17:00 ambs LOL
17:00 ambs seen DietCoke
17:00 purl DietCoke was last seen on #parrot 10 hours and 38 minutes ago, saying: or some ticket closin'.
17:00 ambs Coke++
17:00 ambs (so he gets fatter)
17:09 ambs purl, coke?
17:09 purl somebody said coke was mailto:will@coleda.com or just a figurehead. or http://coke-floats.blogspot.com/
17:09 ambs purl, coke is also DietCoke
17:09 purl okay, ambs.
17:11 * ambs needs to follow Coke on a diet, unfortunately
17:16 NotFound Looks like masak's problem is not readline fault, the pir generated is incorrect.
17:16 NotFound unless , while_22_end
17:16 NotFound error:imcc:syntax error, unexpected COMMA (',')
17:16 NotFound in file 'test.pir' line 37
17:33 Zaba_ joined #parrot
17:39 masak joined #parrot
17:39 masak NotFound: is that fixable?
17:40 masak what generates the pir?
17:40 NotFound masak: ./perl6 --target=pir test.pl
17:40 * masak tries
17:41 NotFound Looks like rakudo ignores the error result of imcc and runs the result anyway.
17:41 masak what does 'unless , while_21_end' mean?
17:42 NotFound I suppose that before the comma must be the register containing "$line"
17:42 NotFound For some reason is not generated.
17:44 masak so if either $P22 or $P24 stood before the comma, my code would likely work?
17:44 masak is there a way I can run the pir code after making the change manually?
17:45 NotFound masak: ./perl6 --target=pir test.pl > test.pir ; ../../parrot test.pir
17:45 masak thanks
17:46 NotFound Try ./perl6 --help , as i did ;)
17:47 masak good idea, in retrospect :)
17:47 masak though it wouldn't have answered my last question
17:48 NotFound Nobody's perfect.
17:48 masak 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)"
17:49 masak not sure I understand that error. what's a caller depth?
17:52 NotFound Don't know, I'm not fluent in pir.
17:53 NotFound You don't need a use perl6; or something?
17:53 NotFound use v6;
17:54 masak same result
17:55 masak not sure I would have got this far had Rekudo not assumed v6
17:55 NotFound I have never used rakudo, don't know.
17:56 Tene I'm awake!
18:02 Tene I remember readline working fine at some point in the past...
18:02 masak so you're suggesting I svn up to an older version? :)
18:04 Tene looks like $a = =$fh is assigning the iterator itself to $a instead of reading from it.
18:04 masak then how come I can actually read from the file?
18:04 masak repeatedly
18:05 Tene How are you doing it?
18:07 masak http://nopaste.snit.ch/12935
18:07 Tene Oh, actually calling .readline() directly.
18:07 Tene I have vague memories of =$fh working.
18:07 masak I'll try that
18:07 Tene It currently doesn't.
18:08 NotFound readline seems to work, the problem is in code generation.
18:08 NotFound $line = $file.readline();
18:08 NotFound if !defined $line {
18:08 NotFound exit();
18:08 NotFound }
18:08 NotFound say $line;
18:09 NotFound Repeat this a bunch of times and you see that detects eof.
18:09 masak Tene: no, Rakudo finds no prefix:<=>
18:09 NotFound But not with the script as file input, of course :D
18:09 masak NotFound: so, without the while loop?
18:09 NotFound masak: yeah.
18:10 masak why not with the script as file input?
18:10 NotFound masak: because will have more lines than readed.
18:11 masak I... ah, oh. nvm
18:12 masak :)
18:14 Tene Yeah, something weird is going on with PAST while nodes, it looks like.
18:16 NotFound exit () unless defined $line; does not work. Is'nt that syntax supported?
18:16 nopaste "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
18:16 masak NotFound: no, I haven't been able to get any `if` or `unless` modifiers to work
18:17 masak that's why I had to write it forwards, with a block
18:19 NotFound You are right, I don't counted well the lines.
18:19 masak so it's not necessarily the loop
18:19 Tene Okay, it might have to do with the infix:= in the while
18:19 NotFound Yeah, but the loop is also failing.
18:20 masak 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
18:21 Tene Which is also a problem.
18:21 purl okay, Tene.
18:21 Tene purl: which?
18:21 purl rumour has it which is <noreply> or a problem
18:21 Tene no, which is <noreply>
18:21 purl okay, Tene.
18:23 NotFound Changing if ! defined $line to if ! $line aborts horribly at eof.
18:25 masak Segmentation fault! :)
18:25 masak I sense more than one bug report about this...
18:25 Tene Yes, one bug is that infix:= doesn't work in a while loop.
18:26 Tene Huh, this is weird:
18:27 Tene Is empty string defined to be true or false in Perl 6?  I'd hope it's true...
18:27 masak why?
18:27 masak it's false in p5
18:28 NotFound In Parrot is false.
18:28 NotFound At least get_bool says it is.
18:28 Tene Oh, right, nevermind.
18:28 masak four things are false in p5, if I remember correctly: 0, '', () and undef
18:29 NotFound In perl 6 you must add "Ready!" X-)
18:30 Tene The recommended way to loop over a file in p6 is: for =$f { ... }
18:30 Tene I should work on making that work.
18:30 masak yes, please
18:30 masak Tene++
18:31 Tene I suspect the problem with assignment in the condition of a while failing is the :lvalue(1)
18:31 Tene That is to say, pct not doing the right thing in that situation.
18:33 nopaste "tene" at 166.70.38.237 pasted "this works" (4 lines) at http://nopaste.snit.ch/12938
18:33 Tene See, =$fh does work.
18:34 Tene It's: $l = =$fh; that doesn't, I guess.
18:34 masak oh
18:35 masak yes, that works fine
18:35 NotFound Too idiomatic for me.
18:35 masak Tene++ # again
18:36 masak hohoho, even for $f -> $line { ... } works!
18:36 Tene masak: $f, or =$f?
18:38 masak ah, the latter, sorry
18:38 Tene So now the thing I need to figure out is whose job it is to make the item context version work.
18:39 Tene NotFound: so... how do you want to do it?
18:39 masak Tene: whose job can it be?
18:40 Tene 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.
18:40 NotFound Tene: was only a comment, I don't know almost nothing of perl6.
18:43 pmichaud infix:= requires special parsing -- see STD.pm
18:43 masak NotFound: in all fairness, I also reacted like you did when I first saw the for loop applied to file reading in Perl 6
18:43 masak mostly because I'm used to connecting file reading to while loops
18:43 pmichaud I don't know if prefix:= is implemented yet (in a proper way).  Iterators in general need work in rakudo and Parrot.
18:44 NotFound I'm a poor lonesome c coder, not fluent in perl idioms.
18:44 Tene pmichaud: prefix:= returns an iterator.  it works properly in: for =$f { ... }
18:44 Tene pmichaud: infix:= behaves very strangely in the target of a while loop, though.
18:44 Tene generates invalid PIR
18:44 Tene while $a = $b.foo() { ... }
18:44 pmichaud can I see an example?
18:44 Tene look for 'unless ,'
18:44 Tene in the --target=pir
18:44 Tene Or, I can pastebin something.
18:45 masak NotFound: well, it _is_ a Perl 6 idiom, so more people than you and me are in for a surprise
18:45 pmichaud pastebin something, please (I'm at lunch at the moment)
18:45 masak you've gotta respect people who can IRC while at lunch
18:46 NotFound And clean his keyboards X-)
18:47 nopaste "tene" at 166.70.38.237 pasted "pmichaud++" (54 lines) at http://nopaste.snit.ch/12939
18:48 pmichaud looking
18:48 Tene pmichaud: look at line 28
18:48 pmichaud yes, I see it
18:49 NotFound IN addition, rakudo seems to ignore the error from imcc and runs the object anyway.
18:49 pmichaud there must be something wrong with the assignment node -- it's not giving a result value
18:49 pmichaud ...rakudo ignores the error from imcc?  that seems.... odd.
18:50 Tene lemme also throw in the past
18:50 NotFound At least in previous test program form masak does.
18:50 nopaste "tene" at 166.70.38.237 pasted "pmichaud++" (189 lines) at http://nopaste.snit.ch/12940
18:51 masak well, time to go home
18:51 masak I seem to have given you guys things to do :)
18:51 masak pmichaud++, Tene++, NotFound++
18:51 NotFound And in sunday... you are cruel X-)
18:55 pmichaud PCT doesn't know how to handle the copy opcode
18:56 * Tene gone for a few hours.
18:56 pmichaud let's see if I can fix
18:59 Zaba joined #parrot
19:10 paco joined #parrot
19:11 ambs joined #parrot
19:13 pmichaud the assignment in while bug should be fixed in r27448
19:13 NotFound pmichaud++
19:15 rdice joined #parrot
19:25 NotFound I'm looking at #53978 and don't understand the issue... get_pmc_keyed_int converts the int to a PMC key.
19:38 NotFound pmichaud: not working for me... may it need a realclean?
19:46 donaldh joined #parrot
20:01 desertmax joined #parrot
20:04 desertmax_ joined #parrot
20:05 NotFound Yes, after realclean and recompiling works.
20:14 Psyche^ joined #parrot
20:16 slightlyoff joined #parrot
20:16 slightlyoff left #parrot
20:19 ambs left #parrot
20:26 * DietCoke returns, briefly.
20:27 NotFound DietCoke: Can you take a look at #50894?
20:34 DietCoke NotFound: IANACP.
20:34 DietCoke I'd foist that one on chromatic. Your analysis seems like a reasonable first approximation, though.
20:35 NotFound But I don't know if including the debug segment is not against optimization.
20:38 NotFound Well, I expect cromathic comments.
20:39 DietCoke NotFound: I have no idea. =-)
20:58 pmichaud (#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
20:58 pmichaud if $P2 happens to be an Integer, for example
20:59 pmichaud if an aggregate only uses integer keys (e.g., array), then it's no problem
20:59 pmichaud and if an aggregat only uses object keys (e.g., hash), then it's still no problem
21:00 pmichaud 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.
21:01 NotFound But in that case, will not be the responsability of the aggregate to evaluate the PMC type?
21:01 pmichaud yes
21:02 pmichaud unfortunately, that's not always terribly efficient.  :-)
21:02 NotFound Yeah, but passing the work to the opcode will be less efficient to all aggregates.
21:03 pmichaud it just has to do with the current implementation of Capture -- I'm not looking for a core change.
21:03 pmichaud actually what I really want is someone to implement a good Capture PMC
21:03 pmichaud I'd do it myself, but as yet I don't understand PMC guts (or have a sufficient example) to make that happen myself
21:04 NotFound What'a a Capture?
21:04 pmichaud A capture is an object that has an array component, a hash component, and a scalar component
21:05 pmichaud as a result,   set $P0[...], $P1      will invoke different operations depending on the key type
21:06 pmichaud right now I have a PIR version implemented in runtime/parrot/library/Parrot/Capture_PIR.pir, which exhibits the int key problem
21:06 pmichaud there is a Capture PMC in src/pmc/capture.pmc, but the last few times I've tried it it has been broken
21:07 pmichaud aha!  but it has been rewritten!
21:07 pmichaud (probably from the pdd17 changes)
21:08 pmichaud I'll look at that.
21:09 NotFound His test passes.
21:09 pmichaud the current Capture PMC doesn't include the scalar component
21:09 pmichaud but I think I can make it work now.  The new PMC code makes much more sense.
21:12 pmichaud first I'll fold in my branch updates.
21:12 cjfields joined #parrot
21:12 NotFound I can try, if you tell me what are the requirements.
21:13 NotFound Or you can create a TODO ticket.
21:14 pmichaud okay
21:14 pmichaud I may just go ahead and implement it, since I understand this code now.  (IAACP)
21:14 NotFound Surely will be faster that way.
21:15 pmichaud I definitely hope so.
21:15 pmichaud I'll want to benchmark it as well :-)
21:15 NotFound faster to have the code working, i mean :D
21:15 pmichaud yes, but I'm also hoping for faster code, too.
21:18 desertmax__ joined #parrot
21:18 NotFound So my confusion was to take the documentation of the default.pmc as the intended semantic for all pmc, right?
21:18 NotFound The comments, I mean.
21:18 pmichaud sounds likely.
21:19 paco joined #parrot
21:25 cjfields getting a bus error with Rakudo (r27449) with t/01-sanity/07-for.t
21:25 pmichaud cjfields: what platform?
21:25 cjfields OS X, 10.5
21:25 cjfields Intel
21:25 pmichaud hmmm
21:25 NotFound Reading capture perldoc, seems that it does no take into account a PMC that contains an integer.
21:26 pmichaud NotFound: correct -- it doesn't at present, but I can fix that
21:26 tetragon joined #parrot
21:26 cjfields worked earlier today
21:27 pmichaud cjfields: I don't have OS X, unfortunately.  Best bet might be to file a ticket at rakudobug@perl.com .
21:27 cjfields pmichaud: will do
21:28 tetragon OS X?
21:28 purl hmmm... OS X is not Unix. Unix doesn't hang.
21:28 tetragon I can see about doing a test
21:28 pmichaud 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
21:30 cjfields Okay, works using 'parrot -G perl6.pbc t/01-sanity/07-for.t'.  Odd...
21:30 pmichaud that implies a "gc bug"
21:30 pmichaud there's some mysterious bug that floats around Parrot that we haven't been able to track down
21:31 pmichaud but running with -G often eliminates it
21:31 pmichaud it tends to show up in Rakudo because Rakudo exercises more of Parrot than a lot of other programs.
21:33 cjfields 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.
21:33 NotFound The recent issue with hash shows that gc problems are not cached in tests because his objects live not enough time.
21:34 pmichaud r27448 changed the way we handle assignment a bit, and that could be the issue.
21:35 nopaste Someone at 99.147.12.205 pasted "class Foo { has $.x; method bo" (16 lines) at http://nopaste.snit.ch/12941
21:35 cjfields nopaste was from me, BTW
21:36 NotFound Someone with fast machines running the test suite with gcdebug maybe will help.
21:36 pmichaud in the nopaste, I get "Type check failed"
21:38 pmichaud anyway, the class/object stuff is jonathan++ 's doing for now, so I'm not sure how to look at fixing it yet.
21:38 NotFound Same here.
21:38 pmichaud I still need to catch up with his code.
21:38 cjfields used 'perl 6 test.p6' in that example
21:39 cjfields with 'parrot -G perl6.pbc test.p6' getting 'get_pmc_keyed() not implemented in class 'Any''
21:40 Infinoid 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.
21:40 pmichaud Infinoid: does it help if I call and say "want to Parrot hack?"  while you're out sailing?  ;-)
21:42 pmichaud 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
21:42 pmichaud cjfields: you could report the "parrot -G perl6.pbc ..." version to rakudobug or perl6-compiler@perl.org, and jonathan++ will likely look at it.
21:43 cjfields pmichaud: my guess as well.  I'll post the failed test to rakudobug and the 'parrot -G' stuff to perl6-compiler.
21:43 pmichaud cjfields++
21:43 cjfields my guess, of course, being the problem disappears!
21:47 cjfields_ joined #parrot
21:48 NotFound 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.
21:50 tetragon Just so you know, on my OS X 10.5 system, I have no problems with that test (07-for.t)
21:50 pmichaud same svn revision?
21:51 NotFound cjfields_: Have you tried a make realclaen?
21:51 tetragon r27449
21:51 tetragon With a realclean before building
21:52 tetragon 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
21:53 cjfields_ I used r27449
21:54 cjfields joined #parrot
21:55 cjfields trying r27451
21:59 cjfields Ran 'make realclean' prior to the r27449 build, just simple 'perl Configure.pl' with standard settings
21:59 cjfields running realclean again JIC
21:59 tetragon Parrot won't build on my box without the anti-universal-from-perl5-%Config patch
22:00 tetragon And editline will trick the readline test, which results in "strange" runtime errors
22:01 cjfields hmm... I don't have that problem
22:01 tetragon And do you, by any chance, have readline installed in a somewhat standard location?
22:02 tetragon I don't.  But the linker options used by parrot put off missing symbol issues from link time to runtime
22:03 cjfields I'm using the macports readline
22:04 cjfields Never had problems with it
22:04 tetragon I don't use darwinports or fink
22:05 tetragon 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.
22:07 cjfields I have run into problems with that; in general I try to keep my use of macports to a minimum
22:09 cjfields 'make test' passes, but I'm still getting the bus error with 'perl6 t/01-sanity/07-for.t'
22:09 cjfields so it looks like the gc bug is still there
22:10 tetragon Which OS X are you on?
22:10 cjfields and the test script still seg faults
22:10 cjfields tetragon: 10.5.2 (Leopard)
22:10 tetragon Same release as I'm on.  I'm using PPC
22:11 * tetragon waits for the build to finish
22:11 cjfields Intel here (older macbook, core duo)
22:12 tetragon I have an old iMac core duo (yes the 32-bit one)
22:12 tetragon But I do most of my builds and tests on my iBook G4
22:13 tetragon If it still doesn't crash on my iBook, I can try it on my (10.4) iMac
22:16 IllvilJa joined #parrot
22:19 tetragon Still no crash on 07-for.t
22:19 * tetragon waits for the tree to finish copying to the iMac
22:24 cjfields interesting difference when running the test script with 'parrot'
22:24 cjfields 'parrot -G perl6.pbc test.p6' results in 'get_pmc_keyed() not implemented in class 'Any''
22:25 cjfields while 'parrot perl6.pbc test.p6' (no -G) results in 'get_pmc_keyed() not implemented in class 'Undef''
22:26 cjfields Don't know if that helps
22:31 radhios joined #parrot
22:32 tetragon My Intel isn't having any difficulty with 07-for.t
22:33 cjfields 10.4 or 10.5?
22:33 tetragon 10.4
22:33 tetragon Hrm... that's interesting...
22:33 tetragon It failed when I ran it via "make test"
22:34 tetragon But ran fine when I used "./perl6 t/01-sanity/07-for.t"
22:35 cjfields I see the opposite (first 6 tests pass, then 'bus error')
22:36 cjfields 'make test' everything passes
22:36 tetragon I don't see a 'bus error' message printed to the console
22:36 * tetragon checks the crash reporter logs
22:37 tetragon It did leave some messages there
22:37 tetragon (such as a stack trace)
22:37 cjfields running 'parrot perl6.pbc' with or w/o '-G' passed fine; using 'perl6' failed
22:38 cjfields of course, used r27451 here
22:38 tetragon No crashes when running "../../parrot perl6.pbc" with or without the -G
22:39 tetragon Only crashing when run via make test
22:39 cjfields odd...
22:40 cjfields I posted a report to perl6-compiler, will post something to RT (for perl6)
22:41 * tetragon wonders about the precise invocation called by t/harness
22:42 tetragon perl t/harness t/01-sanity/07-for.t also crashes (without running the other tests)
22:43 tetragon Anyway, the stacktrace is deep into libparrot when it crashes
22:47 cjfields hmm... not sure what to think.  I may have to wait a day or two to see if additional commits fix the problem.
22:48 * cjfields stepping out for a sec (dinner)
22:52 nopaste "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
23:03 NotFound get_attrib_index_keyed does an string_append with the result of get_string(parent_class) without checking for nullness.
23:05 NotFound Mmmm.... but string_append allows it to be null.
23:08 NotFound Looks like is not the fault of this trace, the interpreter must be already corrupted.
23:16 mire_ joined #parrot
23:16 NotFound ../../parrot --runcore=gcdebug perl6.pbc t/01-sanity/07-for.t
23:16 NotFound 5 minutes and still running.
23:17 NotFound Without the gcdebug core runs fine.
23:46 cjfields_ joined #parrot
23:50 cjfields joined #parrot

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced