»ö« 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.
TimToady errands & 00:01
00:03 imarcusthis left 00:10 bluescreen10 left
[Coke] whiteknight: pull requests seem to have worked in the past. 00:15
whiteknight thanks [Coke]. I'm not ready yet, but good to know for future reference
00:16 cognominal left 00:21 cognominal joined 00:38 imarcusthis joined 00:44 imarcusthis left
cognominal I have a bad day with grammars. Why does this parse fail? 01:01
rakudo: grammar A { rule TOP { ^ a }; token ws { \s* } }; say A.parse(" a")
p6eval rakudo a47a56: OUTPUT«#<failed match>␤»
cognominal niecza: grammar A { rule TOP { ^ a }; token ws { \s* } }; say A.parse(" a")
p6eval niecza v14-14-gc008e24: OUTPUT«A()␤»
cognominal niecza: grammar A { rule TOP { ^ a }; token ws { \s* } }; say A.parse(" a").perl 01:02
p6eval niecza v14-14-gc008e24: OUTPUT«A␤»
01:08 Radvendii joined
Radvendii is there no -p option in perl6 yet? 01:09
01:11 Radvendii left
cognominal Radvendii: You can't group uniletter switch 01:21
echo foo | perl6 -p -e '$_'
using rakudo perl6 01:22
01:28 grizzlysmit joined
dalek ast: 902702c | (Solomon Foster)++ | S32-num/complex.t:
Use eval_dies-ok because Niecza catches comparison errors at compile time.
01:32
01:34 chee is now known as bot-chee, bot-chee is now known as chee 01:35 chee is now known as bot-chee
dalek ast: 9e532ca | (Solomon Foster)++ | S04-statements/for.t:
Additional fudging for niecza.
01:35
01:36 bot-chee is now known as chee
colomon nom: try { 1 div 0 } 01:42
p6eval nom a47a56: ( no output )
colomon niecza: try { 1 div 0 } 01:43
p6eval niecza v14-14-gc008e24: OUTPUT«===SORRY!===␤␤Constant folding threw exception: System.DivideByZeroException: Division by zero␤ at Builtins.divop (Int32 opc, Niecza.Variable a1, Niecza.Variable a2) [0x00000] in <filename unknown>:0 ␤ at Run.CORE.C1206infix:<div> (Niec…
colomon sorear: errr... is this getting carried away with the exception folding?
01:47 chee is now known as bot-chee 01:48 bot-chee is now known as chee
TimToady cognominal: the match fails because the sigspace before ^ traverses the initial whitespace, at which point ^ fails 01:50
01:50 cognominal left
TimToady this is one reason the sigspace rules have been revised (but not yet implemented) 01:50
01:51 cognominal joined
TimToady colomon, sorear: in Ada (at least originally), an error like 1/0 constant-folds into a throw, but it still happens at run time 01:52
01:52 cognominal left 01:53 cognominal joined 01:59 Radvendii joined
Radvendii is there any way to force operations to not flatten lists? 02:01
nom: ("a b c", "d e f").split(" ").perl.say 02:02
p6eval nom a47a56: OUTPUT«("a", "b", "c", "d", "e", "f").list␤»
02:04 Trashlord left
Radvendii cognominal++ #thanks for earlier response, found it on IRC logs :D 02:04
gfldex nom: .split(" ").perl.say for ("a b c", "d e f"); 02:05
p6eval nom a47a56: OUTPUT«("a", "b", "c").list␤("d", "e", "f").list␤»
02:06 Trashlord joined
Radvendii nom: ("a b c", "d e f").»split(" ").perl.say 02:07
p6eval nom a47a56: OUTPUT«===SORRY!===␤Confused␤at /tmp/3mtsYnL5QI:1␤»
gfldex nom: my @a = ("a b c", "d e f"); my @b = @a.map({.split(" ")}); say @b.perl;
p6eval nom a47a56: OUTPUT«Array.new("a", "b", "c", "d", "e", "f")␤»
Radvendii nom: ("a b c", "d e f")».split(" ").perl.say 02:08
p6eval nom a47a56: OUTPUT«(("a", "b", "c").list, ("d", "e", "f").list)␤»
Radvendii there we go
nom: eager ("a b c", "d e f")».split(" ").map(&say)
p6eval nom a47a56: OUTPUT«a␤b␤c␤d␤e␤f␤»
Radvendii dammit
why does
.map flatten everything?
gfldex because map is perl5ish 02:09
Radvendii is there a different operator to use? or is that going to be fixed?
gfldex >>. seams to work quite nicely 02:10
Radvendii that's only if you're applying a method to them each
not if you're trying to do something more complicated
gfldex nom: my @a = ("a b c", "d e f"); my @b = { split(" ", *) } for @a; say @b.perl; 02:13
p6eval nom a47a56: OUTPUT«Array.new(Block.new())␤»
gfldex nom: my @a = ("a b c", "d e f"); my @b = { split(" ", *) } for @a; say @b.flat.perl;
p6eval nom a47a56: OUTPUT«Array.new(Block.new())␤»
gfldex nom: my @a = ("a b c", "d e f"); my @b = split(" ", *) for @a; say @b.flat.perl;
p6eval nom a47a56: OUTPUT«Nominal type check failed for parameter '$target'; expected Cool but got Whatever instead␤ in sub split at src/gen/CORE.setting:1904␤ in block <anon> at /tmp/qoFdWGVOxc:1␤ in method reify at src/gen/CORE.setting:4475␤ in method reify at src/gen/CORE.setting:4380␤ …
Radvendii no worries, all i've gotta do is grep them anyways 02:14
although it *is* kind of silly...
I'm guessing Lists of Lists is one of those things that they'll get to at some point
gfldex nom: LoL.WHAT.say;
p6eval nom a47a56: OUTPUT«LoL()␤»
gfldex problem is that the dispatcher doesn't take return values into account. As a result you can't force map to return a LoL. 02:15
Radvendii dispatcher?
gfldex but you can solve your problem by providing a generator 02:16
the thing that does MMD
Radvendii MMD? (sorry...)
gfldex nom: my @a = ("a b c", "d e f"); my @b = for @a -> @l { take split(@l, " ") }; say @b.perl; 02:17
p6eval nom a47a56: OUTPUT«===SORRY!===␤Confused␤at /tmp/Dq8FHbdSxv:1␤»
gfldex multi method dispatch
same function name, different signature
Radvendii oooh... i see 02:19
gfldex nom: my @a = ("a b c", "d e f"); my @b = gather for @a { take split(*, " ") }; say @b.perl; 02:21
p6eval nom a47a56: OUTPUT«No applicable candidates found to dispatch to for 'split'. Available candidates are:␤:(Str:D , Regex $pat, Any $limit = { ... }, Any :all(:$all), Mu %_!)␤:(Str:D , Cool $delimiter, Any $limit = { ... }, Any :all(:$all), Mu %_!)␤:(Cool , Regex $pat, Any $limit = { ... …
gfldex nom: my @a = ("a b c", "d e f"); my @b = gather for @a { take split($_, " ") }; say @b.perl;
p6eval nom a47a56: OUTPUT«Array.new(" ", " ")␤»
02:22 Chillance joined
gfldex nom: my @a = ("a b c", "d e f"); my @b = gather for @a { say $_.perl; take split($_, " ") }; say @b.perl; 02:22
p6eval nom a47a56: OUTPUT«"a b c"␤"d e f"␤Array.new(" ", " ")␤»
gfldex nom: my @a = ("a b c", "d e f"); my @b = gather for @a { take split(" ", *) }; say @b.perl; 02:23
p6eval nom a47a56: OUTPUT«Nominal type check failed for parameter '$target'; expected Cool but got Whatever instead␤ in sub split at src/gen/CORE.setting:1904␤ in block <anon> at /tmp/8ArEje7qzy:1␤ in method reify at src/gen/CORE.setting:4475␤ in method reify at src/gen/CORE.setting:4380␤ …
gfldex nom: my @a = ("a b c", "d e f"); my @b = gather for @a { take split(" ", $_) }; say @b.perl;
p6eval nom a47a56: OUTPUT«Array.new("a", "b", "c", "d", "e", "f")␤»
TimToady btw, you generally want .words rather than .split(" ")
Radvendii right, but i'm actually doing .split(", ")
and i also prefer fewer primitive subroutines 02:24
i think .split(" ") better describes what i'm doing than .words
TimToady nom: sub lol (**@lol) { @lol.map: {[@$_]} }; (<a b c>, <d e f>).lol.map: *.say 02:25
p6eval nom a47a56: ( no output )
Radvendii nom: eager ("a b c", "d e f")».split(" ")>>.say
p6eval nom a47a56: OUTPUT«f␤e␤a␤d␤c␤b␤»
TimToady nom: sub lol (**@lol) { @lol.map: {[@$_]} }; lol(<a b c>, <d e f>).map: *.say 02:26
p6eval nom a47a56: ( no output )
Radvendii awww... that flattens as well
TimToady nom: sub lol (**@lol) { @lol.map: {[@$_]} }; eager lol(<a b c>, <d e f>).map: *.say
p6eval nom a47a56: OUTPUT«a b c␤d e f␤»
TimToady that doesn't
nom: eager (<a b c>, <d e f>).lol.map: *.say
p6eval nom a47a56: OUTPUT«a b c␤d e f␤»
TimToady that doesn't flatten
nom: eager (<a b c>, <d e f>).lol.perl.say 02:27
p6eval nom a47a56: OUTPUT«LoL.new(("a", "b", "c"), ("d", "e", "f"))␤»
Radvendii what? is there a built in lol function?
TimToady lol, yes
gfldex no, p6eval is just clever
Radvendii haha, nice. cool
TimToady no, Cool is a type
and nice is a Unix command
Radvendii hardy har har. 02:28
TimToady nom: eager lol(<a b c>, <d e f>).map: *.say
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&lol' called (line 1)␤»
TimToady aww
niecza: eager lol(<a b c>, <d e f>).map: *.say
p6eval niecza v14-14-gc008e24: OUTPUT«===SORRY!===␤␤Undeclared routines:␤ 'eager' used at line 1␤ 'lol' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.co…
TimToady niecza: lol(<a b c>, <d e f>).map: *.say 02:29
p6eval niecza v14-14-gc008e24: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'lol' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ at /home…
TimToady niecza: (<a b c>, <d e f>).lol.map: *.say
p6eval niecza v14-14-gc008e24: OUTPUT«Unhandled exception: Unable to resolve method lol in class Parcel␤ at /tmp/_Gj_sJlcYN line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3609 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3610 (module-CORE @ 63) ␤ at /home…
TimToady nom++
for the method, not for missing the listop
Radvendii oh, yeah :P 02:30
TimToady nom: eager (<a b c>, <d e f>).lol.map(-> @x { @x».uc }).lol.[1].say 02:33
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/M4gtyoYKlA:1␤ in <anon> at /tmp/M4gtyoYKlA:1␤»
TimToady I guess nom only implements .lol on parcels so far 02:34
nom: eager (<a b c>, <d e f>).lol.map(-> @x { @x».uc })[1].say 02:35
p6eval nom a47a56: OUTPUT«D E F␤»
TimToady I guess it doesn't really need the second lol
Timbus nom: (<a b c>, <d e f>).lol.map(-> @x { @x».uc })[1].say 02:36
p6eval nom a47a56: OUTPUT«D E F␤»
Timbus no need to be too eager 02:37
TimToady nom: sub lol (**@lol) { @lol.map: {[@$_]} }; .say for lol <a b c>, <d e f>
p6eval nom a47a56: OUTPUT«a b c␤d e f␤»
TimToady niecza: sub lol (**@lol) { @lol.map: {[@$_]} }; .say for lol <a b c>, <d e f> 02:38
p6eval niecza v14-14-gc008e24: OUTPUT«===SORRY!===␤␤Slice parameters NYI at /tmp/Rt49KOXxdl line 1:␤------> sub lol (**@lol⏏) { @lol.map: {[@$_]} }; .say for lol <a␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344…
TimToady lol slices are a prerequisite for much of S09 02:40
colomon Isn't sorear++ still waiting for pmichaud++ to explain how they are supposed to work? 02:42
LoL, I mean 02:43
Radvendii nom: my $a = "foo"; say "foobar" ~~ /$a/;
p6eval nom a47a56: OUTPUT«=> <foo>␤␤»
Radvendii so it does match...
nom: my $a = "(baz|foo)"; say "foobar" ~~ /$a/;
p6eval nom a47a56: OUTPUT«#<failed match>␤»
Radvendii nom: my $a = "<[baz|foo]>"; say "foobar" ~~ /$a/; 02:44
p6eval nom a47a56: OUTPUT«#<failed match>␤»
colomon is trying to figure out why Testing / perl6-Testing doesn't appear in the ecosystem as far as Panda is concerned.
Radvendii what's the new syntax for this *or* that
nom: my $a = "[baz|foo]"; say "foobar" ~~ /$a/;
p6eval nom a47a56: OUTPUT«#<failed match>␤»
TimToady you can't just match it as a string 02:45
you have to force it to interpret it as a regex
nom: my $a = "[baz|foo]"; say "foobar" ~~ /<$a>/
p6eval nom a47a56: OUTPUT«=> <foo>␤␤»
TimToady regexes are not strings in Perl 6 02:46
so you can't use string interpolation to interpolate regex
Radvendii TimToady: a-ah, thanks
and what's the difference between <[]> and [] inside regex?
TimToady S05 explains all this 02:47
Radvendii TimToady: thanks
nom: my @a = "[0|1]", "blah"; say "0" ~~ /<$a[0]>/ 02:53
p6eval nom a47a56: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "[0]>/"␤»
Radvendii nom: my @a = "[0|1]", "blah"; say "0" ~~ /<@a[0]>/ 02:54
p6eval nom a47a56: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 1, near "[0]>/"␤»
Radvendii nom: my @a = "[0|1]", "blah"; say "0" ~~ /<{a[0]}>/
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
Radvendii nom: my @a = "[0|1]", "blah"; say "0" ~~ /<{@a[0]}>/
p6eval nom a47a56: OUTPUT«=> <0>␤␤»
TimToady \o/
Radvendii there we go
:D
TimToady yes, <{ ... }> is available for fancy stuff
Radvendii these regex have such complicated syntax! (granted, i see that it's very powerful) 02:55
TimToady it no more complicated than p5 regex, and much more powerful
02:55 kmwallio joined
TimToady well, maybe a little more complicated...but the simple things are simpler 02:56
Radvendii well... i guess just different
TimToady except for things we've intentionally dehuffmanized, like character classes
Radvendii huffmanized? 02:57
humanized you mean?
TimToady common things should be short, less common things should be longer
a generalization of Huffman coding
en.wikipedia.org/wiki/Huffman_coding 02:58
Radvendii ah, i knew the philosophy, just not the name 02:59
TimToady "Easy things should be easy, and hard things should be possible."
but it's a design principle here that we think about how hard or easy we want things to be, and try to give them shorter or longer syntax to support that 03:00
it's why "my" is shorter than "our", for instance 03:01
and why verbs have an easier way to leave off sigils than nouns do, because good OO or FP programming tends to be verb heavy rather than noun heavy 03:02
Radvendii huh. interesting 03:03
nom: $^a=5; say $a;
p6eval nom a47a56: OUTPUT«===SORRY!===␤Cannot use placeholder parameter $^a in the mainline␤at /tmp/0TyJROvayV:1␤»
Radvendii dang.
TimToady nom: sub MAIN { say $^a } 03:04
p6eval nom a47a56: OUTPUT«Usage:␤ --setting=SAFE <a>␤»
TimToady nom: sub MAIN ($a = 5) { say $a } 03:05
p6eval nom a47a56: OUTPUT«5␤»
Radvendii i was just seeing if i could use $^a instead of my $a
nom: say (<a b c>,<d e f>).lol 03:06
p6eval nom a47a56: OUTPUT«a b c d e f␤»
03:06 wolfman2000 joined
TimToady placeholders are only legal in curlies 03:06
Radvendii nom: say (<a b c>.list,<d e f>.list).lol
p6eval nom a47a56: OUTPUT«a b c d e f␤»
Radvendii TimToady: i figured
nom: say (<a b c>,<d e f>).lol.perl
p6eval nom a47a56: OUTPUT«LoL.new(("a", "b", "c"), ("d", "e", "f"))␤»
Radvendii nom: say (<a b c>,<d e f>).lol.map: {$^a.say} 03:07
p6eval nom a47a56: OUTPUT«a b c␤d e f␤True True␤»
Radvendii nom: say (<a b c>,<d e f>).lol.map: {$^a.grep: {True}}
p6eval nom a47a56: OUTPUT«a b c d e f␤»
Radvendii nom: say ((<a b c>,<d e f>).lol.map: {$^a.grep: {True}}).perl
p6eval nom a47a56: OUTPUT«("a", "b", "c", "d", "e", "f").list␤»
Radvendii why doesn't the '.grep' hold onto the lol context?
timotimo where do i look to find out things like "can i use SDL with perl6 yet?" searching perl6 on cpan only gives me modules for perl5 it seems 03:08
TimToady might be a bug
each map is supposed to return a Parcel
03:08 imarcusthis joined
Radvendii timotimo: there's panda 03:08
but im not sure if that works yet... i haven't gotten it too on my computer
03:08 PacoAir left, grizzlysmit left, Trashlord left
Radvendii TimToady: dang... 03:09
TimToady nom: use SDL
p6eval nom a47a56: OUTPUT«===SORRY!===␤Could not find SDL in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/nom-inst1/lib/parrot/4.0.0-devel/languages/perl6/lib, .␤»
TimToady well, it worked at one point
colomon: you know anything about s
SDL?
timotimo what is panda?
i only know panda3d, but that's python/c++ stuff 03:10
Radvendii by the way, why is perl6 called perl6 if it's not supposed to replace perl5, it makes search results very confused...
colomon TimToady: not really.
Radvendii timotimo: github.com/tadzik/panda 03:11
colomon TimToady: doesn't seem to be much there yet
And it's from six months ago, so it probably doesn't work with nom yet. 03:12
TimToady parrot has SDL, so maybe it's accessible
colomon it's using NativeCall 03:13
Radvendii nom: say ((<a b c>,<d e f>).lol.map: {$^a.grep(/< a b c d >}).perl 03:14
p6eval nom a47a56: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at line 1, near " a b c d >"␤»
Radvendii nom: say ((<a b c>,<d e f>).lol.map: {$^a.grep(/< a b c d >/).perl
p6eval nom a47a56: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at line 1, near " a b c d >"␤»
Radvendii nom: say ((<a b c>,<d e f>).lol.map: {$^a.grep(/[a|b|c|d]/)).perl 03:15
p6eval nom a47a56: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
03:15 Trashlord joined
Radvendii nom: say ((<a b c>,<d e f>).lol.map: {$^a.grep(/[a|b|c|d]/)}).perl 03:15
p6eval nom a47a56: OUTPUT«("a", "b", "c", "d").list␤»
03:16 imarcusthis left
TimToady nom: <a b c>.map({ 1,2,3 }).perl.say 03:16
p6eval nom a47a56: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3)).list␤»
TimToady nom: <a b c>.map({ (1,2,3).grep: * % 2 }).perl.say 03:17
p6eval nom a47a56: OUTPUT«(1, 3, 1, 3, 1, 3).list␤»
TimToady nom: <a b c>.map({ ((1,2,3).grep: * % 2) }).perl.say 03:18
p6eval nom a47a56: OUTPUT«(1, 3, 1, 3, 1, 3).list␤»
TimToady nom: <a b c>.map({ ((1,2,3).grep: * % 2), }).perl.say
p6eval nom a47a56: OUTPUT«(((1, 3).list,), ((1, 3).list,), ((1, 3).list,)).list␤»
TimToady yes, for some reason the map isn't returning the grep's result as a subparcel
sorear colomon: it's not getting "carried away", it's a deliberate decision - when something can't work, we SORRY at compile time 03:19
TimToady it can work if it's in a try though
colomon exactly
TimToady which is why Ada only replaced such with a run-time throw
03:19 xith_kymous joined
TimToady also, it's a bit of a jump from "allowed to complain" to "dies with SORRY" 03:24
03:26 kmwallio left
TimToady I'd put it more in the category of a warning that can be suppressed with #OK 03:27
Radvendii TimToady++ #workaround with extra ',' 03:29
03:38 tokuhir__ left
Radvendii .grep being lazy keeps giving me problems... 03:40
(until i realize what's happening)
nom: say (<a b c>, <d e f>).list.lol 03:44
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/s7b1VmwvG3:1␤ in <anon> at /tmp/s7b1VmwvG3:1␤»
Radvendii grrr.... the problem is that a bunch of functions return stuff in .list format, which then get's flattened
nom: say (<a b c>, <d e f>).lol.map({$_}).perl 03:45
p6eval nom a47a56: OUTPUT«(("a", "b", "c"), ("d", "e", "f")).list␤»
Radvendii nom: say (<a b c>, <d e f>).lol.map({$_}).say
p6eval nom a47a56: OUTPUT«a b c d e f␤True␤»
Radvendii aaand what? 03:46
nom: (<a b c>, <d e f>).lol.map({$_})>>.say
p6eval nom a47a56: OUTPUT«d e f␤a b c␤»
Radvendii hmm...
nom: ((("00", "10").list,), (("101",).list,)).list>>.say 03:47
p6eval nom a47a56: OUTPUT«00␤101␤10␤»
Radvendii oh. it does them in a random order?
that's odd
but still, why is it separating them all with '\n's 03:48
<a b c>.say
TimToady hypers are unordered
Radvendii nom: <a b c>.say
p6eval nom a47a56: OUTPUT«a b c␤»
Radvendii TimToady: yeah, i figured
TimToady (in side effects)
not in result
Radvendii but still, shouldn't it be printing 101\n00 10? 03:49
because the lists are (("00", "10"), ("101"))
nom: (("00", "10"), ("101"))>>.say 03:50
p6eval nom a47a56: OUTPUT«10␤101␤00␤»
Radvendii ôʃō
nom: (("00", "10"), ("101")).lol>>.say
p6eval nom a47a56: OUTPUT«00 10␤101␤»
Radvendii nom: (("00", "10"), ("101")).list>>.say
p6eval nom a47a56: OUTPUT«00␤10␤101␤» 03:51
Radvendii nom: (("00", "10"), ("101")).list.lol>>.say
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/RaGXT4Rm7f:1␤ in <anon> at /tmp/RaGXT4Rm7f:1␤»
Radvendii is there any way to get rid of the .list status so i can make it .lol?
nom: (("00", "10"), ("101")).list.item.lol>>.say
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/ydP_BI11Fe:1␤ in <anon> at /tmp/ydP_BI11Fe:1␤»
Radvendii nom: (("00", "10"), ("101")).list.item.perl.say 03:52
p6eval nom a47a56: OUTPUT«(("00", "10"), "101").list.item␤»
03:53 orafu left
Radvendii nom: (("00", "10"), ("101")).list.perl.subst('list', 'lol').eval.say 03:54
p6eval nom a47a56: OUTPUT«00 10 101␤»
Radvendii nom: (("00", "10"), ("101")).list.perl.subst('list', 'lol').eval.perl.say
p6eval nom a47a56: OUTPUT«LoL.new(("00", "10"), "101")␤»
Radvendii :P
that's what i want to do
except less kludgy
because i'm sure regex-replacing a .perl and then '.eval'ing that is *really* bad practice 03:55
nom: (("00", "10"), ("101")).list.perl.subst('list', '').eval.perl.say
p6eval nom a47a56: OUTPUT«===SORRY!===␤Confused␤at /tmp/47j5BT3EdP:1␤»
Radvendii nom: (("00", "10"), ("101")).list.perl.subst('.list', '').eval.perl.say
p6eval nom a47a56: OUTPUT«(("00", "10"), "101")␤»
Radvendii any ideas guys? 03:58
sorry, i can figure it out. no worries
03:58 orafu joined 04:00 whiteknight left
sorear TimToady: I do not understand the purpose of folding a throw. 04:02
TimToady: why replace "1 / 0" with "die 'Division by zero'"? Or rather, why did Ada do that? 04:03
TimToady: did Ada programs often have a problem with 1 / 0 not being fast enough?
TimToady the point was not to gratuitously change the semantics, I suspect 04:10
eviltwin_b IIRC that was actually specified originally, that optimizations were not allowed to change semantics, so they had to fold it that way to be compliant 04:12
(also meant many optimizations common in other languages couldn't be considered because they changed the operational semantics in some corner cases) 04:16
Radvendii nom: gist.github.com/1742671 04:21
p6eval nom a47a56: OUTPUT«Nominal type check failed for parameter ''; expected Int+{MyRole} but got Int+{MyRole} instead␤ in method test at /tmp/UhkJ_27AhL:2␤ in block <anon> at /tmp/UhkJ_27AhL:20␤ in <anon> at /tmp/UhkJ_27AhL:1␤»
Radvendii anyone got a second to check that out? might be a bug...
sorear TimToady: no, I'm wondering why not just leave it as "1 / 0"
eviltwin_b again, braindamaged spec 04:22
sorear Radvendii: I agree with nom.
eviltwin_b there's a reason most of the world looked at the original Ada spec and said "are you nuts?" and ignored it
Radvendii sorear: what's wrong then? 04:23
what's parameter ''?
sorear "self", apparently
what's wrong is that you wrote an impure FETCH method
Radvendii impure?
sorear FETCH should return the same value if it's called twice in a row
Radvendii and it does... 04:24
sorear no, it doesn
't
every time that FETCH method is called, it calls &infix:<but>, which constructs a new anonymous subclass of Int
eviltwin_b Radvendii, each "but" creates a new anonymous class
so, LTA error, but otherwise correct 04:25
sorear eviltwin_b: I'm curious what in the spec was sufficiently braindamaged to *require* folding 1/0 to die("Divide by zero")
eviltwin_b I don't remember details, but the original spec was a masterpiece of overspecification 04:26
Radvendii eviltwin_b: so what do i do? if i return $.b does MyRole it stacks the MyRoles so that it has Int+{MyRole}+{MyRole}+{MyRole}...
04:26 simcop2387 left
Radvendii nom: gist.github.com/1742671 04:27
p6eval nom a47a56: OUTPUT«Nominal type check failed for parameter ''; expected Int+{MyRole} but got Int+{MyRole} instead␤ in method test at /tmp/plCaSzm_o5:2␤ in block <anon> at /tmp/plCaSzm_o5:20␤ in <anon> at /tmp/plCaSzm_o5:1␤»
04:27 xith_kymous left
sorear I have a hunch that whatever you're trying to do, can be done more easily by not using roles or Proxy at all 04:27
04:28 simcop2387 joined 04:29 araujo left
Radvendii sorear: 1) it does require Proxy because what i'm trying to do involeves at_key 2) i'm trying to make every value of the hash be able to have a method called on them 04:30
(i'm not using at_key in the example because I wanted to keep it as simple as possible) 04:32
sorear: ôʃō? what were you suggesting I do? 04:39
04:39 simcop2387 left, simcop2387 joined
sorear erm, have you tried ... putting values of the correct type in the hash to begin with? 04:39
and just using a vanilla hash, not some weird custom thing 04:40
Radvendii vanilla hash? 04:46
nom: gist.github.com/1742709 04:49
p6eval nom a47a56: ( no output )
Radvendii nom: gist.github.com/1742709 04:50
p6eval nom a47a56: OUTPUT«Scalar()␤»
Radvendii that's what happens when i try putting "values of the correct type in the [variable] to begin with"
TimToady sorear++ is trying to suggest that you have an XY problem, and that you might well do better by a completely different approach to your problem, by not using FETCH or proxies AT ALL. 04:55
meta.stackoverflow.com/questions/66...xy-problem 04:57
05:04 drbean left
Radvendii that's why i incuded information about what i wanted to do... i want to have each element of the hash be able to do a method, on itself. one way to do this would be to have it be a method to the hash like %hash.delete(key) OR i could do it as an adverb (e.g. %hash<key> :delete) but that's NYI, so i opted to go with %hash<key>.delete any other suggestions? (i'm not actually doing this with "delete") 05:05
05:05 drbean joined
TimToady that's the X, what's your Y? 05:07
Radvendii wait... what? i'm confused, which is which? i thought X is what one is supposed to give? 05:10
TimToady: ...? 05:26
sorear nom needs a more strongly worded error message for people who try to do "3 does SomeRole" 05:30
Radvendii why? it's supposed to be "3 but SomeRole"? 05:33
05:33 xinming left
sorear yes 05:40
"does" modifies the LHS in place
05:42 xinming joined
Radvendii right, i tried it with "but" also 05:59
06:02 tokuhir__ joined
dalek ecza: d61f697 | sorear++ | src/NieczaPassSimplifier.pm6:
Change constant folding failure to be a warning
06:02
Radvendii TimToady: What do you want me to tell you? what i want to do, or how i want to do it? 06:15
06:23 awoodland left 06:44 cooper left 06:52 ponbiki joined 06:53 Chillance left 06:54 Chillance joined 06:55 Chillance left 07:03 rasto left 07:14 zby_home_ joined 07:16 imarcusthis joined 07:18 rasto joined 07:20 kaare_ joined 07:27 imarcusthis left 07:30 alvis left 07:31 abhishekisnot joined 07:32 araujo joined, araujo left, araujo joined, abhishekisnot left 07:34 alvis joined 07:39 rasto left 07:57 birdwindupbird joined 08:00 imarcusthis joined 08:02 Trashlord left 08:04 Trashlord joined 08:10 imarcusthis left 08:15 imarcusthis joined 08:24 mucker joined 08:50 birdwindupbird left 08:53 tokuhir__ left 08:55 birdwindupbird joined 08:58 cognominal left 09:00 cognominal joined 09:11 drbean left, drbean joined 09:13 birdwindupbird left 09:15 birdwindupbird joined 09:24 birdwindupbird left 09:47 ponbiki left, Psyche^ joined 09:48 Patterner left, Psyche^ is now known as Patterner 09:53 Pzter left 09:54 PZt joined 10:10 GlitchMr joined
jnthn morning, #perl6 10:14
tadzik good morning
jnthn tadzik: omg, early for you! :) 10:17
tadzik yeah ;) 10:18
jnthn would probably still be snoozing if he didn't have a train to catch in the near future
10:24 Trashlord left 10:32 mj41 joined 10:33 Trashlord joined 10:58 spine joined
jnthn station & 11:00
11:03 y3llow left, y3llow joined 11:19 drbean left 11:20 drbean joined
masak afternoon, #perl6 11:26
man, I'm up after tadzik today... :P 11:27
[backlog] waiwait, type coercions like $obj.Str don't call a .Str method, but get snatched up by the parser as special cases? 11:28
then what have I been doing declaring .Str methods in my classes up until now? :/
tadzik hahaha! 11:29
masak <TimToady> otoh, we didn't have .& back then
it's funny -- .& wasn't added, it was *discovered*. 11:30
it fell out of all the other stuff we had. :)
also, I must confess I still don't grok the "method/submethod semantics" distinction. 11:31
even though I can speak the words and do the dance moves, I don't feel it in my bones.
11:33 drbean left 11:35 drbean joined 11:37 Trashlord left 11:41 tarch joined 11:47 drbean left 11:48 drbean joined 11:52 jaldhar left 11:54 jaldhar joined 11:56 birdwindupbird joined 12:05 awoodland joined 12:09 awoodland left 12:15 iktome joined, iktome left 12:17 tarch left 12:25 drbean left 12:28 drbean joined, icwiener joined
colomon So, do we really want postfix:<++> and postfix:<--> to be part of the KeySet interface? 12:29
ie $keyset<foo>++ to add "foo" to the KeySet, and $keyset<foo>-- to remove it? 12:30
colomon has an efficient implementation of KeySet using Proxy and $keyset<foo> = True and $keyset<foo> = False, but isn't sure how to make postfix:<++> and postfix:<--> work efficiently. 12:32
12:33 fasad joined 12:39 drbean left 12:42 drbean joined
masak colomon++ 12:42
setting to True and False sounds like a very solid start.
the postfix:<++>, postfix:<--> has that $| feel to it. 12:43
but I actually don't quite know how Bool behaves in this regard in Perl 6 in general.
time to experiment :)
perl6: my Bool $b; say $b; $b++; $b++; say $b; $b--; say $b; $b--; say $b 12:44
p6eval niecza v14-15-gd61f697: OUTPUT«Bool()␤True␤False␤False␤»
..pugs b927740: OUTPUT«Bool␤2␤1␤0␤»
..rakudo a47a56: OUTPUT«Bool()␤Type check failed in assignment to '$b'; expected 'Bool' but got 'Int'␤ in sub postfix:<++> at src/gen/CORE.setting:1241␤ in block <anon> at /tmp/Y9i3pF5TWX:1␤ in <anon> at /tmp/Y9i3pF5TWX:1␤»
12:44 whiteknight joined
masak I'm with Niecza on this one. 12:44
but it's a deviation from how enum types behave in general, I guess... 12:45
12:48 simcop2387 left, simcop2387_ joined, simcop2387_ is now known as simcop2387 12:53 drbean left, drbean joined
colomon masak: is it? 12:59
13:00 grondilu joined
grondilu perl6: class Foo {}; package Bar { our Foo $foo .= new; } 13:00
colomon perl6: enum Test <a b c d>; my $a = Test::a; $a++; $a++; $a++; $a++; $a++; say $a
p6eval pugs b927740: ( no output )
..niecza v14-15-gd61f697: OUTPUT«===SORRY!===␤␤Common variables are not unique definitions and may not have types at /tmp/vM51MdmbrY line 1:␤------> lass Foo {}; package Bar { our Foo $foo ⏏.= new; }␤␤Unhandled exception: Check failed␤␤ at /home/p6eva…
..rakudo a47a56: OUTPUT«===SORRY!===␤Cannot put a type constraint on an 'our'-scoped variable at line 1, near " .= new; }"␤»
rakudo a47a56: OUTPUT«5␤»
..pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/StCuFEg4o7 line 1, column 1-20␤»
..niecza v14-15-gd61f697: OUTPUT«d␤»
grondilu perl6: class Foo {}; package Bar { our Foo $foo .= new; }
p6eval pugs b927740: ( no output )
..rakudo a47a56: OUTPUT«===SORRY!===␤Cannot put a type constraint on an 'our'-scoped variable at line 1, near " .= new; }"␤»
..niecza v14-15-gd61f697: OUTPUT«===SORRY!===␤␤Common variables are not unique definitions and may not have types at /tmp/w8L4y8zCMD line 1:␤------> lass Foo {}; package Bar { our Foo $foo ⏏.= new; }␤␤Unhandled exception: Check failed␤␤ at /home/p6eva…
grondilu rakudo doesn't accept 'our'-scoped member variables?? 13:01
13:03 simcop2387_ joined, simcop2387_ left 13:04 simcop2387_ joined, simcop2387 left, simcop2387_ is now known as simcop2387 13:05 tokuhirom joined
colomon nom: class Foo {}; package Bar { our $foo .= new; } 13:05
p6eval nom a47a56: ( no output ) 13:06
tadzik grondilu: doesn't accept type constraint, it seems 13:20
masak wonders why 13:24
13:30 Trashlord joined 13:33 MayDaniel joined, MayDaniel left 13:34 MayDaniel joined, MayDaniel left
arnsholt masak: I suspect that Niecza's error may be a clue, but I don't quite get what it means 13:35
masak oh! 13:36
I know what it is.
Perl 6 has to do "unification" of packages during 'use' and import and stuff.
that's where one variable could be defined in two places, and conceivably that could lead to contradictions if the variables could be typed. 13:37
oh!
it's simpler than that -- even inside of one packages, several 'our'-scoped declarations of the same variable can be made.
13:37 xinming left
fasad what does "Mu" mean? 13:38
masak it's the type at the top/base of the type system.
at least of the Perl 6 type system :) other types outside that may exist. 13:39
it used to be called "Object", but TimToady changed it.
it *means* a lot of things. see S02:1250 for the list. 13:40
mostly, I suspect, it's a reference to the Japanese term for nothingness, 無 13:41
fasad wants the S02:1250 to be clickable !
masak it is in the logs.
irclog.perlgeek.de/perl6/2012-02-05#i_5105140
arnsholt fasad: irclog.perlgeek.de/perl6/2012-02-05
fasad yeah, but i need to refresh the log everytime :( 13:42
masak but it also ties nicely in with the Hofstadterian "this answer is outside of the range of possible answers".
fasad wants a bot
masak write an IRC client (or plugin) that highlights the links for you.
masak should do that hisself
irssi is open-source, right? :D
fasad masak++ 13:43
13:43 xinming joined, PacoAir joined
masak it is. GNU-licensed, and in an svn repo, which means I could use git-svn with it. \o/ 13:43
(spend the past week speaking warmly of git, and how even when you're cursed with lesser VCSes X, you can often use git-X and live in a slightly better world.) 13:44
fasad TimToday's rosettacode userpage says his Perl 6 proficeincy is "Mu", hehe :) 13:51
13:53 tokuhirom left 13:55 birdwindupbird left, shinobicl___ joined
masak and his Perl (5) prodiciency is "Regrettable" :P 13:56
proficiency*
13:56 tokuhirom joined
masak I guess it's fair to say that the "proficiency landscape" for Perl 6 is still very much in flux. 13:57
or it's a bit like a storm, and TimToady is in its eye. 13:58
fasad :)
masak crafts a blog post about blog engine ambitions 13:59
14:03 Radvendii left 14:06 grondilu left
fasad has been reading TimToady as TimToday the whole time and has just noticed it !! Unbelievable ! 14:10
thankfully, perl6 wants every variablt ot be declared :p
*variable
*to
14:13 tokuhirom left, icwiener left 14:22 tarch joined, BooK__ left, BooK_ joined 14:40 shinobicl___ left 14:47 DarthGandalf left 14:50 DarthGandalf joined 14:57 DarthGandalf left 15:01 Su-Shee joined
Su-Shee hi all. 15:01
colomon o/ 15:06
15:12 mucker left
masak Su-Shee! \o/ 15:12
we've missed you!
Su-Shee I had a Perl crisis and had to dip into other languages. ;) 15:15
15:17 Some-body_ joined
masak understandable. :) welcome back! 15:19
which other languages did you dip into?
Su-Shee more smalltalk and I did some ruby and python at work... 15:20
masak nice. 15:21
blog post! strangelyconsistent.org/blog/a-four...-for-psyde 15:22
Su-Shee kind of.. I realize every time how few things I really miss in Perl.. ;)
masak is that so? I usually feel I miss a host of things when I'm not coding in Perl 5 or Perl 6. 15:25
I even miss a bunch of Perl 6 things when I code in Perl 5, though those can usually be worked around or found in modules.
Su-Shee that's what I mean.. I do stuff in other languages and realize that there are only a very few things I miss in Perl... 15:26
15:28 Some-body_ left
masak oh, ok. 15:29
mostly it seems to me that people's objections to other languages, and their preferences for one language over another, are rooted in the fact that they've used some runtime enough to evolve high levels of sympathy with its semantics, and so everything else will feel strange. 15:30
so most discussions about the relative merits of various languages read to me like "I like weaing my shirt but not your shirt, I dunno, there's just something about the texture that doesn't feel right". 15:31
Su-Shee I've mostly missed a certain whipuptitude-feeling in other languages and I really really hate "a match object" when working with regex. :)
masak I've been having a strong sense of that feeling of whipuptitude when writing Perl 6 in Niecza lately. 15:32
mostly I just write out the program in near-pseudocode (this is a programmer's way of saying "I don't even notice the syntax anymore"), and it mostly just works! 15:33
thing with junctions especially tend to read really well. 15:34
Su-Shee the image-based thing in smalltalk is extremely nice, this "hack as you go operate on the open heart" feeling is quite nice.
masak yeah. too bad images are a bit all-or-nothing.
but a big ++ to interactive programming, and evolving code from REPL to program. I should do that more. 15:35
apparently SLIME in Emacs is really good for that as well.
Su-Shee it's a very closed ecosystem. nonetheless the convenience for the developer is amazing. smalltalks web framework doesn't even distinguish between "the webpade you're having in the browser in developer mode" and "the code on the server"
"webpage" 15:36
15:36 Some-body_ joined
masak sould that be Seaside? 15:37
would*
Su-Shee yes, but I think others support it as well. but: they're all extremely unrestful, very tightly coupled. they gave productivity and development speed the clear preference. 15:38
mostly I realized that I would love to have that kind of development style as a window manager. 15:40
15:40 Some-body_ left 15:44 Some-body_ joined
masak aye. 15:44
15:46 Some-body_ left
Su-Shee do I want star or rakudo january? 15:49
dalek ast: f2903a0 | (Solomon Foster)++ | S02-types/keyset.t:
Lots more KeySet tests, inspired by the Set tests. Also fudge for Niecza.
15:50 Some-body_ joined, Some-body_ left
colomon Su-Shee: star 15:50
masak they're the same compiler. but star has a bunch of modules and other goodies, too. 15:51
colomon I thought star had a few days improvements over january
15:53 Some-body_ joined
masak quite possibly. 15:55
I remember it though as the compiler release being delayed a bit less than a week so that no-one'd have to cut another compiler release just for the distribution. 15:56
Su-Shee star already installed.. ;)
colomon masak: turns out I hadn't actually made the $keyset<foo> = True form work yet, and when I did, the $keyset<foo>++ form just started working too. I'm spectesting now. 15:59
masak colomon<foo>++ 16:02
colomon: I'm eager to see that code.
moritz back 16:03
16:05 jferrero left
masak moritz! \o/ 16:05
colomon \o/ 16:11
masak: the code is not terribly impressive, IMO. but it gets the job done!
masak that's what I'm interested in. I'm curious how to get started down the Proxy road. 16:13
moritz jnthn: did you see the parrot-dev discussion about de-magicifying 'self'? does that require nqp/rakudo codegen chanegs?
16:16 xinming left 16:18 xinming joined
dalek ecza: ea84dbe | (Solomon Foster)++ | / (2 files):
Working and reasonably efficient implementation of KeySet.
16:20
ecza: 0ef17b0 | (Solomon Foster)++ | lib/CORE.setting:
Change $dummy to just $ to silence a warning.
colomon whoops, just noticed Str, gist, and perl are clearly wrong. :) 16:21
need more tests!
masak looks at the code 16:26
heh, Niecza really needs 'handles' :)
it's syntactic sugar, but it's very nice sugar. 16:27
that class would be very short indeed if it used 'handles'. 16:28
anyway, colomon++ 16:29
rafl hello perl 6 peeps 16:30
colomon \o
rafl GSoC is starting up again and we're collecting project ideas at wiki.enlightenedperl.org/gsoc2012/ideas
colomon Unless something unexpected happens (or someone beats me to it) I'll probably pound out KeyBag during the Super Bowl 16:31
rafl could you have a go over the perl 6 projects there from last year and remove the ones that aren't in need of a student anymore and possibly add new ones as you see fit?
we're not in a rush at this point, but i'd like that page to be in a reasonable shape before the 9th of march for our organisation application to google 16:32
masak rafl++ # for the heads-up 16:37
I think the MMD optimization has been done at this point, or at least started. 16:38
jnthn will know whether it should be changed or removed.
XML parser binding is still needed, and a good GSoC project.
I'm sure we can think up more. 16:39
rafl super - thanks
cognominal nom: grammar A { rule TOP { ^ a }; token ws { \s+ } }; say A.parse('a')
p6eval nom a47a56: OUTPUT«#<failed match>␤»
cognominal nom: grammar A { rule TOP { ^ a }; }; say A.parse(' a') 16:40
p6eval nom a47a56: OUTPUT«#<failed match>␤»
cognominal I am puzzled.
tadzik yay, gsoc starts :) 16:43
rafl still studying, huh? :) 16:44
tadzik heh, well, studying
rafl excellent! that's the best kind of studying there is :) 16:45
tadzik I got tricked into this "student life" :P "it gets easier after the first year!" Yeah, right ;)
rafl so does gsoc! :) 16:46
honest!
tadzik dun'worry, I'm already decided :)
rafl \o/
tadzik it's way too fun to miss
16:46 Radvendii joined
Radvendii o/ #perl6 16:47
tadzik hey Radvendii
Radvendii hey tadzik
rafl schedules a welcome-go-gsoc beverage of his choice for tadzik early next month
*to
tadzik \o/ 16:48
arnsholt masak: For the text-oriented graphics library, maybe TikZ can serve as some kind of inspiration? 16:50
Radvendii nom: say <a b c>.map: {1,2,3}
p6eval nom a47a56: OUTPUT«1 2 3 1 2 3 1 2 3␤»
Radvendii nom: <a b c>.map({1,2,3}).perl.say 16:51
p6eval nom a47a56: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3)).list␤»
Radvendii nom: <a b c>.map({1,2,3}).map({.say})
p6eval nom a47a56: ( no output )
16:51 Chillance joined
Radvendii nom: <a b c>.map({1,2,3}).map(*.say) 16:51
p6eval nom a47a56: ( no output )
Radvendii nom: eager <a b c>.map({1,2,3}).map(*.say)
p6eval nom a47a56: OUTPUT«1␤2␤3␤1␤2␤3␤1␤2␤3␤»
Radvendii nom: eager <a b c>.map({1,2,3}).lol.map(*.say) 16:52
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/KJo1O8MSfy:1␤ in <anon> at /tmp/KJo1O8MSfy:1␤»
Radvendii grrr
it's doing this just to piss me off :P
nom: eager map {.say} <a b c>.map({1,2,3}) 16:54
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&c' called (line 1)␤Undefined routine '&b' called (line 1)␤Undefined routine '&a' called (line 1)␤»
Radvendii nom: eager map {.say}, <a b c>.map({1,2,3})
p6eval nom a47a56: OUTPUT«1␤2␤3␤1␤2␤3␤1␤2␤3␤»
16:54 jferrero joined
fasad "Pod ... is a purely descriptive mark-up notation, with no presentational components." What does it mean? 16:54
dalek kudo/nom: a177364 | tadzik++ | / (2 files):
Remove trailing whitespace in declarator blocks
16:55
tadzik some official-ish blubber :) Whatcha wanna know? :)
16:55 mj41 left
fasad tadzik: "presentational components" ? 16:56
Radvendii '.lol' is supposed to make something not flatten right?
tadzik I have no idea what would that mean :)
Radvendii so why can't i '.lol' a list? 16:57
tadzik maybe 'supporting something for presentation writing?'. I have no idea, frankly
gfldex fasad: it's not telling you how to display it
fasad tadzik:no problem
cognominal can someone comment the result I get with my grammars?
tadzik nom: grammar A { regex TOP { ^ a }; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«#<failed match>␤»
tadzik nom: grammar A { rule TOP { ^ ' a' }; }; say A.parse(' a') 16:58
p6eval nom a47a56: OUTPUT«#<failed match>␤»
cognominal I would expect a match
tadzik nom: grammar A { token TOP { ^ ' a' }; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«=> < a>␤␤»
fasad gfldex: bold, italics? "how to display" ?
gfldex: maybe if you contrast it with HTML i might get it
gfldex fasad: if I call something bold and then display it as italics, will the universe stop dead? 16:59
tadzik afks 17:00
17:00 jferrero left 17:02 jferrero joined
cognominal do you think it is a bug or, as usual, do I miss something? 17:02
fasad gfldex: sorry for being cryptic. i meant, "how to display it" part was not clear to me. If you tell it to display something as bold, or in fixed-width font, i though you *were* telling it how to disply the text.
cognominal masak, what do you think?
fasad gfldex: anyways, nevermind.
skids cognominal: My crazy wild-ass guess -- implicit <.ws> in rule is being put before ^, matches '', and then ^ doesn't match. 17:15
Radvendii nom: say LoL(<a b c>.list) 17:16
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&LoL' called (line 1)␤»
Radvendii nom: say lol(<a b c>.list)
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&lol' called (line 1)␤»
Radvendii nom: say ~(<a b c>.list) 17:17
p6eval nom a47a56: OUTPUT«a b c␤»
Radvendii nom: say (<a b c>.list.eval.perl)
p6eval nom a47a56: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&c' called (line 1)␤Undefined routine '&b' called (line 1)␤Undefined routine '&a' called (line 1)␤»
Radvendii nom: say print (<a b c>.list) 17:18
p6eval nom a47a56: OUTPUT«abcTrue␤»
17:18 alvis left
cognominal skids: may be. But it should match anyway. /me search the relevant S05 part 17:22
Radvendii nom: eager (<a b c>.list.item.lol>>.say)
p6eval nom a47a56: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/Z3pbgpyEzg:1␤ in <anon> at /tmp/Z3pbgpyEzg:1␤»
Radvendii nom: eager (<a b c>.list>>.item.lol>>.say) 17:23
p6eval nom a47a56: OUTPUT«c␤b␤a␤»
Radvendii nom: eager (<a b c>.list>>.item.lol.perl.say)
p6eval nom a47a56: OUTPUT«LoL.new("a", "b", "c")␤»
Radvendii nom: eager ((<a b c>, <d e f>).list>>.item.lol.perl.say)
p6eval nom a47a56: OUTPUT«LoL.new("a", "b", "c", "d", "e", "f")␤»
cognominal S05:355 says the <.ws> should not be implied before the ^ 17:24
jnthn moritz: (self changes) we don't rely on :method or self in NQP or Rakudo as far as I know.
moritz: At most it's maybe in some obscure bits of PIR that we're going to kill soon anyway.
cognominal jnthn, what do you think of this grammar problem? 17:25
jnthn cognominal: Where?
jnthn hasn't backloggd besides where people addressed him :)
cognominal: ah, I see 17:26
cognominal nom: grammar A { rule TOP { ^ ' a' }; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«#<failed match>␤»
jnthn cognominal: Well, it was correct.
But TimToady changed sigspace rules not so long back, so I ain't so sure any more.
nom: grammar A { rule TOP { ^' a' }; }; say A.parse(' a') 17:27
p6eval nom a47a56: OUTPUT«#<failed match>␤»
jnthn hm
OK, maybe something odd is going on there
nom: grammar A { rule TOP {^' a' }; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«=> < a>␤␤»
jnthn oh, it's that.
<.ws> snatches the space before the anchor.
^ then won't match
And you wrote rule, which means no backtracking, so it fails immediately. 17:28
skids nom: grammar A { rule TOP { a}; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«=> < a>␤␤»
jnthn I think the latest sigspace changes mean that we don't stick a <.ws> in where we're currently doing so, though. They probably fix this case to work as you expect. I didn't look at them closely yet.
skids nom: grammar A { rule TOP {a}; }; say A.parse(' a')
p6eval nom a47a56: OUTPUT«#<failed match>␤»
cognominal so a regex would be more appropriate 17:29
jnthn cognominal: Depends what you want. :)
cognominal: If you can solve a problem without backtracking, it's preferable to not rely on it.
17:30 tarch left
cognominal TimToady pointed me yesterday to S05:319 17:31
here S05:355 is relevant 17:33
moritz I'm about to propose custom sprintf implementation for GSOC 17:34
who would be willing to mentor that?
17:34 hundskatt left
Radvendii nom: say "a\n\nb\n".subst(/^^$$/, 'HERE') 17:37
p6eval nom a17736: OUTPUT«a␤HERE␤b␤␤»
Radvendii shouldn't the last one match?
or does end of string not match end of line?
skids
.oO(Some people when faced with a problem think "Oh I know, I'll use a rule!" Then they have a significant problem space.)
moritz Radvendii: .subst only substitutes once by default 17:39
Radvendii: use :g to change that
Radvendii ooooh
right
thanks
skids: ô.ō 17:40
nom: say "a\n\nb\n".subst(:g, /^^$$/, 'HERE')
p6eval nom a17736: OUTPUT«a␤HERE␤b␤␤»
Radvendii º·º 17:41
masak arnsholt: interesting. it's different enough for me to feel that I can add something by making my own, and yet it's fun to see someone work within the same problem space.
moritz nom: print "a\n\nb\n".subst(:g, /^^[$|$$]/, 'HERE')
p6eval nom a17736: OUTPUT«a␤HERE␤b␤»
Radvendii nom: say "a\n\nb\n".subst(:g, /^^$/, 'HERE') 17:42
p6eval nom a17736: OUTPUT«a␤␤b␤␤»
moritz nom: say "a\n\nb\n".subst(:g, /^^/, 'START')
p6eval nom a17736: OUTPUT«STARTa␤START␤STARTb␤␤»
Radvendii ??ô.ō?? 17:43
does it chomp it?? 17:44
nom: say "a\n".perl
p6eval nom a17736: OUTPUT«"a\n"␤»
Radvendii nom: $a = "a\n"; say $a.perl
p6eval nom a17736: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near " = \"a\\n\"; "␤»
Radvendii nom: my $a = "a\n"; say $a.perl
p6eval nom a17736: OUTPUT«"a\n"␤»
Radvendii shouldn't it print out a(weird super(N)sub(L))? 17:45
nom: my $a = "a\n\n"; say $a.perl
p6eval nom a17736: OUTPUT«"a\n\n"␤»
Radvendii nom: my $a = "a\n\nb"; say $a.perl
p6eval nom a17736: OUTPUT«"a\n\nb"␤»
Radvendii ...
oh
whoops
i forgot about .perl
:P
nom: my $a = "a\n\nb"; say $a
p6eval nom a17736: OUTPUT«a␤␤b␤»
Radvendii nom: my $a = "a\n\nb\n"; say $a
p6eval nom a17736: OUTPUT«a␤␤b␤␤»
Radvendii yeah... it's printing the newline right... 17:46
moritz nom: say "\n".match(:g, /^^/).elems
p6eval nom a17736: OUTPUT«1␤»
moritz still I wonder why ^^ doesn't match after the final \n
Radvendii it seems to be in .match
but not in .subst
nom: say "\n".subst(:g, /^^/, "BOO") 17:47
p6eval nom a17736: OUTPUT«BOO␤␤»
Radvendii ôʃō
it is...
nom: say "b\n".subst(:g, /^^/, "BOO")
p6eval nom a17736: OUTPUT«BOOb␤␤»
Radvendii nom: say "a\nb\n".subst(:g, /^^/, "BOO")
p6eval nom a17736: OUTPUT«BOOa␤BOOb␤␤»
Radvendii ooh... no it's not 17:48
with one \n it should match BOO twice
moritz niecza: say "\n" ~~ m:g/^^/ 17:49
p6eval niecza v14-17-g0ef17b0: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/jooW9LOVqg line 1:␤------> say "\n" ~~ m:g⏏/^^/␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /ho…
moritz niecza: say "\n" ~~ m:c(1)/^^/
p6eval niecza v14-17-g0ef17b0: OUTPUT«False␤»
moritz niecza doesn't match there either
Radvendii nom: say "a\n\nb\n".subst(:g, /\n[$|$$]/, 'HERE')
p6eval nom a17736: OUTPUT«aHERE␤bHERE␤»
Radvendii ## workaround
nom: say "a\n\nb\n".subst(:g, /\n[$|$$]/, '\nHERE') #better 17:50
p6eval nom a17736: OUTPUT«a\nHERE␤b\nHERE␤»
Radvendii is .perl going to be implementation independent? 17:51
so nom isn't going to switch it up on me?
moritz note that this doesn't put a "HERE" before the first "a" 17:54
skids I think the answer might be yes then no, because the spec could still be changed and nom would follow it -- but defer to experts.
masak Radvendii: you shouldn't depend on the exact output of .perl 17:57
Radvendii: if you do, "then you have two problems"
fasad a small typo i noticed. while S26 talks about the '.contents' method, rakudo's pod test suite uses '.content'
Radvendii masak: it's a workaround to begin with. nom is being a pain and not letting me .lol a .list 17:58
17:58 icwiener joined
Radvendii so i'm doing .perl.subst(/.list$/, '.lol').eval 17:58
which i understand is kludgy and bad practice 17:59
masak oh yes.
Radvendii but like i said, it's not working the normal way
masak you're simply wanting a feature too early :)
I've been in that position myself a few times :)
I think you're best off reproducting the functionality you want using nested arrays instead of lists. 18:00
let me see if I can throw together a quick example.
Radvendii mhmm... it's kind of annoying writing something, saying "this *should* work. but doesn't" and then buckling down and writing a kludgy workaround
moritz of course you're welcome to make it work in the first place 18:01
hacking a compiler is no magic, and you don't need a diplom to get started
Radvendii :s but... but... i'll make it all not-optimized and all... 18:02
and it'll be full of bugs...
masak nom: multi t(@a, &c) { [map { t $_, &c }, @a] }; multi t($i, &c) { &c($i) }; my @tree = [1, 2, [3, [4, 5], 6]]; say t(@tree, { $_ * 10 }).perl 18:03
p6eval nom a17736: OUTPUT«[[10, 20, [30, [40, 50], 60]]]␤»
masak there we go.
something like that help?
argh. 18:04
nom: multi t(@a, &c) { [map { t $_, &c }, @a] }; multi t($i, &c) { &c($i) }; my $tree = [1, 2, [3, [4, 5], 6]]; say t($tree, { $_ * 10 }).perl
p6eval nom a17736: OUTPUT«[10, 20, [30, [40, 50], 60]]␤»
jnthn dinner &
masak classic mistake :)
Radvendii: my point is that you can write code that traverses nested arrays, and it doesn't take a lot of code, either. 18:05
Radvendii huh...
but the whole point is that i _don't_ wan't to go that deep... i want to go only one layer in, and that's what .map is supposed to do 18:06
it just flattens *everything* at the moment
masak sure, when you use lists.
that's why I am suggesting you use nested arrays. 18:07
LoLs will eventually do what you want, but they don't today.
and trying to create LoLs from nothing today is more work than trying to use arrays for what you want to do.
Radvendii i'm having trouble applying that to my situation, let me explain: 18:09
moritz re full of bugs, that's why we write tests
all of us are writing code that's full of bugs.
Radvendii masak: i have input in the form of a bunch of lines of a comma separated list 18:10
masak: so what i do is $*IN.lines>>.split(', ')
18:10 IRCMonkey_ joined
Radvendii now if i want to loop over the outer layer of arrays i do $*IN.lines>>.split(', ').lol.map: {...} 18:11
moritz nom: say (1, 2, (3, 4)).lol.perl
p6eval nom a17736: OUTPUT«LoL.new(1, 2, (3, 4))␤»
Radvendii moritz: yeah i know, i'm just afraid of screwing stuff up for everyone else :P
moritz Radvendii: don't be.
Radvendii: if it doesn't break the test suite, it's unlikely to be very, very wrong 18:12
Radvendii moritz: mhmm...
masak: how would i do that without LoLs? 18:13
moritz Radvendii: also I think you really need .tree (which is NYI), not .lol
or is it?
Radvendii moritz: :P great. why, though?
moritz nom: say (1, 2, (3, 4)).tree.perl
p6eval nom a17736: OUTPUT«Method 'tree' not found for invocant of class 'Parcel'␤ in block <anon> at /tmp/wApUxnxnWz:1␤ in <anon> at /tmp/wApUxnxnWz:1␤»
moritz nom: say (1, 2, (3, 4)).list.tree.perl 18:14
p6eval nom a17736: OUTPUT«(1, 2, (3, 4)).list␤»
moritz nom: say (1, 2, [3, 4]).perl
p6eval nom a17736: OUTPUT«(1, 2, [3, 4])␤»
TimToady my @AoA = $*IN.lines.map: { [.split(', ')] }
moritz hm, seems it's there, but doesn't work
arnsholt masak: Definitely. Being TeX, it's definitely not directly mappable to the web world (and the implementation is likely kinda twisted when seen with imperative glasses), but it does seem similarish to what you want 18:15
Radvendii TimToady: hmm... i could do *that*... seems like that's what >>. was _made_ for, but hey, that's what i get for using a language in beta
TimToady wanting to think in terms of >> and nothing else is where the XY problem comes from; now that you've actually said what you want, we can help 18:16
moritz nom: say MapIter.new(:list(1, 2, (3, 4)), :block({ say "|$_|"}).list.eager
p6eval nom a17736: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
moritz nom: say MapIter.new(:list(1, 2, (3, 4)), :block({ say "|$_|"})).list.eager
p6eval nom a17736: OUTPUT«Method 'gimme' not found for invocant of class 'Parcel'␤ in method reify at src/gen/CORE.setting:4475␤ in method reify at src/gen/CORE.setting:4380␤ in method gimme at src/gen/CORE.setting:4744␤ in method eager at src/gen/CORE.setting:4719␤ in block <anon> at /tm…
moritz nom: say MapIter.new(:list((1, 2, (3, 4)).list), :block({ say "|$_|"})).list.eager 18:17
p6eval nom a17736: OUTPUT«|1|␤|2|␤|3 4|␤True True True␤»
moritz nom: say MapIter.new(:list((1, 2, (3, 4)).list), :block({ say "|$_|"; my $ = $_})).list.eager
p6eval nom a17736: OUTPUT«|1|␤|2|␤|3 4|␤1 2 3 4␤»
moritz nom: say MapIter.new(:list((1, 2, (3, 4)).list), :block({ say "|$_|"; my $ = $_})).list.perl
p6eval nom a17736: OUTPUT«|1|␤|2|␤|3 4|␤(1, 2, (3, 4)).list␤»
moritz nom: say MapIter.new(:list((1, 2, (3, 4)).list), :block({ say "|$_|"; .elems == 1 ?? $_ !! [.list]})).list.perl 18:18
p6eval nom a17736: OUTPUT«|1|␤|2|␤|3 4|␤(1, 2, [3, 4]).list␤»
Radvendii TimToady: right... but why is >>.foo *there* if for a bunch of things you have to use .map(*.foo) anyways?
i guess when things are more fully implemented it'll work better
moritz and if we manage to abolish duck mapping again 18:19
TimToady we had a slogan in the early days of Perl 6 that still applies: It's a good thing there's more than one way to do it, because most of them are broken.
Radvendii TimToady: hahahaha
TimToady: that's good.
TimToady moritz: how can we abolish it? we've never even tried it... 18:20
Radvendii what's duck this and duck that. i see it everywhere... 18:21
moritz TimToady: well, we had a spec before duck mapping, and I think it was much saner
Radvendii although i can't actualy remember any other occurences... 18:22
(at the moment)
TimToady moritz: the only difference when you do something that didn't make any sense at all in the old case
it now means something sane; how can this be worse 18:23
moritz Radvendii: en.wikipedia.org/wiki/Duck_typing
TimToady: now code becomes more fragile when you decide to add a method in some class. I don't think that's a plus.
TimToady it eliminates a FAQ; Why did my @array».[1] not work?
moritz it would be much easier by speccing that ». only goes one level deep. Always. 18:24
TimToady and would you impose similar restrictions on infix hypers, which currently can do cool APL semantics? 18:26
Su-Shee Radvendii: it means that you treat/work on/decide/use objects via their methods "whichever fits" and not by type. If an object has an "add" method, then you call it and not go by "if int.. obj.add.."
Radvendii ah
moritz TimToady: no 18:27
TimToady a flat hyper is just a hyper map, so why not make something a bit more useful?
Su-Shee Radvendii: "the object knows what to do with its own methods". you'll see add (some numbers, add an item to something) or send (send an email, send a jabber message, send a data package) as examples.
moritz because it's too easy to turn into a nasty surprise 18:28
TimToady I deem this quite unlikely. 18:29
Su-Shee nasty surprises can be sent and can be added, too. ;)
Radvendii Su-Shee: i mean... it's kind of like calling foo($bar) you don't know what type of object $bar is necessarily. you trust that foo can handle it 18:30
Su-Shee Radvendii: it's just an expression because in many languages you just don't need to be interested in an object's type that much - or wether it comes from the "proper" class. if you can call "send" on it, call it. period. 18:33
18:33 fasad left, chra left
Radvendii mhmm 18:33
mhmm 18:34
Su-Shee Radvendii: think of it as a more bohemian OO instead of a more military hierachy one. ;) wave you hand, call the object's method and be done with it. ;)
Radvendii that makes sense
18:36 chra joined
Su-Shee well in ruby/javascript/smalltalk/perl etc yes, in c++/java etc there are types. also, it's a different style of OO, trying not to care for the object's provenance so much. 18:36
18:37 wolfman2000 left
Su-Shee Radvendii: here, this is one of the best articles about "OO is not little databases with attributes and inheritance" but "little objects sending each other messages" -> fitzgeraldnick.com/weblog/39/ 18:50
18:53 Chillance left 18:54 Chillance joined
sorear good * #perl6 18:59
masak arnsholt: I think I need to write out some examples of what I want.
sorear! \o/
19:00 pernatiy left, avarab is now known as avar 19:01 birdwindupbird joined
arnsholt masak: Actually I've been pondering a TeX/Sexp-inspired thing for blog comments/documents lately 19:02
19:03 abhishekisnot joined 19:05 abhishekisnot left
dalek ast: 8ce3751 | moritz++ | S12-class/attributes.t:
refudge attributes.t for rakudo
19:10
19:13 abhishekisnot joined, abhishekisnot left 19:14 simcop2387 left 19:15 simcop2387 joined 19:16 awoodland joined
dalek ast: 66b3e5c | moritz++ | S06-routine-modifiers/lvalue-subroutines.t:
fix rakudo fudging of lvalue-subroutines.t
19:18
19:24 mj41 joined 19:31 MayDaniel joined 19:34 cosimo joined
dalek ast: 04346b3 | moritz++ | S02-lists/tree.t:
basic list.tree tests
19:36
19:37 rajvm256 joined 19:39 rajvm256 left 19:40 MayDaniel left 19:41 MayDaniel joined 19:49 Radvendii left 19:55 rindolf joined 19:56 nebuchadnezzar left 19:58 awoodland left 20:01 nebuchadnezzar joined, Patterner left 20:02 MayDaniel left 20:14 birdwindupbird left
dalek kudo/nom: 5a2c7d2 | moritz++ | / (3 files):
make List.tree more useful
20:15
20:16 zby_home_ left 20:17 zby_home joined
moritz nom: sub f(@ [$a, @r]) { say @r.perl }; f (1, 2, 3) 20:23
p6eval nom a17736: OUTPUT«Nominal type check failed for parameter '@r'; expected Positional but got Int instead in sub-signature␤ in sub f at /tmp/eyhLPnvml1:1␤ in block <anon> at /tmp/eyhLPnvml1:1␤ in <anon> at /tmp/eyhLPnvml1:1␤»
moritz nom: sub f(@ [$a, *@r]) { say @r.perl }; f (1, 2, 3)
p6eval nom a17736: OUTPUT«Array.new(2, 3)␤»
20:25 Psyche^ joined, Psyche^ is now known as Patterner, rindolf left
moritz nom: say (1, (2, 3)).elems 20:26
p6eval nom a17736: OUTPUT«2␤»
moritz nom: say (1, (2, 3)).flat.elems
p6eval nom a17736: OUTPUT«3␤»
masak nom: role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0] 20:28
p6eval nom a17736: OUTPUT«Cannot type check against type variable T␤ in type_check at src/gen/Metamodel.pm:271␤ in method at_pos at src/gen/CORE.setting:5213␤ in method at_pos at src/gen/CORE.setting:4706␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1140␤ in block <anon> at /tmp…
masak jnthn: what's up with this?
jnthn hm 20:41
nom: (role Foo[::T] { has T @.a }).^attributes.perl.say 20:42
p6eval nom 5a2c7d: OUTPUT«Could not instantiate role 'Foo':␤Not enough positional parameters passed; got 1 but expected 2␤ in specialize at src/gen/Metamodel.pm:1695␤ in <anon> at src/gen/Metamodel.pm:2075␤ in <anon> at src/gen/Metamodel.pm:2071␤ in compose at src/gen/Metamodel.pm:2069␤ i…
jnthn oops
nom: my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r).perl.say
p6eval nom 5a2c7d: OUTPUT«Method 'mro' not found for invocant of class 'Perl6::Metamodel::ParametricRoleHOW'␤ in <anon> at src/gen/Metamodel.pm:622␤ in parents at src/gen/Metamodel.pm:620␤ in attributes at src/gen/Metamodel.pm:342␤ in block <anon> at /tmp/QRW18phCpg:1␤ in <anon> at /tmp/Q…
jnthn ...interesting. 20:43
nom: my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).perl.say
p6eval nom 5a2c7d: OUTPUT«(Attribute.new(),)␤»
jnthn nom: my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).[0].type.perl.say
p6eval nom 5a2c7d: OUTPUT«Positional␤»
jnthn nom: my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).[0].type.HOW.archetypes.generic 20:44
p6eval nom 5a2c7d: ( no output )
jnthn nom: my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).[0].type.HOW.archetypes.generic.say
p6eval nom 5a2c7d: OUTPUT«1␤»
20:44 Patterner left
jnthn Hm, that much is right then. 20:44
masak: Not sure without going for a deeper dig...some kind of generic instantiation failure. 20:45
masak submits rakudobug
20:45 ksi joined
masak does the spec spec what value a `while` loop returns? 20:46
perl6: say (my $i = 0; while (++$i < 10) { $i }).perl
p6eval niecza v14-17-g0ef17b0: OUTPUT«Nil␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected ";"␤ expecting "x", octal digit, "o", "b", fraction, exponent, term postfix, operator or ")"␤ at /tmp/0jLS93DJ2w line 1, column 15␤»
..rakudo 5a2c7d: OUTPUT«Bool::False␤»
jnthn oh 20:48
moritz nom: say do { while 0 { } }
p6eval nom 5a2c7d: OUTPUT«0␤»
jnthn nom: role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0] 20:49
p6eval nom 5a2c7d: OUTPUT«Cannot type check against type variable T␤ in type_check at src/gen/Metamodel.pm:271␤ in method at_pos at src/gen/CORE.setting:5214␤ in method at_pos at src/gen/CORE.setting:4707␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1141␤ in block <anon> at /tmp…
moritz it returns the last condition in nom
jnthn nom: role Foo[::T] { has T @.a = [] }; class Bar {}; say Foo[Bar].new.a[0]
p6eval nom 5a2c7d: OUTPUT«Cannot type check against type variable T␤ in type_check at src/gen/Metamodel.pm:271␤ in method at_pos at src/gen/CORE.setting:5214␤ in method at_pos at src/gen/CORE.setting:4707␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1141␤ in block <anon> at /tmp…
jnthn ah, ok, it is the failure in the place I expected then...
jnthn wondered for a moment if it was to do with the default closure or something
20:52 Psyche^ joined, Psyche^ is now known as Patterner
dalek ast: 2ee3f57 | (Solomon Foster)++ | S02-types/keybag.t:
Add a slew of new KeyBag tests, fudge for Niecza.
21:05
21:16 GlitchMr left
dalek ecza: c83b9cd | (Solomon Foster)++ | / (2 files):
Simple implementation of KeyBag.
21:32
21:35 PZt left
sorear ooooh 21:37
21:38 Trashlord left
masak colomon++ 21:39
jnthn That looks very easily Rakudo-able :)
21:39 Trashlord joined
masak and Rakudo has 'handles', too. 21:40
jnthn yeah
:)
Well, I'll has plenty of tuits on Thursday, but anyone who feels like beating me to it can feel free :) 21:41
sorear colomon: eeerm... what does submethod BUILD (%!elems) { } mean?
masak needs a colon, p'haps?
sorear ... I think the answer is "rely on the fact that niecza still implements named calling of positional parameters" 21:42
masak oh noes 21:44
[Coke] b: say 19605 - 19551 # 02/05/2012 - niecza at 99.72% 21:46
p6eval b 1b7dd1: OUTPUT«54␤»
tadzik perl6: say 19605 - 19551 # 02/05/2012 - niecza at 99.72%
p6eval pugs b927740, rakudo 5a2c7d, niecza v14-17-g0ef17b0: OUTPUT«54␤»
21:47 Patterner left, kaare_ left
masak perl6: say "I like yams".comb.sort.join 21:48
[Coke] niecza has a bunch of failures in S05-mass/properties-general.niecza
p6eval pugs b927740: OUTPUT«Ilikeyams␤»
..rakudo 5a2c7d, niecza v14-17-g0ef17b0: OUTPUT« Iaeiklmsy␤»
21:48 zby_home left
benabik Is .sort broken in pugs? 21:49
tadzik comb, I guess
masak no, it's .comb that has different semantics, I think.
it probably used to mean .words
sorear [Coke]: yeah, whoever wrote that test file didn't think about the fact that Unicode is a moving target
benabik pugs: "I like yams".comb.perl.say 21:50
p6eval pugs b927740: OUTPUT«(Match.new(␤ ok => Bool::True, ␤ from => 0, ␤ to => 1, ␤ str => "I", ␤ sub_pos => (), ␤ sub_named => {}␤), Match.new(␤ ok => Bool::True, ␤ from => 1, ␤ to => 5, ␤ str => "like", ␤ sub_pos => (), ␤ sub_named => {}␤), Match.new(␤ ok => Bool::True, ␤ from…
benabik That is not really what I expected.
masak it is what you got, though, so better live with it :) 21:51
pugs: say "I like yams".comb>>.str
p6eval pugs b927740: OUTPUT«*** No such method in class Array: "&>>str"␤ at /tmp/jakhmyHH4q line 1, column 5 - line 2, column 1␤»
masak pugs: say .str for "I like yams".comb 21:52
p6eval pugs b927740: OUTPUT«*** No such method in class Match: "&str"␤ at /tmp/uCGzP5G6Eg line 1, column 5-10␤»
masak oh, so it's an attr but not a method.
[Coke] perhaps we need a $* to tell us which version of unicode we're supporting. 21:53
jnthn 'night, #perl6
sorear bye
masak takes aim at [Coke] with the pipe from $| 21:54
Juerd A unicode metavariable should at least have a non-ascii identifier 21:56
May I suggest $☃? :)
sorear .u ☃ 21:57
phenny U+2603 SNOWMAN (☃)
masak Juerd: are you familiar with the snowman-comet bug in Rakudo? 22:00
Juerd: the bug was so well-liked that there was talk about reintroducing it through a module. :)
Juerd No, but it sounds like the most fun category of bugs
benabik .u �
phenny U+FFFD REPLACEMENT CHARACTER (�)
masak Juerd: for some inscrutable reason, the bug allowed the snowman and comet characters to be used as "matching bracketing characters" around a regex. 22:01
22:01 zjmarlow joined
tadzik tee-hee 22:01
masak here it is: rt.perl.org/rt3/Ticket/Display.html?id=66498
tadzik "Can't quote a string with a snowman and comet (U+2603 and U+2604)" 22:03
nice
masak I think you agree that there should be a module to re-enable this :) 22:07
you know, just because.
tadzik because we can
benabik use Snowman::Comet;
Juerd masak: Wow. Just wow.
masak Juerd: this is what I like about bughunting. sometimes the bugs just leave me speechless. 22:12
22:19 PacoAir left
sorear Did we ever understand that one? 22:20
22:25 icwiener left, icwiener joined
masak I didn't. maybe pmichaud did. 22:29
colomon sorear: I dunno what the BUILD is there for, that's how TimToady++ had it and it seemed to work so I didn't tinker with it (and copied it from Set to Bag, KeySet, and KeyBag). 22:30
22:32 mj41 left
masak oh, you made Bag, too? colomon++ 22:42
22:56 zjmarlow left 23:00 pernatiy joined 23:03 Radvendii joined 23:04 Some-body_ is now known as DarthGandalf, DarthGandalf left, DarthGandalf joined
Radvendii o/ 23:05
masak \o 23:08
'night, #perl6
23:09 icwiener left 23:36 spine left 23:56 zjmarlow joined