»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
tadzik ep 00:00
00:00 bluescreen10 joined 00:01 tyatpi left
jnthn That's probably going to prove hard to find :( 00:02
00:03 sili left
tadzik :( 00:04
00:05 alyx_ left, alyx_ joined 00:06 alyx_ is now known as alyx
tadzik want a patch to investigate, would that help? 00:06
jnthn Yes, though it'll be tomorrow - wanna sleep soon. :) 00:08
tadzik oh, that's an idea :) 00:10
I'm afraid to remove the commented out code now, it may impact the bug :P
jnthn Trouble is that different memory layout on my machine may well hide the bug too :/ 00:11
tadzik I should be able to provide a shell on my laptop if that helps 00:12
jnthn: want this pushed to a branch, or just a patch?
jnthn tadzik: Branch is easier for me.
tadzik okay 00:13
shit, removing one of the say()s changed the bug 00:15
to Method 'WHY' not found for invocant of class 'NQPLexPad'
evil enough, so I'll keep it that way 00:16
jnthn Well, yeah, it confirms it's something being unmarked and getting GC'd
dalek kudo/wherefore-gc-bug: 396201b | tadzik++ | / (6 files):
Fix Pod::Block::Declarator ordering. Reveals an ugly GC bug
00:17
tadzik I'm using the file from gist.github.com/1130921 00:18
jnthn ok, thanks; I investigate tomorrow. 00:19
tadzik ++jnthn++ 00:20
00:21 Alias left 00:26 tyatpi joined 00:27 isBEKaml left 00:32 bluescreen10 left
tadzik falls asleep 00:37
g'night 00:38
jnthn night, tadzik 00:40
00:41 tyatpi left 00:45 moritz joined 00:53 PacoLinux__ joined 00:54 ranott left, PacoLinux left, PacoLinux__ is now known as PacoLinux
diakopter is amazed jnthn is still awake 00:58
moritz has parental insomnia
diakopter aha
oh wait you're not jnthn 00:59
jnthn is just a late night person and doesn't have to get up too early tomorrow :)
dalek kudo/nom: 31e7121 | jonathan++ | src/core/traits.pm:
Harden export trait a bit to avoid hard to find issues.
kudo/nom: d2bfaa5 | jonathan++ | t/spectest.data:
3 more tests that we can pass now Test::Util works again.
kudo/nom: ab4eacb | jonathan++ | NOMMAP.markdown:
Remove some completed entries from nommap (tadzik++ for noticing).
kudo/nom: ed3094f | jonathan++ | src/ (4 files):
Make sure we give appropriate method names to auto-generated accessors and delegation methods, so introspection works out. Also try to handle multi exporting a bit more sanely.
00:59 tokuhirom left
jnthn The various tests that use Test::Util pass for me when run directly, but fail under the harness. :/ 00:59
01:00 tokuhirom joined
jnthn That was the way in master too, so I guess @other are seeing the same kind of thing. 01:00
But only one some platforms.
Anyway, can look more tomorow. The advent day11 one, I'm not sure how ever passed before...fixed now, anyways. 01:01
moritz jnthn: got an example of a Test::Util based file?
jnthn moritz: Any on those added in d2bfaa5 01:02
moritz ok
jnthn S02-magicals/pid.t for example
I turned on various augment ones too :)
S32-scalar/undef.t looks close to passing - just one clump of fail, iirc. 01:03
01:03 PacoLinux left
jnthn Anyway, I should sleep a bit. :) 01:03
night, all o/
01:04 tokuhirom left 01:07 envi joined
dalek ast: fe922ea | moritz++ | S32-str/trim.t:
fudge a .trim test for rakudo
01:08
kudo/nom: b6e553a | moritz++ | / (2 files):
trim-trailing, trim
01:10
moritz when I work around the missing MAIN thing, ufo works again 01:15
01:15 donri joined 01:16 Chillance left
moritz nom: say (1 + *).WHAT 01:21
p6eval nom: OUTPUT«_block1014␤»
diakopter nom: say '.'.IO.X 01:27
p6eval nom: OUTPUT«Method 'X' not found for invocant of class 'IO'␤current instr.: '_block1002' pc 91 ((file unknown):78104768) (/tmp/S6w2xEt5qa:1)␤»
diakopter nom: say '.'.IO.x
p6eval nom: OUTPUT«Bool::True␤»
diakopter moritz: are the uppercase -R -W -X -O still spec'd in p6 01:28
real uid
tadzik great, not only I can't sleep, but I'm also hungry :/
moritz diakopter: dunno 01:30
01:44 moritz left
[Coke] looks like we just got about 5 tests passing again. 01:45
well, running, I mean. fudges coming shortly
dalek kudo/nom: d601bb0 | moritz++ | / (3 files):
Cool.trim, Str.words, run words.t
kudo/nom: 5b9a992 | moritz++ | NOMMAP.markdown:
note state of Whatever-currying
kudo/nom: 30a9776 | moritz++ | src/core/Any.pm:
generalize .[Whatever] case to .[Callable]
kudo/nom: 4a50e0a | moritz++ | / (4 files):
put CallFrame back into place
[Coke] ... /me reups to make sure he catches moritz's changes. 01:47
soh_cah_toa didn't somebody mention the other day how to install rakudo w/o the parrot 3.6 release? i forget :\ 01:50
01:54 woosley joined 02:06 Moukeddar joined, jaldhar_ left, jaldhar_ joined 02:18 Moukeddar left
dalek ast: 7805860 | Coke++ | / (8 files):
nom fudge
02:28
02:37 daniel-s joined
dalek ast: 8bdc636 | Coke++ | integration/advent2009-day11.t:
unfudge
02:40
02:50 sili joined
dalek ast: f735ef3 | Coke++ | S06-operator-overloading/imported-subs.t:
nom fudge
03:09
[Coke] Files=393, Tests=10870, 1517 wallclock secs ( 6.11 usr 2.80 sys + 1494.17 cusr 138.79 csys = 1641.87 CPU)
dalek kudo/nom: ad24903 | Coke++ | t/spectest.data:
run more fudged tests/track failures
03:10
03:15 Trashlord left
[Coke] and that's missing.... one test file, I think. 03:17
03:17 thou left, thou joined 03:23 Su-Shee_ joined 03:26 Trashlord joined 03:27 Su-Shee left 03:33 shinobicl left 03:37 programming joined 03:43 shinobicl__ joined 03:44 wolfman2000 left 03:46 pushStack joined 03:53 shinobicl__ left 03:58 pushStack left 04:04 bpalmer joined 04:07 satyavvd joined 04:21 soh_cah_toa left 04:24 birdwindupbird joined 04:26 jaldhar_ left, jaldhar_ joined 05:07 jaldhar_ left 05:23 programming left 05:24 odoacre joined 05:31 agentzh joined 05:40 jaldhar_ joined 05:52 daniel-s left, fbass joined 05:53 daniel-s joined, fbass left, fbass joined 05:59 agentzh left 06:02 jaldhar_ left, jaldhar_ joined 06:06 Su-Shee_ is now known as Su-Shee 06:07 _jaldhar_ joined 06:08 jaldhar_ left 06:14 moritz joined 06:19 koban joined
moritz \o 06:22
nom: say ?(0 & 1)
p6eval nom: OUTPUT«Bool::False␤»
moritz nom: say ?(0 S& 1)
p6eval nom: OUTPUT«Bool::True␤»
moritz finds that dubious
06:23 bpalmer left 06:36 SHODAN joined 06:37 birdwindupbird left 06:44 birdwindupbird joined 06:49 Mowah joined
cognominal I am not to sure if i can submit that to github. This is camelia transmogrified in an octocat : gist.github.com/1131321 06:51
07:06 am0c joined 07:10 pernatiy left
dalek ast: 754bc98 | moritz++ | / (23 files):
rakudo unfudges
07:12
07:22 thou left 07:58 mj41 joined
jnthn morning, 08:05
#perl6
moritz mrnng jnthn 08:06
jnthn :)
moritz++ # overnight hacking
08:07 timbunce joined 08:11 im2ee joined 08:12 moritz left, moritz joined, im2ee left 08:22 sivoais left 08:39 agentzh joined, ribasushi joined 08:41 timbunce left, wtw joined 08:56 dakkar joined
moritz nom: my @a = (1, {a => 2, b => 3 }, 4), say -<<@a; 08:57
p6eval nom: OUTPUT«␤»
09:02 odoacre left, odoacre joined 09:04 Alias joined 09:13 Trashlord left
dalek odel: 2bed502 | (Martin Berends)++ | c/t (7 files):
odel/c] patches for OS X (bbkr++ for server shell account) and MinGW
09:23
09:34 ab5tract joined
dalek ast: c1ac92d | moritz++ | S03-metaops/hyper.t:
fudge hyper.t for rakudo
09:36
kudo/nom: 95e209b | moritz++ | t/spectest.data:
run (heavily fudged) hyper.t
09:37
09:41 Trashlord joined 09:42 MayDaniel joined
moritz nom: say 'uc' ~~ .uc 09:43
p6eval nom: OUTPUT«Bool::False␤»
moritz perl6: say 'uc' ~~ .uc 09:44
p6eval pugs: OUTPUT«1␤»
..rakudo 922500, niecza v8-45-g366d65b: OUTPUT«Bool::False␤»
moritz somehow I have my trouble with that response
sorear I am very certain pugs is wrong wrt the current spec
~~ is a topicalizer now
moritz right, so response is 'uc'.uc
sorear 'uc' ~~ .uc means 'uc' ~~ 'UC' 09:45
moritz uhm
sorear which means 'uc' eq 'UC'
moritz does it really smartmatch the result again?
jnthn It only does one smart-match
When .uc is evaluated (before we call ACCEPTS) then the LHS is in $_
09:45 dual left
jnthn nom: say 'UC' ~~ .uc 09:46
p6eval nom: OUTPUT«Bool::True␤»
moritz ah right, the syntactic forms where removed
jnthn Yes.
moritz then S03-smartmatch/any-method needs to be adjusted
nom: say 'abc' ~~ m/./ 09:47
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'ACCEPTS'. Available candidates are:␤:(Mu, Mu $topic, Mu %_)␤␤current instr.: 'ACCEPTS' pc 702744 (src/gen/CORE.setting.pir:178165) (src/gen/CORE.setting:427)␤»
09:47 woosley left 09:50 Mowah left
dalek ast: a96285b | moritz++ | S03-smartmatch/any-method.t:
rewrite smart-matching test to conform to current spec
09:50
09:52 sunnavy joined, ribasushi_ joined 09:54 ribasushi left, ribasushi_ is now known as ribasushi 09:56 dual joined
moritz nom: my %h = a => 1; say 'a' ~~ %h 10:07
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'ACCEPTS'. Available candidates are:␤:(Mu, Mu $topic, Mu %_)␤␤current instr.: 'ACCEPTS' pc 702744 (src/gen/CORE.setting.pir:178165) (src/gen/CORE.setting:427)␤»
moritz nom: say [1, 2, 3].any.perl 10:08
p6eval nom: OUTPUT«any(1, 2, 3)␤»
moritz S03 has 10:10
Scalar Hash hash entry existence X.{$_}:exists
should that be s/Scalar/Cool/ ?
jnthn Cool or Any, I guess. 10:11
moritz there's another entry for Any 10:12
jnthn ah
Yeah, Cool seems reasonable.
dalek ecs: e874ee4 | moritz++ | S03-operators.pod:
[S03] remove Scalar from the smart matching table
10:15
ast: c887819 | moritz++ | S03-smartmatch/scalar-hash.t:
fix test descriptions
10:19
kudo/nom: 3ea71cf | moritz++ | / (2 files):
add missing :Ds to EnumMap, start with EnumMap.ACCEPTS
10:26
10:27 envi left 10:33 envi joined 10:34 nbrown left, [particle]1 left 10:35 nbrown joined 10:39 jferrero left 10:40 Aridai joined, jferrero joined, _jaldhar_ is now known as jaldhar 10:46 mj41 left 10:58 amkrankr1leuen joined 10:59 amkrankruleuen left 11:01 kjeldahl left 11:02 mj41 joined 11:03 Aridai left 11:11 SHODAN left 11:12 kboga left 11:15 Woodi joined 11:25 Woodi left
tadzik good noon 11:29
jnthn o/ tadzik 11:30
tadzik has a new bike
mberends likes bikes 11:31
11:33 im2ee joined
tadzik cognominal++ # hilarous 11:34
an actual laughter was produced, aloud
frettled tadzik: so now there's more bikeshedding on the horizon? 11:37
tadzik aye :)
11:39 kjeldahl joined, pernatiy joined
moritz nom: my $a = [1, 2, 3]; my %h = 1 => 3; say %h.exists($a.any) 11:48
p6eval nom: OUTPUT«Nominal type check failed for parameter '$key'; expected Str but got Int instead␤current instr.: 'exists' pc 760093 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:3955)␤»
jnthn Not Cool 11:49
11:49 satyavvd left 11:50 Woodi joined 11:52 noganex left, crked joined 11:54 mattp_ left
crked Morning, perl6. Is there a fixed date for the new Rakudo to come out? 11:54
tadzik it was supposed to be before the YAPC I think 11:55
11:56 mj41 left, sayu joined
crked So it means it will be released before 15th. Thanks. 11:59
12:00 Woodi left 12:01 Woodi joined
frettled That will be nice. 12:02
tadzik 15th is also my suggested Pencils Down on the GSoC 12:03
moritz quel coincidence
12:05 noganex joined 12:08 rdesfo joined 12:09 Trashlord left 12:12 rlb3_ joined
takadonet morning all 12:19
tadzik morning takadonet
12:19 PacoLinux joined 12:20 wamba joined 12:21 am0c left 12:22 rlb3_ left 12:23 Trashlord joined 12:33 am0c joined
jnthn nom: say Method ~~ Code 12:34
p6eval nom: OUTPUT«Bool::True␤»
12:36 ingy joined, hanekomu joined
dalek kudo/nom: 169baab | moritz++ | src/core/EnumMap.pm:
handle non-Str case of EnuMap.exists
12:39
kudo/nom: b4296cb | moritz++ | src/core/Match.pm:
Match.ACCEPTS
takadonet sorear: ping 12:46
moritz PAST::Compiler can't compile node of type SVG::Plot::AxisPosition 12:47
WHAT?
tadzik hihi
jnthn: btw, any progress on the GC bug?
jnthn tadzik: no :(
tadzik: I'm stuck on a roles-in-the-setting bug :/ 12:48
tadzik moritz: sounds familiar to my "DEBUG: attaching .WHY to class 'Sub'" and later "method .WHY not found for class NQPLexPad" :)
jnthn: ah
moritz fwiw SVG::Plot::AxisPosition is an enum
foomator hrm 12:49
jnthn Somehow it must be landing up in the PAST tree.
foomator wie implementier ich denn am besten nen syntaxcheck fuer funktionen, die ein user in einem config file hinterlegen koennen sollt
soll
also sowas wie substitute("AAA","BBB") 12:50
mir gehts eigentlich nur um Klammern und korrektes Quoting
security is in dem Fall vernachlaessigbar
moritz foomator: wrong channel?
foomator ich koennte natuerlich einfach eval machen
uh 12:51
sh**
moritz foomator: or wrong language at least :-)
foomator totally wrong channel :)
foomator kicks screen and the problem between chair and keyboard
12:52 im2ee left 12:53 bluescreen10 joined 12:55 im2ee joined
tadzik Files=397, Tests=11183, 1418 wallclock secs 12:56
\o/
moritz nom: my token wc { \w } 12:57
p6eval nom: OUTPUT«Rebuild in progress␤»
12:58 drbean left 13:04 kemono left
moritz tadzik: what does MAIN block on? capture-to-signature binding check? 13:07
tadzik yes
I think it's the one last thing
I can paste the MAIN.pm I figured up to this point 13:08
moritz tadzik: we could omit that for now, and just call &MAIN(|@processed_arglist)
tadzik mebbe. Should I commit that?
moritz tadzik: that way we won't get USAGE messages, but at least basic MAIn
yes, plese
*please
tadzik well, we'll get a random/first MAIN()
we're not able to choose the best one
is that what you mean, the first one available? 13:09
moritz can't we get a reference to the proto? 13:10
then it'll just dispatch to the tighted multi
tadzik so far we were cycling through $main.candidates
13:10 odoacre left
tadzik do hyperops now fully work? 13:10
moritz I know, and that's wrong
not fully
jnthn Why do we loop over the candidates? 13:11
tadzik okay, I'll just leave my workarounds
jnthn: no eye deer
jnthn I mean, it feels like you're poorly re-inventing the multi-dispatcher.
moritz jnthn: because that was the only way back in the days when I wired it up
tadzik gist.github.com/1131716
#126
moritz jnthn: oh, I think because the processing of command line arguments depends on the signature 13:12
which is really a bit bogus 13:13
tadzik I find this whole code a bit bogus :)
moritz should re-read the spec 13:14
tadzik what comes to my mind is: get positionals, get nameds, put the hard work on the dispatcher's back
13:14 PacoLinux left
moritz tadzik: it's not that easy 13:14
13:14 PacoLinux joined
moritz tadzik: if you have a Bool $foo in a signature, then a --foo in the argument list doesn't look for a value 13:15
tadzik hmm, true 13:16
jnthn Does it have to be that way?
I mean, if you see
--foo --bar
Then you know what comes next is a switch, not a value
So you stick a Bool in the capture
moritz there are basically two approaches to fix that 13:17
jnthn would be much more comfortable if somehow we could do this with MAIN(|process-args-into-capture(@*ARGS))
tadzik that'd be great, yes
moritz the first is jnthn++'s suggestions, make the argument parsing indepenent of the signature
the second is to say that we only consider the signature of the proto 13:18
jnthn I concede the current spec may not make that plausible.
pmichaud good morning, #perl6
jnthn o/ pmichaud
tadzik good morning pmichaud
moritz good morning pmichaud
tadzik off for bikeshedding
moritz I'm kinda in favor of removing the Bool special-case
13:19 sayu left
takadonet pmichaud: morning 13:19
pmichaud 13:10 <tadzik> do hyperops now fully work?
13:10 <moritz> not fully
...what's missing, ooc?
moritz pmichaud: look through the latest roast commits, I fudged hyper.t for rakudo
pmichaud moritz++ # thanks 13:20
moritz nom: my %h; %h<a b c>>>++; say %h.perl
p6eval nom: OUTPUT«("a" => 1, "b" => 1, "c" => 1).hash␤»
moritz hm, that one works
nom: nom: my @a = (1, {a => 2, b => 3 }, 4), say -<<@a;
p6eval nom: OUTPUT«Confused at line 1, near "nom: my @a"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
moritz nom: my @a = (1, {a => 2, b => 3 }, 4), say -<<@a;
p6eval nom: OUTPUT«␤»
moritz that one is dubious, for example 13:21
pmichaud nom: my @a = (1,2,3,4); say -<<@a;
p6eval nom: OUTPUT«-1 -2 -3 -4␤»
moritz nom: say <a b c d> >>+>> (1, 2, 3)
p6eval nom: OUTPUT«Sorry, lists on both sides of non-dwimmy hyperop are not of same length:␤ left: 4 elements, right: 4 elements␤␤current instr.: 'die' pc 662759 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:370)␤»
pmichaud nom: my @a = (1,{a=>2, b=>3},4); say -<<@a;
p6eval nom: OUTPUT«Default constructor only takes named arguments␤current instr.: 'die' pc 662759 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:370)␤»
pmichaud okay, there we're missing Hash.new
13:22 Mowah joined
moritz perl6: say ~(<a b c d> >>+>> (1, 2, 3)) 13:22
p6eval niecza v8-45-g366d65b: OUTPUT«Unhandled exception: System.FormatException: Unknown char: a␤ at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 ␤ at System.Double.Parse (System.String s, IFormatProvider provider) [0x…
..rakudo 922500: OUTPUT«1 2 3 1␤»
..pugs: OUTPUT«*** ␤ Unexpected ">>+>>"␤ expecting operator or ")"␤ at /tmp/6wMNCg35mX line 1, column 17␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @a != @b }; xyz(<a b c d>, (1,2,3)); 13:33
p6eval nom: OUTPUT«Bool::True␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @a.elems != @b.elems }; xyz(<a b c d>, (1,2,3));
p6eval nom: OUTPUT«Bool::False␤»
dalek ecs: 5f35620 | moritz++ | S06-routines.pod:
make MAIN more robust and less magic

The problem with the previous approach was that it made the parsing of command lines dependent on the signature of each multi MAIN candidate, making it impossible to first process @*ARGS and then do a multi dispatch.
A different approach at fixing that would be to use the signature of the proto of MAIN as reference instead. If somebody feels strongly about preserving the old magic, please revert this commit and clarify that magic command line parsing needs an explicit proto MAIN.
jnthn sanity++
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @a.Numeric; say @b.Numeric }; xyz(<a b c d>, (1,2,3)); 13:34
p6eval nom: OUTPUT«4␤12␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @a.WHAT; say @b.WHAT }; xyz(<a b c d>, (1,2,3));
moritz I feel the hubris of skipping the p6l discussion altogether, and put the foregone conclusion into the commit message :-)
p6eval nom: OUTPUT«List()␤Parcel()␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @a.Numeric; say @b.Numeric }; xyz(<a b c d>, (1,2,3)); 13:35
p6eval nom: OUTPUT«4␤12␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).flat.munch(4); say @a.Numeric; say @b.Numeric }; xyz(<a b c d>, (1,2,3));
p6eval nom: OUTPUT«4␤4␤» 13:36
moritz nom: sub MAIN { say "MAIN" }; sub MAIN_HELPER() { callframe(1).my<&MAIN>() }
p6eval nom: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤current instr.: 'MAIN_HELPER' pc 437 ((file unknown):60005096) (/tmp/ofjKjaPXeW:1)␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).flat.munch(4); say @a == @b }; xyz(<a b c d>, (1,2,3));
p6eval nom: OUTPUT«Bool::True␤»
moritz nom: sub M { say "MAIN" }; sub MH() { callframe(1).my<&M>() }; MH
p6eval nom: OUTPUT«MAIN␤»
moritz \o/
13:37 anbz joined
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).flat.munch(4); say @b.perl }; xyz(<a b c d>, (1,2,3)); 13:37
p6eval nom: OUTPUT«(1, 2, 3, 1)␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @b.perl }; xyz(<a b c d>, (1,2,3));
p6eval nom: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3))␤»
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b xx *).munch(4); say @b.elems }; xyz(<a b c d>, (1,2,3));
p6eval nom: OUTPUT«4␤»
13:40 thou joined
pmichaud nom: sub xyz(\$a, \$b) { my @a := $a.flat; my @b := ($b.flat xx *).munch(4); say @b.perl }; xyz(<a b c d>, (1,2,3)); 13:40
p6eval nom: OUTPUT«(1, 2, 3, 1)␤»
13:42 shinobicl joined
pmichaud > my @a = (1, {a => 2, b => 3}, 4); say (-<<@a).perl 13:47
(-1, {"a" => -2, "b" => -3}, -4).list
> say (<a b c d> >>+>> (1,2,3)).perl
(1, 2, 3, 1).list
>
de-fudging hyper.t now
[Coke] pmichaud++
moritz++ for previous defudging
shinobicl rakudo: sub some-func { say "3" }; some-func; sub some-3func { say "3" }; some-3func; 13:48
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Confused at line 22, near "sub some-3"␤»
[Coke] shinobicl: "An identifier may also contain isolated apostrophes or hyphens provided the next character is alphabetic." 13:49
feather.perl6.nl/syn/S02.html#Names
sorear good * #perl6
shinobicl oh... then i can forget calling a function "in-24h"...
[Coke] sorear: o/
sorear takadonet: i 13:50
[Coke] shinobicl: in_24h would work, methinks.
13:50 mattp_ joined
[Coke] or in24h 13:50
13:50 thou left
moritz how do I construct a capture from an Array and a Hash? 13:56
pmichaud \(|@a, |%h) # maybe? 13:57
13:57 isBEKaml joined
sorear = pmichaud 13:57
13:57 JimmyZ joined
moritz nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return |@a, |%h }; f(c) 13:58
p6eval nom: OUTPUT«AAny()␤»
moritz nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return \(|@a, |%h) }; f(|c) 13:59
p6eval nom: OUTPUT«Could not find sub &prefix:<|>␤current instr.: 'c' pc 515 ((file unknown):286) (/tmp/Fk0V8OBVhR:1)␤»
moritz hm
nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return @a, %h; }; my (@a, %h) := c; f |@a, |%h 14:00
p6eval nom: OUTPUT«Cannot use bind operator with this LHS at line 1, near " c; f |@a,"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
moritz nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return @a, %h; }; my (@a, %h) = c; f |@a, |%h
p6eval nom: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤current instr.: 'f' pc 448 ((file unknown):24018708) (/tmp/9TtR1gg_Cs:1)␤»
jnthn moritz: I tink the @a slurps up both things there. 14:01
nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return @a, %h; }; my ($a, $h) = c; f |$a, |$h
p6eval nom: OUTPUT«Method 'ARGLIST_FLATTENABLE' not found for invocant of class 'Str'␤current instr.: '_block1002' pc 119 ((file unknown):16494275) (/tmp/Q4ktbcYeG6:1)␤»
jnthn grr
nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return \@a, \%h; }; my ($a, $h) = c; f |$a.list, |$h.hash 14:03
p6eval nom: OUTPUT«AAny()␤»
jnthn oh, duh.
nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return \@a.Capture, %h.Capture; }; my ($a, $h) = c; f |$a, |$h 14:04
p6eval nom: OUTPUT«flattened parameters must be a hash or array␤current instr.: '_block1002' pc 134 ((file unknown):158) (/tmp/hIDURAcUZG:1)␤»
jnthn :S
nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return \@a.Capture, %h.Capture; }; my ($a, $h) = c; f |$a, |$h.hash
[Coke] funky beard!
p6eval nom: OUTPUT«A1␤»
jnthn heh
[Coke] (jnthn's emoticon)
jnthn Anyway, |$c doesn't really work yet 14:05
14:05 anbz left
tadzik is back 14:07
moritz jnthn: I'd be fine with having a method-ish API for creating a capture
something like Capture.new(@positional, %named) or so
sorear wait, what is return |%h supposed to do !? 14:09
jnthn sorear: I'm not cure :)
*sure
pmichaud returns named arguments
similar to return a=>1, b=>2 14:10
moritz right; what else could it mean? :-)
pmichaud (assuming %h == { a=>1, b=>2 }
jnthn moritz: Well, \(1, a => 2) should do it, and the | interpolation should work there too, but I didn't fix that up for nom yet 14:12
14:13 kaare_ joined
moritz nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return @a, %h; }; my ($a, $h) = c; f |@$a, |%$h 14:17
p6eval nom: OUTPUT«Non-declarative sigil is missing its name at line 1, near "@$a, |%$h"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
moritz nom: sub f($a, :$b) { say $a, $b }; sub c { my @a = 'A'; my %h = b => 1; return @a, %h; }; my ($a, $h) = c; f |@($a), |%($h)
p6eval nom: OUTPUT«A1␤»
moritz \o/
jnthn :)
14:18 [particle] joined
tadzik jnthn: not sure if I remember correctly, when I want to add a custom code object as a phaser, I need to do this in Grammar.pm.comp_unit, before the lexpads get popped out? 14:18
jnthn tadzik: Yeha, though really you should add an grammar rule in there that triggers an action method, since you'll want to make use of make_thunk or something, I guess. 14:19
And call that from comp_unit
Rather than putting more stuff in comp_unit :)
tadzik I get it
so another <.install_doc_phaser> inside, si?
jnthn that'll do. 14:20
tadzik acknowlegded, thanks
dalek kudo/nom: 38be712 | jonathan++ | src/Perl6/Metamodel/RoleToRoleApplier.pm:
Avoid a bunch of work when the role to role applier has an empty list of roles to apply.
14:22
kudo/nom: f2aabfa | jonathan++ | src/Perl6/Metamodel/RoleTo (2 files):
Avoid some (weird, hard to nail down) circularity issue in getting method names (we can't always do .name as NQP methods are Parrot subs, which we need to stringify...)
kudo/nom: 8fd1a35 | jonathan++ | src/core/Submethod.pm:
Add missing Submethod.pm.
kudo/nom: e0867f0 | jonathan++ | / (3 files):
Start to port over socket stuff from master. This doesn't quite work yet, but builds. Also will need to fix up packages.
jnthn BTW, anybody who's tried doing stuff with roles in the setting and had issues should find the above patches help. 14:27
moritz did, with Date and DateTime
jnthn moritz: Had issues? :) 14:29
moritz yes
jnthn infinite recursion-ish issues?
moritz aye
jnthn Yeah, the above help with that one.
tadzik that should help for Buf too, iirc 14:31
14:34 colomon joined, jaldhar left 14:37 wtw left 14:38 PacoLinux left
moritz $ ./perl6 -e 'sub MAIN($x) { say $x }' \\o/ 14:41
\o/
tadzik \o/ 14:42
JimmyZ \\oo//
jnthn nice :)
moritz++
moritz tadzik++ did a good chunk of the actual work
isBEKaml \\o// 14:43
14:43 koban left 14:44 birdwindupbird left
tadzik moritz: does it choose the more-less-matching one? 14:44
14:45 timbunce joined
moritz tadzik: haven't tried with multis yet :-) 14:45
tadzik looking forward to seeing the patch :) moritz++ 14:46
moritz tadzik: but it just calls &MAIN(|@pos, |%named), so I guess the dispatcher does its job
oh and I simplified the command line processing a lot, courtesy of the latest spec change
tadzik that's awesome
14:47 fbass left
moritz doesn't wait for the full spectest run 14:47
tadzik just implemented a default DOC INIT phaser :)
dalek kudo/nom: 99f5ce9 | moritz++ | / (2 files):
first attempt to put MAIN back, tadzik++ did lot of the early work
jnthn wow, patches all around :) 14:48
tadzik now to only make it print something more sophisticated than 'dupa'...
pmichaud moritz: what's the motivation behind github.com/rakudo/rakudo/commit/30...8d779586e9 ? ( WhateverCode -> Callable in postcircumfix:<[ ]>)
moritz pmichaud: removing an arbitrary limitation 14:49
pmichaud ...why is it arbitrary?
should we really expect @a[{...arbitrary block}] to work?
moritz pmichaud: why should I be allowed to write @a[* % 2] but not @a[-> $x { $x % s }] ?
TimToady it's more of a problem when we get object hashes 14:50
you can never have a closure as a key
moritz array != hash
TimToady (if hashes follow the same policy)
they don't have to be the same, I guess 14:51
moritz well, we can't have WhateverCode keys either
jnthn Does hash even have a WhateverCode case?
pmichaud I'm fine if we state somewhere (in the spec) that blocks in postcircumfix:<[ ]> are invoked. I just want it explicit.
moritz jnthn: not that I'm aware of 14:52
TimToady is it any more expensive?
pmichaud than a whatevercode? not presently.
TimToady then I'd be inclined to generalize it
pmichaud my $c = { ... }; say @a[$c] # might surprise someone.
TimToady it's gonna suprise 'em anyway
moritz aye
tadzik true
well, but an error message is less suprising that unknown behaviour 14:53
pmichaud nom: my $c = { $^a + 1 }; say $c.Int;
p6eval nom: OUTPUT«Rebuild in progress␤»
pmichaud yeah... currently would give 'Method 'Int' not found for invocant of class 'Block'' 14:54
tadzik INITs are FIFO?
TimToady yes
pmichaud tadzik: yes.
tadzik ok, thanks
dalek ast: 82ab11f | pmichaud++ | S03-metaops/hyper.t:
Some hyper.t de-fudging.
15:04
kudo/nom: 429a183 | pmichaud++ | src/core/ (3 files):
Some hyper metaop and hash updates.
15:08 am0c left
moritz rakudo: say 1; sub MAIN() { say 2 } 15:09
p6eval rakudo 922500: OUTPUT«1␤2␤»
moritz rakudo: say 1; sub MAIN() { say 2 }; say 3
p6eval rakudo 922500: OUTPUT«1␤3␤2␤»
moritz is that correct?
TimToady yes
tadzik jnthn: what do I need, aside from $*ST.load_module('Pod::To::Text', $*GLOBALish); to be able do :pasttype<call>, :name<Pod::To::Text::pod2text>? 15:10
jnthn You can't do that with name.
15:10 shinobicl left, shinobicl joined
TimToady rakudo: @*ARGS = '42'; sub MAIN (Int $n) { say $n } 15:10
p6eval rakudo 922500: OUTPUT«Usage:␤/tmp/52blBCQoJN n␤»
TimToady that is not correct
tadzik why not? 15:11
(to jnthn, not to TimToady)
moritz rakudo doesn't do magic parsing of @*ARGS yet
jnthn tadzik: Because it doesn't do multi-level lookups
TimToady moritz: I know, just pointing at the val semantics that are specced
tadzik how do I do this? I tried importing and calling just pod2text, but that didn't find it too
TimToady moritz: your MAIN patch actually brings us closer to that, i think
jnthn load_module won't import 15:12
tadzik yes, I know
jnthn You need another call to do that
tadzik I copypasted the importing part from Grammar.pm
jnthn Did you do :name<pod2text> ?
tadzik yes
jnthn It needs an & on the start, if so :)
tadzik oh :)
moritz TimToady: rakudo nearly has what it takes to make it DWIM in the case of numbers
15:12 am0c joined
moritz but not yet things like colonpairs 15:13
moritz tries to get rid of the additional $MAIN lexikal 15:15
TimToady is still pondering the exact nature of allomorphic literals, but knows we need something like current val spec 15:16
Go just delays conversion of the string form till actual use, but they're not trying to do multi dispatch 15:17
tadzik yay, --doc works 15:18
moritz speaking of other languages, 'kotlin' has a few interesting design choices
flussence is anyone currently working on a Pod::To::HTML? :)
TimToady moritz: haven't heard of it. any choices that we might be interested in? 15:19
tadzik flussence: well volunteered!
moritz TimToady: for example they close classes by default, and you have to mark them as inheritable
if you want to be able to inherit from it 15:20
TimToady that's just wrong, I think :)
moritz with the argument that inheritance from classes that weren't designed for inheritance leads to more problems
TimToady we don't close classes by default till CHECK time
:)
moritz TimToady: I said "interesting", not "good" :-)
oh, and it's a statically typed language for the JVM, with reified generics 15:21
confluence.jetbrains.net/display/Kotlin/Welcome
not much to steal from, but interesting to look at, IMHO
on the plus side they use keywords for defining routines (and they are 'fun' :-) 15:22
on the minus side they have optional semicolons at line end (javascript and go, I'm looking at you)
TimToady is curious, how do you *not* design a class for inheritance? 15:23
15:24 mj41 joined
TimToady "unwarranted chumminess with the memory system", I'll warrant... 15:24
moritz TimToady: if some method calls some other public method under the hood, and that's not obvious, overriding that second public method can cause unexpected behavior 15:25
TimToady okay, so in P6 terms that's using $.foo when you should have said $!foo 15:26
moritz TimToady: if many of the public methods are that tightly coupled (and the abstractions are a bit off), you get a mess when inheriting
TimToady I think one of the important things to teach new P6 programmers will be when to write to the virtual interface and when to write to the storage directly 15:28
but arguably, that's also the fault of the derived class overriding the method without properly wrapping the parent method
tadzik jnthn: how can I import stuff lexically?
jnthn tadzik: Same way use does? 15:30
moritz spec LHF: ack for 'Scalar' and remove every mention of it that doesn't refer to an actual container
tadzik well, hrm
I don't really get how use does this :) 15:31
my $EXPORT := $module<EXPORT>.WHO; if pir::exists($EXPORT, 'DEFAULT') { $*ST.import($EXPORT<DEFAULT>); }
jnthn right.
Taht imports into the current lexical scope.
tadzik hmm, so I have to set my scope to a shiny new Block before calling that?
15:32 daniel-s left
jnthn ah 15:32
Yeah, $*ST.push_lexpad()
And later $*ST.pop_lexpad()
iirc
It imports into the current pad
It only wants a PAST::Block though
(import, that is) 15:33
If you already have one of those to hand, we could always refactor import to take the import target block explicitly.
Think I'd maybe prefer not to though
Alternatively, you could skip the import and just look up the fully qualified name
tadzik well, I should probably load the module lexically too 15:34
so outside of my new Block, it's not visible
jnthn Just loading the module doesn't import anything.
It only does any globals merging
Which you can't skip
tadzik mhm
so, how is the full name different from Foo::bar()?
jnthn $*ST.symbol_lookup(['Pod','To','Text','&foo'], $/) # gets you PAST to look up the sub &Pod::To::Text::foo 15:35
tadzik cool, thanks
jnthn You could just put that in a PAST node
tadzik yes, that sounds good
jnthn Import approach works too but...probably not worth the hassle.
oh, note that only works if it's an our sub :) 15:36
If you want to leave it lexical you've no choice but the import :)
tadzik it's an exported sub 15:37
I could probably make it our
moritz btw the MAIN spec patch silently swept arguments like '-foo' under the rug 15:40
tadzik hmm
moritz we could either make it mean the same thing as --foo, *or* -f -o -o
15:40 agentzh left
moritz but we'd need to decide ahead of time 15:40
tadzik nom: module A { our sub b {} }; A::b()
p6eval nom: ( no output )
tadzik hrm
moritz and I didn't want to make the decision, so I just deleted the associated lines
TimToady or -f='oo' 15:41
moritz if anybody has a strong opinion either way, speak up
TimToady: or that
dalek kudo/nom: ac51b44 | moritz++ | src/Perl6/Actions.pm:
remove superfluous $MAIN lexical
tadzik nom: package A { module B { our sub C {} } }; A::B::C()
p6eval nom: ( no output )
tadzik scratches head
TimToady if we pick one, someone can always munge $*ARGS beforehand to get a differen interpretation
moritz TimToady: but the mere fact that we come up with 3 different interpretations means that it might be best not to pick one 15:42
TimToady it seems relatively useless to have both -foo and --foo
if -foo just means --foo
moritz agreed 15:43
TimToady so I think if we do pick one it has to be a single letter interpretation
the one thing we can't do is to make it depend on the actual switch 15:45
15:46 im2ee left
moritz we could, if we consulted the proto 15:46
tadzik dear #perl6, do I miss something obvious? gist.github.com/1131995
moritz but... it's a rather bad idea IMHO
jnthn isn't fond of that idea either
TimToady so things like perl -pe 's/foo/bar/' are problematic
jnthn We just got rid of the need to introspect...
tadzik: odd. 15:47
tadzik no, I don't have nom installed 15:48
moritz TimToady: IMHO MAIN is a convenient solution to the 90% common problems, and that's one that is out of its scope
jnthn yeah, but even if so...
shoulda been OK
moritz TimToady: likewise subcommands with options etc.
mberends votes for -foo == -f -o -o, principle of least surprise
tadzik +1 15:49
crked +1
mberends it does mean perl6 -doc should probably be perl6 --doc 15:50
tadzik it is
mberends ok
moritz tadzik: how new is your nom?
tadzik nom: module Pod::To::Zebra { our sub pod2zebra(@a) {} }; Pod::To::Zebra::pod2zebra([]) 15:51
p6eval nom: OUTPUT«Rebuild in progress␤»
tadzik nom: goddamnit
p6eval nom: OUTPUT«Rebuild in progress␤»
tadzik moritz: I'm on 3ea71cf82fe9efc07119e8388bda9244ce739f0e
add missing :Ds to EnumMap, start with EnumMap.ACCEPTS
moritz should really make nom install on the p6eval server
should be new enough
15:52 noganex_ joined
tadzik > module Pod::To::Zebra { our sub pod2zebra(@a) {} }; Pod::To::Zebra::pod2zebra([]) 15:52
Could not find symbol 'Pod::To::Zebra::&pod2zebra'
moritz before jnthn++'s fixes from yesterday night I had some weird errors in ::-y modules when loaded from .pir files
tadzik does it work for you, locally?
moritz: mine are not precompiled even
moritz no 15:53
tadzik: I've seen that problem before
tadzik yay, a bug!
oh, with XML::Writer or so?
moritz nom: say X::Base; say ::('X::Base')
p6eval nom: OUTPUT«Rebuild in progress␤»
moritz tadzik: no, when implementing ::()
tadzik mhm
moritz hm, seems that particular instance is gone
tadzik module Zebra { our sub pod2zebra(@a) {} }; Zebra::pod2zebra([]) # that works 15:54
so it's something with :: names
jnthn hm
ugh.
tadzik I seem to find a plenty of bugs recently 15:55
jnthn nqp: module Pod::To::Zebra { our sub pod2zebra(@a) {} }; Pod::To::Zebra::pod2zebra([])
p6eval nqp: ( no output )
jnthn nqp: module Pod::To::Zebra { our sub pod2zebra(@a) { say('ok') } }; Pod::To::Zebra::pod2zebra([])
p6eval nqp: OUTPUT«ok␤»
15:55 noganex left
jnthn hm, I thought we handled things same way in nom. 15:55
16:08 rdesfo left
jnthn nom: module Pod::To::Zebra { our sub pod2zebra(@a) { say('ok') } }; Pod::To::Zebra::pod2zebra([]) 16:09
p6eval nom: OUTPUT«Could not find symbol 'Pod::To::Zebra::&pod2zebra'␤current instr.: 'die' pc 678745 (src/gen/CORE.setting.pir:159616) (src/gen/CORE.setting:370)␤»
dalek odel: d7d1a10 | (Martin Berends)++ | c/ (5 files):
odel/c] gather returned data from multiple threads, Configure fixes
jnthn nom: module Pod2::To::Zebra { our sub pod2zebra(@a) { say('ok') } }; Pod2::To::Zebra::pod2zebra([])
p6eval nom: OUTPUT«ok␤»
jnthn tadzik: Related what's going on.
tadzik: In CORE.setting, we have a package Pod. Installed lexically.
tadzik oh
jnthn When we load a Pod:: ... from a module, the global merger gets it. 16:10
tadzik it's a bug, or a feature?
jnthn But the lexical Pod package in the setting means we never go look in the GLOBAL one.
I'm not sure. :)
moritz uhm
tadzik module Pod::To::Zebra { our sub pod2zebra(@a) {say('ok') } }; ::Pod::To::Zebra::pod2zebra([]) 16:11
jnthn scours S10 and S11 :)
tadzik nom: module Pod::To::Zebra { our sub pod2zebra(@a) {say('ok') } }; ::Pod::To::Zebra::pod2zebra([])
moritz if it were a feature, it would be pretty hard to add more X::thing classes, no?
p6eval nom: OUTPUT«Could not locate compile-time value for symbol To::Zebra::pod2zebra␤current instr.: 'nqp;Perl6;SymbolTable;_block1843' pc 26033 (src/gen/perl6-symboltable.pir:9085) (src/Perl6/SymbolTable.pm:1378)␤»
tadzik ekh
16:11 JimmyZ left
moritz or does it need to be 'my module Pod::To::Text'? 16:11
tadzik moritz: probably, yes
jnthn moritz: Right. Something's gotta be adrift here.
I'm guessing when you do
oh hm
Well, we're not really meant to merge lexical packages, afaik. 16:12
tadzik I could probably make Pod::To::Text core as a workaround, but I'm quite allergic to making core bigger
if not me, then my RAM is
jnthn no, we shouldn't have to do that 16:13
jnthn just re-read S10 and looked for anything in S11 and is still none the wiser. 16:19
16:19 shinobicl left
ashleydev moritz: re -foo, why can't it be configurable as to the meaning? 16:20
16:20 shinobicl joined
jnthn tadzik: For now I'd go tthe import root ;) 16:20
16:20 Transformer joined
tadzik jnthn: that's less than awesome in a way, that when you use --doc, pod2text() is globally visible 16:21
jnthn Huh?
No, import is lexical
you lexically import it into your phasesr, then call it
tadzik oh, I didn't do the push_lexpad thing yes
moritz ashleydev: it's primarily about a sane default
tadzik *yet
ashleydev moritz: i.e. if -f takes args it's -f=oo, if it doesn't it's -f -o
jnthn tadzik: ah, ok :) 16:22
tadzik so what do pass to push_lexpad again?
a fresh Block object?
moritz ashleydev: because if -f takes arguments depends on the invididual multi MAIN candidate
ashleydev: but to do the multi dispatch, we need to process @*ARGS independently of individual candidates
16:22 Transformer left 16:23 shinobicl left
moritz "too much magic considered harmful" 16:23
moritz -> decommute
ashleydev moritz: does that mean there's going to be a get opt long some were?
and use built in for default stuff?
*somewhere
jnthn tadzik: No 16:24
moritz ashleydev: there'll be probably lots of modules that modify MAIN behavior, and others that provide different mechanisms
jnthn tadzik: It creates one
jlaire requiring that an option either always takes an arg or never takes an arg feels reasonable to me
jnthn tadzik: And returns it to you.
moritz in the far future, that is :-)
moritz -> really gone
tadzik okay
jlaire so it wouldn't depend on individual MAIN multis
jnthn tadzik: Then you push your stuff into it
tadzik: And do the import
tadzik god it 16:25
jnthn tadzik: And the pop when you're done and create a code object from it
16:34 TiMBuS left
tadzik setting now needs about 1.33 GBs of ram to compile 16:36
tadzik wonders if he'll be able to buy another 2 before the YAPC 16:37
16:37 TiMBuS joined
tadzik okay, works :) 16:42
jnthn \o/ 16:43
tadzik spectests, dishes won't wash themselves 16:45
mberends makes some nom while his computer makes nom 16:53
16:55 thou joined 17:02 ab5tract left 17:05 rdesfo joined 17:06 crked left
jnthn std: module Foo { constant Bar = 42 }; Foo::Bar 17:11
p6eval std 516268a: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Foo::Bar' used at line 1␤Check failed␤FAILED 00:01 120m␤»
jnthn std: my module Foo { constant Bar = 42 }; Foo::Bar
p6eval std 516268a: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Foo::Bar' used at line 1␤Check failed␤FAILED 00:01 121m␤»
dalek kudo/nom: 9ca7ef7 | moritz++ | / (3 files):
partially put back Temporal
17:12
jnthn std: module Foo { constant Bar = 42; Bar }
p6eval std 516268a: OUTPUT«ok 00:01 120m␤»
jnthn TimToady: ^
moritz woah, my vim hangs when opening t/spec/S32-temporal/DateTime.t 17:13
17:13 pyrimidine joined
jnthn ouch! 17:13
17:13 benabik left, benabik joined
tadzik :P 17:14
moritz oh, and the authors of those tests seem to have a fundamental misunderstanding on how unit tests are supposed to work
jnthn When you do 17:15
TimToady jnthn: you haven't exported the constant, or imported it
hmm, but you shouldn't need to...
jnthn my module Foo { constant Baz = 42 }; say Foo::Baz
moritz instead of providing a list of samples, they recreate the algorithm they want to test, and compare both the algorithm in the tests and in the compiler/setting
jnthn Then the 'my' is leaking through to constant there.
TimToady: Yeah, they're our scoped by default. 17:16
TimToady: Seems $*SCOPE isn't being reset.
flussence moritz: wow, I just looked at that file in gvim. I've never seen a program where all but the cursor and scrollbar are frozen...
TimToady niecza: module Foo { constant Bar = 42 }; Foo::Bar 17:17
p6eval niecza v8-45-g366d65b: ( no output )
TimToady niecza: module Foo { constant Bar = 42 }; say Foo::Bar
p6eval niecza v8-45-g366d65b: OUTPUT«42␤»
TimToady looks like niecza fixed it with the symbol table integration
STD's symbol tables are kind of a kludge to work around not having real symbol tables
flussence (and after looking at the file in `less`, I have no idea why vim would freeze) 17:18
jnthn TimToady: It looks like $*SCOPE leakage in this case.
dalek ast: d8786c3 | moritz++ | S32-temporal/DateTime.t:
[DateTime.t] avoid passing the same named argument twice

also remove "perl6" vim filetype, since it makes my vim freeze
jnthn TimToady: The symbol just never gets stuck in the package in the first place in nom because it sees the scope as "my" when it should see it as empty. 17:19
TimToady that doesn't explain the non-my case
mberends moritz: I wrote those Temporal tests. The algorithm in the test file is *different*. 17:20
jnthn TimToady: no, but the non-my case works in nom :)
17:20 dakkar left
jnthn It is a bit curious because I'd expect us to go through termish and that does set $*SCOPE 17:21
moritz mberends: still an algorithm for calculating the same thing has no place in a test suite, IMHO
it's a classical case of over-design 17:23
mberends moritz: there was a method behind that madness, to dynamically generate different test cases when run at different times, thus increasing coverage. I was not convinced that a few static points would suffice.
flussence runs that gvim command through callgrind and finds "regtry" taking up most of the CPU time
moritz mberends: I'm not really convinced
flussence
.oO( whee. vimscript debugging. )
mberends i see
PerlJam moritz: He's successfully tested that those two algorithms produce the same output. :-) 17:24
moritz mberends: for example if both suffer from a similar kind of problem in the math implementation, both algorithms could have the same errors
mberends: like sign of $negative % $positive, just as a common example
even two very different algorithms might boil down to the same error 17:25
mberends the tests for the math implementation will certainly cover those problems 17:26
moritz mberends: this particular problem (in niecza) was found by an RC entry, not by the test suite 17:27
tadzik Result: PASS 17:28
yay :)
mberends moritz: the cross check algorithm was made deliberately simple, not optimized, so that it would be easier to verify. I get your point that some people prefer absolute comparisons to variable ones. 17:30
jnthn tadzik: And working --doc? :)
tadzik jnthn: yes :)
dalek kudo/nom: ff8d46f | tadzik++ | src/Perl6/ (2 files):
Implement a default DOC INIT phaser
jnthn \o/
tadzik++
tadzik now, S26 talks about something around: perl6 --doc LWP::Simple, but I'd rather see it in some userspace tool to be honest 17:31
partly because it makes everything weird
17:31 hanekomu left
tadzik as in: if above works, then perl6 LWP::Simple should work too 17:32
so I'd rather see it as a userspace tool that locates LWP::Simple in PERL6LIB and calls perl6 --doc on that file
17:33 impious joined, [Coke] left
jnthn tadzik: makes some kinda sense, yes 17:33
tadzik so it's my third bullet on spec tuning
shame that I forgot the first one
PerlJam tadzik: why not an option to perl6 for locating modules?
tadzik PerlJam: I think the usecase is pretty narrow. You don't often run modules 17:34
17:34 [Coke] joined
tadzik I don't think it's worth it for --doc alone 17:34
PerlJam Practically every perl program will "run modules" 17:35
since lots of "perldoc" functionality is being folded into perl6, why not that one too? 17:36
tadzik well, not in a 'perl6 DBI' sense I think
PerlJam besides, perl6 has to be able to locate the modules anyway 17:37
tadzik but maybe it's a wanted feature, hence I'm asking :)
that's correct
17:37 thou left
PerlJam It seems like a 2 birds 1 stone situation to me. 17:37
tadzik and that may end up in useful stuff actually. As in no need for ~/.perl6/bin. Then we go for stuff like 'perl6 ufo', 'perl6 Module::Starter::start' or so 17:38
I wonder if any other Synopsis mentions something like this 17:39
jnthn nom: say pi
p6eval nom: OUTPUT«3.14159265␤»
tadzik nom: say pi.WHAT 17:40
p6eval nom: OUTPUT«Num()␤»
mberends moritz: you'll notice that only some of the Temporal tests use dynamically generated dates, and many more use fixed ones anyway. The intent of the dynamic ones was to use many tests over a long period to probe for yet untried corner cases. I've read it somewhere described as 'Monte Carlo Testing'. So far the Temporal code seems to have stood up to all those semi-random vectors.
tadzik there's nothing close to 'perldoc perlrun' in Synopses it seems 17:41
17:41 pernatiy left
pmichaud tadzik: S19 would be the closest, I think. 17:42
tadzik huh
Week #9, 17 – 23 July
Make the documentation for classes, methods and subroutines accesible
with the .WHY method.
17:42 masak joined
moritz mberends: I'll rest the case, I just don't want that paradigm to be over-used 17:42
masak \o/
tadzik I didn't mention all the other stuff, which means I'm pretty much done :)
moritz tadzik: what about B<...> escapes etc? 17:43
tadzik moritz: yes, that's still on my list
jnthn masak! \o/
[Coke] tadzik++ # looks like a very successful GSOC
masak jnthn! \o/
pmichaud tadzik++ indeed
tadzik hey, I'm nod done yet! :P
I meant the .WHYs
masak tadzik++ # you'll get another karma when you finish :P 17:44
tadzik nom nom nom
colomon tadzik++
pmichaud tadzik: even though you aren't done, we can count the GSOC as a big success
tadzik I left formatting codes for the very end, since it's the most predictable thing
jnthn tadzik++ # again, excellent work
moritz agreed
jnthn :)
tadzik it probably won't reveal any double bacon bugs, GC bugs or so
it's plain parsing, I mean, what can go wrong? :P
that's why I moved the later stuff sooner, for more time to sort it out 17:45
jnthn suspects the GC bug is everpresent, just rare enough that we don't run into it much. :/
tadzik yeah
good that I ran into it
jnthn I've a horrible suspicion it's something to do with mixins.
tadzik moritz: I'm planning to open a list of tickets (maybe in the gsocmess repo), as a sort of countdown
jnthn But a couple of goes over the code and it's hard to see what's up.
PerlJam "double bacon bugs"?
tadzik I'm planning to have everything done by the beginning of the YAPC
pmichaud Double bacon bugs.
PerlJam "double bacon" sounds more like a good thing than a buggy thing 17:46
pmichaud YAPC is in.... 1 week? ;-)
jnthn I may put together some kinda stress test for that to try and trigger the GC issue.
tadzik PerlJam: my @a = Array.new('bacon'); say @a # bacon bacon
pmichaud PerlJam: if we're going to have bugs, we might as well have double-bacon. :)
tadzik like, two days of headscratching. "I must be doing this serialization stuff _so_ wrong"
colomon pmichaud++ 17:47
17:52 bluescreen10 left
mberends moritz: I agree, I would not recommend Monte Carlo tests very often either, because they lack some rigor. I would recommend that approach, however, when it comes to our Trig tests, because the probability of failure is very low, and our number of almost redundant passing tests is very high and costs us a too much spectest time. 17:54
dalek kudo/nom: c49a3c9 | pmichaud++ | src/core/ (2 files):
Re-enable hyperop assignment metaops.
17:55
ast: 410d696 | pmichaud++ | S03-metaops/hyper.t:
Unfudge hyperop assignment metaop tests.
moritz mberends: I think a once-chosen random sample is good enough for the trig tests to
o 17:56
mberends: and yes, it should be much smaller than what we have now
mberends we agree to agree, then :) 17:57
17:57 noganex_ left, shinobicl joined
jnthn Got socket IO working again \o/ 17:57
Need to sort out package issues but that aside, it seems to work. 17:58
colomon errr.... you guys realize the trig tests do not use a random sample, and right now they are getting close to the minimum possible to test that the many possible permutations of the functions are actually tested? 17:59
masak jnthn++
jnthn BTW, the trig tests now actually fail due to missing trig functions rather than inability to load the trig test support library :) 18:00
moritz colomon: no
mberends colomon: yes
moritz colomon: since the trig implementations always use the same method under the hood, there's not much point in testing more than one combination of values for a given tuple of (function, input type) 18:01
colomon moritz: which is exactly what it does
moritz last time I ran them that wasn't the case
colomon except for the two cases of Num and Complex, which are the core methods "under the hood"
moritz: that's been the case for over a year 18:02
I was working on that change at YAPC::NA 2010.
TimToady expert testers I've heard prefer tests of selected boundary conditions over random tests, since if things are correct at the boundaries they tend to be correct away from the boundaries too 18:03
moritz colomon: for example the tan.t tests repeat all Num and Complex tests for the sub and the method form
TimToady and it can take a lot of random tests to trigger a boundary-condition bug
so one gets a false sense of security from random testing 18:04
mberends colomon: it's not a serious suggestion, but since the code is *very* stable and the failure rates are almost nil, it is almost unnecessary to test every possible permutation before every commit unrelated to trig.
PerlJam is DOC a general statement prefix?
moritz colomon: so there's a redundancy of a factor of nearly 2 in those tests alone
mberends we're oversimplifying when we use the same suite for commit tests and spec tests. 18:05
PerlJam I mean could I say "DOC say 'foo';" and have that only run when --doc is specified?
moritz PerlJam: it's a phaser, just like BEGIN and INIT etc.
TimToady mberends: well, if Perl 6 were fast enough, it wouldn't matter :P
moritz nom: BEGIN say 'foo'
p6eval nom: OUTPUT«foo␤»
moritz and phasers work with either statements or blocks 18:06
mberends TimToady: therefore you're saying it does matter :P 18:07
18:07 PZt joined
TimToady everything always matters, at least a little... 18:07
PerlJam except antimatter
jnthn Does anybody else get a hang on instants-and-durations.t? 18:08
It does it to me every time...
moritz jnthn: never for me
18:08 bluescreen10 joined
jnthn nom: say now 18:08
p6eval nom: OUTPUT«Instant:1312826970.62952␤»
jnthn youch! *that* hangs for me. :/ 18:09
18:09 noganex joined
jnthn nom: say pir::time__n 18:10
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Float'␤current instr.: 'say' pc 721306 (src/gen/CORE.setting.pir:178315) (src/gen/CORE.setting:4290)␤»
moritz nom: pir::say pir::time__n
p6eval nom: OUTPUT«1312827029.69941␤»
mberends jnthn: it would probably hang here as well, on a win32 platform, its system time rounds to a fairly coarse granularity. 18:11
PerlJam jnthn: I just ran command-line nom and "say now" hangs for me.
jnthn ouch 18:12
PerlJam and when I eventually interrupt it .... 18:13
Failed allocation of 124320 bytes
Parrot VM: PANIC: Out of mem!
moritz PerlJam: what about pir::say pir::time__n ?
PerlJam (which I find odd)
jnthn yeah, it noms the stack
moritz PerlJam: does that also hang?
jnthn The op doesn't hang here
PerlJam moritz: no, that works fine
moritz huh 18:14
jnthn is looking at the code and struggling to see how it could hang.
moritz nom: pir::say pir::time__i
p6eval nom: OUTPUT«1312827284␤»
mberends
.oO( it was so mean, it wouldn't even give you the time of day )
18:15
moritz jnthn: when I uncomment the attribute declarations in src/core/Temporal.pm class DateTime, I get infinite recursion during setting compilation 18:16
jnthn: maybe it's the default values... 18:18
jnthn meh
I'm getting it doesn't happen outside of the setting? 18:19
moritz correct
jnthn Default values shouldn't do it
moritz: Does it make a difference if they're public vs private? 18:20
18:20 envi left
moritz jnthn: haven't tried yet 18:20
18:20 envi joined
jnthn moritz: Can I see the bottom bit of the bt also? 18:21
argh, I was just about to go to the shop and it's started raining really heavily :/
weather--
mberends jnthn: that's the cloud that was soaking .nl this morning 18:22
moritz jnthn: will give you the bottom when I get it again
jnthn mberends: Couldn't you have kept it? :P 18:24
mberends jnthn: I tried to dispatch it to Texas, but ran out of breath 18:25
PerlJam mberends: Texas appreciates the effort :) 18:26
flussence mberends: that'd explain the gale-force winds here today :)
dalek kudo/nom: 362dac2 | jonathan++ | src/Perl6/Grammar.pm:
Prevent scope leakage, which caused my module Foo { constant Bar = 42 } to end up declaring the constant my scoped.
18:28
kudo/nom: e76d280 | jonathan++ | src/Perl6/SymbolTable.pm:
Make a comment more accurate.
kudo/nom: 98408a8 | jonathan++ | src/core/IO/Socket/INET.pm:
Get socket IO working again, or at lesat enough for it to do a HTTP request and get the result.
tadzik moritz, masak: please criticise github.com/tadzik/gsocmess/issues 18:29
everyone: feel free to add new things which you'd like to see done, I'll probably do them, GSoC or not :)
18:30 y3llow_ joined
mberends tadzik++ 18:30
colomon moritz: "for example the tan.t tests repeat all Num and Complex tests for the sub and the method form" -- what are you talking about? Took me a while to have the time to look, but there's exactly one test of tan(Num) (not counting the tan(Inf) and tan(-Inf) tests) and tan(Complex) in the tan.t in roast. (Exactly one test == the number needed to make sure the sub forms actually are hooked up.)
18:31 sbp left 18:32 Tedd1^ left
moritz colomon: I was wrong about Num, but for Complex I see 18:32
18:32 sbp joined, Tedd1 joined
moritz ok 154 - Complex.atan - 6.80678408284103 18:32
ok 155 - atan(Complex) - 6.80678408284103
ok 156 - Complex.atan - 6.80678408284103
ok 157 - atan(Complex) - 6.80678408284103
etc.
jnthn: not related to private vs. public - the default values go through radcalc, which loops through Str, Stringy and infix:<~> 18:33
18:34 y3llow left, y3llow_ is now known as y3llow 18:37 soh_cah_toa joined
PerlJam wrt nom's time problems, here's some thing interesting: gist.github.com/1132392 18:40
18:42 pernatiy joined 18:43 birdwindupbird joined
tadzik nom: pir::time__n.WHAT.say 18:44
p6eval nom: OUTPUT«Can only use get_what on a SixModelObject␤current instr.: '_block1002' pc 61 ((file unknown):13483696) (/tmp/BWaIFop9SQ:1)␤»
tadzik that's probably the failreason
PerlJam you mean in binding pir::time__n to a parameter of Instant.from-posix? 18:46
jnthn The binder will marshall it there, but yeah, it's not ideal. 18:47
moritz: Yeah, I got that too :/
I spent a couple of hours trying to understand that weird loop this morning. I failed. 18:48
(And just re-wrote to avoid it.) 18:49
dalek ecs: 35e20e2 | larry++ | S02-bits.pod:
define coercion types, value/impl types better

We were using two different meanings of "value type", so now value vs implementation type is "of" type vs "container" type.
We also now have a coercive type syntax, so there's no longer any need for a separate 'as' trait for subs.
18:51
jnthn In this case it's the literal cache.
pmichaud back from lunch
jnthn omg 18:52
TimToady I don't expect this to be implemented right away 18:53
but we've been talking about it for months
jnthn TimToady: Any chance you can flesh our what coercion really means while on this? 18:54
colomon moritz: you're right, you've managed to find the one case I missed eliminating. moritz++ 18:55
jnthn TimToady: As in, that does Array($foo) actually do? Who gets flow of control?
And is an exact type match, or just a normal type match, required in order to not need to do the coercion? 18:56
TimToady normal, I'd think
jnthn Yeah, that's what I did in nom. 18:57
Nobody yelped yet :)
TimToady the main type is just a constraint
jnthn Well, the upshot is that
given S < T
sub foo($x as T) { }; foo(S) # doesn't need to coerce, since $x ~~ T
TimToady yes, same thing, we're mostly just changing the notation, which was hateful to me 18:58
jnthn Which strikes me as fine, but I'm not sure if it's what you had in mind :)
pmichaud I'm confused by the new notation (more)
or, at least, I see a potential for confusion.
jnthn Well, the problem is that it's not a notation change at all.
You've introduced a new kind.
pmichaud sub foo(Int $x) { ... } $x must be ~~ Int
sub foo(Int() $x) { ... } $x is Any 18:59
TimToady sub foo(T() $x) is how you write that 'as T' now
jnthn e.g. $x as Int was just spec'd on parameters before really
moritz who do I write 'Cool $x as Int' now?
pmichaud it feels weird that Int and Int() specify different constraints.
jnthn So the coercion type just gets a slot in Parameter
TimToady Int(Cool)
pmichaud moritz: Int(Cool) $x
moritz ok
TimToady because the typ eof $x is really Int, not Cool
colomon TimToady++ 19:00
TimToady which is why the Cool $x as Int is bogus, because it looks like you're declaring $x to be Cool, not Int
pmichaud so, it's really more like Int $x from Cool
tadzik Int(Cool) looks like "make Int given Cool"
TimToady just like an Int() coercion does elsewhere 19:01
pmichaud okay.
and sub foo(Int $x) is really sub foo(Int(Int) $x)
PerlJam it's just weird to see it in a declarative spot
TimToady pmichaud: you could look at it that way 19:02
pmichaud so, we're talking about three types now. There's the container type, the 'of' type, and the coercian type.
or really the "constraint" type.
(for the latter)
TimToady well, constraint is probably too generic a term to use just for that 19:03
colomon Util: ping?
pmichaud the constraint type is the one that gets used for multidispatch
TimToady that's just one place constraints are used
pmichaud I'm fine if we call it something else.
TimToady the of type also constrains what can be there
pmichaud it does? 19:04
jnthn TimToady: Do you see Foo(Bar) syntax as purely sugar for setting a container's constraint and coercion type?
TimToady: Or do you see them as a first-class kind of type?
(more)
To eleborate, given
role Foo[::T] { }
Would you expect it to be possible to instantiate the role as Foo[Int(Cool)] ?
pmichaud jnthn: I think it has to be more first class-ish. my Int(Cool) @a; 19:05
jnthn pmichaud: That situation isn't a problem to desugar.
pmichaud: The role one would be.
TimToady I'd think we should push for first class to the until we run into obstacles
s/to the//
jnthn (I'm not leaning either way at the moment, I'm just trying to get a good enough grip on what's needed so I can ponder it.)
pmichaud jnthn: since my Int(Cool) @a ultimately involves Positional[Int(Cool)], I suspect it's there. 19:06
I'm not sure how to do that without having Int(Cool) as first-class-ish.
TimToady as long as we can optimize things that are known to be constant at compile time, I'm fine with making it as first class as possible 19:07
my $new-wonder-type = $narrow($inner); # :)
s/inner/wide/
PerlJam hmm .... Foo[Int](Foo[Any])
TimToady PerlJam++ :D 19:08
masak o.O
I leave for like five minutes, and you guys change everything!? :P
jnthn pmichaud: Aye 19:09
tadzik we also renamed my to Mine
pmichaud "The of type specifies what kinds of values may be stored in the 1577
+variable"
masak tadzik: and 'our' to 'Enterprise'? :)
pmichaud that seems ambiguous.
jnthn I suspect it means we have a CoerciveTypeHOW, like we have a GenericHOW, and various places just have to know what it means to them.
tadzik masak: no, to Everyone's 19:10
note the apostrophe
pmichaud is it specifying the kind of value that exists in the variable after an assignment, or the type that can occur on the rhs of an assignment?
masak tadzik: ooh
pmichaud (or both?)
moritz jnthn: I'm now trying to rewrite Mu.Str with nqp:: ops isntead of infix:<~>
pmichaud my Int(Cool) $x = '13'
jnthn moritz: OK, but the problem I was seeing was that we should never hit that candidate for Str
tadzik you can also omit, a package, e.g. instead of $Foo::bar you can do 'DO WANT $bar'
jnthn moritz: But instead should be hitting one in a subclass
moritz jnthn: hm, right 19:11
pmichaud ....why rewrite Mu.Str ?
moritz pmichaud: a failed attempt to avoid a circularity issue while compiling constants in Temporal.pm 19:12
PerlJam pmichaud: I would expect your example to mean that $x.WHAT.perl eq 'Int' 19:14
dalek ecs: 5645947 | larry++ | S02-bits.pod:
some disambiguation
pmichaud PerlJam: so, the "of" type specifies the type of the value after it's been stored in the container
but not the restriction of the values that can be passed for storage in the container 19:15
(unless the "of" type actually refers to both)
TimToady unless it's coercive, in which case it specs that too
pmichaud okay, so if I say my Int(Cool) $x; and then ask for $x.of I'll get something that indicates both Int and Cool
jnthn moritz: The underlying issue needs fixing.
pmichaud (may be VAR($x).of ) 19:16
TimToady in a sense, my Int() $x = expr; is really more like my Int $x = Int(expr);
jnthn It'd need VAR, yes
TimToady: Yes, but what does Int($expr) really mean? :)
pmichaud well, not exactly 19:17
my Int(Num) $x = 3/4; # should fail
jnthn Also, it'd affect every assignment to the variable.
pmichaud: Yes, true.
19:18 rdesfo left
pmichaud unless, of course, the coercion only refers to binding, not assignment. 19:18
TimToady coercion might imply copy semantics 19:19
jnthn Then it'd never affect the initial assignment ;)
pmichaud jnthn: unless that's not really an "assignment". TimToady++ has often said that '=' in a declaration is macro-ish.
TimToady I always call it pseudo-assignment
pmichaud so, does the coercion apply to assignment also? 19:20
my Int(Cool) $x; $x = prompt 'hello';
TimToady why not?
pmichaud I'm just verifying that it does.
If it does, then the constraint and coercion have to attach to the variable (that's fine)
TimToady if anything, coercion makes binding more like assignment, if it implies "is cpoy"
*copy 19:21
pmichaud and "of type" really means a combination of "constraint" and "coercion"
jnthn pmichaud: I suspect we'll somehow denormalize at lesat the presence of a coercion into the container.
er, container descriptor
TimToady thinks we might even get rid of 'is copy' if that's what Foo() means
jnthn s/we'll/we'd/
pmichaud jnthn: I agree 19:22
19:22 rdesfo joined
PerlJam TimToady: except that "is copy" makes for better documenation IMHO 19:22
pmichaud TimToady: well, except that Foo $x is copy really needs to mean Foo(Foo) $x somehow
TimToady and we don't necessarily copy if no coercion is necessary
so readonly is probably still the correct default
pmichaud right 19:23
"is copy" makes what would otherwise be readonly into rw
TimToady but readonly does not preclude copy
well, except rw means something else
pmichaud right
I meant "read write" as opposed to "is rw"
sorry.
sub abc(Foo $x is copy) is really sub abc(Foo(Foo) $x is copy) 19:24
jnthn We do as just find today without affecting rw-ness or needing is copy. 19:25
'as' :)
pmichaud is the thing in parens constrained to be a typename in order to specify an 'of type'?
19:25 [Coke] left
pmichaud i.e., Int(Cool) and Int($x) mean different things and likely parse differently? 19:26
jnthn pmichaud: typename as in, the rule in the grammar?
pmichaud jnthn: perhaps
jnthn pmichaud: I was assuming we'd have the typename rule parse coercion types
We'd better have
pmichaud I'm trying to know how we distinguish Int(Cool) versus Int($x)
jnthn Hm
19:28 [Coke] joined 19:29 donri left
jnthn pmichaud: We already have to distinguish SomeSub($x) and SomeType($x), iirc. 19:29
pmichaud jnthn: yes, I'm saying we now need a third case. 19:30
SomeSub($x), SomeType($x), and SomeType(OtherType)
jnthn *nod* 19:31
True
And they all do different things
Two are verbs and one is a noun for one. :)
19:33 Chillance joined
masak it's never really ambiguous though, as far as I can see. 19:36
dalek ast: 7bf42b2 | (Solomon Foster)++ | S32-trig/generate-tests.pl:
Remove unneeded inverse sub test, and use a better information string for the surviving equivalent test.
19:38
PerlJam ::T in the context of Foo(::T) or ::T(Foo) seems weird. 19:40
pmichaud yeah, it's the edge cases I'm wanting to make sure are nailed down 19:42
jnthn I'm not sure Foo(::T) is meaningful
oh
maybe it is in the context of a signature 19:43
pmichaud yeah
jnthn Generally, anything generic is only valid in a context where it's got some hope of being resolved.
nom: role Foo[::T] { BEGIN { T.say } } 19:44
p6eval nom: OUTPUT«Cannot call a method on type variable T␤current instr.: 'nqp;Perl6;Metamodel;GenericHOW;find_method' pc 28220 (src/gen/perl6-metamodel.pir:6074) (src/gen/Metamodel.pm:181)␤»
19:44 M_o_C joined
pmichaud although it's more likely to be Foo(Any) ::T $x 19:44
jnthn Doubtful, that'd imply multiple prefix types.
pmichaud isn't that how we do sub(Foo ::T $x) now ? 19:45
or is the syntax ::T Foo $x (I never can remember)
PerlJam it's Foo ::T $x
pmichaud right
jnthn std: sub(Foo ::T $x) { }
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/8A95QjbAQC line 1:␤------> sub⏏(Foo ::T $x) { }␤Couldn't find final ')'; gave up at /tmp/8A95QjbAQC line 1:␤------> sub(Foo ::T ⏏$x) { }␤ expecting any of:␤ …
jnthn nom: sub(Foo ::T $x) { } 19:46
p6eval nom: OUTPUT«Could not locate compile-time value for symbol T␤current instr.: 'nqp;Perl6;SymbolTable;_block1843' pc 26033 (src/gen/perl6-symboltable.pir:9085) (src/Perl6/SymbolTable.pm:1378)␤»
jnthn std: sub(Int ::T $x) { }
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/xLu3rVr0oz line 1:␤------> sub⏏(Int ::T $x) { }␤Couldn't find final ')'; gave up at /tmp/xLu3rVr0oz line 1:␤------> sub(Int :⏏:T $x) { }␤ expecting any of:␤ …
jnthn oh duh
std: sub foo(Int ::T $x) { }
pmichaud std: sub abc(Foo ::T $x) { }
p6eval std 516268a: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/7e65W7SWVz line 1:␤------> sub foo(Int ::T ⏏$x) { }␤ok 00:01 120m␤»
std 516268a: OUTPUT«===SORRY!===␤In parameter declaration, typename 'Foo' must be predeclared (or marked as declarative with :: prefix) at /tmp/3kaXEEPzwf line 1:␤------> sub abc(Foo⏏ ::T $x) { }␤Parse failed␤FAILED 00:01 120m␤»
jnthn nom: sub foo(Int ::T $x) { }
p6eval nom: ( no output )
jnthn oh, it accepts it
OK
pmichaud right
so
with 19:47
jnthn
.oO( nom is smarter than me already, dammit )
pmichaud sub foo(Int(Cool) ::T $x) { }
what does the ::T capture?
the type of $x after the coercion, or the type of the argument?
PerlJam pm: or both. maybe we should start thinking of types as Foo(Foo) instead of just Foo 19:48
jnthn Tssk. Could argue it both ways :)
pmichaud I don't think it can be "both"
jnthn PerlJam: I find that result unlikely.
pmichaud sub foo(Int(Cool) ::T $x) { ... }; foo("12") 19:49
jnthn It's gonna be what $the_passed_val.WHAT returns
PerlJam That's what I'm here for ... to suggest crazy things :)
pmichaud ::T has to be either Int or Str, it can't be both.
jnthn It's just a case of when we evaluate that, I guess.
19:49 bluescreen10 left
pmichaud and, of course, in the case of 19:49
jnthn nom: sub foo(::T Int $x) { }
p6eval nom: ( no output )
jnthn Note that
pmichaud sub foo(Numeric(Cool) ::T $x) { ... }; foo($x)
jnthn we could have
sub foo(::B Int(Cool) ::A $x) { } # ;-) 19:50
pmichaud we know that T.WHAT is almost certainly not Numeric :-)
jnthn (Before and After)
pmichaud I'd prefer Int(Cool ::B) ::A
jnthn (no, I don't want to implement that)
:)
pmichaud: hm
PerlJam Is there a valid use-case for both capturing the coerced type and capturing the argument-as-passed type?
pmichaud ::B captures the type of the argument, ::A captures the type of the parameter
jnthn That scares me in other ways :)
pmichaud PerlJam: sure
in fact, one could say 19:51
PerlJam What's the use-case for the second one?
pmichaud PerlJam: whenever you want to make sure that two arguments have the same type
sub abc(Int(Any) ::T $x, Int(T) $y)
jnthn That argues for it being the first 19:52
oh, duh
You *know* what the type will be after the coercion because you had to write it right there :)
PerlJam That would be: sub abc(Int(Any) ::T $x, T $y) though, wouldn't it?
jnthn (The subtype case aside)
pmichaud PerlJam: no, because then $y isn't an Int
19:52 birdwindupbird left
pmichaud jnthn: you don't know the type of the coercion 19:53
Str.Numeric doesn't tell you the type
you just know that it's ~~ Numeric, but you don't know what .WHAT will be.
same for Stringy
indeed, many of the core places that we'd use coercers are because we're coercing to Numeric or Stringy 19:54
jnthn pmichaud: true
19:55 envi left
pmichaud lest there be any confusion -- I'm not at all opposed to the Int(XYZ) syntax... I just want to know exactly what it *means* (from an implementation perspective). 19:56
jnthn Yes, me too 19:57
And especially it's interaction with generics.
19:57 rgrau joined
dalek ast: 5c6b8e3 | (Solomon Foster)++ | S32-trig/ (13 files):
Actual trig tests generated by running the "Remove unneeded inverse sub test, and use a better information string for the surviving equivalent test." patch.
19:57
PerlJam pmichaud: I still don't quite see when you'd want foo(1,4); and foo("1","4"); but not foo(1,"4"); 19:59
colomon BTW, after that change lopped another 25% of the number of trig tests, the S32-trig tests run in 50 seconds total (single threaded) on my laptop. 20:00
tadzik compared to how many?
20:02 bluescreen10 joined
pmichaud PerlJam: many functions want to constrain the arguments to being of like types 20:02
infix:<eqv> being one of the more obvious
colomon tadzik: it was down under 2 minutes before, I'm not sure what exactly. go back far enough, and there used to be around 1500 tests per trig function; now it's more like 150. 20:03
masak 'night, #perl6
tadzik masak: gnight
ha, I was fast enough :)
colomon: cool
masak stuck around a bit this time :P
20:04 masak left
pmichaud PerlJam: indeed, that's one of the reasons that ::T exists -- so one can capture a type and use it as a type constraint for subsequent parameters. 20:04
jnthn
.oO( so you know when you drew paper-rock-scissor :) )
20:06
PerlJam pmichaud: what's "like type" mean? is it the same as "same type"? 20:07
20:08 am0c left
PerlJam infix:<eqv> doesn't constrain it's arguments to being the same type. It seems to care more about the "after coercion" type than the "before coercion" type 20:09
pmichaud PerlJam: S06:1623 20:12
20:13 wamba left
mberends colomon++ # trig test golfing 20:16
20:16 shinobicl left
colomon mberends: eh, moritz++ noticed the redundancy. 20:16
jnthn moritz: ping 20:17
moritz: I don't think I can hunt down your Temporal blocker in a short space of time, but this will avoid the issue: gist.github.com/1132621 20:19
tadzik jnthn: simple :nocache works too
20:19 MayDaniel left, shinobicl joined
jnthn tadzik: not in nqp 20:19
tadzik I think it does
jnthn nqp: foo(:a)
p6eval nqp: OUTPUT«Could not find sub foo␤current instr.: '_block1000' pc 31 ((file unknown):34) (/tmp/YleomNPT6w:1)␤»
jnthn huh
tadzik at least I use it
and it doesn't crash :P
jnthn nqp: sub foo(:$a) { say($a) }; foo(:a) 20:20
p6eval nqp: OUTPUT«1␤»
jnthn When'd that sneak it!
nqp: sub foo(:$a) { say($a) }; foo(:!a)
p6eval nqp: OUTPUT«0␤»
jnthn wow!
How did I not know that. :)
tadzik :)
jnthn Dinner done...time for evening hacking. 20:22
pmichaud :a and :!a have been in nqp for sometime, iirc 20:24
jnthn should pay more attention 20:25
20:33 im2ee joined 20:39 wamba joined
moritz jnthn: that patch gets us a bit further, but if I uncomment more of the stuff in Temporal.pm, I get a similar infinite loop 20:43
jnthn Shit.
moritz this time through trait_mod<is>
20:44 wolfman2000 joined
jnthn OK, probably not worth any more workarounds if the underlying issue is going to show up this much. 20:44
Though I've no idea what it could be.
20:55 timbunce left 20:57 kaare_ left 20:59 george_z0rwell left
BinGOs a/win 58 21:01
21:01 timbunce joined 21:03 miso2217 left 21:04 miso2217 joined 21:08 amkrankr1leuen left 21:10 sivoais joined, bluescreen10 left 21:20 M_o_C left 21:24 impiou1 joined 21:26 impious left 21:31 lue left 21:33 timbunce left
dalek odel: 7a6f96e | (Martin Berends)++ | c/ (10 files):
odel/c] add a generic threads library with simple tests
21:39
21:40 Mowah left, timbunce joined 21:41 im2ee left 21:47 Patterner left 21:49 Psyche^ joined, Psyche^ is now known as Patterner 22:05 miso2217 left 22:06 miso2217 joined 22:07 mj41 left
shinobicl sub func(Int $x = 0, Int $y = $x + 1) { return $y }; say func; say func(3); say func(3,20); 22:11
rakudo: sub func(Int $x = 0, Int $y = $x + 1) { return $y }; say func; say func(3); say func(3,20);
p6eval rakudo 922500: OUTPUT«1␤4␤20␤»
22:12 tty234 left, tty234 joined 22:15 saaki left 22:16 saaki joined
ruz what are :Ds? 22:18
jnthn Means the object is defined 22:20
(as in, an instance, not a type-object)
ruz ah
22:21 timbunce left, saaki left 22:24 Chillance left, Chillance joined 22:32 rdesfo left, saaki joined 22:33 am0c joined 22:42 tokuhirom joined 22:53 rdesfo joined 22:57 wamba left 23:00 PacoLinux joined 23:09 PacoLinux left 23:14 whiteknight joined 23:16 jaldhar joined 23:18 PacoLinux joined 23:21 molaf__ joined 23:25 molaf_ left, tokuhirom left, tokuhirom joined 23:30 tokuhirom left 23:34 PacoLinux left 23:38 molaf_ joined 23:40 molaf__ left 23:42 Alias left 23:43 molaf_ left 23:46 thou joined
dalek ast: d30a73e | jonathan++ | S12-construction/new.t:
Fudge a test that we probably passed for the wrong reasons.
23:48
ast: 20e88c0 | jonathan++ | S12-subset/subtypes.t:
De-cruft subtypes.t (still assumed Int ~~ Num, had a mistake, made a bad scoping assumption). Also remove all Rakudo fudges - we pass this one in full now.
kudo/nom: af72bd3 | jonathan++ | src/Perl6/ (3 files):
Start to improve and clean up package and type installation to fix some bugs and make various things work that didn't before.
23:49
kudo/nom: 1701656 | jonathan++ | src/Perl6/Actions.pm:
Simplify installation part of constant action method to re-use more SymbolTable code.
kudo/nom: 53133a7 | jonathan++ | src/Perl6/SymbolTable.pm:
Simplify install_package_symbol; it now need only concern itself with direct, not nested, installation.
kudo/nom: 6544695 | jonathan++ | src/Perl6/SymbolTable.pm:
Couple of symbol handling fixes.
kudo/nom: bf856cd | jonathan++ | src/core/IO/Socket (2 files):
Move Socket to be IO::Socket and INET to be IO::Socket::INET.
kudo/nom: 918e8c6 | jonathan++ | src/Perl6/ (2 files):
Get need in place. Sketch out import, though export is a bit too incomplete for it to really work out yet.
kudo/nom: 8863d55 | jonathan++ | t/spectest.data:
Run S12-subset/subtypes.t
ast: 38ff5f7 | jonathan++ | S12-methods/what.t:
Corrections to comments and code in what.t; remove a couple of Rakudo todos. Still needs some more fixing though (both to test and to Rakudo).
23:53
23:55 thou left 23:57 Woodi left, molaf_ joined