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