»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
colomon TimToady: hypers either extend or die, depending. 00:00
TimToady yeah
colomon zip always stops when the shorter list runs out.
TimToady right
jnthn kinda sorta :-)
colomon: For now for installing the generated meta-op subs just I suggest try
sorear hello all 00:01
jnthn PAST::Op.new( :pasttype('bind'), PAST::Var.new( :name($opsubname), :scope('package') ), ...the assuming call thingy... )
sorear: oh hai
colomon sorear: o/
sorear in other news, #parrot has decided that parrot-nqp needing 1600MB to compile Rakudo is "probably a bug"
jnthn "probably" :-) 00:02
TimToady 多分
jnthn sorear: Did they decide anything on your patch to unblock blizkost progress?
sorear I haven't pressed on yet 00:04
jnthn TimToady: heh, the second char looks like a walking coathanger.
sorear I finished the patch at 3am and immediately fell asleep
jnthn Oh hey, I did that with a patch yesterday too :-)
TimToady it's actually "eight" and "sword"
so it means "part", as in the bits you end up with when you hack something up 00:05
the first one means "many"
jnthn Ah, cool :-)
TimToady "many parts" means roughly, 9 times out of 10
colomon jnthn: I'm guessing I just can't call .assuming directly in Actions.pm?
jnthn colomon: no, you need something like
PAST::Op.new( :pasttype('callmethod'), :name('assuming'), ...node that looks up &callwith..., ...node that looks up &infix:<worreva>...) 00:06
TimToady: It uses 1600MB 9 times out of 10, and doesn't 1 time out of 10 because it segfaults? :-) 00:07
bkeeler No wonder poor lue struggles with his old powerbook 00:08
jnthn Aye
lue I has 384 MiB :/
colomon jnthn: would node that looks up &callwith be
PAST::Var.new( :name('&callwith'),
:scope('package') )
jnthn Most likely 00:09
Yes
lue Ooh! Bold text! How'd you do that, colomon?
00:09 hanekomu_ left
colomon I'm not sure. 00:09
I think I must have hit something here that turned on bold. command b, I guess 00:10
jnthn colomon: oh
bkeeler oooh
colomon oh?
jnthn colomon: No, actually not quite that
colomon: Do it like &callwith normally works
bkeeler can has italics too
jnthn colomon: run perl6 --target=past
Then type &callwith and hit enter to see it
But basically
PAST::Op.new( :pirop('find_sub_not_null__Ps'), '&callwith' ) 00:11
colomon that was a spectacular amount of pir that just flashed by.
jnthn --target=past, not --target=pir :-) :-) 00:12
TimToady std: I can has red
p6eval std 30125: OUTPUT«===SORRY!===␤Malformed has at /tmp/tdsIqcplWU line 1:␤------> I can has ⏏red␤ expecting any of:␤ scoped declarator␤ typename␤FAILED 00:01 107m␤»
colomon [1] => PMC 'PAST;Stmts' {
<pos> => 0
<source> => \past
[0] => PMC 'PAST;Op' {
<pirop> => "find_sub_not_null__Ps"
[0] => "&callwith"
}
}
TimToady bbl &
jnthn Basically, find_sub_not_null looks in lexpads first, and then after that the package
TimToady: o/
00:12 alester joined
jnthn colomon: Also, callwith will work on user defined ops if you change the lookups of the ops used with Z and X meta-ops to use that instead of the PAST::Var way. 00:13
Probably.
:-)_
00:13 rhr_ joined
colomon jnthn: do I need that for the inner op sub name as well, or just for &callwith 00:14
?
colomon wonders if that was what was wrong with X and Z and user-defined ops....
lue How's the situation on memory usage?
colomon lue: #parrot is working on it.
lue ah. ok. 00:15
jnthn colomon: The inner one if you want to fix user defiend ops (and be correct going into the future)
sorear 10:55 <@darbelo> Are we leaking memory again?
10:57 <@particle> i imagine so, can you see a need to use 670MB during a compile?
11:01 <@Coke> particle: it's several THOUSAND lines of nqp.
11:11 <@Coke> whoops. that was 1600M on a parrot-nqp invocation, not the parrot invocation that builds core.pir 00:16
11:12 <@Coke> (though that too is now up past 1600M)
11:37 <@japhb> OK, >1600 MB to compile one NQP file is just crazy. Sounds like we need chromatic++'s Mad Leak Huntin' Skillz (tm)
00:16 quietfanatic left
sorear I think that covers the important cross section of #parrot 00:16
colomon jnthn: now making....
lue Are you sure it's FREENODE's #parrot? There were only 4 people there, including me (now 3) 00:17
00:18 Patterner left
sorear I never said it was 00:18
It's MAGNET's #parrot
japhb lue: MAGnet.
sorear aka irc.perl.org
lue ah. ok.
sorear aaka irc.parrot.org
and it was magnet before either project existed in its modern form
00:19 snarkyboojum_ joined
lue is going to check MAGnet's #perl6 (if there is one) 00:21
00:21 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum
jnthn sorear: Looking over the Parrot log, I think the point of your patch wasn't grokked properly... 00:22
colomon jnthn: any hints on debugging? 00:24
jnthn colomon: That's...general. :-) Did I miss some context? :-) 00:26
colomon: What's the problem you get?
colomon blast, there was supposed to be a paste with it.
jnthn Oh. :-)
colomon gist.github.com/337095 00:27
jnthn looks sadly at his expired beer 00:28
...and the nopaste.
sjohnson drink it anyway!
colomon $opsub is what is being being, so I think it is right.
I don't have any mental tools for debugging this sort of thing, I fear... 00:29
jnthn colomon: Where do you stick the code that gets generated here?
lue jnthn: hit F5 :P
jnthn sjohnson: no, no, I was more referring to the fact that the bottle is empty. :-)
lue: OH IF ONLY that worked! 00:30
:-)
colomon: Can you paste me the full --target=pir for that program?
colomon jnthn: ummm... nowhere?
jnthn (for say 1, 2 X~ 'a', 'b'; )
nowhere?
jnthn is...confused :-)
colomon jnthn: I've updated the gist to have more context for the code.
jnthn Can I see the diff too? It's probably easier to just see what you have. 00:31
Thanks.
yes, that works too
colomon could it just be I need to add make before the first PAST?
jnthn That sounds wrong-ish
bkeeler How do I "unbox" a PMC into a string?
jnthn bkeeler: Context?
00:31 snarkyboojum_ joined
colomon oh, I see, I'll get you the --target=pir in a sec. 00:32
00:32 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum
jnthn bkeeler: (There's more than one answer, it depends what you're doing.) 00:32
bkeeler I'm trying to implement that 'variable in a regex thing'
colomon is recompiling to try a different trick with Z...
bkeeler And it's generating
find_lex $P33, "$foo"
length $I10, $P33
jnthn And that explodes? :-)
What does the code that generates this look like? 00:33
bkeeler it splodes, yes
jnthn (esp the length call)
:pirop('length') ?
bkeeler Well, I take the PAST::Var node that comes back from the variable parse
And bundle it up in a PAST::Regex node
The Regex PAST->POST thing wants it to be a pir string I think 00:34
jnthn bkeeler: Please can you paste the little bit of code that's doing that?
00:34 yinyin joined
bkeeler method metachar:sym<p6var>($/) { 00:34
make PAST::Regex.new(
jnthn I think I know the answer, but want to see what you have rather than send you on a false trail :-)
bkeeler $<variable>.ast,
:pasttype('literal')
);
}
jnthn OK, I think that stands a chance of working with one tweak... :-) 00:35
Change $<variable>.ast
to
00:35 Psyche^ joined, Psyche^ is now known as Patterner
jnthn PAST::Op.new( :pirop('set__SP'), $<variable>.ast ) 00:35
bkeeler Also see github.com/perl6/nqp-rx/blob/master...-Regex.pir lines 670 ish
jnthn oops
PAST::Op.new( :pirop('set SP'), $<variable>.ast )
That one
bkeeler Thanks
jnthn Hopefully that works.
It'll lead to the expression that gets fed to PAST::Regex having a S register anyway 00:36
And hopefully it all works from there on in.
bkeeler Trying...
jnthn is glad he can help @other write code even if he isn't tonight :-)
bkeeler The long-term leverage effect of teaching others is worth a lot 00:37
jnthn++
colomon jnthn++ indeed!
lue
.oO($_ means "it". What does @_ and %_ mean?)
jnthn++++++++++++++ 00:38
bkeeler Is there a bot that keeps track of all the ++?
jnthn There...was.
karma jnthn 00:39
@karma jnthn
colomon jnthn: FYI: switching to the find_sub_not_null__Ps thing made the old code for Zop work with user-defined ops.
jnthn ...there's not now. :-(
colomon: \o/
snarkyboojum jnthn's karma probably exceeded the size of int, so the bot crashed :P
jnthn colomon: I figured it probably would. I'd debugged it, just not got a fix. Great that you did! :-)
japhb lue: @_ is 'them'
00:40 Patterner left, cdarroch_ left
lue then what is the english language equivalent of %_ ? (TimToady, that's your cue to help!) 00:40
colomon gist.github.com/337095 now has the --target=pir output too.
jnthn colomon: oh. 00:41
You're essentially making a bunch of PAST...and then throwing it away.
So it never makes it to the PIR 00:42
PAST::Op.new( :pasttype('bind'), ... ) and all the stuff beneath it is in void context
colomon so.... add "make"
?
or @BLOCK[0].loadinit.push(
?
jnthn The second.
make means "this is the PAST I want to produce for the bit of code I just parsed" 00:43
The thing you want to do at the point you see it in the code is look it up though.
The code to generate it needs to be run at load/init time.
So needs to be stashed away somewhere else, and the loadinit of the current block is *maybe* OK 00:44
colomon trying that...
jnthn It'll work for now.
We'll re-visit it a bit later, I have a feeling that it'll be wrong in some cases. 00:45
bkeeler Is there a way to do 'perl6 --target=pir', tweak the pir, then run it?
jnthn kinda 00:46
00:46 Psyche^ joined, Psyche^ is now known as Patterner
jnthn You'd need to add some "loader" code at the top to load_bytecode 'perl6.pbc' I guess 00:47
Then you'd run it with parrot executable, not perl6 one.
It is possible, though.
lue does --target "compile" perl6 code?
jnthn Yes 00:48
Basically it says "rather than running this code, stop at <this stage>" 00:49
It normally goes through those stages anyway on the way to running.
lue perl6 --control-parrot --parrot-target="machinecode" 00:50
jnthn Sadly, NYI. :-) 00:51
lue I can't wait to compile P6 scripts! 00:52
bkeeler It would be really nice if you could just do './perl6 foo.pir' and have it DTRT 00:53
colomon gist.github.com/337095 now has the latest error. :( 00:54
jnthn colomon: can you perl6 -e it so there's a stacktrace? 00:55
(want to see where the NPMCA happens)
colomon how do you -e it? 00:56
jnthn perl6 -e "say 1, 2 X~ 'a', 'b';"
Then it should say a little more than "Null PMC Access"
colomon Null PMC access in clone() 00:57
current instr.: '&callwith' pc 17300 (src/builtins/Capture.pir:123)
called from Sub 'perl6;Code;assuming_helper' pc 12743 (src/builtins/Str.pir:38)
can past more if you need it.
00:57 lestrrat is now known as lest_away, hercynium joined
jnthn colomon: argh, you copied my FAIL! 00:57
&callwith
Shoudl be &crosswith :-) :-)
colomon doh!
jnthn Group failing!
lue
.oO(every error should begin with DON'T PANIC!)
colomon I actually kept on wanting to make it "callwidth"
jnthn bkeeler: Are you wanting to do this with Rakudo code or NQP code, by the way? 00:58
bkeeler Rakudo
jnthn OK
One other thing that can work is a "cheat" 00:59
Put the code in a sub and mark it is export
or just actually make it "our"
put it in a PIR file
then "need name_of_pir_file;"
or use maybe
(if you do the is export route)
That way is easier, since the Perl 6 environment is already set up
So it's just like loading a pre-compiled module.
lue there's still the array pairs/exists to do, right? If so, any place where those two would be described in detail (besides S32, it's not in detail there) 01:00
bkeeler Ahh nice one
jnthn lue: See the existing tests perhaps.
Or the existing imeplemntation
alpha did them both
lue that's what I did (tests). Just hoping it was specced.
jnthn Feel free to patch the spec too ;-) 01:01
lue rakudo: my Pair $a=3,4; say $a
p6eval rakudo 1e9aa0: OUTPUT«Type check failed for assignment␤current instr.: '&die' pc 16934 (src/builtins/Junction.pir:399)␤»
jnthn 3 => 4
snarkyboojum how do I use the exists pir op in Array.pm? This doesn't work paste.lisp.org/display/96589
:)
lue Oh yeah! I keep on forgetting :)
SNARKYBOOJUM! :D
jnthn snarkyboojum: Oh...ouch 01:02
snarkyboojum there's bugs in that code anyway :)
heh
snarkyboojum is a newbie remember :)
i.e. I don't know what I'm doing heh
jnthn snarkyboojum: try pir::exists__PPP(self, $index)
snarkyboojum jnthn: ok - thanks :)
jnthn But keyed ops and pir::foo don't always go together. :-(
bkeeler ./perl6 'need foo.pir'; <- gives Unable to open filehandle from path 'need foo.pir' 01:03
jnthn keyed ops are this wonderful thing when hand-writing PIR code, and a horrible thing for writing compilers
bkeeler: remove the .pir
bkeeler Bah, need -e
jnthn bkeeler: it's implicit
colomon > say 1, 2 X~ 'a', 'b';
1a1b2a2b
jnthn++
snarkyboojum write that down for a time when he'll understand it :)
jnthn: thanks
jnthn snarkyboojum: Sorry, was just having a Parrot design whine. :-)
lue snarky: I only yelled because of your impeccable timing cocering array.exists :)
bkeeler Unable to find module 'foo'
Does it look in '.'?
jnthn yeah but for .pm 01:04
01:04 takadonet joined
jnthn touch foo.pm 01:04
snarkyboojum lue: let's get em done today :)
jnthn it'll ignore it if the .pir is there
colomon > say 1, 2 RX~ 'a', 'b';
No applicable candidates found to dispatch to for 'crosswith'. Available candidates are:
:(&op, Iterable $a-iterable, Iterable $b-iterable)
bkeeler Perfect, thanks
jnthn Though this trick won't work forever :-)
snarkyboojum battery about to die.. bbl :) 01:05
jnthn kk o/
colomon: Aww.
colomon jnthn: I'll bet R thinks it has a scalar on both sides, or something like that.
lue I guess Rakudo/Parrot knows not to cross the beams :P
jnthn Oh, may be that.
lue (couldn't resist) 01:06
jnthn lol
colomon: How's R implemented?
Perl 6 sub or PIR?
colomon PIR
jnthn ah
colomon though I was just thinking it would be easy to re-implement it on the new X model.
jnthn That means it's not premature context enforcization then.
Yeah 01:07
Can you nopaste the PIR for that one?
I'm curious
It may be something easy
colomon: oh 01:08
:-/
I think assuming needs a fix.
colomon did you find metaops.pir?
jnthn colomon: YOu know the signature of crosswith?
Can you s/&/$/ on the first arg and try it? 01:09
If that makes it work, it means assuming is broken.
01:09 snarkyboojum left
colomon ok, trying... 01:09
PIR for reverse is in metaops.pir, as I tried to say above -- that's easier than pasting. :) 01:10
jnthn Holland has awesome symphonic metal bands. :-)
(off-topic random thought :-))
colomon: If you write it in Perl 6, it may be wise to have the signature as (\$a, \$b) 01:11
So you don't enforce any context.
colomon reverse, you mean?
jnthn Yes 01:12
lue Oh those happen all the time jnthn. Especially in planets orbiting the red dwarf Op.
colomon it would have to be (&op, \$a, \$b), right?
jnthn Correct.
colomon jnthn: changing &op to $op did not help: 01:14
> say 1, 2 RX~ 'a', 'b';
No applicable candidates found to dispatch to for 'crosswith'. Available candidates are:
:(Any $op, Iterable $a-iterable, Iterable $b-iterable)
jnthn Aww.
colomon oh, hey I see. 01:15
jnthn assuming is still wrong, I think
colomon Z~ is list_infix
01:15 justatheory joined
colomon RZ~ is item_assignment 01:15
so it just gets the two scalars on either side, which aren't Iterable. 01:16
so, that brings up my other big meta issue.
how do I mean Rop (for instance) get the precedence of op?
jnthn Oh! 01:17
So does: say (1, 2) RX~ ('a', 'b') # work, for example?
01:18 agentzh joined 01:19 aesop_ left
colomon > say (1, 2) RX~ ('a', 'b') 01:19
a1a2b1b2
jnthn \o/
OK, good.
So we're down to a precedence issue, essentially. 01:20
colomon yes.
jnthn We'll need to deal with transparent precedence with hypers anyway, Ithink.
colomon imo
jnthn Yeah, I concur that's what it is.
colomon and we need to deal with it for R already.
jnthn Right.
colomon I've been meaning to write tests to show it is broken. :)
jnthn It'll take a little effort to fix that, I think. 01:21
Twiddling our O
(as in <O(...)>
colomon it just never occurred to me that precedence could also control how many arguments you get .
right, it's very simple in STD
jnthn :-)
Once we figure out how to map that incantation from STD to Rakudo (which I hope won't be too hard, twiddle away if you like) it should be easy enough. 01:22
colomon $<O> = $<infixish><O>;
jnthn If you := it, then it may just work.
colomon that's the STD version!
jnthn But I'm not convinced.
Yeah
It may just work in Rakudo with s/=/:=/
bkeeler Gah. There's a bug in the regex code. Sooooo clode
jnthn If it does, awesome. 01:23
bkeeler: aww :-(
I really, really need to sleep in 5 mins or so
lue
.oO(how many kinds of operators are there? Like hyperoperators, metaoperators...)
jnthn lue: Infinitely many ;-)
colomon lue: hyperoperators are a kind of metaoperators.
jnthn But only finitely many meta-operators
Well
Depending how you look at it 01:24
:-)
colomon jnthn: understood about the sleep.
I need to get ready for the RPG convention next week.
01:24 eternaleye joined
colomon :) 01:24
jnthn Nice :-)
01:25 sorear joined, snarkyboojum joined
lue bah. I want to name a sun in this galaxy/universe of ours Op. I want to make sure it has the correct number of orbiting planets :) 01:25
01:26 lest_away is now known as lestrrat
lue hello snarky o/ 01:28
snarkyboojum lue: hello!
colomon > say 4 R- 3; 01:29
too few positional arguments: 1 passed, 2 (or more) expected
that's with the precedence patch from STD. :(
lue STD--
snarkyboojum my playing with rakudo definitely appears to be a process of natural selection :)
lue (jk)
colomon whoops, except I forgot to switch it to :=
lue STD++
jnthn OK, sleep for me. 01:30
I wish you all happy hacking! :-)
snarkyboojum nightio
jnthn Have fun
lue goodnight jnthn! o/
jnthn night o/
sorear jnthn: I'll... have you help me convince others tommorrow then.
(I thought you were a Parrot core dev?)
jnthn sorear: I...used to be.
lue ...about what?
jnthn I still have my commit bit, but I'd rather get consensus. :-)
colomon with := it fails to compile. :(
night, jnthn++ 01:31
sorear jnthn: Politics?
lue rakudo: my $a=3; $a :=$b; say $b
p6eval rakudo 1e9aa0: OUTPUT«Symbol '$b' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
lue rakudo: my $a=3; my $b := $a; say $b
jnthn colomon: Did you copy double {{ or just single? use single if so
p6eval rakudo 1e9aa0: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16934 (src/builtins/Junction.pir:399)␤»
lue colomon: there's your problem! NYI!
jnthn sorear: Well, just throwing in a patch people are uneasy about - even if I think it should go in - is kinda bad form without discussing it first. 01:32
sorear jnthn: are you on the parrot list?
jnthn Yes
I try and read the bits I think matter
Feel free to make a post there
sorear jnthn: I meant wrt "used to be a core dev"
colomon I didn't copy { } at all. Trying that now.
jnthn Then I can reply to it
sorear: No, I meant in terms of "actively committing lots of stuff to Parrot" :-)
I still patch it now and then.
sorear: Anyway, I'd pitch it as, "the Parrot interface to dlopen is incomplete, and Blizkost development - which in turn matters for Rakudo * - has just hit upon the incompleteness. This patch adds a way - with platform abstractions - to expose the functionality we need to make progress." 01:34
lue afk 01:35
jnthn To me that makes it pretty clear that the thing the patch is aiming for is needed. Beyond that, folks I guess can look at the patch and say it's going the wrong way about it (though it looked sane to me). 01:36
But "we're not going to have a complete interface to loading native libraries because only one thing needs it now" is kinda silly to me.
TimToady alpha: say ('*' Xx 1..5) X~ "\n"
p6eval alpha 30e0ed: OUTPUT«*␤**␤***␤****␤*****␤␤» 01:37
colomon > say 4 R- 5
Null PMC access in get_string_keyed()
that's with
token infix_prefix_meta_operator:sym<R> { <sym> { $<O> := $<infixish><O> } }
jnthn oh
colomon errr... though where can it even it infixish, now that I look at it?
jnthn erm...I guess our infix_prefix_meta_operator looks rather different to STDs
colomon token infix_prefix_meta_operator:sym<R> { 01:38
<sym> {} <infixish(1)>
<.can_meta($<infixish>, "reverse the args of")>
<?{ $<O> = $<infixish><O>; }>
}
yes.
jnthn OK
colomon (that's STD's)
jnthn Hmm
colomon I don't see why we can't switch over to something more like that version?
jnthn That may well be worth a try.
TimToady your version never actually matches the infix 01:39
colomon what is the {} after <sym> intended to do there?
jnthn I think mark end of LTM?
01:39 eternaleye left
TimToady correct 01:39
it's faster than using ::
colomon desperately needs to beef up his perl 6 regex skills...
jnthn oh
TimToady because :: implies a bunch of lazymaps
jnthn | <OPER=infix_prefix_meta_operator> <infixish> 01:40
heh
that's how we do it now
colomon right.
.oO(I did that...)
jnthn
.oO( it's hard to go to bed with all this Rakudo! )
01:40 eternaleye joined
bkeeler Stay up! 01:40
01:40 jaldhar joined
jnthn I'm rather confused what the <OPER=...> is all about... 01:41
astrojp Is this pacakge the correct one to install for the ICU library? 'libicu40' I'm using Ubuntu, trying to build Rakudo.
TimToady is that the fakey LTM?
bkeeler > my $foo = 'it'; say "zomgitworks" ~~ /zomg $foo works/ 01:42
zomgitworks
jnthn oh, I think it's redundant
bkeeler: omg!
\o/
colomon jnthn: that would be me trying to imitate what was going on two lines before.
bkeeler++ \o/
bkeeler Regex engine bug = FIXT
jnthn colomon: OK, no worries
bkeeler++ bkeeler++
bkeeler Rakudo feature = IMPLEMENTED 01:43
jnthn Wow, another priority 1 ROADMAP item falls. :-)
bkeeler So who can commit to nqp-rx in the asbence of pm? 01:44
jnthn colomon: Maybe try doing the { $<O> ... } thingy in infixish after | <OPER=infix_prefix_meta_operator> <infixish>
oh
but that'll get it wrong for ops that don't want transparent
:-(
I think we're gonna have to refactor to be more STD-ish.
colomon it's okay, I'll do a bit of a reorganization to look more like std
right.
jnthn bkeeler: Good question.
colomon :)
bkeeler perlpilot has the last commit there so he can at least 01:45
jnthn I wonder if I can...
bkeeler: The other issue is that nqp-rx then somehow needs to be re-integrated into the Parrot tree and then we get it for Rakudo through that.
bkeeler: And...I'm not sure who knows that part. Is your patch somewhere on github (e.g. do you have your own clone)? 01:46
bkeeler jnthn: Yeah, I guess that's up to the parrot folks to pull it
Yeah, I do
jnthn Well, pmichaud normally pushed it iirc.
OK
I'll try and look into that tomorrow.
I actually don't know the procedure off hand. 01:47
TimToady I wonder how close you guys are to just being able to run STD straight up... :)
jnthn TimToady: Getting closer every day, it seems.
01:47 jql joined
jnthn It will be Very Cool. :-) 01:47
OK, I really, really will sleep now!
astrojp cool, it's already installed. 01:48
TimToady nighty night
jnthn night all, awesome hacking \o/
o/
colomon o\
bkeeler G'night! 01:49
01:52 Raugturi joined 01:53 Raugturi left
bkeeler Spec tests pass! yay, I didn't break anything 01:56
I need a break I think 01:57
TODO list: 1) nom 2) watch last night's Daily Show/Colbert 3) Practice my Bach and 4) more hacking!
laterz....... 01:58
02:02 y0ngbin joined 02:07 aesop_ joined, aesop_ is now known as aesop
colomon wow, switching <infixish> from inside <infixish> to inside the infix_prefix_meta_operator tokens is a huge fail. no idea why. 02:08
"Null PMC access in get_pmc_keyed()" during the build
02:12 stephenlb left 02:18 xomas left 02:27 wknight8111 left
snarkyboojum std: my @a = <1 2 3>; say @a[1]:exists; 02:33
p6eval std 30125: OUTPUT«ok 00:01 108m␤»
02:34 justatheory left
snarkyboojum std: my @a = <1 2 3>; say @a[1] :exists; 02:35
p6eval std 30125: OUTPUT«ok 00:01 107m␤»
snarkyboojum std: my @a = <1 2 3>; say @a[1] exists;
p6eval std 30125: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/OpEtQdug7f line 1:␤------> my @a = <1 2 3>; say @a[1] ⏏exists;␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤FAILED 00:01 107m␤»
snarkyboojum std: my @a = <1 2 3>; say @a.exists(0);
p6eval std 30125: OUTPUT«ok 00:01 107m␤»
02:38 justatheory joined 02:43 astrojp left
colomon jnthn: fail on redoing grammar to be more like STD. and reverting back to the old code, it turns out we don't pass cross-metaop.t with the changes in place. looks like this one might actually be an assuming bug? anyway, will try to hunt down next time I get a chance, but tomorrow looks MEGA busy. 02:49
02:53 alester left
snarkyboojum rakudo: my int $i = 5; 03:05
p6eval rakudo 1e9aa0: OUTPUT«Malformed my at line 11, near "int $i = 5"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
snarkyboojum rakudo: my Int $i = 5;
p6eval rakudo 1e9aa0: ( no output )
snarkyboojum alpha: my int $i = 5;
p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "int $i = 5"␤in Main (file <unknown>, line <unknown>)␤» 03:06
snarkyboojum std: my int $i = 5;
p6eval std 30125: OUTPUT«ok 00:01 108m␤»
lue hello again! 03:07
snarkyboojum hi lue 03:14
I'm having fun trying to get exists going ;)
how do I create a parrot int from rakudo - i.e. result in something that does $I0 = 5 in PIR 03:17
03:18 justatheory left 03:23 justatheory joined 03:27 sorear left
lue I do not know (busy watching DW on the intertubes...) 03:27
03:28 [synth] left
snarkyboojum alpha: my @a = <a b c>; say (@a.exists(1)).WHAT 03:29
p6eval alpha 30e0ed: OUTPUT«Bool()␤»
03:29 synth joined
snarkyboojum rakudo: my Int $i = 0; say $i; 03:33
p6eval rakudo 1e9aa0: OUTPUT«0␤»
snarkyboojum rakudo: my Int $i = 0; say $i.WHAT;
p6eval rakudo 1e9aa0: OUTPUT«Int()␤»
snarkyboojum rakudo: my Int $i = 0; say $i.WHAT.^parents; 03:34
p6eval rakudo 1e9aa0: OUTPUT«Any()Mu()␤»
03:36 sorear joined 03:39 agentzh left 03:54 envi^home joined
spinclad phenny, karma STD 04:00
hugme, help 04:01
hugme spinclad: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
04:03 obra left 04:06 obra joined
lue HUGME'S BACK! 04:10
hugme: hug me
hugme hugs lue
lue YES!
sorear hugs lue too 04:12
lue hugme: hug sorear
hugme hugs sorear and blushes
lue hugme: hug TimToady
hugme hugs TimToady
lue hugme: hug hugme
hugme hugs hugme
lue glad it's back :D 04:13
afk
04:17 alester joined 04:35 patt joined 04:50 patt left 05:15 snarkyboojum left, jhuni joined 05:25 TimToady sets mode: +vvv buubot dalek hugme, TimToady sets mode: +vv ilogger2 IRSeekBot, TimToady sets mode: +vv p6eval phenny 05:28 quietfanatic joined 05:29 Guest39075 is now known as Trashlord, Trashlord left, Trashlord joined
araujo wonders if there is some regexp wizard here 05:31
or unix one ... looking for a command to give the common code between two files 05:32
any idea?
05:32 vamped joined
vamped well, i've never used it before, but there is a "diff" command in linux. -i ignore case... see man page 05:37
also commands: cmp, comm
araujo: i think comm is what you may want to try first 05:38
05:38 vamped left
sorear see also cpd 05:39
05:39 uniejo joined 05:41 clkao_ joined
sorear wonders what vamped is doing to connect in such an unusual way 05:42
05:42 clkao_ is now known as clkao 05:47 araujo left 05:50 ShaneC left 05:51 araujo joined 05:52 justatheory left 06:02 mberends joined
mberends rakudo: BEGIN { say "beginning"; }; say "main"; 06:19
p6eval rakudo 1e9aa0: OUTPUT«main␤»
mberends alpha: BEGIN { say "beginning"; }; say "main"; 06:21
p6eval alpha 30e0ed: OUTPUT«beginning␤main␤»
uniejo rakudo: say "main"; INIT { say "init" } 06:23
p6eval rakudo 1e9aa0: OUTPUT«init␤main␤»
06:23 xinming joined
mberends uniejo: thanks, I'll try that in proto right now :-) 06:24
hmm, it's not early enough for this: BEGIN { @*INC.unshift('lib'); } 06:25
mberends thinks of a workaround using the Perl 5 part 06:26
06:31 uniejo left 06:37 yinyin left 06:54 yinyin joined 06:56 kaare joined 06:57 kaare is now known as Guest44199 07:01 Guest44199 left 07:11 cotto left 07:15 agentzh joined
mathw bah 07:15
Form doesn't compile with master :(
araujo mm...
mathw it's not giving me happy error messages
araujo comm seems what I wanted .. but not giving the right results it seems
mberends mathw: I know the feeling.. proto is in the same state 07:16
moritz_ good morning 07:17
mberends welcome back moritz_
mathw it's also failing to tell me accurately which file it's got a problem with 07:18
07:20 uniejo joined
mathw rakudo: my @a = "1", "2", "3"; @a.map: *.chars; 07:22
p6eval rakudo 1e9aa0: ( no output )
mathw rakudo: my @a = "1", "2", "3"; [+] @a.map: *.chars;
p6eval rakudo 1e9aa0: OUTPUT«Confused at line 11, near "[+] @a.map"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
mathw rakudo: my @a = "1", "2", "3"; my $r = [+] @a.map: *.chars;
p6eval rakudo 1e9aa0: OUTPUT«Confused at line 11, near "my $r = [+"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
mathw ahah
rakudo: my @a = "1", "2", "3"; my $r = [+] @a.map: { .chars };
p6eval rakudo 1e9aa0: OUTPUT«Confused at line 11, near "my $r = [+"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ rakudo: say [+] 1, 2, 3
p6eval rakudo 1e9aa0: OUTPUT«Confused at line 11, near "say [+] 1,"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ there you go, reduce meta-op not yet implemented 07:23
mathw lovely
I use that quite extensively in this one file
moritz_ too
alpha: my @a = "1", "2", "3"; say [+] @a.map: *.chars;
p6eval alpha 30e0ed: OUTPUT«3␤»
mathw yeah it used to work
07:24 finanalyst joined
mathw urgh 07:25
for loops are so clumsy
moritz_ rakudo: say (1, 2, 3).reduce: &infix:<+> 07:26
p6eval rakudo 1e9aa0: OUTPUT«6␤»
07:26 cotto joined
mathw ooh 07:26
finanalyst Yesterday I saw a rakudo release announcement on the perl developer list, but nothing on the perl6-language list. Was that an error, or do I have a problem receiving p6l? 07:28
mathw I didn't see a rakudo announcement on p6l either 07:29
mberends getting the announcements out everywhere is, strangely enough, harder than producing a technically sound release. Also, there are strange delays in some of the messaging systems. 07:30
07:31 Chillance left
finanalyst a) relief! its not my spam system, which has been trashing excessively recently. b) i noted that traffic on p6l has been quite low recently. 07:32
mathw oooh damn
named enums
we don't have named enums yet do we
Form uses them quite extensively 07:33
I will have to wait...
in the mean time, I should go to work
07:33 alester left 07:43 kaare joined, kaare is now known as Guest11603 07:45 envi^home left 07:53 cotto left 07:55 fridim joined 07:58 mberends left 07:59 drbean joined 08:02 iblechbot joined 08:05 fridim left 08:07 drbean_ joined, drbean left 08:17 mberends joined 08:22 drbean_ left 08:25 riffraff joined 08:30 drbean joined 08:36 drbean left 08:37 drbean joined 08:38 am0c joined 08:40 Su-Shee joined 08:46 IllvilJa joined 08:48 hanekomu_ joined
colomon o/ 08:55
mathw o/
colomon is completely mystified by his cross-metaops.t fails. 09:02
09:07 payload1 left
mathw is weeping for named enums 09:10
09:10 lestrrat is now known as lest_away 09:12 payload joined 09:18 payload left 09:20 payload joined 09:27 Sarten-X left 09:28 Sarten-X joined 09:30 payload1 joined, payload left 09:31 yinyin left 09:33 clintongormley joined
colomon mathw: work is underway on named enums. masak++ 09:37
mathw I know, but I needed them two hours ago! 09:38
It's quite a shock to come up against the regressions like that 09:39
09:46 y0ngbin left 09:49 iblechbot left 09:51 payload1 left 10:01 payload joined 10:03 smash_ joined
smash_ hello everyone 10:03
mberends hi smash_, well done on the Copenhagen release! 10:04
smash_ mberends: thank you, many complaints already ? 10:06
mberends no, we can cause plenty of new ones and blame ourselves 10:08
10:10 payload left 10:16 dre joined 10:17 payload joined, dre left, dre_dre joined 10:18 dre_dre left, bkeeler left 10:31 snarkyboojum joined 10:34 agentzh left 10:41 payload left 10:46 bkeeler joined 10:48 Yanz joined 10:49 Yanz is now known as Yanzie
Yanzie Hello, I run backtrack 4 final, does Perl come pre-installed on this? 10:49
10:50 xomas joined 10:54 Yanzie left
snarkyboojum Yanzie: Perl 5 may 10:56
oops helps to reply to people still in the room 10:57
11:00 payload joined 11:01 hanekomu_ left, am0c left 11:02 am0c joined 11:19 masak joined 11:34 ilogger2 joined 11:35 payload joined 11:37 fda314925 joined 11:44 payload left 11:47 payload joined 11:49 envi^home joined
masak snarkyboojum: it strikes me that if we'd implemented the 'go' sub as a multi, the mistakes I made would never have had a chance to creep in. :) 11:52
snarkyboojum masak: aye
masak I'll write up a patch for that.
snarkyboojum has similar thoughts when banging it out the first time.. but thought "I'll just keep it simple and make it work" :) 11:53
cool
s/has/had/
masak nod.
colomon jnthn: nope, I've done no patching yet.
masak it actually becomes simpler now, because the if cases melt away. 11:54
jnthn (multi dispatch)++ :-) 11:55
snarkyboojum multi rocks :)
colomon jnthn: I figured I'd do the improved action version of Xop and Zop, and then when that didn't work I gave up and collapsed into bed.
snarkyboojum kinda reminds me of my first year uni days learning pattern matching in Haskell (kinda)
even tho I'm sure it's very different ;P 11:56
jnthn colomon: Ah, fair enough. 11:57
colomon I'll take a stab at it right now, because it's a dead cinch I'm not getting a big project done today.
colomon has 3 estimators visiting the house from 3 different moving companies today, plus closing on selling our house. 11:58
jnthn Wow! 11:59
colomon first guy should be here any moment (8am our time) 12:01
12:10 nihiliad joined 12:24 frettled left
snarkyboojum masak: the multi subs are beautiful :) 12:39
masak :)
dalek kudo: 9affb78 | (Solomon Foster)++ | src/Perl6/Actions.pm:
Better internal op lookup for Xop and Zop.
12:40
takadonet are we passing more tests now then we did before the merge of ng branch? 12:41
colomon nope
but we're getting back about 1000 tests a week at the moment. 12:42
masak wow. 12:44
[particle] HA! "is there a production release date?" hilarious.
jnthn If somebody wants to have everlasting fame for winning back some thousand or so tests, there's some more in S05-mass 12:46
If somebody wants to write a P5Regex compiler that targets PAST::Regex we can start to handle :perl5 adverb again to ;-) ;-)
*too
masak sounds like fun. 12:47
jnthn YAY VICTIM!
[particle] ...there's a sucker born every minute.
jnthn er, volunteer.
:-)
masak I don't know what you're talking about :)
TimToady: [backlog] I think I would expect hyperops to mirror the precedences of their corresponding inner ops, yes. 12:51
TimToady: but I wouldn't mind being forced to parenthesize there too, on the grounds that I'm doing something very advanced and should be a bit careful/clear with what I'm doing.
12:52 nacho joined 12:54 [synth] joined
colomon masak: thing is, we need to be able to get the base op precedence for Rop, so by the time we get around to hyperop it should be a solved problem. 12:56
masak colomon: well, the thing TimToady is arguing for is >>+<< et al having list infix precedence, and then *another*, inner, precedence besides that. 12:57
12:57 iblechbot joined
masak I'm considering signing up for a GSoC project -- building a static analyzer for Perl 6. 12:58
jnthn That sounds interesting. 12:59
masak: What you try and do it within an existing compiler?
masak jnthn: depends on whether you consider Yapsi to exist or not yet. :)
jnthn masak: I'm willing to mentor a static analyzer for Rakudo project (it's easier to mentor someone else to do it than write it myself... :-)) 13:00
masak jnthn: I do plan to make Yapsi extremely modular, working in different passes which can be plugged into STD.pm, or Rakudo, etc.
jnthn: cool! I hadn't considered doing it for Rakudo. will explore a little.
that's probably a better idea than starting totally afresh. 13:01
jnthn masak: Well, part of the reason e.g. Perl6::Compiler::Signature and Perl6::Compiler::Package and its subclasses exist was in anticipation of helping to do that kind of thing in the future.
masak oh, nice.
rakudo: class A { method f() {} }; A::f 13:02
p6eval rakudo 1e9aa0: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
masak submits rakudobug
rakudo: class A {}; A::f 13:03
p6eval rakudo 1e9aa0: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
masak rakudo: A::f # :)
p6eval rakudo 1e9aa0: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn masak: erm
NPMCA is wrong
But not finding f is correct.
So those lot are all the same bug. 13:04
masak hence just one 'masak submits rakudobug' :)
the rest was just golfing.
jnthn OK, just wanted to make sure you hadn't taken them as two seperate issues. :-)
masak the system is very simple. :)
jnthn rakudo: Some::thing()
p6eval rakudo 1e9aa0: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn alpha: Some::thing()
masak one 'masak submits rakudobug', one rakudobug.
p6eval alpha 30e0ed: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (file <unknown>, line <unknown>)␤»
jnthn Ah. Exact same problem as we had before. 13:05
Or near enough.
jnthn should really try and fix that one.
Then I write a blog post called "A farcical fix" :-D
masak 哈哈
so, how do I get the method object for a method foo in class A? 13:06
jnthn can 13:07
rakudo: class Foo { method lol { say "rofl" } }; my $x = Foo.can('lol'); $x(Foo)
p6eval rakudo 1e9aa0: OUTPUT«rofl␤»
masak really?
jnthn YA RLY 13:08
masak that's the idiom?
I can accept it, I'm just...surprised.
jnthn If you want to write Foo::lol you shoudl mark the method "our"
masak I thought there was a way involving '::'
ok.
jnthn But Rakudo doesn't support that yet.
masak rakudo: package A { sub f { say "OH HAI" } }; A::f
p6eval rakudo 1e9aa0: OUTPUT«OH HAI␤»
jnthn ...erm. I'm not sure that's quite right either. :-/
Aren't subs lexically scoped?
masak it does seem strange considering what you just said. 13:09
jnthn Right
I think that's a bug.
masak submits rakudobug
jnthn I'm rather surprised that worked.
masak so are the rest of us :P
jnthn methods have "has" scope by default.
m6locks :P
jnthn Yes, but even knowing the guts I'm surprised. :-)
masak knowing the guts is just distracting when finding bugs :) 13:10
jnthn Strangely, it helps with fixing them. :-P
yay lunch! 13:11
masak rakudo: my @a = 1,2,3,4; my @b = 3,4,5,6; my @c = grep { $_ === any(@a) }, @b; say @c.perl 13:12
p6eval rakudo 1e9aa0: OUTPUT«[]␤»
masak have I misunderstood what === does?
(again)
jnthn It looks like you're expecting === to auto-thread. I'm not convinced it does. 13:13
masak oh!
that might be it.
masak rewrites
jnthn the first thing === does is "is this the same type" 13:14
masak it makes sense that === doesn't autothread, I think. 13:16
though it could sometimes be useful to have an operator that did.
jnthn There's plenty of operators that do. :-P 13:20
13:20 Woody2143 left
jnthn Maybe @a ~~ *,$_,* would do what you want 13:20
I think it ===s
masak orly I thought it ~~d. 13:21
13:32 cognominal joined
snarkyboojum rakudo: my @a = <a b c>; my $b = @a; say @a === $b 13:33
p6eval rakudo 9affb7: OUTPUT«1␤»
snarkyboojum rakudo: my @a = <a b c>; my @b := @a; say @a === @b 13:34
p6eval rakudo 9affb7: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16934 (src/builtins/Junction.pir:399)␤»
snarkyboojum cool message :)
alpha: my @a = <a b c>; my @b := @a; say @a === @b
p6eval alpha 30e0ed: OUTPUT«1␤»
masak "we're awesome while you wait..." :) 13:35
snarkyboojum heh
13:37 ajardan joined
ajardan heya 13:37
I'm trying to install ilbot on one of our servers, with no luck, it is aking for an IrcLog.pm module :) 13:38
13:38 jpzork joined
ajardan any ideas where can I get it, or what's wrong 13:39
snarkyboojum ajardan: github.com/moritz/ilbot/tree/master/lib/ might help?
ajardan hmm, I hae it in lib folder too... 13:40
masak rakudo: return True if 1 13:41
p6eval rakudo 9affb7: OUTPUT«Missing block at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
masak submits rakudobug
ajardan snarkyboojum, any ideas why it doesn't see the lib ? 13:45
13:46 arthur-_ joined
masak rakudo: return for 1,2,3 13:52
p6eval rakudo 9affb7: OUTPUT«Could not find non-existent sub &for␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
masak I recognize this bug.
colomon it's return, isn't it?
masak it's parsing. 13:53
colomon rakudo: .say for 1, 2, 3
p6eval rakudo 9affb7: OUTPUT«1␤2␤3␤»
colomon it's parsing return. :)
rakudo: return if True;
p6eval rakudo 9affb7: OUTPUT«Could not find non-existent sub &if␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn Another nice post use.perl.org/~jhuni/journal/
masak: It's the way return is parsed.
masak future-proof URL: use.perl.org/~jhuni/journal/40253 13:55
jnthn oops, yes
:-)
masak I guess it's the way listops interact with statement modifiers in the parser.
jnthn It's actually more than return isn't being parsed as a list op atm. 13:56
But iirc as a statement control
It's a bit annoying to fix since calling return isn't like calling pretty much anything else
And I didn't work out a clean way to handle that yet.
(Granted, I didn't spent much time on it either... :-)) 13:57
14:00 wasy joined 14:02 payload1 joined, payload left 14:03 alester joined 14:07 payload1 left 14:28 MAK_ joined
MAK_ While installing a new release of rakudo and parrot will I have to clean up the existing one and then install or can I install on the existing one itself? 14:29
I am installing on windows
finanalyst i havent been able to spend much time here recently. I noticed 'alpha' as an evaluation bot. What is alpha? 14:30
masak MAK_: perhaps jnthn++ can help you. he's on Windows too.
finanalyst: 'alpha' is the name given to the branch that was called 'master' before 'ng' became 'master' in late January. 14:31
finanalyst ahhh. Thanks
masak i.e. 'the old Rakudo'.
MAK_ masak : I will try out few things myself let me see if it works out
jnthn masak: How did you do it before?
Just perl Configure.pl --gen-parrot and then make? 14:32
er
finanalyst how long before new Rakudo catches up to alpha?
jnthn MAK_: ^ that was for you :-)
MAK_: Or do you use the binaries?
MAK_ I am building from source, will try out as you suggested
masak finanalyst: depends on the exactness of the criterion 'catches up'.
jnthn MAK_: Then it should be fairly self contained
masak finanalyst: in some respects, it already does more. the regressions are quickly filled in.
MAK_ okies ;) 14:33
jnthn Just build the new one in a new folder and there should be no interference between them. :-)
masak finanalyst: some things might take a long time before they're back in place.
jnthn finanalyst: What masak said. Depends what aspects you care about. In many places master is a lot more advanced than alpha ever was.
finanalyst what is the status of Rakudo * ?
14:33 unobe joined
jnthn finanalyst: A bit delayed, due to recent events, though not epicly so. 14:34
finanalyst perl6: my $x='a'; my $y='abc'; say ?($x ~~ $y) 14:35
p6eval rakudo 9affb7: OUTPUT«0␤»
..elf 30125, pugs: OUTPUT«␤»
finanalyst perl6: my $x='a'; my $y='abc'; say ?($y ~~ $x)
p6eval rakudo 9affb7: OUTPUT«0␤»
..elf 30125, pugs: OUTPUT«␤»
masak finanalyst: if you're expecting substr or regex matching out of that, your expectations are off :) 14:36
finanalyst regex matching, and yes I have probably forgotten the proper syntax.
masak finanalyst: it's /abc/ for regexes. 14:37
finanalyst perl6: my $x='a'; my $y='abc'; say ?($y ~~ /$x/)
p6eval elf 30125: OUTPUT«1␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.14/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
..rakudo 9affb7: OUTPUT«0␤»
MAK_ Will doing a --gen-parrot pick up the latest parrot release?
masak finanalyst: that wouldn't cut it either.
finanalyst: you'd just get the literal string 'abc' inside the regex.
jnthn masak: I think that should work.
mathw MAK_: It'll get the Parrot which Rakudo currently requires
MAK_ ok
jnthn masak: no, $x
masak oh right.
mathw MAK_: This may be more recent than the last release.
masak finanalyst: nevermind. that should work.
MAK_ hmmm.... actually seems like parrot doesnt release tarballs 14:38
jnthn finanalyst: The variable in regex case doesn't quite work yet *but* bkeeler++ wrote a patch last night to make it do so, we just didn't get it in yet. :-)
MAK_ like rakudo
finanalyst perl6: my $x='a'; my $y='abc'; say ?($y ~~ /{$x}/)
MAK_ so Im getting the svn installer to get use the --gen-parrot option
p6eval elf 30125: OUTPUT«No viable candidate for call to multimethod prefix__63() at (eval 127) line 5␤ at ./elf_h line 5881␤»
..rakudo 9affb7: OUTPUT«1␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.14/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
jnthn MAK_: They do, but it's still just all around easier to use --gen-parrot 14:39
finanalyst Still regexes with variables can be made to work now, which is definitely a long way. 14:40
jnthn finanalyst: I'm not convinced that's working for the reason you expect it to, fwiw.
finanalyst How about lazy evaluation? 14:41
jnthn finanalyst: Coming along in master. :-)
finanalyst excellent.
jnthn rakudo: (1..*).map({ $_ ** 2 }).batch(20).perl.say
p6eval rakudo 9affb7: OUTPUT«(1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400)␤»
finanalyst if i read in from a file, will rakudo pull in the whole file, or execute lazily? 14:43
colomon If you use .lines, it is lazy 14:44
jnthn for $fh.lines -> $current-line { ... } # for example 14:47
colomon Except "for" itself isn't lazy at the moment, is it? 14:48
mathw I didn't think "for" was supposed to be lazy 14:49
the point is that .lines doesn't read the entire file at the start of the loop
colomon mathw: in theory, "for" is lazy, unless it is executed eagerly (like in sink context) 14:50
in practice, I'm pretty sure "for" gathers all the elements to be looped on before it starts looping. So it will read the entire file at the moment.
mathw you mean something different by 'for is lazy' than I do 14:51
jnthn for is essentially just sugar for map
(which is also eager in sink context) 14:52
colomon though again, in practice at the minute they are completely different implementations.
rakudo: for gather loop (my $i = 0; $i < 10; i++) { say "blue $i"; my $j = $i; take $j; } { say "green $_";} 14:53
p6eval rakudo 9affb7: OUTPUT«blue 0␤Could not find non-existent sub &i␤current instr.: '_block47' pc 377 (EVAL_1:155)␤»
colomon rakudo: for gather loop (my $i = 0; $i < 10; $i++) { say "blue $i"; my $j = $i; take $j; } { say "green $_";}
p6eval rakudo 9affb7: OUTPUT«blue 0␤blue 1␤blue 2␤blue 3␤blue 4␤blue 5␤blue 6␤blue 7␤blue 8␤blue 9␤green 0␤green 1␤green 2␤green 3␤green 4␤green 5␤green 6␤green 7␤green 8␤green 9␤»
mathw if I say for @a { something } I'd expect it to loop through every element of @a right there and then, which, if @a itself was lazy, would cause @a to be fully evaluated. That doesn't fit in anything in my head that says 'for is lazy'
map, on the other hand, I might expect to defer until the result array is evaluated 14:54
(in fact I would, because I learned map in Haskell originally :))
colomon mathw: unfortunately for your expectations, for and map are supposed to be identical 14:55
14:55 cotto joined
jnthn ...wow... 14:56
mathw but for doesn't have a result array 14:57
or anything to grab onto and say evaluate it
jnthn cotto: the one set of curlies followed right away by another looks odd. :-)
colomon mathw: it's supposed to have
14:57 ruoso joined
mathw whaa 14:57
colomon rakudo: map({ say "green $_";}, gather loop (my $i = 0; $i < 10; i++) { say "blue $i"; my $j = $i; take $j; })
cotto jnthn, on the wiki?
masak gotta go now. I just pushed a surprise for you. something I worked on last night. :)
p6eval rakudo 9affb7: ( no output )
jnthn mathw: Both for *and* map evaluate eagerly
masak please bikeshed while I'm away :) 14:58
colomon rakudo: map({ say "green $_";}, gather loop (my $i = 0; $i < 10; i++) { say "blue $i"; my $j = $i; take $j; }).eager
p6eval rakudo 9affb7: OUTPUT«blue 0␤green 0␤Could not find non-existent sub &i␤current instr.: '_block65' pc 454 (EVAL_1:187)␤»
jnthn mathw: in sink context
colomon rakudo: map({ say "green $_";}, gather loop (my $i = 0; $i < 10; $i++) { say "blue $i"; my $j = $i; take $j; }).eager
jnthn mathw: And lazily if the result is being used.
p6eval rakudo 9affb7: OUTPUT«blue 0␤green 0␤blue 1␤green 1␤blue 2␤green 2␤blue 3␤green 3␤blue 4␤green 4␤blue 5␤green 5␤blue 6␤green 6␤blue 7␤green 7␤blue 8␤green 8␤blue 9␤green 9␤»
mathw jnthn: so an ordinary for loop is in sink context?
cotto nm. automiscomplete
dalek kudo: c05da93 | masak++ | (2 files):
[Set.pm] new class in core

for checking subset and superset relationships. There are two sets of ops for the above: one unicode set and one 'Texas' parenthesized set. This is all a bit above and beyond the current spec, but quite close to what I envision for core.
jnthn Yes
colomon and there is the current different between for and map.
masak: \o/
jnthn masak++!!
mathw phenny: tell masak I'm disappointed that wasn't named enums
phenny mathw: I'll pass that on when masak is around.
jnthn mathw: aww! 14:59
14:59 jpzork left
mathw jnthn: I need named enums for Form.pm 14:59
and I'm in the mood for form hacking
jnthn Ah. 15:00
mathw And I don't really care what the current difference between for and map is, I want to make sure I understand what the spec is
jnthn The spec is that they're not different.
colomon well, their syntax is slightly different, obviously. :) 15:01
mathw obviously
jnthn Well, yes. :-P
15:02 MAK_ left
mathw The key is probably checking up on what sink context actually is 15:02
Because I have only a vague idea
jnthn mathw: Read sink as void perhaps.
mathw rakudo: for 1, 2 { say "sink context for loop?" }
p6eval rakudo 9affb7: OUTPUT«sink context for loop?␤sink context for loop?␤»
colomon The important point to their current difference is that if you say "for $fh.lines", it will read the entire file before processing them. Whereas if you use map, it won't.
mathw colomon: but that, to me, is clearly an implementation fault 15:03
colomon clearly it is a major implementation fault. until it is fixed, it needs to be pointed out to people, lest they innocently cause themselves serious trouble. 15:05
mathw as long as my sudden paranoia about the intended behaviour of for loops goes away, I can live with it 15:06
jnthn colomon: Wonder how hard it would be to tweak for to akshually use map
colomon: But always just .eager at the end of the lot for now
mathw I don't, after all, expect Rakudo to be usable in any kind of real code at the moment
colomon jnthn: probably not bad, but ... oooo, right.
jnthn colomon: It'd lazily evaluate the iterator then at least
colomon: oh, I remember why it's hard :-/
colomon: next/last/etc
mathw jnthn: I thought that might be why 15:07
colomon jnthn: right, mapping for to map plus... oh, damn, you're right. :(
mathw also what about for @a -> $x, $y { } - that doesn't fit very well in map's model either
colomon mathw: sure it does
jnthn How so?
mathw or does map support that
I just realised there's no reason why it shouldn't
colomon rakudo: (1...30).map(-> $a, $b { say $a * $b }).eager 15:08
p6eval rakudo 9affb7: OUTPUT«2␤12␤30␤56␤90␤132␤182␤240␤306␤380␤462␤552␤650␤756␤870␤»
jnthn rakudo: (1,2,3,4).map(-> $x, $y { say $x + $y }).eager
p6eval rakudo 9affb7: OUTPUT«3␤7␤»
jnthn heh, colomon++ beat me to it ;-)
colomon ;)
mathw that's a disadvantage of thinking of map from the Haskell viewpoint 15:09
colomon I have to admit, it hurts my brain to think about next/last/etc in map.
mathw because that's strictly one element at a time
colomon rakudo: for 1...* -> $a { say $a; last if $a > 10; } 15:12
p6eval rakudo 9affb7: ( no output ) 15:13
colomon rakudo: (1...*).map( -> $a { say $a; last if $a > 10; }).eager
p6eval rakudo 9affb7: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤Warning␤Null PMC access in isa_pmc()␤current instr.: 'perl6;Iterator;eager' pc 10741 (src/builtins/Role.pir:143)␤»
colomon ha!
that's one way to exit a potentially infinite loop....
jnthn fejl! 15:14
mathw map is going to need last/next/etc 15:15
hmmm
jnthn Think it's just exception handlers being added into map implementation 15:16
colomon we also need FIRST, etc.
seems like coming up with a unified model might not be too hard?
jnthn Maybe no 15:17
*not
jnthn is not so awesome at thinking about control-flowy matters
15:19 MAK_ joined
MAK_ Which are the first docs one must read to gte started with perl 6 15:19
*get* 15:20
mathw jnthn: it sounds like a unified model is definitely desirable
the more I think about it, the more similarity I see
and there's no harm in map being able to handle control flow exceptions of appropriate kinds, and the phasers... probably. 15:21
MAK_ Why does building parrot eat away so much memory? 15:22
15:24 ruoso left
jnthn MAK_: Building Parrot, or building Rakudo? 15:26
MAK_: If you know Perl 5 already, then moritz++ has a very good 5 to 6 series.
MAK_ perl Configure.pl --gen-parrot eats away memory
One more thing.... for the end user parrot and rakudo are the same 15:27
Computer almost hangs during the build process 15:30
jnthn Yes, both a resource-intensive to compile. 15:33
The Parrot team are looking into why compiling Rakudo is so resource heavy and last I heard had an understanding of why and an idea of how to fix it. 15:34
TimToady /e
jnthn TimToady: Right, they're evaluating the situation. :-) 15:35
TimToady e/
15:36 MAK_ left
mathw jnthn: woo 15:41
TimToady I'm back to thinking that hypers should stay transparent for now, because eager semantics kinda imply that they're more OO than listy.
and if you *do* have lists, you probably want X or Z anyway 15:43
jnthn If you want parallel processing, you'd also use hypers, even if you had lists, I guess.
TimToady also, I envisage many mathematicians will just want to say "use autohyper" and wrap «op» automatically 15:44
jnthn autohyper?
TimToady so that $a + $b always means $a «+» $b
(as in APL) 15:45
jnthn What a disgusting module. :-)
TimToady but then we still want to keep Perl precedence, and not throw it all out like APL does. :)
(though that wouldn't be an issue with subprecedence either) 15:46
but anyway, having looked over all the hyper uses in *.t, I think we'll leave it as is for now, that is, transparent
jnthn +1 15:47
TimToady the fact that there are hyper prefix/postfix also indicates that they really only work on items
but it was worth considering
and it would also be trivial for someone to add Hop to get the other semantics :)
jnthn True. :-) 15:50
Ah, the wonders of an easily extensible grammar. :-)
15:51 ajardan left
TimToady it does make me wonder, though whether putting transparent metas like R and S into upper case is a small design mistake 15:52
jnthn In what sense? 15:53
TimToady and that the uppercase should perhaps be reserved for list infixes
jnthn Oh, I see.
Hmm
TimToady so that people don't generalize falsely from X and Z to R and S
jnthn Worth considering. 15:54
TimToady I can also argue it the other way, of course, that (say) r and s don't stand out, and are likelier to cause collisions
alternately, one could steal more symbolic metas, like ! and = do already 15:55
mathw are there any symbols left?
mathw looks at his keyboard and finds only £ and € 15:56
TimToady not many new ones, but if any of the existing ones can be seen as a degenerate case, we can use that
like X is a degenerate Xop
one could, for example, imagine reusing , as a prefix to mean S 15:57
mathw well, it has connotations of sequentialness 15:58
sequentiality?
TimToady and if we hadn't done [\op] then \op could be reversed
jnthn c 15:59
TimToady even || could do as "short circuit" in a pinch
or &&op 16:00
jnthn because it's like you curl the args around
:-)
(for R )
:-)
TimToady well, but has same problem as r
cmp
mathw ccmp 16:01
hmm
so rename cmp...
TimToady rename it to...Xmp
jnthn Aye
TimToady oh wait...
mathw call it fred
jnthn Yeah, I think discussion of the cop proposal should be arrested. 16:02
mathw is supplier of handcuffs to the pun police
TimToady though I guess, techinically, the symbolic ops are also potentially ambiguous with other symbolics in the same way 16:03
mathw very true
but I don't like the idea of lowercase letters as metaops, on the surface, because the uppercasing makes it stand out
I think it does need to be uppercase or a symbol
jnthn I don't think the lower cases gain (people don't make bad analogy) is worth the lower case loss (not distinctive). 16:04
TimToady or some standard delim
r:op s:op for example
mathw that might work
I don't know if the parser would like it, but r:op has pleasant connotations with regexp modifiers
TimToady r./ r-/ ...
but the colon is looking the wrong way 16:05
mathw turns his colon upside down... and it's the same. damn.
TimToady r^op r!op
mathw r!!=
TimToady all prefix metas end in ! and ! is a degenerate case?
nah 16:06
jnthn TimToady: It may be that "uppercase = meta-op" is a more useful general guide than "uppercase = meta-op which parses as a list infix"
TimToady still a lot to be said for uppercase
mathw maybe it means the Z needs a different name 16:07
TimToady nod, just thinking through all the issues
but X is also list infix
jnthn Aye. There's no standalone R or S.
TimToady and I love X and Z for their visuals
mathw yeah 16:08
jnthn Same.
mathw I can't say it ever confused me that we have Xop and X
maybe I never thought about it
and I can't think now
it's too close to the end of the working day
good luck
16:09 SmokeMachine joined 16:13 SmokeMachine left 16:19 astrojp joined 16:21 Chillance joined
TimToady actually, I could argue \ for sequential, since [\op] reports the intermediate (sequential) results 16:23
and maybe ` for reversed 16:24
or ` is our metadelim and s`op and r`op 16:26
or s\op and r\op
I dunno, if we go that route I'm still inclined to do something that is visually small, s.op s_op s`op s^op 16:28
but something to be said for sticking to single chars too
,op for sequential and `op for reversed as a pleasing, if semantically false, symmetry 16:29
*has a
comma won't really work though--too likely to get false metas if people are golfing the spaces out 16:32
so I think the single chars have to be ` for reverse and \ for sequential, if we go with single chars
it's kind of a pity that ` 16:33
that ~ is taken already
I suppose a case could be made for %cmp as a reversed cmp 16:34
but that's too ambiguous with %, which is not a degenerate case
so %= is bad
okay, here's another thought: R and S could turn into postfix metas like = somehow 16:36
that seems intrinsically more difficult to analyze for ambiguity, however 16:39
16:39 unobe left 16:40 unobe joined 16:42 drbean joined
TimToady otoh, backformation from [\op] seems to indicate that $a \op $b should return ($a, $a op $b) 16:44
I wonder if there's any practical use for that... 16:45
I'm afraid I've exceeded my quota of impossible things before breakfast... 16:46
16:52 envi^home left
TimToady interestingly, though, it appears we have no current operators that begin with r 16:53
so rcmp isn't so bad
esp if you're canadian
jnthn EARRESTPUNTOOEARLY 16:54
m6locks ror
16:55 cdarroch joined, cdarroch left, cdarroch joined
TimToady and there are also no infixes that begin with s currently 16:55
so maybe r and s are fine
16:56 envi^home joined
jnthn not as visually distinctive though. 16:56
req vs Req
TimToady can always say r[eq] if it bothers you 16:57
jnthn huh? and type 2 more characters?!
;-)
TimToady another consideration is whether we want to encourage user-defined metas to be uppercase regardless of precedence policy 16:58
much to be said for that, too
if we have a very small arbitrary list of metaops to memorize the precedence of, it's not so very terrible 17:00
I guess we'll leave it as is for now. I do like the visual R and S as a kind of punch between the eyes.
but we had to do the analysis :) 17:01
so we can at least say "we thought about it" down the road
17:02 unobe left, quietfanatic joined 17:03 unobe joined 17:06 distrachan joined 17:07 distrachan left, dual joined
TimToady R and S are arguably easier to look up, too 17:08
17:08 payload joined
TimToady (than punctuation) 17:08
colomon is scared by what he just saw of the backlog.... and also no longer a homeowner! 17:12
17:12 cls_bsd left
TimToady hugme: hug colomon 17:13
hugme hugs colomon
17:16 payload left 17:18 stuart02 joined 17:20 stuart02 left
colomon TimToady: user-defined metaops?! 17:21
TimToady p6 is supposed to be extensible
and to the extent that it is, we want to encourage people to do it consistently and unambiguously 17:22
colomon bless you, sir
TimToady I try to be nice to homeless people occasionally.
m6locks lol 17:23
TimToady btw, === and eqv are supposed to autothread
if that makes life harder for the implementation of junctions, too bad.
colomon TimToady: please sir, do you have any spare changes? 17:25
we take both svn and git here...
colomon is strongly in favor of R and S, for what it is worth. 17:27
TimToady in that case, you don't really want any changes...
colomon You could give them to me and I'll put them to good use.... ;) 17:28
17:34 M_o_C joined
quietfanatic
.oO(clearly we ned a Jop metaop for non-autothreading on junctions...)
17:36
17:37 cls_bsd joined
jnthn back 17:38
colomon \o/ 17:39
jnthn is happy with the "keep them as R and S" outcome, but the whole discussion was interesting and very worth having. :-) 17:42
colomon I hadn't known that user-defined metaops were on the table. I'm curious what the syntax will be, or if the user will have to hack the grammar directly.... 17:46
17:46 ggoebel joined 17:47 envi^home left
jnthn colomon: anywhere there is a proto regex, it's an invitation "oh hai extend me" 17:47
Yes, you would probably have to subclass the grammar
Or some "slang" - I don't know exactly how those look :-) 17:48
17:51 unobe left, unobe joined
pugssvn r30126 | lwall++ | [S03] clarify that nearly all normal operators autothread, including === and eqv 17:52
TimToady colomon: what jnthn++ said 17:53
just because it's possible doesn't mean we have to make it easy 17:54
otoh, the current metaops are really just sugar for higher-order functions, so not that hard, conceptually 17:55
"higher-order functions" always sounds so high-falutin', like they're somehow socially superior to normal functions 17:56
maybe we should just call them metafunctions 17:57
jnthn: (still backlogging) if return can't be a normal function, then something's wrong with our ability to bind a raw parcel and pass it along 18:00
jnthn "functions that take arguments are also functions"
TimToady: Then there is something wrong with that. :-)
TimToady: The problem is this:
foo 1, 2, a => 3;
We at compile time (hand-waving a bit at the Parrot mapping) transform that into a capture. 18:01
And invoke foo
And the binder unpacks it.
So by runtime there's no Parcel to be seen.
For return we don't want that.
18:01 Psyche^ joined
jnthn And we can't re-construct a Parcel from a Capture since we've lost ordering information. 18:01
TimToady I've always argued to keep that info around somehow 18:02
I think of Capture as a Parcel with an index :)
jnthn It...sort of maybe is...kinda...
TimToady alternately, if there's a return proto, we could pay attention to it's sig
*its
jnthn What would such a sig look like? 18:03
TimToady and know not to capturize
jnthn That detail aside I'm open to such a solution though.
Especially since I can just cheat on spotting return for now.
And fill out the full implementation later. 18:04
TimToady looks like |$foo should be that
18:05 SmokeMachine joined
jnthn I don't think so. 18:05
|$foo makes a Capture
And puts it in $foo
18:05 Psyche^ is now known as Patterner
TimToady what diff if it makes it a Parcel? 18:05
jnthn (In fact, it makes a snapshot of the current capture depending where it appears in the signature)
TimToady to use it as a subsequent capture, you have to use | on it again
jnthn |$foo # Parcel in $foo 18:06
||$foo # Capture in $foo
;-)
TimToady there certainly has to be some way to grab a raw parcel
jnthn The thing is that |$foo at the moment is more than just "the capture that was passed" though
It's got that whole snapshot nature about it. 18:07
TimToady \| or |\ maybe
jnthn That'd probably be a nightmare for the Parcel equivalent. :-/
I like \|
It's going to be written *very* rarely.
Can we conservatively say that if you write \| in a signature, that is the _only_ thing you can write in it? 18:08
TimToady sure
jnthn The thought of doing otherwise gives me indigestion. :-)
OK, spec'ing something like that would seem to give us a way to resolve the issue. 18:09
TimToady consider that there will be something of that nature in the sig, even if it doesn't end up \|
jnthn OK. The syntax is almost certainly not a big deal to adapt. 18:10
TimToady one could almost argue that sigless does that, and you have to get the parcel from @_
jnthn Please no.
TimToady I said "almost" :)
jnthn sub foo { }; foo(1); # I really like that this errors
:-)
TimToady er, it shouldn't
oh, I see how it does 18:11
nevermind
jnthn
.oO( phew! )
18:12
TimToady it requires the user to mention @_ to get p5 semantics
jnthn *nod*
TimToady forgot we did that
TimToady <- loose cannon mode today 18:13
you'd think it was a friday...
18:13 frettled joined
frettled Good localtime from Maspalomas, Gran Canaria. :) 18:14
jnthn frettled: Warm? :-) 18:15
frettled jnthn: yes! We have fine-grained sand (dust, really) from Sahara now, it's almost like a baker's oven. 18:16
[particle] it's a friday?
huzzah!
colomon that means no moving cost estimators coming over for two days! (of course, there's one in the other room at the moment...) 18:17
jnthn frettled: Must make a nice chance from the cold. :-) 18:25
frettled jnthn: absolutely, it's wonderful! 18:26
jnthn :-)
18:26 pyrimidine joined
frettled I missed the Iron Man deadline, though, but right now I don't care too much. ;) 18:26
colomon frettled: oh no! if they ever update the statuses again, you'll drop! 18:37
frettled colomon: heh :) 18:38
colomon I mean, it's only be six months, right?
frettled I don't have the faintest clue
18:38 Khisanth joined 18:39 mberends joined
frettled idles again. :) 18:39
18:39 pmurias joined
colomon frettled: I'm pretty sure someone posted that a month or so ago (that they'd looked at the directory timestamps for the Ironman status images, and the newest was in October). 18:41
18:44 ShaneC joined
colomon not ok 3 - X** works 18:45
# got: GatherIterator.new()
# expected: (1, 1, 4, 16, 9, 81)
jnthn grr
colomon what I don't get is -- aren't they all GatherIterators? 18:46
jnthn Depends if something somewhere ends up packaging the iterator into something else first
colomon In fact, it's just different forms of calling the crosswith
jnthn My impression is that we should never really be returning an iterator directly... 18:47
But maybe that's wrong.
colomon we're just doing gather / take -- it returns what it returns.
jnthn gather gives back a GatherIterator, yes 18:48
That's what I'm questioning.
Whenever we see a XIterator, it feels like a bit of guts just leaked. :-/
colomon that's sort of a side problem here, though. :) 18:49
(I mean, I'd like to get the final iterator / list structure in place too...) 18:50
jnthn rakudo: sub foo() { gather { for 1..10 { take $_ } }; say foo(); say foo().perl; 18:52
p6eval rakudo c05da9: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
jnthn rakudo: sub foo() { gather { for 1..10 { take $_ } } }; say foo(); say foo().perl;
p6eval rakudo c05da9: OUTPUT«12345678910␤GatherIterator.new()␤»
jnthn The tests that do .perl I guess end up with GatherIterator 18:53
I guess maybe the tests should explicitly stringify before calling is?
I'm not sure that .perl should end up iterating the iterator, maybe it's OK to leak there.
colomon not ok 3 - X** works 18:54
# got: "0 0 1 0 0 0"
# expected: "1 1 4 16 9 81"
is what I get when I stringify both sides?!?
> say (1, 2, 3 X** 2, 4).eager.perl 18:55
(1, 1, 4, 16, 9, 81)
18:56 fglock joined
colomon I have not had enough sleep to deal with this... 18:56
or enough scotch... 18:57
jnthn :-)
The 0 0 1... is bizzare.
rakudo: say ~(1, 2, 3 X** 2, 4)
p6eval rakudo c05da9: OUTPUT«1 1 4 16 9 81␤»
colomon doubt it will show up there, is this is my local hack of the code, the way we were doing it last night again. 18:58
jnthn ah, ok
colomon I just tried adding a say to crosswith. recompiling now...
18:59 Psyche^ joined
fglock hi 19:00
colomon o/ 19:01
jnthn o/ 19:02
ooh, dinner time
\o/
fglock I'm preparing a Perlito release
just finishing some extra tests
19:03 Patterner left, Psyche^ is now known as Patterner
colomon just now looking at Set.pm -- little does masak realize that .uniq is using Hash internally, so using an Array and .uniq instead of a Hash has very little advantage at the moment.... 19:04
jnthn Oh.
fglock the Perlito Go backend is now bootstrapped - it's an important milestone to me :) 19:05
jnthn fglock: How is Go as a backend?
colomon 1 op 2 = 0
1 op 4 = 0
2 op 2 = 1
2 op 4 = 0
3 op 2 = 0
3 op 4 = 0
not ok 3 - X** works
# got: "0 0 1 0 0 0"
# expected: "1 1 4 16 9 81"
'
!!!!
fglock it is currently 2x slower than the Perl5 backend - but there is some space for optimizing 19:06
it is stable enough, the compiler is about 1MB of Go code and seems to work well 19:08
pyrimidine jnthn, bkeeler: did the 'variable in regex' stuff work out? Thinking about ab.using it to get .trans running again
19:08 drbean left, drbean joined
fglock jnthn: I think I've read in a blog that you planned to work in a .net implementation? 19:09
some time ago
not sure if it was you, sorry 19:10
jnthn fglock: I'm planning work on Rakudo coming multi-backend, and .Net is probably the most likely first additional backend (we'll keep targetting Parrot too of course)
That's after Rakudo * though.
I want to re-do object layout and some of the meta-model low level things along with that. 19:11
fglock btw, I'm trying to make Perlito runnable in Parrot 19:12
it should work, since Perlito is a subset of perl6
but I'm getting some problems
jnthn Is it an NQP-sized subset?
fglock hmm - it's a different subset
jnthn OK.
What specific issues are you running into? 19:13
fglock I've implemented a desugaring backend, that should run everywhere
I'm recompiling the latest rakudo right now, I'll try again and see how it goes
jnthn OK 19:14
fglock (done)
ah, not yet - that was the configure part
re: dinner time - we can talk later :) 19:15
jnthn fglock: Dinner time is actually more the start of a process. :-)
fglock ok
jnthn fglock: I didn't quite make it past the "what shall I cook" phase yet. :-)
colomon jnthn: so in addition to (possible) gather iterator issues, we've also got some kind of "you looked up what operator?" problems going on.... 19:16
rakudo: say 1 ** 4
p6eval rakudo c05da9: OUTPUT«1␤»
jnthn colomon: :-/
colomon 1 op 4 = 0
where op is what crosswith is getting when I do X** 19:17
jnthn add a say op
colomon will that work?!
jnthn Should.
fglock rakudo: my $c = 1; sub x { if $x { 3 } else { 4 } }; x() # does 'if' return a value?
jnthn rakudo: say &infix:<**>
p6eval rakudo c05da9: OUTPUT«Symbol '$x' not predeclared in x␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
rakudo c05da9: OUTPUT«infix:<**>␤»
19:17 bbkr joined
fglock rakudo: my $c = 1; sub x { if $c { 3 } else { 4 } }; x() 19:18
p6eval rakudo c05da9: ( no output )
jnthn my $c = 1; sub x { if $c { 3 } else { 4 } }; say x()
rakudo: my $c = 1; sub x { if $c { 3 } else { 4 } }; say x()
p6eval rakudo c05da9: OUTPUT«3␤»
fglock ok - thanks
jnthn settles on vindaloo o/
kitchen time!
bbkr rakudo: BEGIN { say "BEGIN phaser works"} INIT { say "INIT phaser works" } 19:19
p6eval rakudo c05da9: OUTPUT«Confused at line 11, near "BEGIN { sa"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
fglock looking up 'vindaloo'
19:19 mberends left
bbkr rakudo: BEGIN { say "BEGIN phaser works"}; 19:19
p6eval rakudo c05da9: ( no output )
bbkr bug?
jnthn bbkr: The BEGIN phaser...doesn't work.
bbkr: Yeah, it's on my hit list, if nobody beats me to it.
bbkr thanks for the info :) 19:20
fglock ah, it's actually portuguese origin food :)
it works better if prepared in advance 19:21
19:21 unobe left
colomon infix:<==> 19:21
1 op 4 = 0 19:22
19:22 unobe joined
colomon rthat's from X** :\ 19:22
jnthn er. wtf
OH 19:23
YOu know how I said assuming might be broken?
:-(
...it's more broken that I had energy to notice last night... 19:24
.const 'Sub' curried = 'assuming_helper'
capture_lex curried
.return (curried)
EPIC FEJL
colomon: Locate that bit of code in Code.pir
colomon: change the capture_lex line to
curried = newclosure curried
19:28 unobe left
bbkr I have an idea. If executed file is *.t then it should prepend 'lib' to @*INC by default. That will save a lot of typing in every test file. 19:28
fglock jnthn: perl6 says ":= binding of variables not yet implemented" 19:29
Perlito says "infix<=> not implemented"
:P
jnthn lol 19:30
fglock I think they will be incompatible for a while
jnthn fglock: I hope we can restore binding in the not too distant future.
colomon jnthn: trying (was called away for a diaper change back there...) 19:31
jnthn: so what's the diff between capture_lex and newclosure 19:34
I mean, besides the fact the latter works! \o/
pmurias fglock: hi 19:35
fglock: where does the perlito code live?
jnthn colomon: capture_lex = just associate the current lexical scope with this block of code as its outer
colomon: newclosure clones and then does it to the clone
pmurias fglock: ah, it's a new name for mp6
jnthn Well, clones something...not the whole bytecode or anything
fglock pmurias: github, fglock/Perlito
colomon ah. So we were getting the operator for later invocations of crosswith, eh? 19:36
jnthn colomon: So basically assuming wasn't making a closure, so you got the...right.
:-)
pmurias fglock: why did you move out of the pugs repo?
fglock pmurias: nferraz suggested moving, and git is shinier - but I think in the end it is more difficult for contributors 19:37
pmurias i use git-svn to work on mildew 19:38
fglock re name - mp6 is too generic, there are several "miniperl6" 19:39
colomon jnthn: just realized the reason we were seeing GatherIterator in the test output is that the iterator was empty! 19:40
my $test = $got eq $expected; 19:41
proclaim(?$test, $desc);
if !$test {
By the time you've gotten that far, $got (the iterator we pass in) is already empty...
jnthn oh! 19:42
colomon so if the test is correct, no worries, but if the test fails, you see a gatheriterator there.
fglock (reading about mildew) how is return() special? 19:43
pmurias special? it throws a control exception 19:44
fglock: what are you reading? 19:45
fglock www.perlfoundation.org/perl6/index.cgi?mildew
colomon jnthn: running spec tests on Xop change, if everything works will duplicate it in Zop and check in (maybe with a bit of cleanup as well). 19:46
however, there may be a nap somewhere in that schedule...
pmurias fglock: $foo = &return;$foo(123) returns from a routine
fglock nice :) 19:48
return is also an exception in Perlito-Go - but I replaced the function with a macro just today
19:49 simcop2387 joined
fglock I wonder if "$foo = &return;" would be an error if return is a macro in some implementation 19:49
jnthn colomon: cool 19:51
19:53 M_o_C left
pmurias fglock: it seems to be specced as a function 19:54
fglock: i'm adding while to Perlito
TimToady std: BEGIN { say "BEGIN phaser works"} INIT { say "INIT phaser works" } 19:55
er...
p6eval std 30126: OUTPUT«===SORRY!===␤Missing semicolon or comma after block at /tmp/oFK3vUO8oD line 1:␤------> BEGIN { say "BEGIN phaser works"} ⏏INIT { say "INIT phaser works" }␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier 19:56
..loop␤FAILE…
pmurias TimToady: my $foo = &return;$foo(123) is legal?
fglock pmurias: how are you doing it? I was wondering about some tricks with closures, to avoid reimplementing at each backend
TimToady it should be, if we make a Parcel recoverable from a Capture
or don't pre-capturize an indirect parcel 19:57
jnthn and I were just discussing that earlier today
and inventing a \|$parcel to grab the raw parcel without capturizing
(or that reparcelizes a capture) 19:58
19:58 am0c joined
TimToady I tend to view a capture as a parcel with a positional and a hash index into the real parcel arguments 19:59
pmurias fglock: i plan to fill in the While class 20:02
fglock I mean, if you implement it as an ast macro, then it will work for all backends. Implementing at the emitter level requires working out each backend. 20:03
pugssvn r30127 | lwall++ | [STD] don't assume missing block punctuation is always semi or comma 20:05
pmurias fglock: a while could be translated into recursion... but that seems to produce inefficent code 20:06
fglock: how do i recompile mp6?
fglock hmm - there are several ways - I think the most efficient is: 20:08
perl util-perl5/make.pl -Cast-perl5 && rm -rf libast-perl5 && mv libast-perl5-new libast-perl5 # create an ast-cache
perl util-perl5/make.pl -Cperl5 20:09
20:09 bacek joined 20:10 bacek left
fglock this will create a lib5-new, which you can rename to lib5 20:10
20:10 bacek joined, bacek left
fglock there are some instructions in README for the other backends 20:11
20:11 simcop2387 left, mantovani left, ingy left, solarion left, arnsholt left, doublec left, Lorn left, hanekomu left, f00li5h left, pugssvn left, literal left, p6eval left, revdiablo left, baest left, mdxi left, betterworld left 20:12 arnsholt joined 20:13 unobe joined
pmurias fglock: what's the plan/roadmap for perlito? 20:13
unobe \exit 20:14
20:14 unobe left, solarion joined 20:15 cotto_work joined, huf_ joined, japhb joined, hicx174 joined, betterworld joined, silug joined, allbery_b joined, tylerni7 joined, yahooooo joined, doublec joined, Lorn joined, hanekomu joined, f00li5h joined, pugssvn joined, literal joined, p6eval joined, revdiablo joined, baest joined, mdxi joined, barjavel.freenode.net sets mode: +v p6eval, ingy joined, mantovani joined
fglock pmurias: Perlito is "done", because it doesn't try to be complete 20:16
the initial roadmap is complete 20:17
there are some things I'd like to experiment with, like static-type optimizations and threads in Go and Lisp 20:19
and write a better regex engine 20:20
20:20 nacho left 20:21 nacho joined
fglock and at some point, Rakudo should be able to execute Perlito code directly 20:21
20:21 dalek joined
fglock and KindaPerl6 should be runnable in plain Perlito again - but that's a different project 20:24
20:28 bacek joined 20:30 justatheory joined
pugssvn r30128 | lwall++ | [S06] spec the \| parcel parameter syntax 20:36
20:37 nacho left
fglock pmurias: why do you ask for a plan? 20:42
pmurias fglock: what do you intend perlito to become. grow it into a fully fledged Perl 6 implemanation, a limited and fast and usable one or just experiment with a lot of backends 20:45
fglock currently it's going in the "limited and fast and usable" direction 20:46
there is a core that works everywhere, and then each backend has it's own special features 20:48
20:49 hanekomu_ joined 20:50 iblechbot left
jnthn bkeeler: ping 20:51
20:51 nacho joined 20:56 ggoebel left
fglock pmurias: "usable" is the hard part right now 20:56
20:57 nacho left, fridim joined 20:58 pyrimidine left
pmurias fglock: having an easy way to recompile mp6 would be usefull 21:00
recompiling only the files that changed
fglock the ast cache is meant to help; static backends do need to recompile everything, unless there is some complex dll infrastructure 21:02
pmurias fglock: the p5 backend doesn't 21:03
fglock: one bug i noticed is that 1 < 2; loops
* hangs up
fglock you can recompile a single file with mp6.pl 21:04
looking
perl mp6.pl -Cperl5 lib/....pm > tmp.pm && cp tmp.pm lib5/...pm 21:05
pmurias: '<' is just not implemented 21:07
pmurias fglock: got the while working for the perl5 backend
fglock cool :) 21:08
pmurias can i have a commit bit? ;) 21:09
fglock yes - let me find how
pmurias Admin > Add Another Colaborator 21:10
fglock done
pmurias fglock: comitted 21:23
fglock thanks! 21:24
pmurias there are some files in perl5 which are missing from the repo should i add them? 21:25
fglock 3 backends to fix...
in lib5? yes, please
pmurias rm: cannot remove `libast-perl5-new': No such file or directory when running the tests for -Bgo 21:28
and hangs on t/01-sanity.t
sorry my error
fglock what happened?
pmurias a missing ' in the shell ;) 21:29
pmurias installs go 21:32
jnthn colomon: BTW, figured out what the OPER means.
It's the thingy that the operator precednece parser looks for the O magical hash in.
(and thus the precedence info) 21:33
21:34 ggoebel joined 21:36 ggoebel left
pmurias fglock: does prove -e "perl mp6.pl -Bjs" work for you? 21:38
21:40 rv2733 joined
fglock yes, it works - which javascript do you have? 21:42
colomon jnthn: maybe that explains my fail last night when I tried to change the grammar -- I think that was the very first thing I removed. ;)
pmurias i get an't use string ("0") as an ARRAY ref while "strict refs" in use at /home/pawel/Perlito/lib5/MiniPerl6/Javascript/Emitter.pm line 23.
t/01-sanity.t ..............
Dubious, test returned 255 (wstat 65280, 0xff00)
jnthn colomon: Heh, it's not like I knew what they did until a few moments ago too. :_)
colomon and yes, I've been napping almost continuously since I said "I think I might nap." 21:43
spectest passed, so time to get patching further...
jnthn \o/
21:44 Sarten-X joined
jnthn colomon: I think I also figured out how to do the NQP bootstrap thing and update the Parrot one too. 21:44
colomon jnthn: I don't remember exactly what you were trying to do there, but \o/
;) 21:45
jnthn colomon: Well, it means I actually know (in theory) the process we need to go through in order to patch NQP. :-)
Which is kinda Good To Know. :-)
colomon :)
fglock pmurias: did you recompile lib5? I'll recompile here, maybe I get the error
pmurias fglock: i recompiled it yes 21:46
fglock ok
pmurias: I can reproduce the error 21:49
can't
21:49 jhuni joined
fglock does this fail too? $ perl mp6.pl -Cjs t/01-sanity.t 21:51
21:52 wknight8111 joined
fglock running a perltidy'ed lib5/MiniPerl6/Javascript/Emitter.pm will help finding the error position 21:53
(running util-perl5/bootstrap-perl5.sh here, just to be sure) 21:54
jnthn Ouch...gen_core.pm really takes some time these days :-/ 21:55
fglock jnthn: is there a description of the new rakudo regex internals somewhere?
maybe in the source code 21:56
jnthn fglock: Not beyond the README and then intros to various source code files, as far as I know. 21:58
fglock: It's all in the nqp-rx repository
fglock: The basic overview though is that it's bootstrapped, so the regex parser is written in Perl 6 regex. 21:59
fglock: And it generates PAST::Regex nodes
that is, it falls into the general AST structure that everything else does.
colomon: I'm attempting to put my new found knowledge of the OPP to good use. :-) 22:00
colomon :)
jnthn rakudo: say (1,2,3).reduce(&infix:<+>) 22:01
p6eval rakudo c05da9: OUTPUT«6␤»
jnthn rakudo: say reduce(&infix:<+>, [1,2,3])
p6eval rakudo c05da9: OUTPUT«Could not find non-existent sub &reduce␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn awww!
colomon Hmmm... trying to remember why I didn't implement that... 22:03
jnthn colomon: Should it exist?
colomon I think so. I think there was a complication when I tried to do it. 22:04
jnthn OK
I...may try it... ;-)
colomon it's in the spectest, at any rate.
go jnthn go!
colomon is hoping there is nom in his near future... 22:06
22:08 bacek left
pmurias fglock: an't use string ("0") as an ARRAY ref while "strict refs" in use at /home/pawel/Perlito/lib5/MiniPerl6/Javascript/Emitter.pm line 23. 22:08
t/01-sanity.t ..............
sorry
Dubious, test returned 255 (wstat 65280, 0xff00)
fglock: (@$pos).>>emit_javascript causes the error
with @{@{ $pos }} being in the emitted file 22:09
fglock looking here
I see the wrong code here - but why does it work for me? 22:10
colomon jnthn: these compiles really are getting painful now, aren't they? 22:12
22:12 nihiliad left
pmurias perl6: my $a := [1,2,3];my $c = 0;for $a -> $b {$c += $b}; 22:12
colomon jnthn: wonder if there's some sort of O(N^2) issue in there we're just now getting large enough to really trigger...
p6eval elf 30128: OUTPUT«Unknown rule: infix_postfix_meta_operator:=␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
..rakudo c05da9: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16934 (src/builtins/Junction.pir:399)␤»
..pugs: ( no output )
pmurias pugs: my $a := [1,2,3];my $c = 0;for $a -> $b {$c += $b};say $c; 22:13
p6eval pugs: OUTPUT«6␤»
pmurias pugs: my $a := [1,2,3];my $c = 0;for @$a -> $b {$c += $b};say $c;
p6eval pugs: OUTPUT«6␤»
jnthn colomon: It may be that 22:14
colomon: It may inadvertantly be masak++'s set class.
colomon: afaik it's the first thing that uses chars outside of latin-1
(in the setting)
colomon: And I think there's transcoding to latin-1 if it determines it can get away with it 22:15
Or something.
Otherwise we hit the UTF-8 codepath and it's horribly slow
My recollection is hazy, but if that is the issue...well...it sucks.
But it's possible.
DAMM I hate this website! 22:16
www.sj.se/messages/error/general.fo...rException
...
fglock pmurias: I found the bug in the perl5 emitter "hyper"
fixing - but I wonder why my perl doesn't say anything about it (v5.8.8) 22:17
pmurias isn't the solution to change @$pos.>> to $pos.>>? 22:18
colomon jnthn: I was wondering if it might be O(N^2) in memory -- that might be the sort of thing you'd miss for a long time and then get slammed hard by once it got big enough. 22:19
jnthn: which isn't to say I know of any flaws in your theory. ;)
pmurias perl6: say [1,2,3].>>perl.perl 22:20
p6eval pugs: OUTPUT«("1", "2", "3")␤»
..rakudo c05da9: OUTPUT«Confused at line 11, near "say [1,2,3"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
..elf 30128: OUTPUT«Parse error in: /tmp/2uYGAUieiI␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say [1,2,3].>>perl.perl␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_red/std.rb…
22:21 Teratogen joined
Teratogen when is Perl 6 gonna be released, dammit 22:22
fglock pmurias: I'd rather have explicit conversions for now, to keep the implementation simpler - but the current impl is missing the test for the '@' sigil (see For impl)
colomon jnthn: spectest in progress here with full Xop and Zop changes, but I'm going to be gone a-nomming by the time it's done, I fear. Will push when I return.
Teratogen when is Perl 6 gonna be released, dammit 22:23
TimToady Teratogen: depends on how many of us impatient people hack on it.
we want it worse than you do
Teratogen is anyone actually using Perl 6 in a real project? 22:24
sjohnson Teratogen: you can use rakudo now anyways
and yes
fglock (at p5 emitter line 330)
22:24 snarkyboojum joined
sjohnson few guys are writing cute games in perl 6 22:24
a few*
perl 5 is still pretty handy 22:26
jnthn colomon: OK, cool. :-) 22:27
22:28 SmokeMachine left, pmurias left
jnthn ffs. In the time I've spent screwing around with the swedish railways website, seeing it fail in various ways and still not having managed to buy a ticket, I could have walked to the station, got the ticket, gone for a beer and come home and still had time to spare. :-/ 22:36
The barrier for "ready for production" is apparently very, very low. 22:37
pugssvn r30129 | lwall++ | [STD] missing punctuation message should point to before any whitespace 22:39
22:40 ggoebel joined
TimToady jnthn: I specced your \| for you so we can haz a prototype for return 22:40
s/prototype/signature/
jnthn TimToady: I noticed.
TimToady: Thanks. :-)
TimToady: I may even get to sorting return out this evening 22:41
TimToady if necessary, we can require predeclaration on that one, I suppose
jnthn Cool
jnthn is currently distracted hacking on Shiny Stuff.
:-)
And pondering Russia. 22:42
jnthn has an invite and is very tempted.
22:44 ggoebel left 22:45 snarkyboojum left, ggoebel joined
sjohnson i think my boss is starting to realize that Perl is a pretty big deal as of late 22:45
22:46 ggoebel left
sjohnson i have been using PHP to slurp up binmode STDOUT from perl stuff i write a lot lately 22:46
22:47 REPLeffect joined
fglock .oO( Perlito in PHP? ) 22:48
jnthn colomon: Not compiling Set.pm does appear to get us a win. I suspect it is that UTF8 parsing is dog slow. 22:50
22:53 REPLeffect left
TimToady first think STD does is unpack('U*') to an integer array :) 22:54
(though it also uses the string still for some testing) 22:55
jnthn Yeah...don't think we quite want to re-do a strings implementation as well. :-)
TimToady UTF8 will suck out your soul
jnthn Rakudo already swaps out half of Parrot. ;-)
(OK, I exagerate. A bit.) 22:56
22:56 snarkyboojum joined
TimToady and parrot is already committed to switching to NFG 22:56
jnthn Yes.
Quite.
jnthn wonders when that happens...
oh yay 22:57
> say [+] 1,2,3;
# generating for +
6
TimToady \o/
jnthn Now to find out if I broke the parser. :-)
Though if it compiled the setting, it can't be too broke.
mathw \o/
jnthn > say [].WHAT 22:58
Array()
> say [1].WHAT
Array()
> say [+1].WHAT
Array()
Well, it can't be so bad
:-)
mathw looking good 22:59
jnthn > say [-] 1,2,3
-4
> say [R-] 1,2,3
2
fglock pmurias: the hyper-op problem is fixed 23:01
jnthn
.oO( need to fix Rakudo's hyper-op problem too... :-) )
sorear jnthn: How do I easily share code between PMCs? 23:06
23:06 REPLeffect joined
sorear I may be killing p5Invocation, but Sub, Scalar, and Interpreter all need to do PCC<->P5Stack copying 23:07
23:09 quietfanatic left
jnthn sorear: When I needed that, I just popped it in a .c file, created a .h, #include'd that in the PMCs, and make sure it got linked in to perl6_group.dll 23:09
(blizkost_group.dll in your case)
sorear: I think that's what we do with bind.c in Rakudo. 23:10
23:12 rv2733 left
lue Hello! 23:15
23:15 xomas joined, xomas left, xomas joined
jnthn lue: oh hai 23:21
pugssvn r30130 | lwall++ | [S03] document that R does not change associativity 23:24
23:25 cotto left
jnthn wknight8111: About? 23:25
sorear jnthn: Ick at not being able to use 'make headerizer'. 23:26
Teratogen when is Perl 6 gonna be released, dammit
lue who knows?
dalek kudo: 53ace9a | jonathan++ | src/ (3 files):
First cut of reduce ops. Don't handle the triangle case yet (but it's an uncomment and some LHF away for some enterprising soul).
snarkyboojum only just got the Rakudo *, Rakudo Whatever connection :) 23:27
wknight8111 jnthn: pong?
jnthn wonders if Teratogen is just a bot that asks that question every so often, to motivate the Perl 6 devs to stay hard at work :-)
TimToady could be
jnthn wknight8111: I just managed to catch a slightly bewildering segfault in Parrot. 23:28
TimToady if so, it's just slowing us down, so should be kicked
wknight8111 jnthn: orly? details?
lue snarkyboojum: unintentional pun
jnthn wknight8111: Sketchy, it only happens some of the time too
Teratogen I am not a damned bot!
wknight8111 (typing with baby asleep in one arm. brevity.)
snarkyboojum lue: unintentional?
TimToady then listen to our answers, dammit! 23:29
sjohnson Teratogen: yeah, it's not ready for production use yet, and there is no set deadline
jnthn wknight8111: but when it does, it's trying to clone an Exception PMC
wknight8111: Which falls back to the default freeze it then thaw it code
wknight8111 I dont know if Excption supports any of that
jnthn wknight8111: Well, it's in an Object PMC that gets cloned 23:30
TimToady Teratogen: the only requirement is that it is a convergent process; as long as that holds, the answer is "Soon enough."
jnthn And thus it ends up being cloned itself.
wknight8111: Rather than us trying to directly do it. :-)
wknight8111: Anyway, I'm not sure how related to Exception it is.
wknight8111 inherits from Exception?
sjohnson Teratogen: it will be ready when your heart is ready for it 23:31
jnthn Guess so.
wknight8111 or delegates?
TimToady hugme: hug Teratogen Real Hard
hugme hugs Teratogen Real Hard
jnthn wknight8111: Hard to tell immediately from the C debugger ;-)
wknight8111 ok
jnthn wknight8111: The really odd thing is this. It *looks* like the ImageIO's ->todo pointer which gets init'd to an RPA somehow has a NULL address in ->VTABLE->push_pmc 23:32
wknight8111 urg.
jnthn Yes, that's what makes me think this isn't specific to Exception in any way.
I checked the ImageIO's mark routine, and that it's set for custom marking, in case GC is happening at some point during this. 23:33
Teratogen I guess what I want to ask is, when will Perl 6 be ready to do serious production work?
jnthn The ImageIO PMC is only referenced on the stack if GC happesn at that point.
But I thought Parrot could handle those cases fine, so I ain't sure it's just that.
sorear Teratogen: Perl 6 was released years ago, it's actually a pretty good language now. The library situation sucks, but you can help fix that!
Teratogen: People are using it in production now. Not many of them, but some. 23:34
sjohnson Teratogen: probably 2-12 months ?
maybe less?
TimToady really depends on your definition of "serious"
I wouldn't use it for designing airliners just yet.
jnthn wknight8111: Anyway, thought I'd mention it in case you had any memories of debugging in that area. :-)
wknight8111: It's rather hard to formulate a decent ticket on it. 23:35
I only get it one run in 5 or so under the debugger.
wknight8111 jnthn: it sounds similar to a bug we had in the past 23:36
the imageIO was getting prematurely collected and recycled
because the ->todo shoulb be set in the init routine
jnthn Yeah, I see it should be. And walking up the call stack, I don't see why it woulnd't be. 23:37
2 frames up is:
PMC *image = Parrot_pmc_new(interp, enum_class_ImageIO);
VTABLE_set_pmc(interp, image, pmc);
return VTABLE_get_string(interp, image);
TimToady Teratogen: Rakudo * (and successors) is intended for serious early adopter production, so that we will have some confidence that we can lock down a 6.0.0 api we can stick with over the long haul
jnthn And it's that image PMC that's seeing to lose its ->todo, or have its ->todo collected. 23:38
wknight8111 yeah, so thats probably it
TimToady but early adopters will understand that we can still break things to fix things before 6.0.0 23:39
jnthn wknight8111: It does occur to me seperately, that every time we have to go thorugh freeze/thaw default clone implementation, it's hideously expensive compared to the PMC knowing how to clone itself.
wknight8111: It may be interesting to see how often it gets hit. 23:40
TimToady esp if you can clone value bits by merely copying a ref
wknight8111 yes
Teratogen ok
jnthn wknight8111: Actually I'm curious...
wknight8111: I'll try it now and try and get a feel for how often it is. :-) 23:41
TimToady Teratogen: as I said at the top; we're more impatient about this than you are :)
wknight8111 okay, thanks
Teratogen I'd love to start writing Perl 6 modules
jnthn TimToady: Yes, indeed. And freeze/thaw allocates some PMCs to do its work too, so it's lose all around.
TimToady you can now, if you don't mind 'em bitrotting occasionally 23:42
23:42 nihiliad joined
TimToady the STD parser is a Perl 6 module that I've been working on for years now 23:42
23:42 cotto joined
fglock Perlito 4.0: github.com/fglock/Perlito/tree/7f0a...b37cbd7b6e 23:43
pmurias++ # thanks for testing
wknight8111 jnthn: if you see it again, take a backtrace. I'd like to see it 23:44
23:44 dual left
jnthn wknight8111: Will try and do so. 23:44
wknight8111 if the PMC is not anchored anywhere, and the optimized build keeps it off the stack for long enough, it could be getting collected
thanks
23:45 dual joined
jnthn wknight8111: We actually end up hitting the default freeze/thaw even in "say 42" 23:45
Twice.
lue STD.pm: the hopeful end-result of any decent P6 implementation :)
wknight8111 ouch
jnthn: we definitely need to avoid that 23:46
jnthn let me dump the PMC type id too
wknight8111 I think we've recently decided that clone should be shallow by default, so it's going to have different semantics from freeze/thaw anyway
please do!
jnthn wknight8111: is it SELF->vtable->id ?
oh no, it's base_type, ain't it... 23:47
wknight8111 pmc->vtable->base_type
pmc->vtable->whoami may be more informative (that's the string name of the type) 23:48
jnthn it's OK, an ID is easy enough to look up too
Mostly I want to see if it's all the same one or a whole mixture.
All the same 23:49
Always 6
(Exception)
colomon you got reduce ops up!?! 23:53
jnthn colomon: Yeah 23:54
rakudo: say [*] 1..10
p6eval rakudo 53ace9: OUTPUT«3628800␤»
colomon \o/
jnthn rakudo: multi postfix:<!>($n) { [*] 1..$n }
colomon except for the part where I have to recompile and retest... ;) 23:55
p6eval rakudo 53ace9: ( no output )
jnthn rakudo: multi postfix:<!>($n) { [*] 1..$n }; say 5!
p6eval rakudo 53ace9: OUTPUT«120␤»
jnthn colomon: Did you re-structure infixish to be more stdish?
:-)
jnthn looks forward to colomon++'s patch too 23:56
colomon: I think we can probably have hyper ops pretty soonish too.
sorear woah!!!!
reduce AND custom infix?
colomon++ 23:57
jnthn sorear: custom postfix. :-)
sorear er
right
either way.
jnthn Custom prefixes and infixes do also work.
sorear But not (post)circumfixes? 23:58
jnthn You can override the existing ones.
(postcircumfixes that is)
Well
You can do like
method postcircumfix:<( )>($c) { ... }
If you want to be able to override invocation 23:59
And [ ] and { } are also possible. :-)
I think custom ones (and circumfixes) would perhaps count as things you have to do with slangs. Maybe.
sorear Slangs?