|
»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moderator on 7 October 2009. |
|||
| quietfanatic | Yeah. It ought to find the right file if nobody's chdir'd | 00:00 | |
| Tene | unless it's in their $PATH ;) | 00:01 | |
| quietfanatic | Oh. | 00:02 | |
| Of course, I could examine %ENV{PATH}... | 00:03 | ||
|
00:03
Limbic_Region joined
|
|||
| quietfanatic | ...but that may just be the beginning of a wild goose chase. | 00:03 | |
| Tene | look at Perl's FindBin library for ideas. | 00:04 | |
|
00:07
tylerni7 joined
|
|||
| quietfanatic | Another thing: Is there a way to get a file's modification time? | 00:12 | |
| $file ~~ :M does not work. | |||
| I conclude I shall use `stat` | |||
|
00:16
r0bby joined
00:26
charsbar joined
00:28
envi^office joined
|
|||
| ShaneC | does rakudo implement exceptions at all yet? | 00:38 | |
| Tene | ShaneC: Yes, but not extensively. | ||
| ShaneC: what do you want to do with them? | 00:39 | ||
| ShaneC | just basic try/catch | ||
| Tene | Sure. Just put a CATCH {...} block in another block. | 00:41 | |
|
00:43
crythias joined
01:16
ihrd joined
01:17
orafu joined
01:18
SmokeMachine joined
01:19
KyleHa joined
01:25
xenoterracide joined
01:35
hello joined
01:39
msmatsko joined
01:46
ihrd joined
01:55
ihrd left
|
|||
| diakopter | first post! | 02:06 | |
| snap out of it | |||
| o wait. | 02:07 | ||
| diakopter hides | |||
| PerlJam | hiding doesn't do much good if you keep making noise | 02:08 | |
| diakopter | heh | ||
| sjohnson | howdy | 02:14 | |
| pugs_svn | r28658 | lwall++ | [STD] properly check dups inside individual sigs of a multisig | 02:15 | |
| r28658 | without interering across different sigs, or with only-ness in the body. | |||
| PerlJam | "interering"? | 02:17 | |
| :) | |||
| diakopter am writing up notes for redoing sprixel's object/type/calling-conventions (the *right* way this time), now that the interpreter engine proves stable for any sort of control flow | 02:18 | ||
| PerlJam | btw, diakopter++ for sprixel | 02:19 | |
| diakopter | thanks :) | 02:23 | |
| PerlJam wonders if the book should mention the other perl6 implementations and give URLs for them | 02:39 | ||
|
02:40
ihrd joined
02:45
Confield joined,
Confield left,
Confield joined
02:48
xinming_ joined
03:03
SmokeMachine joined
03:19
ihrd joined
03:23
Ryan52 left
03:25
[bjoern] left
|
|||
| Patterner | "illegal hardware instruction perl6" | 03:36 | |
|
03:50
am0c joined
04:00
ihrd left
04:10
Confield left
04:27
muri joined
04:35
ihrd joined
|
|||
| pugs_svn | r28659 | lwall++ | [Cursor] don't delete important bits of the cached settings, duh | 04:50 | |
|
05:12
nbrown_ joined,
justatheory joined
05:33
szabgab joined
05:46
snearch joined
|
|||
| moritz_ | good morning | 06:10 | |
| TimToady | guten abend | 06:13 | |
|
06:15
ihrd left
|
|||
| sjohnson | (´ー` ) | 06:19 | |
|
07:07
mberends joined
07:08
rfordinal joined
07:10
iblechbot joined
|
|||
| bAUt | ( `ー´) | 07:17 | |
|
07:30
mariuz joined
07:58
Grrrr joined
08:04
simcop2387 left
08:15
|Jedai| joined
|
|||
| pugs_svn | r28660 | lwall++ | [STD] parse quasiunquotes correctly | 08:18 | |
| r28660 | [STD_P5] prefix regex categories with p5 more consistently | |||
| r28661 | lwall++ | [rx.t] :Perl5 goes outside of // for now | 08:20 | ||
| jnthn | oh morning | 08:28 | |
|
08:31
zloyrusskiy joined
08:33
maja joined
|
|||
| moritz_ | \\p/ | 08:35 | |
| Matt-W | \\o/ | 08:37 | |
| sjohnson | \\ö/ | 08:42 | |
| Matt-W | :D | 08:46 | |
| sjohnson++ | |||
|
08:47
rfordinal left
|
|||
| sjohnson | (´ー` ) | 08:47 | |
| carlin | Unicode art; who needs real conversation anyway? | 08:50 | |
| jnthn | Conversation is srsly overrated. | 08:51 | |
|
08:59
mzedeler joined
09:30
NorwayGeek joined
|
|||
| jnthn | (doing stuff at compile time)++ | 09:39 | |
| (doing said stuff we used to do at runtime in PIR at compile time instead but in NQP)++ | |||
|
09:40
riffraff joined
|
|||
| Matt-W | jnthn++ | 09:43 | |
|
09:44
rgrau` joined
09:49
masak joined
|
|||
| masak | good day, #perl6. | 09:49 | |
| moritz_ | \\o/ | ||
| Matt-W | oh hai masak | 09:50 | |
| jnthn's been muttering about doing things at compile time in NQP that we used to do in runtime in PIR. I'm encouraged. | |||
| jnthn | yayitsmasak | 09:51 | |
| masak: timezone sync status? ;-) | |||
| jnthn is slipping back into late nights and late mornings now his jetlag is wearing off. | |||
|
09:53
drbean_ joined
|
|||
| jnthn | Matt-W: If you're interested, compare what was removed in github.com/rakudo/rakudo/commit/263...1407ff2f5c with what was added in github.com/rakudo/rakudo/commit/c83...cb063b014c | 09:53 | |
| masak | jnthn: today marks the first honest attempt to re-sync in a long time. result: FAIL. but still. | ||
|
09:54
am0c joined
|
|||
| jnthn | o/ am0c :-) | 09:55 | |
| Matt-W | jnthn: does all that stuff you removed only do what the added stuff does? | ||
| because that's immensely cool | |||
| am0c | \\o/ jnthn OH HAI | ||
| jnthn | Matt-W: Yes | 09:57 | |
| Matt-W: Well | |||
| Matt-W: It did one thing. | |||
| That what went in does not do. | |||
| Which I'm not sure how to handle yet. | |||
| But it pretty much decides all of the stuff at compile time and emits code to build a correct signature. | 09:58 | ||
| Rather than figuring it out at runtime as the PIR did. | |||
| I mean, if we've got all the information... :-) | |||
| I now make it about half way through the setting, them something explodes when compiling Rat. :-/ | 09:59 | ||
| Matt-W | cool | 10:02 | |
| What's the thing it doesn't do? | |||
|
10:02
simcop2387 joined
|
|||
| jnthn | Consider: | 10:02 | |
| subset Odd of Int where { $^n % 2 }; | 10:03 | ||
| multi foo(Odd $x) { } | |||
| multi foo(Int $x) { } | |||
| So we expect foo(3) to call the first of those, not the second. | |||
| Matt-W | We do | ||
| jnthn | But for that to happen, we have to take Odd, identify that it's a refinement type, pull out the thingy it's refining (Int) and stick that as the nominal type, and boot the Odd over to the constraints. | 10:04 | |
| Probably. | |||
| Or at least, that's what we were doing before now. | |||
| Though out of curiosity... | |||
| Matt-W | So what you were doing is transforming it into | ||
| jnthn | rakudo: subset Odd of Int where { $^n % 2 };; say Odd ~~ Int | 10:05 | |
| p6eval | rakudo 30e2cf: OUTPUT«1» | ||
| jnthn | Oh hmm. | ||
| Matt-W | multi foo(Int $x where { $^n % 2 } ) | ||
| jnthn | Matt-W: Yeah. | ||
| moritz_ | I think TimToady once mentioned that subset types are notionally inlined | ||
| jnthn | We may *just* get away with it. | ||
| Matt-W | Provided your candidate sorting on wheres is okay, it's probably fine | ||
| jnthn | But I think we need to really split it up. | ||
| My problem is that at the moment, I don't have a way to know - at compile time - if what I have is a refinement type or not. | 10:06 | ||
| Matt-W | Although it might lead to LTA error reporting | ||
| Ah | |||
| Hmm | |||
| that's a bit of a problem | |||
| moritz_ | jnthn: but you can know at CHECK time, no? | 10:07 | |
| jnthn | The role stuff we can figure out easy enough, the fact that the user didn't write a type on something and that we need the default we can also figure out. | ||
| moritz_: Actually I think we *can* know at compile time. | |||
| moritz_ | can subset types be stubbed? | ||
| jnthn | Hmm. Not sure. | 10:08 | |
| moritz_: The issue is more than we don't have the infrastructure at the moment to know. | |||
| Matt-W | And at compile time, is there a problem if the subset type hasn't been declared yet, or is predeclaration enforced in Perl 6 for that sort of thing? | ||
| moritz_ | well | ||
| you can say ::Odd | |||
| jnthn | Well, there's that too, yeah...what if it's a late-bound lookup. | 10:09 | |
| moritz_ | which means "that's a type, I'll declare that later" | ||
| jnthn | Careful. | ||
| ::Odd inside a signature is a type capture. | |||
| moritz_ | oh | ||
| right | |||
| jnthn | Which is the case that I'm considering here. | ||
| I don't think there is a way to build a signature from a not yet declared type. | |||
| (I think I consider that a good thing...) | 10:10 | ||
| Matt-W | WEll | ||
| it would be quite tricky, since you don't knwo what the type is | |||
| moritz_ | and you can't do any sorting at compile time | ||
| Matt-W | And I suppose you can't really build it incomplete, and come back later | ||
| jnthn | Yeah | ||
| Matt-W | Does that mean you need to be able to build them at runtime as well | ||
| jnthn | So anyway, I expect by the time we hit the Odd in the signature we know what kind of type it is. | ||
| Even if it's stubbed, I highly doubt you can stub something as a class and then define it as a subset type. | 10:11 | ||
| I'd think std says no to those kinda tricks. | |||
| Matt-W | Well that'd be a name collision wouldn't it | ||
| moritz_ | std: class A { ... }; class A { } # sanity check | ||
| jnthn | std: class Foo { ... }; subset Foo of Int; | ||
| p6eval | std 28658: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol GLOBAL::<A> (from line 1) at /tmp/GsE9hZKcli line 1:------> [32mclass A { ... }; class A[33m⏏[31m { } # sanity check[0mFAILED 00:01 96m» | ||
| std 28658: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol Foo (from line 1) at /tmp/EcYNnXY1jv line 1:------> [32mclass Foo { ... }; subset Foo [33m⏏[31mof Int;[0mFAILED 00:02 96m» | |||
| Matt-W | 'This name already exists as a class, go away' | ||
|
10:11
drbean left
|
|||
| moritz_ | it doesn't do any sstubbing at all, it seems | 10:12 | |
| jnthn | Oh, I thought that had been put into std. | ||
| I musta been mistaken. | |||
| moritz_ | I thought so too | ||
| maybe it got b0rked by some other change | 10:13 | ||
| jnthn | Anyway, I rather hope the kind of a type can't change, so I think with the right infrastructure we'll be able to know that at compile time. | ||
| Matt-W | I don't think the kind of a type *should* be able to change | ||
| jnthn | For now, I suspect I'll have to check it at the time we build the signature (check). | ||
| oh hmm | 10:14 | ||
| We go explodey on our Int multi(...) { ... } | |||
| Matt-W | is that... a sub called multi | ||
| jnthn | oh no | ||
| I shoulda really copied it | |||
| I was getting at, compiling a multi method with the "our Int" bit out front. | 10:15 | ||
| Matt-W | ah | ||
| jnthn | I suspect it may be the call to the trait handler though. | ||
| Matt-W | so is it the our or the return type | ||
| ah | |||
| moritz_ | I think much of that 'our Int' is bogus, especially on methods | ||
| jnthn | Yeah | ||
| It's probably on the call to trait_mod:<of> | 10:16 | ||
| Matt-W isn't sure yet why you need 'our' methods | |||
| jnthn | That probably just means I've a bug when building the sig for one of the trait_mod:<of> multi variants. | ||
| Matt-W | Given what you're doing, that seems plausible | 10:17 | |
| jnthn | It's kinda challening to hack on some of this stuff. | ||
| Matt-W | I bet | ||
| That's why I'm not doing it | |||
| jnthn | Mostly because you have to compile the setting before you can run the tests. | 10:18 | |
| And compiling the setting and surviving its init sequence is actually quite hard. | |||
| Matt-W | Well | ||
| it's a test :) | |||
| jnthn | The trait mods are probably some of the deepest use of multiple dispatch in the entire setting. | ||
| moritz_ | well, compiling the setting worked, no? | ||
| Matt-W | A very big, very mean test | ||
| jnthn | moritz_: Yeah, it does not, it blows up at init time. | 10:19 | |
| aha | |||
| moritz_ | you can also try to run some basic tests with the s1 compiler | ||
| jnthn | figured it. | ||
| moritz_ | or did we move say/print to the setting? | ||
| jnthn | moritz_: Yes, I've been playing with the s1 a lot. | ||
| moritz_: We moved say/print to the setting | |||
| moritz_ | oh | ||
| jnthn | moritz_: However, die ... will throw an exception with the output you desire. ;-) | 10:20 | |
| moritz_ | so no .t file runs without compiling the setting. Ha. | ||
| jnthn | moritz_: I think we may end up though, having a PIR-based minimal "setting". | ||
| That we don't compile in at all other than to the stage 1 compiler. | |||
| Yes, correct. That's why this is a pain. :-) | 10:21 | ||
| colomon | jnthn: does something in Rat really generate an "our | 10:49 | |
| Int multi"? | |||
| jnthn | colomon: Num not Int actually | 10:51 | |
| line 36 | |||
| colomon | ah, sure | ||
| I did that. | |||
| must have copied and pasted from somewhere, as I do not usually use "our" or return types. | 10:52 | ||
| jnthn | colomon: It's valid Perl 6, just hits a bug. | ||
| In the refactor I'm doing. | |||
| (So I need to isolate and fix the bug...) | |||
| If I didn't hit it here, I'd do so in the spectets anyway. | 10:53 | ||
| colomon | understood, and good hunting | 10:54 | |
|
11:13
ihrd joined
11:29
ihrd left
|
|||
| jnthn | Initial signs are that changing the way we construct signatures at startup has won us another 10% saving. | 11:30 | |
| Matt-W | yay! | 11:31 | |
| jnthn++ | |||
| jnthn | Provided fixing up spectests doesn't cause any slow-down, it seems the last few days changes since I started on re-working signatures have taken away 20% of our startup time. | 11:32 | |
| spinclad | sweet! | 11:33 | |
| jnthn | Since we spend plenty of startup doing dispatches to set various things up, I'm hoping that as dispatch gets faster (next steps in what I'm working on over the next week or so) we'll shave yet more off. | 11:34 | |
| Matt-W | :) | 11:35 | |
| spinclad | (burning fat out of the layers of interpretation)++ | ||
|
11:37
ihrd joined
|
|||
| masak | all speedups are very welcome indeed. | 11:37 | |
| ihrd | hi there | ||
| masak | hi ihrd! | ||
| ihrd | masak: hello | 11:38 | |
| colomon | does someone remember where pmichaud's awesome short card script lives online? I know I found it for someone else a few month's back, but I don't remember where I found it now... | ||
| rgrau` | colomon: They are in one of his slides IIRC | 11:41 | |
| colomon | yes... | ||
| masak | colomon: it can also be found in the "Perl Myths" talk on SlideShare. | ||
| probably not copyable, though. :/ | |||
| colomon | Ha! | 11:42 | |
| carlin | gist.github.com/153993 | ||
| colomon | that reminded me, I actually have a copy. | ||
| locally, I mean. | |||
| carlin++ | |||
| ihrd | roles-related question | 11:43 | |
| rakudo: role R { method foo { ... } }; class C {}; (C.new does R).^methods(:local)>>.name>>.say; | |||
| p6eval | rakudo 30e2cf: ( no output ) | ||
| ihrd | why I do not got 'foo' here? | ||
| colomon | X~, that's what I was looking for. \\o/ | ||
| jnthn | ihrd: Ah, I've run into that one before. | ||
| masak | ihrd: I agree that you should. I don't know why you don't. | ||
| jnthn | ihrd: I think it's a bug. | ||
| ihrd: Suspect "does" is somehow not generating creating an updated meta-class or something. | 11:44 | ||
| ihrd | jnthn, masak: thank you very mach :) | ||
| masak | ihrd: will you submit it to RT, or shall I? | ||
| ihrd | masak: yes! | ||
| masak | great. | ||
| any(ihrd, masak) will submit it. :) | 11:45 | ||
| ihrd | masak: :) I mean I like to submit this one | ||
| masak: I can`t do much for perl6 now, so I happy to do this bit | 11:46 | ||
| masak | ihrd++ | ||
| colomon | rakudo: say ((1, 2, 3) X+ (5, 4, 3)).perl | 11:47 | |
| p6eval | rakudo 30e2cf: OUTPUT«[6, 5, 4, 7, 6, 5, 8, 7, 6]» | ||
| ihrd | jnthn: can I use you suggestions here in the bug report? | 11:48 | |
| jnthn | Sure | ||
|
12:06
envi^home joined
12:08
abra joined
12:09
takadonet joined
|
|||
| takadonet | morning all | 12:09 | |
| ihrd | syntax 'of' NYI in Rakudo? | 12:10 | |
| I mean something like '$o does R of Some'? | |||
| masak | ihrd: there's R[Some] | 12:11 | |
| takadonet: \\o | 12:12 | ||
| jnthn | std: $x does Positional of Int | 12:13 | |
| p6eval | std 28658: OUTPUT«[31m===[0mSORRY![31m===[0mTwo terms in a row at /tmp/2CW3O8VXuf line 1:------> [32m$x does Positional [33m⏏[31mof Int[0m expecting any of: bracketed infix infix stopper standard stopper statement modifier loop terminatorOther potential difficulties: | ||
| ..Variable $… | |||
| jnthn | aye | ||
| std: $x does Positional[Int] | |||
| p6eval | std 28658: OUTPUT«Potential difficulties: Variable $x is not predeclared at /tmp/yHcZ4m20r0 line 1:------> [32m$x[33m⏏[31m does Positional[Int][0mok 00:01 99m» | ||
| ihrd | jnthn: I just read last part of you talk | 12:15 | |
| where you say about Can of Beer | |||
| masak: yes, R[Some] works | 12:16 | ||
| jnthn | rakudo: class Beer { }; role Can[::Contents] { }; my Can of Beer $starobrno; | ||
| p6eval | rakudo 30e2cf: ( no output ) | ||
| jnthn | ihrd: You probably saw that. | ||
| ihrd: That syntax is valid in declarations. | |||
| But I think not just as a noun anywhere. | |||
| ihrd | jhnth: but not with `does`... *confused* | 12:17 | |
| jnthn | ihrd: does is just an operator | ||
| ihrd: It's RHS is parsed no differently to any other operator. | |||
| erm, Its | 12:18 | ||
.oO( must make less grammar mistakes ) |
|||
|
12:22
lmc joined
|
|||
| jnthn | rakudo: say 2 * 69.72 | 12:22 | |
| p6eval | rakudo 30e2cf: OUTPUT«139.44» | ||
| ihrd | jnthn: when you say 'my Pack of Can of Beer ...' you mean Pack is parametrize role with argument Can wich is parametrized role too? | 12:27 | |
| masak | ihrd: pravda. | 12:28 | |
| masak cheats again with Cyrillic. bad masak! | 12:29 | ||
| ihrd | masak: it is nice ;) | ||
| masak | typing with Cyrillic layout is slow, because I don't know where the keys are at. :/ | 12:30 | |
| правда | 12:31 | ||
| ihrd | OMG multiple variants of Roles! roles multi dispatch, I missed this one in spec. | ||
| ha! a lot of people who use single layout think we use to keyboards | 12:32 | ||
| s/to/two/; | |||
| and wondering how fast we swap it | 12:33 | ||
| zloyrusskiy | ihrd, привет | 12:34 | |
| masak | are roles multi by default? | ||
| ihrd: are those the same people who think that the Chinese must have HUGE keyboards? | |||
| rakudo: role Foo[Int] { method bar() { "I only do Ints" } }; role Foo[Str] { method bar() { "I only do Strs" } }; say .bar for Foo[Int].new, Foo[Str].new | |||
| p6eval | rakudo 30e2cf: OUTPUT«I only do IntsI only do Strs» | ||
| jnthn | masak: yes | 12:37 | |
| oh noes! I haz Slovak class...I wonder if I can still even speak this language... | |||
| masak: Chinese keyboards are crazy, so many thousands of keys... | 12:38 | ||
| ...and the fact that to fit them in such a small space, they have to be really small, and then you have a thing like a pointy chop-stick to press them, and you gotta be really accurate... | |||
| ...it's amazing! | 12:39 | ||
| masak | jnthn: and you have to push the key from the right direction to get the right tone... it's a wonder they manage it. | ||
| jnthn | Yeah, I know. | ||
| jnthn bbl, slovak | 12:40 | ||
|
12:56
[particle] joined
13:02
NorwayGeek joined
13:05
[particle] joined
|
|||
| PerlJam | good $localtime all | 13:12 | |
| ihrd | Perljam: hi | ||
| moritz_ | oh hai | ||
| PerlJam++ # nice preface | |||
| PerlJam | It's a start. | ||
| moritz_ just learned a new word from reading a scientific paper: to epitomize. I like it. | 13:13 | ||
| PerlJam | moritz_: btw, I have told you that I see your name every where I go? There's a car place here called Moritz that puts its name on all of the vehicles it sells, so as I'm driving around town and glance at the cars around me, I'll invariably see your name :) | 13:16 | |
| ihrd | jhnthn: does traits example in your talk works? | ||
| moritz_ | PerlJam: I deny the existence of any conspiracy related to that. | 13:18 | |
| ihrd | I have problem with multi trait_mod:<is>... | ||
| rakudo: multi tarit_mod<is>() { ... } | |||
| p6eval | rakudo 30e2cf: OUTPUT«Malformed routine definition at line 2, near "tarit_mod<"in Main (src/gen_setting.pm:146)» | ||
| PerlJam | ihrd: install mod_speling in your brain and/or fingers :-) | 13:19 | |
| ihrd | Perljam: you are right, I need one | ||
| rakudo: multi trait_mod:<is> (Container $r, doc, $text) {...} | 13:21 | ||
| p6eval | rakudo 30e2cf: OUTPUT«Malformed routine definition at line 2, near "trait_mod:"in Main (src/gen_setting.pm:146)» | ||
| ihrd | rakudo: multi trait_mod:<is> () {...} | ||
| p6eval | rakudo 30e2cf: ( no output ) | ||
| ihrd | rakudo: role doc {}; multi trait_mod:<is>(Container $c, doc, $text) { $c does doc($text) } | 13:23 | |
| p6eval | rakudo 30e2cf: OUTPUT«Malformed routine definition at line 2, near "trait_mod:"in Main (src/gen_setting.pm:146)» | ||
| ihrd | it is exactly what I see in talk :( | 13:24 | |
| masak | ihrd: 'doc' is missing a sigil. | 13:26 | |
| oh wait. | 13:27 | ||
| ihrd | ::? | ||
| masak | perhaps not. | ||
| ihrd | this example have many confused parts for me | ||
| PerlJam | ihrd: I could have sworn it worked at one point, but rakudo was very picky about the exact syntax. | 13:28 | |
| ihrd | how should work does role($foo)? | ||
|
13:33
frederico joined
|
|||
| masak | ihrd++ # "does" is somehow not generating creating an updated meta-class or something | 13:38 | |
| ihrd | I gonna look at LolDispatch, it use trait_aluxiliary:<is>... | 13:41 | |
|
13:49
abra joined
|
|||
| ihrd | actually LolDispatch do not work too, with same issue | 13:50 | |
| "No applicable candidates found to dispatch to for 'trait_mod:is'" | 13:51 | ||
|
13:53
SmokeMachine joined
|
|||
| masak | that sounds familiar. | 13:54 | |
| ihrd: maybe look at the spectests, and see how it's done there? | |||
|
13:56
Ananth joined
|
|||
| pmichaud | good morning, #perl6 | 14:02 | |
| PerlJam | morning Pm | ||
| ihrd | masak: woow. it works | ||
| masak | moning, pm. | ||
| ihrd: :) | |||
| ihrd | example is broken, or mb, it is a little bit modern | 14:03 | |
| masak | it's possible there have been spec shifts in the meantime, yes. | 14:04 | |
|
14:10
rfordinal joined
|
|||
| ihrd | I should sleep now, bye | 14:11 | |
|
14:11
ihrd left
14:12
hanekomu joined,
abra joined
14:17
KyleHa joined,
Psyche^ joined
|
|||
| jnthn back | 14:19 | ||
|
14:19
rfordinal left
|
|||
| masak | jnthn: so, what's on the agenda? more signature refactors? | 14:19 | |
| jnthn | Fixing up spectest brekage fallout from this refactor first. | 14:20 | |
| After that, I'm ready to start on the new binder. | 14:21 | ||
| I'm really not sure how long that is going to take me to get good enough. | |||
| Should allow us to close a bunch of tickets though. | |||
| Once it's done. | |||
| (like, the binding nameds to positionals one.) | 14:22 | ||
| moritz_ | including a very old one by diakopter++ :-) | ||
| PerlJam | jnthn: stop jabbering to us and get back to coding! ;) | ||
| moritz_ | that's the one I was thinking of, yes | ||
| masak | ooh, binding-nameds-to-positionals! \\o/ | ||
| jnthn | PerlJam: I'm enjoying jabbering in a langauge I speak well for a bit, after spending the last hour and a half jabbering in one that I speak badly. :-P | ||
| masak | I have a new favorite problem ticket, by the way: rt.perl.org/rt3/Ticket/Display.html?id=69438 | 14:23 | |
| pmichaud | names-to-positionals.... what's the approach there? | ||
| moritz_ | when that's done we have to go through the setting and see if the names of the parameters agree in setting and spec | ||
| masak | it's always possible to work around it, but it's often a bit of extra work. | ||
| pmichaud | since we don't have :callsig yet ? | ||
| masak | I think I'll take a look at it myself to try to figure out what the cause is. | ||
| jnthn | pmichaud: Debating that a bit still, but one of: | 14:24 | |
| masak | moritz_: and if the names in the spec could be improved. | ||
| moritz_ | masak: aye | ||
|
14:24
abra_ joined
|
|||
| jnthn | 1) Take slurpies and process those instead of callsig for now. Easy migration path then. | 14:24 | |
|
14:24
justatheory joined
|
|||
| jnthn | 2) Just do what Perl6MultiSub does to get the args. But that is actually further away from what :callsig will give us. | 14:25 | |
| And also only works if we're invoked from PIR. | |||
| pmichaud | I'm fine with either of those. | ||
| jnthn | Actually I'm really surprised we've never hit an issue where we try to invoke a Perl 6 multi from anywhere other than PIR. We've got very lucky there. | ||
| PerlJam | jnthn: or we've constructed the maze just so we don't fall into the traps :) | 14:26 | |
| jnthn | pmichaud: I'm still pondering exactly how I want a lot of this to look though. | ||
| pmichaud: Most specifically, when do we bind. | 14:27 | ||
| pmichaud | jnthn: ack | ||
| jnthn | pmichaud: There's a certain level of temptation to do it inside invoke. | ||
| pmichaud | I think I like them separate | ||
| I'm still in favor of a "bind_params" dynop | 14:28 | ||
| jnthn | That's the obvious way, but I'm a tad "hmm" on it. :-) | ||
| pmichaud | okay. | ||
| jnthn | I mean. | ||
| The problem I have is... | |||
| We really need a way to be able to potentially bind a signature | 14:29 | ||
| But being able to fall back out if we fail to. | |||
| And have that cheap. | |||
| I think we have to create a full on lexical context for that anyway though. | |||
| But if we don't fall back into the runloop until after we've bound, the control flow gets a bit easier to manage. | 14:30 | ||
| Well | 14:31 | ||
| Maybe it doesn't actually matter. | |||
| Anywhere can invoke the ret cont to make it as if we never called in there. | |||
| The fun is in the multiple dispatch though. | |||
| We don't want to re-do a bunch of checks. | |||
| pmichaud | seems like we want a continuation | 14:32 | |
| jnthn | It only gets tricky in that if we are invoked in a single rather than a multi dispatch, we still need to do all the checks. | ||
| And depending on the nature of the multi-dispatch, we may either | |||
| 1) Know that we can just find and be done with it or | 14:33 | ||
| 2) Have already done a full bind because we needed to know that we could | |||
| s/find/bind/ | |||
| Yes, continuations may well be the answer here. | |||
| pmichaud | iwbni there's an easy way for the binding operation to know if it's single or multi dispatch | 14:34 | |
| jnthn | Indeed, I'm still trying to work out a clean way to do that. | ||
| pmichaud | i hate to suggest it, but perhaps a flag on the sub pmc? | ||
| jnthn | Since contexts are PMCs now, though... | ||
| No, *not* the sub. | |||
| Imagine a bunch of recursive calls. | |||
| Some multi, some not. | 14:35 | ||
| Or in a threaded context. | |||
|
14:35
ruoso joined
|
|||
| pmichaud | but wouldn't we have to complete binding into a call before we can recurse? | 14:35 | |
| jnthn | It's about the current invocation rather than every invocation. So I think the flag wants to go on the context PMC. | ||
| Not if something in one of the constraints calls it, which would yes be contrived. | 14:36 | ||
| pmichaud | ah | ||
| jnthn | But anyway, contexts are PMCs, we can flag them. | ||
| pmichaud | sure, flagging the context works nicely also | ||
| er, wait | |||
| hmmm | |||
| flagging the caller context or the newly created context? I guess caller. | |||
| jnthn | Newly created, surely? | ||
| As in, the current invocation. | 14:37 | ||
| pmichaud | ...how do you flag it before it exists? | ||
| jnthn | By the time we get to binding, it has to exist. | ||
| And if we have already started binding, it already exists. | |||
| pmichaud | I'm missing a step, just a sec | ||
| jnthn | Binding needs the lexpad. | ||
| pmichaud | the dispatcher calls invoke on a sub | ||
| that creates a new context | 14:38 | ||
| when we get back from invoke, aren't we already in the new sub's context ? | |||
| jnthn | Right. | ||
| Yes. | |||
| Oh wait | |||
| Which caller did you mean? | |||
| :-) | |||
| pmichaud | I don't know which caller I meant | ||
| jnthn | Heh, I don't know which you meant either. :-) | 14:39 | |
| pmichaud | I'm just wondering when/if the dispatcher gets control after calling the invoke vtable | ||
| jnthn | It'd depend. | ||
| There's two cases. | |||
| pmichaud | so that it could flag the newly created context | ||
| because prior to the invoke vtable, the new context doesn't exist | |||
| if the dispatcher doesn't regain control, it doesn't have an opportunity to flag the context to say "this is multidispatch" | |||
| jnthn | Wait, there's three cases. Let me enumerate them. | ||
| 1) A single dispatch. The multi-dispatcher hasn't been invoked at all. The binder needs to do all checks and binding work. | 14:40 | ||
| In this case, nothing has been flagged up at all. No flags set = do everything. | |||
|
14:41
kent\\n joined
|
|||
| jnthn | 2) A multi-dispatch where the dispatch cache on the nominal types made a decision for us. We didn't actually bind anything, but we know that we only have positional arguments and that we don't need to do any type checks on them, just bind them, because we know from the type-based cache that it's fine. | 14:42 | |
| In this case, the multi-disptacher's invoke vtable method after deciding this is the candidate to invoke calls VTABLE_invoke on the chosen candidate. At this point, we get an opportunity to set a flag saying "you've got a simple positional unchecked binding to do, go do it fast" | |||
| pmichaud | okay. | 14:43 | |
| jnthn | 3) A multi-dispatch where we have constraints or named parameters. In this case, we need to actually try doing the binding to see if it will work out. | ||
| pmichaud | don't we still need to do the remaining type checks, though, in case they have any side effects? | ||
| jnthn | The key phrase was "nominal types" - let me expand on that... | ||
| These are the types that we cache based on already. | |||
| They are a simple "isa" or "does" check. | 14:44 | ||
| There's no side-effect. | |||
| If there's constraints, case (2) does not apply. | |||
| pmichaud | even if the nominal types were sufficient to make a decision, we're not in case (2) if any of the checks weren't strictly nominal ? | ||
| jnthn | Correct. | 14:45 | |
| pmichaud | then case #2 should read: a multi dispatch wehre all of the type checks are nominal | ||
| jnthn | We already have a bunch of stuff in Perl6MultiSub that says "is it OK to cache this" | ||
| Correct. | |||
| pmichaud | okay | ||
| jnthn | Case 3 is the interesting one in a copule of ways. | ||
| pmichaud | the piece I was missing was that multisub's invoke gets control after doing the sub invoke. | 14:46 | |
| yes, I'd suggest setting a flag on the context there | |||
| jnthn | - We need to actually try to bind. That means we need to invoke, because we need a lexpad. The question is if we then enter the runloop or not. | ||
| Or really, "can I get hold of the call sig without doing so". | |||
| pmichaud | if the multisub sets a flag on the called context | 14:47 | |
| jnthn | We'd then set a flag saying to the bind_params dynop "oh, already bound, you has no work, go relax, has a beer" | ||
| pmichaud | then the binding opcode can check for that flag, and throw an exception or otherwise get control back to the multidispatcher | ||
| jnthn | Well, we do exceptions today. But erm, I didn't figure out how on earth to catch exceptiosn in C. :-) | 14:48 | |
| pmichaud | right | ||
| might not be easily doable | |||
| jnthn | Which is why I'm wary of re-entering the runloop. | ||
| I think if it was easily doable, I'd have found a way by now. :-) | |||
| TimToady | surely Parrot catches exceptions in C :) | ||
|
14:48
zaphar_ps joined
|
|||
| Matt-W | You'd think so... | 14:48 | |
| jnthn | TimToady: Well, yeah, but returning to the right point in C is more fun. :-) | ||
| TimToady | yes, thinking about how Perl 5 does it, I can see the difficulty | 14:49 | |
| jnthn | pmichaud: Anyway, the other thing I am guessing is that when you do an invoke, it creates a return continuation. | ||
| TimToady | if Parrot uses setjmp/longjmp | ||
| or something like it | 14:50 | ||
| jnthn | pmichaud: In theory then, if we fail to bind, then we can just invoke that to clear up, and try binding the next thing. | ||
| moritz_ | is it a "I want to sleep tonight, don't tell me" thing? | ||
| jnthn | TimToady: yes, it uses those. | ||
| pmichaud: But this means control never falls back into the Parrot runloop. | |||
| Well | |||
| It does for constraints. | |||
| But they're quite clean enter/exit. | |||
| pmichaud | I don't understand "clear up" | 14:51 | |
| TimToady wonders how to mix longjmp with continuations and will probbly not sleep tonight :) | |||
| jnthn | pmichaud: Invoke creates a new context and makes it the current one. | ||
| pmichaud | okay. | ||
| jnthn | pmichaud: We need the lexpad available in that when trying to do the binding. | ||
| pmichaud | yes, I understand that invoke creates the lexpad needed for binding. | ||
| jnthn | pmichaud: However, if we fail to bind, we need to throw away that context. | ||
| Because we're not going to use it. | 14:52 | ||
| pmichaud | s/throw away the context/return to the caller context/ | ||
| jnthn | Invoking the return continuation stashed within the context PMC will do that. | ||
| pmichaud: Exactly. | |||
| pmichaud | we don't have to explicitly "throw it away", gc will do that. | ||
| jnthn | Yes, bad phrasing on my part. | ||
| pmichaud | we just need to get back to the caller context | ||
| jnthn | Anyway, what I'm getting at is it won't be degree level gymnastics, just calling vtable methods. :-) | 14:53 | |
| pmichaud | hmmmm | ||
| jnthn | So we won't be fiddling too deeply. | ||
| pmichaud | how evil would it be for the binding opcode to actually put us back in the outer context if binding fails? | ||
| instead of throwing an exception or something that has to be caught? | |||
| jnthn | pmichaud: Let me back up a bit. | ||
| My plan for this case (3) was that we would *not* enter the runloop and call the binding opcode. | 14:54 | ||
| We call VTABLE_invoke, and then enter the binder directly. | |||
| pmichaud | from within the called sub's VTABLE_invoke? | ||
| jnthn | No | ||
| pmichaud | from the multi's vtable_invoke, then? | 14:55 | |
| jnthn | Yes | ||
| pmichaud | okay | ||
| jnthn | Well, something called from... | ||
| but yes | |||
| pmichaud | I think I'd be okay with that | ||
| jnthn | I think it's relatively clean. | ||
| pmichaud | (need more precision about _which_ invoke is doing what :-) | ||
| jnthn | And makes me *very* happy that contexts are now PMCs so we actually can flag this. | ||
| In a cheap and easy way. | |||
| pmichaud | yes, that was an important change. I'm surprised we didn't take a bigger speed hit. | ||
| jnthn | Me too. | ||
| Anyway, I expect that we're going to win a bunch of startup too. | 14:56 | ||
| pmichaud | which I've been taking to be an important lesson (more) | ||
| we keep doing things that I think ought to be big speed hits but aren't, thus invalidating all of our concerns about optimizing around them | |||
| jnthn | Because trait_mod goes on a non-nominal dispatch, so we have to do a bindability check. | ||
| Well, trait_mod:<is> does. | |||
| And at the moment those are really, really not cheap. | 14:57 | ||
| pmichaud: I may try sig construction via methods, once I've got it working via the ops, just to see what the real win is, at some pint. | |||
| *point | |||
| PerlJam | jnthn: beer on the brain? ;) | 14:58 | |
| pmichaud | okay, that'd be good. | ||
| jnthn | PerlJam: Not enough beer, I suspect. | ||
| pmichaud | it'd be useful to know what the relative costs are there. | ||
| jnthn | pmichaud: Yeah. The thing is... | ||
| ...I think that something other than that is what is really swamping startup time at the moment. | |||
| KyleHa | I'm almost always surprised by where performance problems actually are vs. where I thought they'd be. | ||
| jnthn | And I rather suspect it may be that the trait mod invocations are costly. | 14:59 | |
| masak | KyleHa: that's why the "premature optimization" meme exists in the first place. :) | ||
| PerlJam | sounds like we're back to mentioning that we need better profiling tools | ||
| KyleHa | masak++ : Agreed. | ||
| jnthn | PerlJam: Thing is, we have some now. ;-) | 15:00 | |
| PerlJam: Just need to use them. :-) | |||
| PerlJam | perhaps profiling should be integrated in the same way that testing is | ||
| Though with testing, you run the tests for the results right then, but with profiling you're going to want to look at history more. | 15:01 | ||
| Didn't Alias mention something like this WRT benchmarking perl a few months ago? | 15:02 | ||
| jnthn | pmichaud: Anyway, seems I now have a way forward that you're not going to disagree with too strongly. :-) | ||
| Or maybe even like. :-) | |||
| pmichaud | I don't envision a better way forward anytime soon :) | 15:03 | |
| jnthn | OK, let's try this one then. | 15:04 | |
| Man is this going to be "fun" to implement. :-) | |||
| But at least it's not a regex engine. | |||
| ;-) | |||
| TimToady | it bothers me that you're talking about applying traits at binding time | 15:05 | |
| jnthn is at this point *very* happy with the current devision of labor. | |||
| TimToady: Erm. | |||
| TimToady: We weren't. | |||
| TimToady: Well, I wasn't... | |||
| TimToady | okay, need more coffee | ||
| jnthn | TimToady: I was talking about the fact that applying traits uses multiple dispatch. | ||
| TimToady: And the way it makes use of multiple dispatch is currently a way that is rather slow in Rakudo. | |||
| TimToady | 'kay, but that's still just compile time, so not in anyone's tight loop | 15:06 | |
| except maybe the testor's :) | |||
| jnthn | No, it's not in a tight loop, but it affects startup time. | ||
| pmichaud | for the setting it's at "load type", though. | ||
| *"load time" | |||
| i.e., it's a cost incurred at startup | |||
| jnthn | We currently run 450 test files, or there abouts. | 15:07 | |
| Before I started working on things a couple of days back, for me Rakudo had a startup time of just over a second. | |||
| If we can pull that down to 0.5s, then I save over three minutes on a spectest run. | 15:08 | ||
| masak | \\o/ | 15:09 | |
| TimToady | eventually we'll just find a way to mmap the (presumably immutable) setting structure into memory | ||
| jnthn | Then with pmichaud++'s parsing speed improvements, we can parse the tests a bunch faster. | ||
| pmichaud | we haven't found a good way to do that yet. | ||
| jnthn | Then we have more time to go to the pub. | 15:10 | |
| pmichaud | (mmap) | ||
| TimToady | std just pulls it in with Storable | ||
| 'course, you're pulling a lot more in | |||
| jnthn | erm, I mean, then we can test faster and implement new features faster... | ||
|
15:10
infrared joined
|
|||
| pmichaud | basically doing something like mmap means we need a linker | 15:10 | |
| TimToady | but a setting can be linked ahead of time | 15:11 | |
| pmichaud | so that we can tie the references in the setting structure to wherever things happened to be loaded | ||
| I mean for the things that the setting refers to that aren't part of the setting | |||
| jnthn | It's not impossible, but it's not on a Rakudo * timescale either. | ||
| TimToady | just thinking about how it might play out | 15:12 | |
| waiting for the blood to hit my coffeestream | |||
|
15:15
nihiliad joined
15:18
drbean joined,
NorwayGeek joined
15:21
ejs joined
|
|||
| jnthn digs in to fixing the various spectest failures in the switch over to the new signature representation. | 15:22 | ||
| TimToady looks at why class stubs don't work | 15:23 | ||
|
15:23
drbean_ joined
|
|||
| diakopter is just sayin' | 15:24 | ||
|
15:32
crythias joined
15:33
mberends joined
15:34
iblechbot joined
|
|||
| TimToady | .öÖ(King Diakopter the Just Sayin') | 15:37 | |
| crythias | howdy | 15:38 | |
| masak | crythias: oh hai there. | 15:42 | |
| crythias | Hee :) | 15:48 | |
| Convicted of the crime of trying to split light into many colors, he found his eureka moment when he went to prism. | 15:50 | ||
| jnthn | Woo. My fails list has been trimmed down muchly by two fixes. :-) | 15:51 | |
| jnthn groans | |||
| crythias: that's *terrible* | |||
| masak throws crythias a punny | |||
| TimToady | I had classified you as Chaotic Good, but now I'm not so sure... | 15:52 | |
| crythias | I'll try my saving throw. | ||
| pmichaud wonders about his classification. | |||
| crythias | When you put it into perspective, a rectangle is a trapezoid. | 15:53 | |
| TimToady | and a trapezoid is a rectangle, sometimes | ||
| masak | sorry, you just crack me up. srsly. | ||
| crythias is so chaotic that he throws two 1d20. The first determines the saving throw requirement of the second. | 15:55 | ||
| pugs_svn | r28662 | lwall++ | [Cursor] remove setting storage bug installed yesterday | 15:56 | |
| r28662 | [STD] check for yada on class declarations too | |||
|
15:59
Woodi joined,
meppl joined
16:02
cdarroch joined
|
|||
| TimToady | std: class A {...}; class A {} | 16:02 | |
| p6eval | std 28658: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol GLOBAL::<A> (from line 1) at /tmp/i8GCnQO0py line 1:------> [32mclass A {...}; class A[33m⏏[31m {}[0mFAILED 00:01 96m» | ||
| TimToady | I actually broke the build-from-scratch at 28659, TimToady-- | ||
| std: 28662 | 16:06 | ||
| p6eval | std 28658: OUTPUT«ok 00:01 94m» | ||
| diakopter | std: class A {...}; class A {} | 16:09 | |
| p6eval | std 28658: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol GLOBAL::<A> (from line 1) at /tmp/zEshZy3YD4 line 1:------> [32mclass A {...}; class A[33m⏏[31m {}[0mFAILED 00:02 96m» | ||
| diakopter | so p6eval needs a make clean? | ||
| TimToady | I think it does that eventually via cron | 16:10 | |
| jnthn | rakudo: &kv.candidates>>.signature>>.perl>>.say | ||
| p6eval | rakudo 30e2cf: OUTPUT«:(Object *@values):(Mapping self)» | ||
| TimToady | std: 28662 | 16:20 | |
| p6eval | std 28662: OUTPUT«ok 00:01 94m» | ||
| TimToady | std: class A {...}; class A {} | ||
| p6eval | std 28662: OUTPUT«ok 00:01 96m» | ||
| TimToady | was just never implemented on classes | ||
| std: class A {...}; subset A of Int where 0..9; | 16:21 | ||
| p6eval | std 28662: OUTPUT«ok 00:02 98m» | ||
| TimToady | std: class A {}; subset A of Int where 0..9; | ||
| p6eval | std 28662: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol A (from line 1) at /tmp/zLd8o8NBoz line 1:------> [32mclass A {}; subset A [33m⏏[31mof Int where 0..9;[0mFAILED 00:02 96m» | ||
| TimToady | std: package A {...}; subset A of Int where 0..9; | 16:23 | |
| p6eval | std 28662: OUTPUT«ok 00:01 98m» | ||
| jnthn | Eww. | 16:24 | |
| TimToady | std: subset A where {...}; subset A of Int where 0..9; | ||
| p6eval | std 28662: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol A (from line 1) at /tmp/P2nUUnWErb line 1:------> [32msubset A where {...}; subset A [33m⏏[31mof Int where 0..9;[0mFAILED 00:02 97m» | ||
| TimToady | maybe I should make that one work | ||
| std: package A {...}; constant A = 0x10; | 16:25 | ||
| p6eval | std 28662: OUTPUT«ok 00:01 98m» | ||
| pmichaud | for those who are interested in playing with the nqp-rx development: github.com/perl6/nqp-rx/blob/master/STATUS describes where things stand at the moment | ||
| TimToady | all typenames and constant names are created equal, as far as STD is concerned | ||
| std: package A {}; constant A = 0x10; | 16:26 | ||
| p6eval | std 28662: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol A (from line 1) at /tmp/uCedAf7d0o line 1:------> [32mpackage A {}; constant A [33m⏏[31m= 0x10;[0m expecting any of: constant_declarator declarator multi_declarator typenameFAILED 00:01 96m» | ||
| TimToady | std: subset A; subset A of Int where 0..9; | 16:27 | |
| p6eval | std 28662: OUTPUT«[31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol A (from line 1) at /tmp/mIFfCs2GCa line 1:------> [32msubset A; subset A [33m⏏[31mof Int where 0..9;[0mFAILED 00:01 95m» | ||
| TimToady | std: proto subset A; subset A of Int where 0..9; | ||
| p6eval | std 28662: OUTPUT«ok 00:01 98m» | ||
| TimToady | heh | ||
| jnthn | std: multi subset A of Int where 0..9; | 16:30 | |
| p6eval | std 28662: OUTPUT«ok 00:01 98m» | ||
| jnthn | std: multi subset A of Int where 0..9; multi subset A of Str where 'A'..'Z' | ||
| p6eval | std 28662: OUTPUT«ok 00:02 98m» | ||
| jnthn | heh heh | ||
| TimToady | perhaps not for 6.0.0 | 16:31 | |
| but one could view it as an | type | 16:32 | ||
| slavik2 | jnthn: what is that? Perl understands SQL like things? | 16:33 | |
| jnthn | slavik2: heh, I was more seeing if std would accept it :-) | ||
| slavik2 | oh ... | 16:34 | |
| jnthn | slavik2: I'm not sure what it'd mean semantically if it did though. | ||
| TimToady: well, perhaps that, yes... | |||
| Not 6.0.0. :-) | |||
| TimToady | subset A of Any where Int & 0..9 | Str & 'A'..'Z' | 16:35 | |
| so maybe trivial | |||
| fsdo trivial... | 16:36 | ||
| anyway, we can declare names without necessarily knowing the exact type | 16:37 | ||
| but they should be known by CHECK time | |||
| I should make STD check for unrequited stubs | 16:38 | ||
| well, maybe not | |||
| optional check for when you think you're done maybe | 16:39 | ||
| jnthn | Oh gah, something in the setting is using the (currently not spec'd and likely something we want to change) signature introspection interface. | 16:41 | |
| moritz_ | the series operator, yes | 16:42 | |
| jnthn | moritz_: Aye. | ||
| moritz_ | feel free to regress on that if necessary | ||
| jnthn | I'm pondering that we may want to have something more object-y | 16:43 | |
| So instead of a hash of data, we have a bunch of descriptors. | |||
| I knew we'd have to re-do this interface, I just hadn't realized that somebody relied on it. | |||
| Anyway, it's not a lot of work to re-do it now. | |||
| moritz_ apologizes | 16:44 | ||
| jnthn | moritz_: No, no worries. :-) | ||
| It's one of those "expected to have to do it at some point, and now is no biggy". | |||
| Ignoring series and arity.t, which also calls .params, I've got 5 spectests that have some issues now. | 16:45 | ||
| That's not bad to say we've completely changed the internal representation of signatures, and shuffled a load of stuff we used to deal with at runtime to be compile time decisions in with it. | 16:46 | ||
|
16:47
stephenlb joined
|
|||
| moritz_ | pmichaud: is it intentional that [ab] produces two separate atoms in nqp-rx? | 16:51 | |
| table tennis match, bbiafh& | |||
|
16:52
ewilhelm left
16:53
payload joined
16:57
NorwayGeek|Away joined
16:59
ejs joined
17:00
icwiener joined
17:08
arthur-_ joined
17:09
alfieANDfred joined
|
|||
| colomon wishes he could easily test his C++ code using Perl 6... | 17:13 | ||
| int data [] = { -5, 0, 3, 72 }; | 17:17 | ||
| for (unsigned int i = 0; i < 4; i++) | |||
| pmichaud | moritz_: if you mean it produces two separate atoms on the parse, then yes. | ||
| colomon | versus | ||
| for (-5, 0, 3, 72) -> $i | |||
| pmichaud | moritz_: however, in the resulting PAST tree you'll see that it's combined back to a single atom :) | ||
| moritz_: and in STD.pm each individual character ends up being its own atom | 17:18 | ||
|
17:22
REPLeffect joined
|
|||
| TimToady | colomon: the parens aren't necessary | 17:25 | |
| std: for -5, 0, 3, 72 -> $i {...} | 17:26 | ||
| p6eval | std 28662: OUTPUT«ok 00:02 105m» | ||
| colomon | rakudo: for -5, 0, 3, 72 -> $i { say $i } | ||
| p6eval | rakudo 30e2cf: OUTPUT«-50372» | ||
| colomon | TimToady: that is so nice it makes me want to cry.... | ||
| My perl 6 version which was oodles better than the C++ version still wasn't as good as Perl 6 can get.... | 17:27 | ||
|
17:36
Chillance joined
|
|||
| TimToady | rakudo: for <-5 0 3 72> { .say } | 17:38 | |
| p6eval | rakudo 30e2cf: OUTPUT«-50372» | ||
|
17:38
crythias joined
|
|||
| TimToady | bugs me that that doesn't turn into List of Int | 17:39 | |
| jnthn | A typed one? | 17:41 | |
| Or just that they're integers? | 17:42 | ||
| erm, Ints. | |||
| mberends | rakudo:<-5 0 3 72>>>.say | ||
| TimToady | : < | ||
| jnthn | .oO( eyes, legs and no body? ) |
17:43 | |
| mberends | rakudo: <-5 0 3 72>>>.say | 17:44 | |
| p6eval | rakudo 30e2cf: OUTPUT«-50372» | ||
| TimToady | it ought to randomize those just to keep people honest | ||
| s/those/the order/ | 17:45 | ||
| colomon | : rakudo: for <-5 0 3 72> { say .WHAT } | ||
| TimToady | ^ that's strange | 17:46 | |
| PerlJam | leading colon+space == confused bot | 17:47 | |
| rakudo: for <-5 0 3 72> { say .WHAT } | 17:48 | ||
| p6eval | rakudo 30e2cf: OUTPUT«Str()Str()Str()Str()» | ||
| TimToady | only in random order :) | ||
| jnthn | oh argh | 17:49 | |
| jnthn has made himself a fascinating bug... | 17:50 | ||
| PerlJam | TimToady: so ... >> is random only by virtue of asynchronicity, right? | ||
| TimToady | it's random by virtue of promising that you don't care about the order | 17:51 | |
| which is what "hyper" means | |||
| ruoso .oO( maybe we could accept that if the hyper is NYI as hyper, it should really randomize ) | |||
| lambdabot | ruoso: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
| jnthn | (note, order of the calls, not order of the results) | ||
| TimToady | hyper for <-5 0 3 72> { .say } would make similar promises | 17:52 | |
| PerlJam | jnthn: right. | ||
| TimToady | .say is side effect | ||
| jnthn | Indeed. | ||
| TimToady | so depends on order of calls, not order of results | ||
| PerlJam | I think I would want what ruoso just said to remind myself of the fact. | 17:53 | |
| TimToady | I wonder if we should define a .yaml to go with .perl | ||
|
17:53
abra joined
|
|||
| TimToady | PerlJam: that's what I was suggesting above | 17:54 | |
| ruoso | in a completely different matter... I was wondering yesterday if we could somehow have auto-threading that really uses fork instead of threads... | ||
| PerlJam | TimToady: yes ... my brain is a little slow right now because I'm eating. For some reason I can't eat and think at the same time :) | ||
| ruoso | which would basically mean some time of iterator that knows how to serialize and deserialize the objects that are sent from/to the iterator | ||
| jnthn | ruoso: Sounds like a pragma. | 17:55 | |
| use hyperfork; | |||
| ;-) | |||
| TimToady | why would it be a pragma if it's the default? | ||
| jnthn | Why would it be the default? | ||
| ruoso .oO( ouch ) | 17:56 | ||
| TimToady | to randomize hypers? | ||
| jnthn | TimToady: No, I was talking about the forking idea. | ||
| TimToady | or to reorder randomized hypers? | ||
| ah, missed that | |||
| jnthn | pmichaud: ping | ||
| ruoso | maybe it would not be about serialization | 17:57 | |
| TimToady .= kid_transport_mode() | |||
|
17:57
riffraff joined
|
|||
| ruoso | but maybe it would | 17:58 | |
| ruoso thinking about objects pointing to file descriptors | |||
|
17:58
abra joined
|
|||
| ruoso | I think the trick would be to somehow detect that the object it is receiving was alive before the fork, and then somehow access that object | 17:59 | |
| instead of creating a new one | 18:00 | ||
| ruoso feels that he's getting closer to Erlang | |||
| or maybe some objects "belong" to a specific process | 18:01 | ||
| and others are "clonned" to other processes | |||
| and for the objects that belong to a different process, talking to it would require sending a message to the owner process | |||
| PerlJam | ruoso: if you can import any good ideas from Erlang into Perl 6, that would be great :) | 18:02 | |
| ruoso | the point is that I don't like threads | 18:03 | |
| but forking usually makes it really hard to share data | |||
| Erlang model is really sane in that respect | 18:04 | ||
| ok... I think I had an idea... | 18:05 | ||
|
18:05
abra joined
|
|||
| ruoso | the process always store the current "version" of the memory... which only needs to be incremented after a "fork", since it marks that the new child won't have access to the memory that is allocated after that | 18:06 | |
| then we have two types of object | |||
| the Imutable values, which store the "version" at which they were created | |||
| and the mutable values, which store their "owner process" | 18:07 | ||
| when an iterator sends an object from one process to another | 18:08 | ||
| pmichaud | jnthn: pong | ||
| ruoso | it checks | ||
|
18:08
rblasch joined
|
|||
| ruoso | 1) if it is immutable, it will check if the target process have a link to this value | 18:09 | |
| jnthn | pmichaud: Don't worry, I think I found the answer. | ||
| pmichaud | jnthn: okay, glad I have less to worry about. :) | ||
| jnthn | pmichaud: I was using :inline(...) # yeah, bad me, I know | 18:10 | |
|
18:10
omega joined
|
|||
| jnthn | And, er, wondered why the code genreated for '%named' was going all so wrong. :-) | 18:10 | |
| Anyway, using signatured pirop now...if only I can write the signature I want. :-) | |||
|
18:10
omega left
18:11
abra joined
|
|||
| pmichaud | you should be able to | 18:11 | |
| which op? | |||
| jnthn | set_signature_elem ;-) | ||
| yes, got it :-) | 18:12 | ||
| :pirop('set_signature_elem vPisiPPPP'), | |||
| pmichaud | yup | ||
| PCT fwt | |||
| *ftw | |||
| jnthn | pct++ pmichaud++ | ||
| OK, down to three test files to worry about. | 18:13 | ||
| Plus two after that to spec and implement a new signature introspection interface for. | |||
|
18:16
Woody2143 left
|
|||
| jnthn | \\o/ | 18:23 | |
| Just one now. And it's the one file I expected to have problems. :-) | |||
|
18:23
abra joined
|
|||
| PerlJam | (reality matching expectations)++ | 18:23 | |
| jnthn is *really* happy that he decided to do this in small steps. | 18:24 | ||
| Of course, the next step is the *really* big one. | 18:25 | ||
| (switching to a new binder) | |||
| But knowing that signatures are in the format the new binder will expect, plus having everything else using that already, will be a big help. | 18:26 | ||
|
18:28
krishna_ joined
|
|||
| jnthn | OK, it's nom time. | 18:29 | |
|
18:30
lumi joined
18:34
abra joined
|
|||
| pugs_svn | r28663 | fglock++ | [mp6] Javascript - 'token' statement works | 18:40 | |
|
18:42
i-blis joined
|
|||
| i-blis | hello folks | 18:42 | |
| does anyone know: is pugs dead? | |||
| TimToady | it's hibernating | 18:43 | |
| i-blis | long and cold winter? | 18:44 | |
| TimToady | more like one of those crawly things that waits until the once-every-few-years rainstorm | 18:45 | |
| KyleHa | That's patience. | 18:46 | |
| i-blis | i see | ||
| TimToady | and also impatience :) | ||
| obra_ | There's definitely also some laziness and hubris in there ;) | 18:47 | |
| i-blis | :) | ||
| TimToady | the problem with pugs is that it's bus-number was too low, and kinda got bussed | ||
| but the moment someone picks it up and starts playing with it again, I suspect it will liven up again | 18:48 | ||
|
18:48
lumi joined
|
|||
| TimToady | we just need to find that special person who can't make up their mind whether they like Haskell or Perl 6 better :) | 18:48 | |
| i-blis | sad in a way. haskell has been in my way these last months | ||
| TimToady | "in my way" usually has negative connotations; did you mean it that way? | 18:49 | |
| explain yourself, and give three examples :) | 18:50 | ||
|
18:51
|theJackal| joined
|
|||
| i-blis | bad english. i meant, i encountered haskell because of high-order style in perl, 've been playing with it | 18:51 | |
| TimToady | cool | 18:52 | |
| i-blis | very cool language. plays well with perl in my opinion. (many ways to do it) | ||
| TimToady | nobody here would be upset if you woke pugs back up | ||
| i-blis | to heavy for me, I guess | 18:53 | |
| TimToady | that's kinda why the bus-number stayed at one, alas | ||
| colomon | oooo.... if The Book could contain an example of something Higher-Order Perl-ish, but in p6, that would be awesome. | ||
| i-blis | i am an average perl hacker with less than one year of functional programming | ||
| which Book? Erdös's? :) | 18:54 | ||
| TimToady | We are trying to steal the promethean fire from functional programming without stealing the procrustean bed. | ||
| i-blis | ho I see | ||
| it seemed to me that p6 has done a lot in that direction | 18:55 | ||
| to permit clearer high-order perl | 18:56 | ||
| TimToady | mostly a matter of keeping mutable/immutable distinctions clear, and making it easy to express things without gratuitous sequentiality | 18:57 | |
| i-blis | what do you mean by _gratuitous_ sequentiality? | 18:58 | |
| TimToady | like having to increment an index variable when you could just talk about a list of values as a whole | ||
| i-blis | perl is already good at that, isn't it? | 18:59 | |
| TimToady | or, to take a misfeature of most FP languages, having to talk about a list in terms of head and tail | ||
| i-blis | i see your point now | 19:00 | |
| what needed p5 i think was a better parameter handling | |||
| and p6 brings that | |||
| this is almost enough for perl-ish fp | 19:01 | ||
| TimToady | yes, we want to be able to spec pattern matching with sigs | 19:02 | |
| i-blis | streams are easy to implement any way why bother with "gratuitous sequentiality" as you called it | ||
| this is a very important feature imho | 19:03 | ||
| TimToady | but yes, Olin Shivers described Perl 5 as one of the successful FP languages at HOPL3 | 19:05 | |
| i-blis | i read about that | 19:06 | |
| TimToady | I've also liked Guy Steele's recent talk at ICFP, research.sun.com/projects/plrg/Publ...Steele.pdf | 19:07 | |
| i-blis | this was indeed the point that dominus tried to make a couple of years before hopl3 even | 19:08 | |
| TimToady | indeed, he didn't just try, but succeeded :) | ||
| i-blis | :) | ||
| yes, certainly | |||
| thnaks for the link | 19:09 | ||
| TimToady | which is one of the reasons that so many things he had to hack around in Perl 5 are just built-in to Perl 6 | ||
| crythias | Xistence is Supple. Let's Re-Engineer Perl. | 19:12 | |
| TimToady | already had both xs and lrep | 19:13 | |
| crythias | yes, but this is perl six backwards. | ||
| TimToady | not unless you capitalize the I | ||
| someone might capitalize the E instead.... | 19:14 | ||
| crythias | fine, fine: Xistence is Supple. Let's Re-Engineer Perl | ||
| what? | |||
| I cap.. | |||
| grr | |||
| Xistence Is Supple. Let's Re-Engineer Perl. | 19:15 | ||
| I just don't understand. It's like I'm talking to a ... | |||
| sorry. | |||
| TimToady | Life is a bitch, and it's not your bitch. | ||
| crythias | indeed. | 19:16 | |
| [particle] | damn The Man. | 19:17 | |
| TimToady | In my experience, people who are bad to the bone usually have pretty good bones to compensate. | 19:18 | |
| i-blis | @TimToady, the presentation of Steele is very instructive (and very clear), thanks | 19:19 | |
| lambdabot | Unknown command, try @list | ||
| i-blis | in the same vein: www.cs.nott.ac.uk/~gmh/bib.html#fold | 19:20 | |
| TimToady | it makes me glad that we have list-associativity in Perl 6, and also that [op] doesn't specify l or r | ||
| rakudo: say [+] ^10 | 19:21 | ||
| p6eval | rakudo 30e2cf: OUTPUT«45» | ||
| TimToady | it's free to do that fold in any order | ||
| i-blis | you may need it with (possibly infinite) streams though | ||
| TimToady | sure, though [+] is by definition eager | ||
| maybe [\\+] to get the running sum | |||
| i-blis | on the other hand there is no right associative ops in perl 6 (am i right?) | ||
| TimToady | rakudo: say [**] 2, 3, 4 | 19:22 | |
| p6eval | rakudo 30e2cf: OUTPUT«4096» | ||
| TimToady | where associativity matters, the algorithm is free to reorder only to the extent that a correct result is assured :) | 19:23 | |
| however, I think [**] is quite unlikely to be seen in Real Code® | 19:24 | ||
| on the other hand, assignop precedence is also r2l | 19:25 | ||
| which matters mostly for => | |||
| hmm | |||
| rakudo: say [=>](1..5).perl | 19:26 | ||
| p6eval | rakudo 30e2cf: OUTPUT«say requires an argument at line 2, near " [=>](1..5"in Main (src/gen_setting.pm:2536)» | ||
| TimToady | rakudo: [=>](1..5).perl.say | ||
| p6eval | rakudo 30e2cf: OUTPUT«Syntax error at line 2, near "[=>](1..5)"in Main (src/gen_setting.pm:146)» | ||
| TimToady | std: [=>](1..5).perl.say | ||
| p6eval | std 28663: OUTPUT«ok 00:02 102m» | ||
| TimToady | missing op in rakudo | ||
| i-blis | hmm | 19:27 | |
| TimToady | => is more or less equiv to . in Lisp | ||
| i-blis | p6eval is a parrot build? | ||
| i see | 19:28 | ||
| TimToady | no, it runs several implemenations | ||
| diakopter | nations indeed | ||
| TimToady | perl6: say ~ ^10 | ||
| p6eval | pugs, rakudo 30e2cf: OUTPUT«0 1 2 3 4 5 6 7 8 9» | ||
| ..elf 28663: OUTPUT«Undefined subroutine &GLOBAL::prefix__94 called at (eval 125) line 3. at ./elf_h line 5881» | |||
| ..sprixel 28663: OUTPUT«Sprixel Error: Symbolic_unary prefix__S_Caret not yet implemented; srsly!!?!??» | |||
| TimToady | otoh | 19:29 | |
| perl6: say ~^10 | |||
| p6eval | rakudo 30e2cf: OUTPUT«0 1 2 3 4 5 6 7 8 9» | ||
| ..sprixel 28663: OUTPUT«Sprixel Error: Symbolic_unary prefix__S_TildeCaret not yet implemented; srsly!!?!??» | |||
| ..elf 28663: OUTPUT«Undefined subroutine &GLOBAL::prefix__126_94 called at (eval 123) line 3. at ./elf_h line 5881» | |||
| ..pugs: OUTPUT«ÎÏ» | |||
| TimToady | pugs is the correctest there | 19:30 | |
| pmichaud | need spectest? | ||
| TimToady | assuming one can convert 10 to a buffer and flip its bits | 19:31 | |
| probably has one that is fudged or skipped | |||
| but feel free to check | |||
| i-blis | ok | ||
| TimToady | i-blis: the tests and specs are also in the pugs repo, if you want to hack on them | 19:32 | |
| do you have a pugs repo commit bit? | |||
| i-blis | Steeve's presentation is quite hard to follow toward the end :) | ||
| TimToady | if not, /msg me your email and preferred svn nick | 19:33 | |
| i-blis | no i don't | ||
| i don't need commit i think | |||
| TimToady | yes, well, he's talking to some *very* *bright* people at ICFP | ||
| that doesn't matter, you oughta have a commit bit anyway | |||
| just to keep on your countertop in case you decide you need one | 19:34 | ||
| if you start reading tests/specs it's almost certain you'll run across something you'll want to fix | 19:35 | ||
| commitbit sent | 19:36 | ||
| i-blis | ok, i'll see | 19:37 | |
| TimToady | it's customary to add yourself to AUTHORS to test the bit | ||
| around here we do forgiveness rather than permission | |||
| so if you screw up, we'll just fix it | |||
| i-blis | good | ||
| i msg'ed you | |||
|
19:39
jamtech joined
|
|||
| jnthn | My word, while I was away in Asia I think they installed the brightest lighting rig ever around the city castle. | 19:48 | |
| Between it and the new white-ish restored stonework, you almost need sunglasses to look at it by night now. | |||
| TimToady: I'm planning to pop something in the spec about signature introspection. | 19:51 | ||
| TimToady: I'm thinking .params gets you an array of SignatureItem objects (plz improve name ;-)) with properties like "name", "type", "slurpy", etc. | 19:52 | ||
| TimToady: Does that sounds like a reasonable direction/starting point? | |||
| (BTW, anyone else welcome to chime in too ;-)) | |||
| TimToady | why not just Parameter objects? | 19:53 | |
| jnthn | TimToady: See, this is why I ask you to name stuff. :-) | ||
| Parameter it is. | |||
| jnthn feels silly for not thinking of that now. | 19:54 | ||
| TimToady | it would be nice if there was a way to bind to the front of an argument lists and return the position where it stopped | 19:55 | |
| then you wouldn't need any introspection to do C<for> | |||
| jnthn | Use case? | ||
| We need that now? | 19:56 | ||
| TimToady | optional params | ||
| for @list -> $x, $y? { ... } | |||
| jnthn | Oh, you mean work through an iterator up to the point where the signature has taken all it can? | ||
| TimToady | yes | 19:57 | |
| I think that should be some kind of primitive | |||
|
19:57
Lorn joined
|
|||
| TimToady | and not dependend on polling the sig for .arity or .count | 19:57 | |
| *ent | |||
| just something to bear in mind | |||
| jnthn | Well, the only real difference is that you don't panic when you find you have some stuff still in the list. | ||
| TimToady | right, and find a way to give the pos back | 19:58 | |
| or iterate the iterator | |||
| jnthn | If it's an iterator, it manages the pos though? | ||
| TimToady | presumably, if it's destructive readout | ||
| some forms of binding want to give the whole thing back if they dont match completely | 19:59 | ||
| jnthn | I guess then it's just making sure the binder can handle an iterator as input rather than a capture. | ||
| erm | |||
| as well as | |||
| I don't see that being too hard to achieve. | |||
| Hmm. Give the whole thing back is a little trickier though. | 20:00 | ||
| TimToady | I just see that as a more natural approach than introspecting | ||
| jnthn | Yeah, it likely is. | ||
| TimToady | well, but you have to do that when trying against multiple candidates | ||
| jnthn | oh hmm | ||
| yes. | |||
| That wouldn't play nice with multi dispatch otherwise. | 20:01 | ||
| TimToady | I almost envision it as an extra * parameter that just binds the rest of the list | ||
| jnthn | That could work too. | 20:02 | |
| TimToady | so for @list -> $x, $y turns into -> $x, $y, *@rest, and then we replace @list with @rest and continue | ||
| assuming binding to slurpy is also lazy | |||
| jnthn | Not sure how the last step would look | ||
| (replace...) | |||
| Well, that is also an assumption... :-) | |||
|
20:07
SmokeMachine joined
20:12
hercynium joined
|
|||
| jnthn | (though not an assumption that I find unreasonable) | 20:13 | |
| jnthn was distracted sorting out laundry | |||
| TimToady: Where does the sig introspection spec belong? | 20:22 | ||
| TimToady: S06? | |||
| moritz_ | you could also put it in S32::$somewhere, but then nobody would take it serious ;-) | 20:24 | |
| jnthn | :-P | ||
| sbp | tell them the S stands for Serious | 20:26 | |
| moritz_ | it stands for Speculation | ||
| sjohnson | heh | 20:29 | |
| S == Srsfknbzns | |||
| TimToady | rakudo: sub myfor (@list,&block) { 1 while block(|@list) }; myfor(0..10, -> $x, $y?, *@x where { @CALLER::list = @x } { say $x, $y//'undef' }) | 20:30 | |
| that almost works | |||
| p6eval | rakudo 30e2cf: TIMED_OUT | ||
| TimToady | says 01 over and over | ||
| moritz_ | no CALLER yet | ||
| TimToady | ah | 20:31 | |
| jnthn | Aye, it'll be putting it - quite literally - into the package CALLER. :-) | ||
|
20:31
snearch joined
|
|||
| TimToady | but you get the idea | 20:31 | |
| jnthn | Yes. | ||
| TimToady | course, it shouldn't work anyway for at least two other reasons | ||
| jnthn | One being @list isn't a context var? | 20:32 | |
| TimToady | and the other is that @list is not rw | ||
| well, in any case, we can't rely on the user to tack on the *@x parameter | 20:33 | ||
| so we need some way for 'for' to request the transformation on the block's sig | 20:34 | ||
|
20:34
payload joined
|
|||
| jnthn | Feels like we're a generalization away from a neat solution. | 20:37 | |
| Or something. | |||
| TimToady | it's either some special invoke that assumes the extra slurpy, or some way to derive a block/sig with the return path via a wrap or some such indirection | 20:39 | |
| or a way to pull out the block's sig and use it as part of a larger sig | 20:40 | ||
| anyway, my point is that we should treat the need for .arity and such to be a design smell | 20:41 | ||
| nap & | 20:42 | ||
| pugs_svn | r28664 | jnthn++ | First cut of specification for signature introspection. | 20:49 | |
|
20:52
payload1 joined
|
|||
| pugs_svn | r28665 | jnthn++ | [spec] Add missing invocant and multi_invocant traits from signature introspection interface. | 21:04 | |
| moritz_ | jnthn++ | 21:10 | |
|
21:13
pmurias joined
21:14
quietfanatic joined
|
|||
| jnthn | moritz_: In theory, this makes the signature operator fix deleting two characters. ;-) | 21:17 | |
| pugs_svn | r28666 | kyle++ | typo fix | 21:19 | |
|
21:20
Whiteknight joined
|
|||
| moritz_ | jnthn: ;-) | 21:20 | |
| PerlJam | (progress by removing things)++ | 21:21 | |
| jnthn | ...while I like typo fixes, I can't see the typo in that diff? | 21:22 | |
| oh | |||
| way | |||
| :-) | |||
| meh | |||
| thanks kyle :-) | 21:23 | ||
| KyleHa | *bow* | ||
| dalek | kudo: 10069b6 | chromatic++ | src/ops/perl6.ops: [ops] Fixed some compiler warnings by casting malloc() results. |
21:25 | |
| KyleHa | When I build Rakudo with 'make' it works, but with 'make -j 3|5', it breaks. Undeclared dependency somewhere? | 21:26 | |
| moritz_ | KyleHa: it works with make -j 3 (and 2 cores) here... how does it fail for you? | ||
| KyleHa | perl6_ops.c:29:38: error: ../pmc/pmc_p6lowlevelsig.h: No such file or directory | 21:27 | |
| jnthn | Oh hmm | ||
| Maybe PMCs have to come before ops is not enforced. | |||
|
21:28
ShaneC1 joined
|
|||
| moritz_ | how do I write a multi that takes an undef as its only argument? ($x where undef)? | 21:29 | |
| jnthn | moritz_: Should work, if smart-matching agaisnt undef checks undefinedness. | ||
| moritz_ | it does | 21:30 | |
| jnthn | Then yes, should work. | ||
| moritz_ | rakudo: say undef ~~ undef, 0 ~~ undef; | ||
| p6eval | rakudo 30e2cf: OUTPUT«10» | ||
| jnthn | Should do what you want them. :-) | ||
| I don't think you'll get away with... | |||
| moritz_ | just wandering if there was a cooler way ;-) | ||
| jnthn | std: multi foo(undef) { } | ||
| p6eval | std 28665: OUTPUT«[31m===[0mSORRY![31m===[0mInvalid typename undef at /tmp/ixjQYhJGNa line 1:------> [32mmulti foo(undef[33m⏏[31m) { }[0mFAILED 00:02 100m» | ||
| jnthn | aye | ||
| 'fraid not. :-) | |||
| moritz_ | rakudo: multi sub foo(undef) { say '\\\\o/' }; foo(undef) | 21:31 | |
| p6eval | rakudo 30e2cf: OUTPUT«Malformed routine definition at line 2, near "foo(undef)"in Main (src/gen_setting.pm:146)» | ||
| quietfanatic | std: multi foo(Any:U) {...} | 21:33 | |
| p6eval | std 28665: OUTPUT«[31m===[0mSORRY![31m===[0mInvalid typename Any at /tmp/CWGlMiJEUK line 1:------> [32mmulti foo(Any:U[33m⏏[31m) {...}[0m expecting circumfixFAILED 00:01 99m» | ||
| moritz_ | now that's a bit LTA error message ;-) | ||
| quietfanatic | That's not quite the error I expected. | ||
| moritz_ | rakudo: multi a(Int $x) { say 'Int' }; multi a(Object $x) { say 'Object' }; a(3|4) | 21:34 | |
| p6eval | rakudo 30e2cf: OUTPUT«Object» | ||
| jnthn | rakudo: multi a(Int $x) { say 'Int' }; multi a(Any $x) { say ' }; a(3|4)Any' | 21:37 | |
| p6eval | rakudo 30e2cf: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""in Main (src/gen_setting.pm:146)» | ||
| jnthn | rakudo: multi a(Int $x) { say 'Int' }; multi a(Any $x) { say 'Any' }; a(3|4) | ||
| p6eval | rakudo 30e2cf: OUTPUT«IntInt» | ||
| jnthn | \\o/ | ||
|
21:37
tak11 joined
21:38
payload joined
21:40
Intensity joined
|
|||
| jnthn | moritz_: Yay. Series fixed. :-) | 21:41 | |
| moritz_ | \\o/ | 21:42 | |
| jnthn | Hey, this means we can write Signature.perl in Perl 6. | ||
| moritz_ | \\o/ | 21:43 | |
| jnthn | Time to re-triage the bugs. | 21:45 | |
|
21:52
rgrau joined
|
|||
| quietfanatic | rakudo: sub add ($a, $b) {$a + $b}; sub wrapper (*@_) {add(@_[])}; wrapper(3,4) | 21:53 | |
| p6eval | rakudo 30e2cf: OUTPUT«too few arguments passed (1) - 2 params expectedin sub add (/tmp/tP7MizKgkh:1)called from sub wrapper (/tmp/tP7MizKgkh:2)called from Main (/tmp/tP7MizKgkh:0)» | ||
| quietfanatic | rakudo: sub add ($a, $b) {$a + $b}; my @x = 3, 4; add(@x[]) | 21:54 | |
| p6eval | rakudo 30e2cf: OUTPUT«too few arguments passed (1) - 2 params expectedin sub add (/tmp/leGcr4PgkW:1)called from Main (/tmp/leGcr4PgkW:0)» | ||
| quietfanatic | rakudo: sub add ($a, $b) {$a + $b}; my @x = 3, 4; add(@x.values) | ||
| p6eval | rakudo 30e2cf: OUTPUT«too few arguments passed (1) - 2 params expectedin sub add (/tmp/oAetf5H0DR:1)called from Main (/tmp/oAetf5H0DR:0)» | ||
| quietfanatic | What's wrong with what I'm doing? | ||
| moritz_ | arrays don't flatten automatically in argument lists | 21:55 | |
| you have to do that with |@_ | |||
| quietfanatic | I thought the [] or .values would flatten... | ||
| moritz_ | not in argument lists. | ||
| quietfanatic | rakudo: sub add ($a, $b) {$a + $b}; my @x = 3, 4; add(|@x) | ||
| p6eval | rakudo 30e2cf: ( no output ) | ||
| moritz_ | they are essentially slice context | ||
| quietfanatic | I guess I haven't quite got my head around the flattening/nonflattening business. | 21:56 | |
| moritz_ | it's a hairy business | 21:57 | |
| quietfanatic | Hmm, still not working for what I'm doing... | 21:59 | |
| Perhaps it doesn't work on Parrot NCI functions. | 22:04 | ||
| jnthn | That wouldn't be entirely surprising. :-/ | 22:06 | |
| quietfanatic | In which case, I shall have to know the number of parameters ahead of time. | 22:07 | |
| It can be done. It's just a bit harder. | |||
| This is odd. | 22:09 | ||
| rakudo: my @x = 3, 4; say |@x.perl | |||
| p6eval | rakudo 10069b: OUTPUT«argument doesn't arrayin sub say (src/gen_setting.pm:1730)called from Main (/tmp/QYB3fZHi1v:0)» | ||
| quietfanatic | "argument doesn't array" | ||
| I came upon this by accident, but... | |||
| moritz_ | @x.perl returns a string | 22:10 | |
| lambdabot | Unknown command, try @list | ||
| jnthn | rakudo: my @x = 3, 4; say |(@x.perl) | ||
| p6eval | rakudo 10069b: OUTPUT«argument doesn't arrayin sub say (src/gen_setting.pm:1730)called from Main (/tmp/aBW29d9j4b:0)» | ||
| moritz_ | |Str doesn't make any sense | ||
| jnthn | rakudo: my @x = 3, 4; say (|@x).perl) | ||
| quietfanatic | rakudo: say |"Str" | ||
| p6eval | rakudo 10069b: OUTPUT«Syntax error at line 2, near ")"in Main (src/gen_setting.pm:146)» | ||
| rakudo 10069b: OUTPUT«argument doesn't arrayin sub say (src/gen_setting.pm:1730)called from Main (/tmp/jSdUGar7Fl:0)» | |||
| jnthn | rakudo: my @x = 3, 4; say (|@x).perl | ||
| p6eval | rakudo 10069b: OUTPUT«[3, 4]» | ||
| quietfanatic | That was how it happened, yes. I removed the parens. | ||
| And forgot to remove the | | 22:11 | ||
| dalek | kudo: 36e82b6 | chromatic++ | src/pmc/p6lowlevelsig.pmc: [PMC] Fixed compiler warnings in P6LowLevelSig PMC. |
||
| kudo: 77088bc | chromatic++ | src/pmc/perl6multisub.pmc: [PMC] Fixed compiler warnings in Perl6MultiSub PMC. |
|||
| jnthn | Precedence strikes. | ||
| dalek | kudo: 4f997a0 | chromatic++ | src/pmc/p6opaque.pmc: [PMC] Fixed a compiler error in the P6Opaque PMC. |
||
| jnthn | chromatic++ fixes my crappy C code :-) | ||
| quietfanatic | But that error message is weirder than I could've hoped for. :) | ||
| jnthn does a spectest run, hoping this means his branch is mergable. | 22:14 | ||
|
22:15
justatheory joined
22:16
Whiteknight joined,
TopoMorto joined
|
|||
| jnthn reads the regex actions.pm file and is impressed | 22:17 | ||
|
22:17
Lorn joined
|
|||
| jnthn | method metachar:sym<$>($/) { # ah, so that's how we define actions for 'em. :-) | 22:18 | |
| quietfanatic: btw, was it you that was asking about signature introspection? | 22:21 | ||
| quietfanatic | Yes. | 22:22 | |
| jnthn | quietfanatic: I put something in the spec this evening. | ||
| quietfanatic: And implemetned said bit of spec in my branch. | |||
| If the current spectest run passes, I'll merge. :-) | |||
| quietfanatic | I see. I shall pull and try it. | ||
| Hmm | |||
| Your branch...how do I get that branch? | |||
| jnthn | quietfanatic: Wait 30 mins or so, with luck it'll be master soon. :-) | 22:23 | |
| quietfanatic | Or maybe I'll wait for the merge then. | ||
| jnthn | If you git pull and then git checkout llsig though | ||
| Then you'll probably have it. | |||
| moritz_ | ah, now I also get the parallel build failures | 22:25 | |
| jnthn grabs a beer and relaxes a bit | |||
| quietfanatic | I am almost done with a preliminary-version Link::C module. | 22:26 | |
| jnthn | quietfanatic: ooh, nice | 22:27 | |
| moritz_ | jnthn: how are you supposed to get the sigil of a parameter through introspection? | ||
| quietfanatic | It only works with functions on native data types right now. | ||
| jnthn | .name.substr(0, 1) | ||
| quietfanatic | (such as int, char *, but no structs) | ||
| moritz_ | ok, so it's in name | ||
| jnthn | moritz_: yes | 22:28 | |
| moritz_: name The name of the lexical variable to bind to, if any | |||
| moritz_ | ok | ||
| jnthn | The name of the lexical includes its sigil. | ||
| Though | |||
| heh | |||
| moritz_ | that implies sigil, right | ||
| jnthn | This definition is kinda sucky once we hit attributive parameters. | ||
| So it'll likely want a tweak of some kind. | 22:29 | ||
| Anyway, now there's a spec, if anybody fancies writing some tests for sig introspection, that'd be great. | |||
| A "git pull" updates all branches, yes? | 22:30 | ||
| moritz_ | all tracked branches | 22:31 | |
|
22:31
i-blis joined
22:40
NorwayGeek joined
22:42
Lorn_ joined
|
|||
| pugs_svn | r28667 | lwall++ | [S12] revise type subset pair notation a bit | 22:55 | |
| jnthn | OK, going for merge! | 22:58 | |
| Of course, it's the next branch where The Real Fun happens. :) | |||
| pmichaud | branch*es* :) | ||
| jnthn | ;-) | 22:59 | |
| Well, the next one is The Really Big One for the binding changes. | |||
| But yes, for other stuff I see many more. :-) | 23:00 | ||
| Juerd really needs to learn how to use revision control thingies, so he can decipher the other half of irc. | |||
| jnthn | I expect to do some more things in master first. | ||
| Cleanups, preparation, etc. | 23:01 | ||
| Merged. Please note re-configure needed. | 23:02 | ||
|
23:02
dalek joined
|
|||
| jnthn | And this includes the parameter introspection stuff. | 23:02 | |
| quietfanatic: ^^ | 23:03 | ||
| quietfanatic | Yay! | ||
| jnthn | No doubt we'll extend and tweak it a bit. | 23:04 | |
| obra_ | 2C | 23:05 | |
|
23:06
i-blis left
|
|||
| quietfanatic | I can't clone...no doubt the fault of my college's network... | 23:12 | |
| Oh there we go, never mind. | 23:13 | ||
|
23:17
payload joined
23:19
NorwayGeek joined
|
|||
| quietfanatic | rakudo: .type.say for (sub (Int $a, Str $b) {...}).signature.params | 23:25 | |
| p6eval | rakudo 4f997a: OUTPUT«Attributes of type 'struct llsig_element **' cannot be subclassed from a high-level PMC.current instr.: 'perl6;Perl6Role;!select' pc 5073 (src/classes/Role.pir:55)» | ||
|
23:25
lumi joined
|
|||
| quietfanatic | Worked over here. | 23:25 | |
| anyway, jnthn++ | |||
| jnthn | quietfanatic: If that works for you, I suspect it's just that rakudo bot here is not updated yet. | ||
| quietfanatic | makes sense | 23:26 | |
|
23:28
Confield joined
23:35
dalek joined
23:50
NorwayGeek joined
|
|||
| pugs_svn | r28668 | lwall++ | [S06,S12] clarify when yada is taken to be a stub | 23:51 | |
| r28668 | [S06] clarify semantics of package subs | |||
| r28668 | [S06] document that subs default to 'my' scope now | |||
| jnthn | TimToady: Subs are now lexical by default? | 23:53 | |
| TimToady: How much else is going to become lexical by default? | |||
|
23:54
mepplock joined
|
|||
| jnthn | Well, better phrased, are the other things you expect to become... | 23:55 | |
| pugs_svn | r28669 | lwall++ | [STD] improve message on unrecognized type names | ||
| r28669 | [STD] recognize :D, :U, and :_ type modifiers | |||
| r28669 | [STD] allow sub &*foo form of contextual sub declaration | |||
| TimToady | I've been parsing subs as 'my' by default for a month or two now, and it doesn't seem to cause too much indigestion | 23:56 | |
| I don't expect classes to become lexical only, since people want to mention those globally often | |||
| jnthn | TimToady: OK, makes sense. | ||
| TimToady: One other thing. You mention :D and :U are syntactic sugar for a where constraint. | 23:57 | ||
| TimToady: Does this definition allow for a compile to do something smarter, though? | |||
|
23:57
aleK69 joined
|
|||
| TimToady | sure | 23:57 | |
| jnthn | OK | ||
| TimToady | .defined is deep magic in any case :) | 23:58 | |
| jnthn | I note that this definition means that :(Int:_) and :(Int:D) sort to the same level in the multi-dispatch ordering. | ||
| Oh, wait | |||
| They don't | |||
| Since :_ is a no-op | 23:59 | ||
| TimToady | otoh, it means nearly all sigs are constrained, which is a problem | ||
| jnthn | In fact, I'm curious why we even have :_ | ||
| Since it's the default. | |||
| Well, not really | |||
| TimToady | reread the section, it's not always | ||
| jnthn | You normally don't care, no? | ||
| TimToady | we currently default non-invocant args to :D | ||
| but that's negotiable, I suppose | |||