Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-09-20

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 jamtech_ joined #perl6
00:12 dalek roast: 53b43a6 | Coke++ | S05-metasyntax/repeat.t:
00:12 dalek roast: rakudo/nom fudging
00:12 dalek roast: review: https://github.com/perl6/roast/commit/53b43a6096
00:13 dalek rakudo/nom: 0d73bac | Coke++ | t/spectest.data:
00:13 dalek rakudo/nom: run fudged test
00:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0d73bacf0e
00:14 replore_ joined #perl6
00:30 uasi joined #perl6
00:32 soh_cah_toa joined #perl6
00:33 y3llow joined #perl6
00:39 [Coke] rakudo: sub foo { say "bar" }; my $x = 'foo'; ::$x()
00:39 p6eval rakudo b10ef5: OUTPUT«===SORRY!===␤Cannot look up empty name␤»
00:40 diakopter does it work without the ::
00:40 diakopter oh, of course not
00:40 sorear should be ::($x) anyway
00:41 [Coke] sorear: perhaps you can close out RT#64846
00:47 sorear [Coke]: no.
00:47 jamtech_ joined #perl6
00:48 sorear hmm, rakudo needs to become self-aware
00:53 [Coke] hey, rakudodevs. can we reject #68636 ?
00:54 [Coke] rakudo: %*h.push: $*IN.slurp.join.comb.map(-> $k {$k=>1}); say %*h.perl
00:54 p6eval rakudo b10ef5: OUTPUT«Method 'push' not found for invocant of class 'Failure'␤  in <anon> at /tmp/HOfa8x5OBj:1␤  in <anon> at /tmp/HOfa8x5OBj:1␤␤»
00:55 sorear niecza: class B0rk { say $.a }
00:55 p6eval niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $.a used where no 'self' is available at /tmp/QbuhzpkBAZ line 1:â�¤------> [32mclass B0rk { say [33mâ��[31m$.a }[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE di…
00:55 colomon woah, slew of bug e-mails from [Coke]
00:56 colomon :)
00:59 [Coke] perl6: role woowoo {}; multi trait_mod:<is>(Routine $c, woowoo) { $c.wrap: sub { say "Woowoo" } }; sub foo is woowoo { say "foo" }; foo();
00:59 p6eval niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0m��Cannot extend category:trait_mod with subs at /tmp/BMLhA2C9Nk line 1:�------> [32mrole woowoo {}; multi trait_mod:<is>[33m�[31m(Routine $c, woowoo) { $c.wrap: sub { sa[0m��Unhandled exception: Unable to resolve method ast…
00:59 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ":<is"␤    expecting "::", "handles", "is", bare trait, subroutine parameters, trait or block␤    at /tmp/nyWkzg6sgM line 1, column 32␤»
00:59 p6eval ..rakudo 0d73ba: OUTPUT«===SORRY!===␤Method 'wrap' not found for invocant of class 'Sub'␤»
01:04 soh_cah_toa that reminds me, in other trait_mod definitions (in src/core/traits.pm), i see signatures w/ what look like smiley faces attached to the type. for instance, 'multi trait_mod:<of>(Routine:D $target, Mu:U $type)'. what are the :D and :U for? i don't think i've ever seen those in the spec before
01:06 [Coke] t/spec/S02-types/enum.t - any reason this file isn't even in spectest.data ?
01:06 uasi joined #perl6
01:09 buubot_backup joined #perl6
01:18 dalek roast: 74ac196 | Coke++ | S02-types/enum.t:
01:18 dalek roast: rakudo nom fudging
01:18 dalek roast: review: https://github.com/perl6/roast/commit/74ac196188
01:18 * [Coke] guesses no.
01:18 dalek rakudo/nom: cbdd9b0 | Coke++ | t/spectest.data:
01:18 dalek rakudo/nom: run fudged test.
01:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cbdd9b07d6
01:19 [Coke] rakudo: ({nextsame})()
01:19 p6eval rakudo 0d73ba: OUTPUT«No dispatcher in scope␤  in block <anon> at /tmp/eaLBhdn45F:1␤  in <anon> at /tmp/eaLBhdn45F:1␤  in <anon> at /tmp/eaLBhdn45F:1␤␤»
01:21 dalek specs: fe723c3 | larry++ | S12-objects.pod:
01:21 dalek specs: rm "Conjectural" from :D and :U
01:21 dalek specs: review: https://github.com/perl6/specs/commit/fe723c3b27
01:22 TimToady soh_cah_toa: see S12:1590
01:22 woosley joined #perl6
01:23 wolfman2000 joined #perl6
01:23 soh_cah_toa ah, i knew it! i guessed d = defined and u = undefined
01:24 soh_cah_toa so :T as a type object means an object that can't be instantiated, correct?
01:26 vlixes joined #perl6
01:29 arnsholt joined #perl6
01:35 TimToady well, it means an object *isn't* instantiated at that spot...
01:35 TimToady but you can certainly instantiate one out of a type object using the .new method :D
01:37 soh_cah_toa oh, so 'my Int $a' doesn't actually instantiate it until i say '$a = 42'
01:39 TimToady doesn't instantiate it then either, since the 42 is already instantiated
01:40 TimToady nom &
01:40 soh_cah_toa how is 42 instantiated? it's a constant
01:41 donri but still an object right?
01:42 soh_cah_toa oh right, you can do stuff like 42.abs()
01:43 soh_cah_toa everything is an object now, that's right
01:45 soh_cah_toa so then still, what's the difference between a type object and say a user-defined object? if a type object isn't instantiated when it's declared, when is it instantiated?
01:46 donri does that work, it's commonly a syntax error in many languages
01:46 donri rakudo: 42.abs
01:46 p6eval rakudo 0d73ba:  ( no output )
01:46 donri rakudo: say 42.abs
01:46 p6eval rakudo 0d73ba: OUTPUT«42␤»
01:46 donri rakudo: say 42.
01:46 p6eval rakudo 0d73ba: OUTPUT«===SORRY!===␤Confused at line 1, near "say 42."␤»
01:46 donri rakudo: say .5
01:46 p6eval rakudo 0d73ba: OUTPUT«0.5␤»
01:53 [Coke] rakudo: say one.5
01:53 p6eval rakudo 0d73ba: OUTPUT«===SORRY!===␤Confused at line 1, near "say one.5"␤»
01:59 donri this aint ruby ;)
02:11 buubot_backup joined #perl6
02:22 TimToady perl6: say slurp;
02:22 p6eval niecza v9-32-g380d891: OUTPUT«Unhandled exception: No value for parameter $path in CORE slurp␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE slurp @ 0) ␤  at /tmp/m4v6NNxa25 line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON @ 2) ␤  a…
02:22 p6eval ..rakudo cbdd9b: OUTPUT«No applicable candidates found to dispatch to for 'slurp'. Available candidates are:␤:(Any $filename)␤␤  in sub slurp at src/gen/CORE.setting:4892␤  in <anon> at /tmp/aDXoSGkc7x:1␤  in <anon> at /tmp/aDXoSGkc7x:1␤␤»
02:22 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ";"␤    at /tmp/geUmRzq0SQ line 1, column 10␤»
02:23 diakopter niecza: say slurp 'Makefile'
02:23 p6eval niecza v9-32-g380d891: OUTPUT«Unhandled exception: CORE slurp may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE slurp @ 0) ␤  at /tmp/Ew4ZEILOpb line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON @ 2) ␤  at /…
02:23 TimToady slurp should default to ARGFILES
02:23 TimToady dinner really &
02:25 am0c joined #perl6
02:36 jamtech_ joined #perl6
02:44 TimToady perl6: say slurp($*ARGFILES)
02:44 p6eval niecza v9-32-g380d891: OUTPUT«Unhandled exception: CORE slurp may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE slurp @ 0) ␤  at /tmp/bYV_c9HJnQ line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON @ 2) ␤  at /…
02:44 p6eval ..rakudo cbdd9b: OUTPUT«This type cannot unbox to a native string␤  in method open at src/gen/CORE.setting:4761␤  in sub open at src/gen/CORE.setting:4874␤  in sub slurp at src/gen/CORE.setting:4894␤  in <anon> at /tmp/KMqpS6_q5U:1␤  in <anon> at /tmp/KMqpS6_q5U:1␤␤»
02:44 p6eval ..pugs: OUTPUT«*** Unsafe function 'slurp' called under safe mode␤    at /tmp/e04AMhVxhP line 1, column 5 - line 2, column 1␤»
02:45 diakopter I think slurp and other file reading things should be allowed in safe mode; it's my p6eval box, after all
02:46 packetknife joined #perl6
02:51 jfried joined #perl6
02:51 Gothmog_ joined #perl6
02:51 Psyche^ joined #perl6
02:51 sorear diakopter: noted.
02:53 _sri joined #perl6
02:53 TimToady http://rosettacode.org/wiki/Letter_frequency#Perl_6
02:59 jnthn joined #perl6
03:05 cotto joined #perl6
03:18 jamtech__ joined #perl6
03:19 envi_|2 joined #perl6
03:31 [Coke] rakudo: say index("uuúuúuùù", "úuù")
03:31 p6eval rakudo cbdd9b: OUTPUT«4␤»
03:33 [Coke] perl6: my $*x = 42; say $*x.WHAT
03:33 p6eval pugs: OUTPUT«Scalar␤»
03:33 p6eval ..rakudo cbdd9b, niecza v9-32-g380d891: OUTPUT«Int()␤»
03:33 [Coke] rakudo: $*x = 42; say $*x.WHAT
03:34 p6eval rakudo cbdd9b: OUTPUT«Cannot assign to a non-container␤  in <anon> at /tmp/meGTbjLflb:1␤  in <anon> at /tmp/meGTbjLflb:1␤␤»
03:35 [Coke] rakudo: my Str %s = {a => 'b'}
03:35 p6eval rakudo cbdd9b:  ( no output )
03:35 [Coke] rakudo: my %s of Str; %s<a> = 'b';
03:35 p6eval rakudo cbdd9b:  ( no output )
03:36 [Coke] rakudo: my Str %s = a => 'b'
03:36 p6eval rakudo cbdd9b:  ( no output )
03:38 uasi joined #perl6
03:44 [Coke] rakudo: enum A::B <a b c>; say b
03:44 p6eval rakudo cbdd9b: OUTPUT«A::B::b␤»
03:49 [Coke] rakudo: $a = (my $a)
03:49 p6eval rakudo cbdd9b:  ( no output )
03:49 [Coke] rakudo: my $a = $_ given $a
03:49 p6eval rakudo cbdd9b:  ( no output )
03:50 [Coke] rakudo: my @a = (1,2) Z (3,4); say @a.perl
03:50 p6eval rakudo cbdd9b: OUTPUT«Array.new(1, 3, 2, 4)␤»
03:53 * [Coke] wonders why "testsneeded" comes last.
03:54 [Coke] rakudo: &infix:(+)(3,4).say
03:54 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Malformed parameter at line 1, near "+)(3,4).sa"␤»
03:54 [Coke] rakudo: &infix:("+")(3,4).say
03:54 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Symbol '&infix:("+")' not predeclared in <anonymous> (/tmp/Sz2DJWxqL6:1)␤»
03:54 [Coke] rakudo: my $foo="+";&infix:($foo)(3,4).say
03:54 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Symbol '&infix:($foo)' not predeclared in <anonymous> (/tmp/qTMVLz747s:1)␤»
03:55 [Coke] rakudo: class A { method f(*%_) { |%_ } }'
03:55 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "class A { "␤»
03:56 [Coke] rakudo: for 1..5 -> $a, $b { say $a, $b }
03:56 p6eval rakudo cbdd9b: OUTPUT«12␤34␤Not enough positional parameters passed; got 1 but expected 2␤  in block <anon> at /tmp/DxYdxC7jfN:1␤  in method reify at src/gen/CORE.setting:3690␤  in method reify at src/gen/CORE.setting:3595␤  in method reify at src/gen/CORE.setting:3595␤  in method gimme…
03:56 [Coke] rakudo: for 1..5 -> $a, $b { say $a, $b? }
03:56 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
03:56 [Coke] rakudo: for 1..5 -> $a, $b? { say $a, $b }
03:56 p6eval rakudo cbdd9b: OUTPUT«12␤34␤5Mu()␤»
03:57 [Coke] rakudo: say %("foo" ~~ /foo/).exists("foo")
03:57 p6eval rakudo cbdd9b: OUTPUT«Bool::False␤»
03:59 satyavvd joined #perl6
03:59 [Coke] rakudo: ok %( 'foo' ~~ /<alpha> oo/ ){ 'alpha' }:exists; say "alive"
03:59 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "ok %( 'foo"␤»
04:00 [Coke] rakudo: Inf.int.say
04:00 p6eval rakudo cbdd9b: OUTPUT«Method 'int' not found for invocant of class 'Num'␤  in <anon> at /tmp/qPsFlg_0FW:1␤  in <anon> at /tmp/qPsFlg_0FW:1␤␤»
04:00 [Coke] rakudo: Inf.Int.say
04:00 p6eval rakudo cbdd9b: OUTPUT«-9223372036854775808␤»
04:01 birdwindupbird joined #perl6
04:08 [Coke] sorear: ping.
04:09 [Coke] phenny: ask sorear if we can close 75030 - it was originally rejected, and rakudo has autoprint in REPL now.
04:09 phenny [Coke]: I'll pass that on when sorear is around.
04:10 [Coke] rakudo: sub foo() { return 1,2,:c<3> }; say foo().perl
04:10 p6eval rakudo cbdd9b: OUTPUT«(1, 2, "c" => Mu)␤»
04:10 [Coke] rakudo: say '16'{'%x'}
04:10 p6eval rakudo cbdd9b: OUTPUT«Method 'at_key' not found for invocant of class 'Str'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1002␤  in <anon> at /tmp/MHZjKseyZi:1␤  in <anon> at /tmp/MHZjKseyZi:1␤␤»
04:10 sorear [Coke]: you may close 75030.
04:10 phenny sorear: 04:09Z <[Coke]> ask sorear if we can close 75030 - it was originally rejected, and rakudo has autoprint in REPL now.
04:11 sorear [Coke]: I don't know if you can - I know I can't.  Who can give out close bits?
04:11 moritz sorear: I think pmichaud can
04:11 moritz good morning
04:11 [Coke] I can.
04:12 [Coke] I am an rt p6 admin from the dark times.
04:12 [Coke] but to give them out, I have to git-bisect parrot until I find the instructions. ;)
04:13 [Coke] enum A <a b c>; enum B <a b c>; say &a.perl
04:13 [Coke] rakudo: enum A <a b c>; enum B <a b c>; say &a.perl
04:13 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Symbol '&a' not predeclared in <anonymous> (/tmp/4cTc1McdVJ:1)␤»
04:13 [Coke] rakudo: enum A <a b c>; enum B <a b c d>; say &d.perl
04:13 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Symbol '&d' not predeclared in <anonymous> (/tmp/vOGTaBd5w0:1)␤»
04:19 [Coke] rakudo: my ::foo $x; say $x
04:19 p6eval rakudo cbdd9b: OUTPUT«Cannot call a method on type variable foo␤  in find_method at src/gen/Metamodel.pm:261␤  in sub say at src/gen/CORE.setting:4722␤  in sub say at src/gen/CORE.setting:4729␤  in <anon> at /tmp/ormgC9k2j3:1␤  in <anon> at /tmp/ormgC9k2j3:1␤␤»
04:19 [Coke] rakudo: my ::foo $x;
04:19 p6eval rakudo cbdd9b:  ( no output )
04:19 [Coke] rakudo: my ::foo $x; say "alive"
04:19 p6eval rakudo cbdd9b: OUTPUT«alive␤»
04:22 jamtech joined #perl6
04:22 dalek niecza/serialize: 06f4a53 | sorear++ | / (6 files):
04:22 dalek niecza/serialize: Code execution in new model, checkpoint 2
04:22 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/06f4a53b92
04:23 [Coke] rakudo: rakudo: say (4...^5).perl
04:23 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: sa"␤»
04:23 [Coke] rakudo: say (4 ... 0, 1, 2, 3, 4).perl
04:23 p6eval rakudo cbdd9b: OUTPUT«(4, 3, 2, 1, 0, 1, 2, 3, 4).list␤»
04:24 [Coke] rakudo: rakudo: say (-5...^5).perl
04:24 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: sa"␤»
04:24 [Coke] rakudo: rakudo: say (4...^5).perl
04:24 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: sa"␤»
04:24 [Coke] rakudo: rakudo: say (4 ... ^5).perl
04:24 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: sa"␤»
04:26 [Coke] there's a list branch but I can't see it on github?
04:27 sorear it was deleted a while ago
04:27 sorear git pull doesn't delete locally-saved branches
04:27 sorear it only pulls new ones
04:27 [Coke] can I see when it was deleted?
04:28 sorear maybe by running reflog on the server
04:30 [Coke] eh. not worth it. Danke.
04:33 [Coke] rakudo: die
04:33 p6eval rakudo cbdd9b: OUTPUT«␤  in <anon> at /tmp/FgvcEoz0pL:1␤  in <anon> at /tmp/FgvcEoz0pL:1␤␤»
04:34 [Coke] rakudo: ...
04:34 p6eval rakudo cbdd9b:  ( no output )
04:34 [Coke] rakudo: fail
04:34 p6eval rakudo cbdd9b:  ( no output )
04:34 [Coke] rakudo: exit
04:34 p6eval rakudo cbdd9b:  ( no output )
04:34 [Coke] rakudo: .die
04:34 p6eval rakudo cbdd9b: OUTPUT«Method 'die' not found for invocant of class 'Any'␤  in <anon> at /tmp/0jzYTcsKvO:1␤  in <anon> at /tmp/0jzYTcsKvO:1␤␤»
04:35 [Coke] rakudo: class AtestOfSay { ... }; my AtestOfSay $t; say $t;
04:35 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤    AtestOfSay␤␤»
04:36 [Coke] rakudo: Seq.new.^methods>>.say
04:36 p6eval rakudo cbdd9b: OUTPUT«join␤unshift␤at_pos␤exists␤rindex␤say␤dispatch:<.*>␤acos␤dispatch:<::>␤infinite␤grep␤gist␤max␤atanh␤sqrt␤fmt␤cos␤sinh␤match␤BUILDALL␤cis␤infinite␤any␤pairs␤asech␤Array␤tan␤DUMP-ID␤trim-trailing␤classify␤iterator␤Num␤postcircumfix:<[ ]>␤cosech␤Int␤values␤capitalize␤…
04:37 [Coke] die Exception.new("Test");
04:37 [Coke] rakudo: die Exception.new("Test");
04:37 p6eval rakudo cbdd9b: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:502␤  in <anon> at /tmp/Vb7LIiy8VA:1␤  in <anon> at /tmp/Vb7LIiy8VA:1␤␤»
04:38 jaldhar joined #perl6
04:38 [Coke] rakudo: sub foo() { succeed }; say foo
04:38 p6eval rakudo cbdd9b: OUTPUT«Warning␤0␤»
04:40 [Coke] rakudo: say <1 2 3>.>>.perl
04:40 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Confused at line 1, near "say <1 2 3"␤»
04:42 packetknife joined #perl6
04:43 [Coke] rakudo: say "abcd".index("xyz") == 0
04:43 p6eval rakudo cbdd9b: OUTPUT«Use of uninitialized value in numeric context␤Bool::True␤»
04:46 [Coke] rakudo: say Mu.perl
04:46 p6eval rakudo cbdd9b: OUTPUT«Mu␤»
04:46 [Coke] rakudo: class A {}; A.new.perl
04:46 p6eval rakudo cbdd9b:  ( no output )
04:46 [Coke] rakudo: class A {}; A.new.perl.say
04:46 p6eval rakudo cbdd9b: OUTPUT«A<95569160>␤»
04:47 [Coke] rakudo: say (1..10).sort(&rand)
04:47 p6eval rakudo cbdd9b: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub rand at src/gen/CORE.setting:2609␤  in method reify at src/gen/CORE.setting:3690␤  in method reify at src/gen/CORE.setting:3595␤  in method gimme at src/gen/CORE.setting:3932␤  in method eager at …
04:50 [Coke] rakudo: say 357+498+7
04:50 p6eval rakudo cbdd9b: OUTPUT«862␤»
05:04 moritz nom: enum SomeEnum < a b c>; say SomeEnum::.keys
05:04 p6eval nom cbdd9b: OUTPUT«0␤»
05:04 moritz nom: enum SomeEnum < a b c>; say SomeEnum::.enums.keys
05:04 p6eval nom cbdd9b: OUTPUT«a b c␤»
05:05 moritz (that was RT #70894)
05:05 packetknife joined #perl6
05:09 moritz [Coke]++ # going wild in RT queue
05:19 dalek roast: a4a120d | moritz++ | S0 (3 files):
05:19 dalek roast: random rakudo unfudges
05:19 dalek roast: review: https://github.com/perl6/roast/commit/a4a120df9a
05:26 koban` joined #perl6
05:26 koban` left #perl6
05:39 daniel-s joined #perl6
05:41 cookys joined #perl6
06:02 wtw joined #perl6
06:03 lestrrat joined #perl6
06:10 orafu joined #perl6
06:11 JimmyZ joined #perl6
06:14 JimmyZ rakudo:  trait_mod:<is-a>(Routine:D $r, :$rw!) { $r.set_rw(); }  # bug ?
06:14 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
06:14 uasi_ joined #perl6
06:15 uasi joined #perl6
06:16 kaleem joined #perl6
06:18 sorear JimmyZ: you need "sub " at the beginning of the line.
06:18 JimmyZ LTA error?
06:18 sorear JimmyZ: rakudo is parsing (...) as an argument and getting confused, because argument lists can't have types
06:19 sorear It's a technically correct error, and I'm not sure how it can be improved.
06:20 sorear except maybe by unifying parameter and argument syntax, but for a language like Perl 6 that would waterbed a geyser... it could probably be made to work in C#
06:21 JimmyZ rakudo: class A { method trait_mod:<is-a>( $r, :$rw!) { $r.set_rw(); } };  # how can I use is-a here?
06:21 p6eval rakudo cbdd9b:  ( no output )
06:21 sorear A.trait_mod:<is-a>(@args)
06:21 sorear implicit trait syntax only works for subs, not methods
06:22 sorear general rule - if you're changing the syntax, it needs to be through something with the my-scope
06:23 jnthn It's just "is", not "is-a"
06:23 JimmyZ rakudo: class A { sub trait_mod:<is-a>( $r, :$rw!) { $r.set_rw(); } };  # and this one?
06:23 p6eval rakudo cbdd9b:  ( no output )
06:23 jnthn Unless you're trying to introduce a new one...
06:23 jnthn mornin', btw
06:23 JimmyZ yes, I'm trying to introduce new one
06:23 sorear JimmyZ: Why do you keep saying class A?
06:23 zby_home_ joined #perl6
06:23 JimmyZ good morning, jnthn
06:24 sorear mornin', jnthn
06:24 cotto hi jnthn
06:24 JimmyZ sorear: I'm trying to find bug
06:24 jnthn JimmyZ: Then it needs to be declared multi trait_mod:<blah>(...) { ... }, but Rakudo won't augment the parser for new ones yet.
06:24 sorear JimmyZ: I'm fairly sure that introducing new trait keywords is not supported by any compiler yet
06:25 sorear (this will change next month)
06:25 JimmyZ rakudo: class A { sub trait_mod:<is>( $r, :$rw!) { $r.set_rw(); } };  #  how can I use is here?
06:25 p6eval rakudo cbdd9b:  ( no output )
06:25 JimmyZ I didn't is not supported ,hehe
06:25 JimmyZ I didn't know it is not supported ,hehe
06:25 jnthn YOu can declare custom trait mods for sure.
06:26 jnthn For now you should explicitly mark them multi.
06:26 JimmyZ rakudo: class A { mutil trait_mod:<is>(Class:D $r, :$rw!) { $r.set_rw(); } };  #  how can I use is here?
06:26 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
06:26 jnthn JimmyZ: See my grammar debugger module for an example of a module that adds, and exports, extra traits.
06:26 jnthn multi, not mutil :)
06:27 jnthn YOu use traits by putting them on declarative thins.
06:27 Sarten-X joined #perl6
06:28 JimmyZ rakudo: class A { multi trait_mod:<is>(Class:D $r, :$rw!) { $r.set_rw(); } };
06:28 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 1, near " $r, :$rw!"␤»
06:28 jnthn rakudo: multi trait_mod:<is>(Routine:D $r, :$blah!) { $r does role { method blah { True } } }; sub foo() is blah { }; say &foo.blah
06:28 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Lexical '$r' not found␤»
06:29 jnthn uh...huh.
06:29 jnthn rakudo: multi trait_mod:<is>(Routine:D $r, :$blah!) { $r does role { method blah { True } } }
06:29 p6eval rakudo cbdd9b:  ( no output )
06:29 jnthn meh, too little coffee to debug stuff... :)
06:30 JimmyZ rakudo: class A { multi trait_mod:<is>(Routine:D $r, :$rw!) { $r.set_rw(); } };
06:30 p6eval rakudo cbdd9b:  ( no output )
06:30 JimmyZ jnthn: How can I use it when it's defined in a class
06:32 jnthn JimmyZ: By applying it to things in the class.
06:32 jnthn method foo() is rw { ... } # should hit your trait mode
06:32 jnthn *mod
06:33 jnthn It may not, however, because I didn't do the tie-breaking on scope depth yet.
06:34 JimmyZ rakudo: class A { multi trait_mod:<is>( $r, :$rwr!) { $r.set_rw(); }; sub b is rwr { };  };
06:34 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Lexical '$r' not found␤»
06:36 jnthn JimmyZ: That should work. I'm a bit confused about why it doesn't.
06:37 jnthn rakudo: sub foo($a) { say $a }; BEGIN foo(42)
06:37 p6eval rakudo cbdd9b: OUTPUT«42␤»
06:38 jnthn rakudo: multi sub foo($a) { say $a }; BEGIN foo(42)
06:38 p6eval rakudo cbdd9b: OUTPUT«42␤»
06:38 JimmyZ rakudo: class A { multi method trait_mod:<is>( :$rwr!) {  }; Class b is rwr { };  };
06:38 p6eval rakudo cbdd9b: OUTPUT«Could not find sub &rwr␤  in <anon> at /tmp/fu78dmR3EG:1␤  in <anon> at /tmp/fu78dmR3EG:1␤  in <anon> at /tmp/fu78dmR3EG:1␤␤»
06:39 jnthn oh...it's that bug :(
06:40 moritz uhm, is it write to declare trait_mod as a methodß
06:40 moritz s/ß/?/
06:40 jnthn moritz: no
06:41 jnthn moritz: I just found why the multi sub case isn't working though.
06:41 * JimmyZ uses rakudo with a bit violence
06:41 JimmyZ how to user multi method trait_mod:<is> ?
06:41 JimmyZ use
06:42 jnthn JimmyZ: You're not meant to write it as a method.
06:42 jnthn JimmyZ: Traits are dispatched to as subs.
06:42 JimmyZ rakudo: class A { multi method trait_mod:<is>( :$rwr!) {  }; }
06:42 p6eval rakudo cbdd9b:  ( no output )
06:43 JimmyZ rakudo allows me to write it as a method ;)
06:43 jnthn So what?
06:43 jnthn It's just a name.
06:43 jnthn If you do class Foo { method m() { ... }; m() }
06:43 jnthn Then it'll let you write m as a method too.
06:44 jnthn But the dispatch will fail.
06:44 jnthn It's not that you can't write a method called trait_mod:<is>. You can - we do it in Actions.pm. It's that trait dispatch is a sub dispatch, not a method one.
06:46 moritz if it were a method, in which class would it look for the trait method?
06:47 sorear also, JimmyZ, trait subs should be declared at top level, not in a brace group
06:47 sorear unless you want to limit the use of the trait to the group
06:47 frhodes joined #perl6
06:52 TimToady perl6: [{a => 1}, {a => 2}]»<a>.say
06:52 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\187'␤*** ␤    Unexpected "\187<"␤    expecting term postfix or operator␤    at /tmp/y0k53zSN_O line 1, column 21␤»
06:52 p6eval ..rakudo cbdd9b: OUTPUT«Method 'at_key' not found for invocant of class 'Int'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1002␤  in method reify at src/gen/CORE.setting:3690␤  in method reify at src/gen/CORE.setting:3595␤  in method reify at src/gen/CORE.setting:3595␤  in meth…
06:52 p6eval ..niecza v9-32-g380d891: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Int␤  at  line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 101 (CORE Any.at_key @ 8) ␤  at  line 0 (ExitRunloop @ 0) ␤  at /tmp/8xEerIsAOB line 0 (MAIN C3_ANON @ 0) ␤  …
06:52 TimToady b: [{a => 1}, {a => 2}]»<a>.say
06:52 p6eval b 1b7dd1: OUTPUT«12␤»
06:52 TimToady only old rakudo manages to do it right
06:53 TimToady or is there some reason why hyper should be iterating the key and value of the pair separately?
06:54 jnthn TimToady: hypers descend into data structures.
06:54 jnthn TimToady: Here it desends into the inner hashes.
06:54 jnthn TimToady: I thought that was what it was meant to do, fwiw.
06:55 TimToady it makes little sense to treat the keys the same as the values, since they're likely of different types
06:55 JimmyZ if I want to define method trait_mod:<is>, how can I use it?
06:55 TimToady so I think it should not descend into the pairs of a hash
06:55 jnthn TimToady: I don't think it does
06:55 * JimmyZ dosesn't how Actions.pm uses it
06:56 jnthn TimToady: I think it's calling .<a> on 1 and 2
06:56 jnthn The values of the hash.
06:56 jnthn oops, meeting!! &
06:58 uasi joined #perl6
06:58 sorear JimmyZ: if you want to define a method named trait_mod:<is>, you need to use it as an ordinary method.
06:58 sorear rakudo: class A { method trait_mod:<is>() { say "hi" } }; A.new.trait_mod:<is>();
06:58 p6eval rakudo cbdd9b: OUTPUT«hi␤»
06:58 JimmyZ oh
07:00 JimmyZ thanks sorear
07:04 JimmyZ joined #perl6
07:05 TimToady jnthn: nevermind, I was thinking about it wrong; what I really want is multidimensional subscripting someday...
07:06 mj41 joined #perl6
07:12 dalek niecza/serialize: 37d7895 | sorear++ | lib/ (2 files):
07:12 dalek niecza/serialize: Finish initial cases of running code
07:12 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/37d7895970
07:12 sorear stefan@stefans:~/rel/niecza$ mono-sgen run/Niecza.exe -L NULL -e 'Q:CgOp { (prog (say (s "Hello world")) {0}) }'
07:12 sorear Hello world
07:12 * sorear sleep
07:17 mberends joined #perl6
07:18 mberends 'night sorear
07:26 mishin_ joined #perl6
07:33 woosley Hi, #perl6. How is undef defined in Perl6?
07:33 woosley Does Mu stand for undefined object in perl6?
07:34 moritz woosley: for every class there is a type object. The type object is undefined
07:34 moritz so Int, Str and Mu are perfectly fine undefined objects
07:36 moritz Mu is the "most undefined" object in the sense that it defines the least behavior
07:36 woosley moritz: Can I get a Mu object, by "$x.WHAT.say" ?
07:38 moritz rakudo: my $x = Mu; $x.WHAT.say
07:38 p6eval rakudo cbdd9b: OUTPUT«Mu()␤»
07:39 woosley rakudo: my $x = FO; $x.WHAT.say
07:39 p6eval rakudo cbdd9b: OUTPUT«Could not find sub &FO␤  in <anon> at /tmp/VvCCif3zXi:1␤  in <anon> at /tmp/VvCCif3zXi:1␤␤»
07:41 woosley moritz: what is the relationship between Cool, Any, Mu, it there any document about these object type?
07:42 moritz S02 I think
07:43 moritz rakudo: say Cool.^mro
07:43 p6eval rakudo cbdd9b: OUTPUT«Cool() Any() Mu()␤»
08:02 y3llow joined #perl6
08:17 cougnut joined #perl6
08:26 bakedb joined #perl6
08:27 y3llow_ joined #perl6
08:30 dakkar joined #perl6
08:30 * jnthn back
08:41 am0c joined #perl6
08:41 SHODAN joined #perl6
08:46 moritz welcome back.
08:49 tadzik backtoo
08:51 mls_ morning!
08:53 mls_ jnthn: CATCH/CONTROL still have to have their own $/ $! $_, right?
08:54 moritz I'm pretty sure that they have their own $_ at least
08:54 moritz because that's aliased to $!
08:55 mls_ yes. It's more about the other two, cause jnthn++ patched the way they work yesterday
08:55 moritz but we expect do { die 'foo'; CATCH { default { 1 } } }; say $!  to access the $!
08:55 moritz (because it's the same as  try { die 'foo' }; say $! # which we certainly want to continue working)
08:57 mls_ What about CONTROL? I don't think we want to leak $! $/ ?
08:57 * moritz has no idea about CONTROL, because I don't know any use cases for it
08:57 mls_ warn() et al
08:58 moritz that's not exactly a "use case", just a keyword :-)
08:58 mls_ I'm talking about the "resume exception" case. I don't think we should change $/ $! in that case.
08:59 mls_ S04 talks about warnings throwing a control exception
09:00 mls_ afk for half an hour... dayjob...
09:08 jnthn mls_: Well, the other thing is that we're discussing whether $! should be looked up lexically or dynamically. Which also has some bearing on this.
09:08 jnthn I don't have a good feeling for which way that one will go.
09:08 jnthn It does fix the long-standing .subst closure issue.
09:28 daxim joined #perl6
10:08 bakedb joined #perl6
10:13 mls_ jnthn: I'd prefer lexical
10:14 mls_ could grep et al do something like local($CALLER::</>) ?
10:14 moritz that was my proposal as well :-)
10:14 mls_ (local being the perl5 local, I don't know if it's the same in perl6)
10:14 moritz called temp() in p6
10:15 moritz erm, probably just temp, it's not a function
10:16 cyfi joined #perl6
10:21 mls_ regarding setting $! in CATCH: S04's catch lambda contains an explicit set_outer_caller's_bang(@handled) call
10:22 moritz ok, so that's not an argument for missing $! in CATCH blocks
10:25 mls_ perl6: say do {die; CATCH {"hello"}};
10:25 p6eval rakudo cbdd9b: OUTPUT«Method 'gist' not found for invocant of class 'Exception'␤  in sub say at src/gen/CORE.setting:4729␤  in <anon> at /tmp/znwlmr7cjz:1␤  in <anon> at /tmp/znwlmr7cjz:1␤␤»
10:25 p6eval ..niecza v9-32-g380d891: OUTPUT«Unhandled exception: Died␤  at /home/p6eval/niecza/lib/CORE.setting line 742 (CORE die @ 2) ␤  at /tmp/RL2zpdsmL6 line 1 (MAIN C1_ANON @ 1) ␤  at /tmp/RL2zpdsmL6 line 1 (MAIN mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON…
10:25 p6eval ..pugs: OUTPUT«*** Died␤    at /tmp/hSTOj_AHu1 line 1, column 9-12␤»
10:26 cougnut hello moritz, could you assit me with ilbot?
10:26 moritz cougnut: I can try, please /msg me
10:29 mls_ afk -> lunch
10:37 lateau_ joined #perl6
10:44 mishin joined #perl6
11:03 ingy phenny: tell pmurias alias TOP to a rule called something else and start on that rule? Realize that I am writing language grammars where I almost always want to parse an entire text. requiring ^$ is not only annoying, it is going to cause problems when people forget it.
11:03 phenny ingy: I'll pass that on when pmurias is around.
11:08 bbkr enum.t passing \o/, RT queue will decrease to 850 :)
11:23 uasi joined #perl6
11:26 nsh joined #perl6
11:26 sbp joined #perl6
11:36 Psyche^ joined #perl6
11:39 benabik joined #perl6
11:48 envi_laptop joined #perl6
12:03 mtk joined #perl6
12:11 * [Coke] yawns from $DAYJOB
12:12 envi_|2 joined #perl6
12:13 ingy moritz: https://gist.github.com/1228947 as promised
12:14 ingy moritz: basically want to think up operators for these use cases. also more use cases if you think of any.
12:15 * moritz thinks about it
12:16 * [Coke] wonders why the grants queue is always filled with spam whenever he happens to look at it.
12:19 bluescreen10 joined #perl6
12:21 [Coke] rakudo: sub incr1 (*@v is rw) { @v[0]++; @v[1]++; }
12:21 p6eval rakudo cbdd9b:  ( no output )
12:23 moritz rakudo: sub incr1 (*@v is rw) { @v[0]++; @v[1]++; }; incr1 my $x; say $x
12:23 p6eval rakudo cbdd9b: OUTPUT«Any()␤»
12:24 [Coke] rakudo: $?:: # known?
12:24 p6eval rakudo cbdd9b: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$?:: # kno"␤»
12:24 moritz std: $?::
12:24 p6eval std bb4f150: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement at /tmp/UmSFYMvwJz line 1:�------> [32m<BOL>[33m�[31m$?::[0m�Parse failed�FAILED 00:01 120m�»
12:24 moritz ingy: somehow I dislike ?**?, but I'm not sure what a better operator for it would be
12:25 moritz usually the ? implies that it's ok to have fewer atoms in  your string, here it means it's ok have more
12:25 [Coke] rakudo: class A { method foo {} }; say A.can("foo").WHAT
12:25 p6eval rakudo cbdd9b: OUTPUT«Parcel()␤»
12:25 felher [Coke]++ #35 Tickets. Wow!
12:26 [Coke] 35 tickets... worked on?
12:26 tadzik remaining? :P
12:28 * felher Just checked his mails and thought: 35 Mails tagged with Perl6BugTracker... what the.. has to be spam.
12:29 woosley joined #perl6
12:29 jnthn moritz: Not sure if "is rw" is really valid in slurpy...does the spec call it either way?
12:29 [Coke] who manages rakudo.org, accounts and sthings?
12:30 jnthn [Coke]: pmichaud, I believe.
12:30 moritz jnthn: I think the spec is silent on that
12:30 moritz aye
12:30 jnthn moritz: Feared so ;)
12:30 jnthn I'll just hope TimToady++ swings by with a ruling ;)
12:30 [Coke] ... in your favor!
12:31 jnthn [Coke]: could go either way ;)
12:32 satyavvd joined #perl6
12:32 rhr joined #perl6
12:33 wolverian joined #perl6
12:33 moritz fwiw I just deployed some small but untested changes to the IRC logs -- please notify me if you see something odd (erm, odder than usual :-)
12:36 cyfi joined #perl6
12:37 * felher just looks at S04-statements/for.t line 47-55 and wonders: where should the '4' in 'is $str, "(1 5)(2 4)(3 6)",' come from?
12:38 cougnut joined #perl6
12:38 moritz that test looks wrong.
12:39 felher *nods*
12:39 moritz felher: do you want to fix it, or should I?
12:39 felher guess it should be 1..3 and 4..6, and (1 4), (2 5) and (3 6)
12:39 felher moritz: i'll fix it
12:49 Woodi how i can check general type of param ? eg: sub( $k, $v) { if $v.is_numeriv {} else ... ?
12:49 jnthn if $v ~~ Numeric { ... }
12:50 tadzik .WHAT
12:50 jnthn Don't really need to resort to .WHAT
12:50 tadzik I think I do sotmehing like this in File::Find, hmm
12:50 jnthn Plus it won't give you the general type
12:50 Woodi yes, what gives to many posibilities
12:50 tadzik oh well, if it's about Numeric
12:50 jnthn All numeric types do Numeric. Anything string-like does Stringy. etc.
12:50 jnthn Woodi: What does?
12:51 moritz .WHAT should not be used for type checking
12:51 Woodi WHAT gives: Int, Rat, ... - so many for 'if'
12:51 tadzik https://github.com/tadzik/perl6-File-Tools/blob/master/lib/File/Find.pm#L16
12:51 moritz Woodi: use  if $thing ~~ Numeric { ... }  instead
12:52 jnthn Woodi: Yes, that's why I suggested you use Numeric.
12:52 moritz Woodi: that will catch them all
12:52 tadzik it's not really WHAT here
12:52 jnthn Doing .WHAT === ... is a very bad idea.
12:52 Woodi k, thank you
12:52 jnthn As you break polymorphism.
12:52 moritz tadzik: that's really just type checking with smart matching
12:52 tadzik yef
12:52 moritz (given/when does smart matching)
12:52 tadzik yep
12:52 tadzik and no ifs :)
12:54 cougnut joined #perl6
12:56 dalek roast: 3c9d437 | (Felix Herrmann)++ | S04-statements/for.t:
12:56 dalek roast: [S04-statements/for.t] fix test: 'for zip(@a; @b) -> $x, $y'
12:56 dalek roast: review: https://github.com/perl6/roast/commit/3c9d437228
13:01 benabik joined #perl6
13:04 Holy_Cow joined #perl6
13:05 Holy_Cow left #perl6
13:11 jimmy1980 joined #perl6
13:14 lucs lslcom
13:15 lucs ww, sorry
13:16 uasi joined #perl6
13:16 skangas joined #perl6
13:46 robins joined #perl6
13:47 bluescreen10 joined #perl6
13:48 Juerd joined #perl6
13:48 Juerd Say, is anyone still using feather3 for anything?
13:48 Juerd Judging by the charts its filesystem has been full for quite a while; it's managed to exhaust its inodes, even!
13:49 moritz I think try.rakudo.org runs on feather3
13:49 moritz erm, tried to run :-)
13:50 moritz Juerd: have you cleaned it up again? doesn't look full to me now
13:50 Juerd No; I'm just looking at munin charts
13:50 jnthn try.rakudo.org seems to basically work.
13:50 Juerd It's using 99% of available inodes and it's been topped out a few times
13:51 moritz ah, I was just looking at  df -h
13:51 Juerd I'll try to find where all those (temporary?) files are
13:51 Juerd Try df -i
13:51 moritz /dev/vdb              655360  647369    7991   99% /
13:51 moritz wee
13:51 Juerd You'd think that 655360 ought to be enough... :D
13:52 skangas joined #perl6
13:52 moritz no lsof installed :(
13:54 Juerd It is now :)
13:55 moritz thanks
13:55 moritz doesn't show me anything interesting though
13:55 Woodi rakudo: my $v = "Hallo World!"; $v ~~ s/(\s)/\\$1/; say $v;
13:55 dakkar joined #perl6
13:55 p6eval rakudo cbdd9b: OUTPUT«Hallo\World!␤»
13:56 Woodi how to get escaped whites ?
13:56 Woodi rakudo: my $v = "Hallo World!"; $v ~~ s/(\s)/\\$0/; say $v;
13:56 p6eval rakudo cbdd9b: OUTPUT«Hallo\World!␤»
13:57 Woodi perl6: my $v = "Hallo World!"; $v ~~ s/(\s)/\\$0/; say $v;
13:57 p6eval niecza v9-32-g380d891: OUTPUT«Hallo\ World!␤»
13:57 p6eval ..rakudo cbdd9b: OUTPUT«Hallo\World!␤»
13:57 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped b…
13:57 Woodi wooo, niecza works
13:57 Woodi perl6: my $v = "Hallo World!"; $v ~~ s/(\s)/\\$1/; say $v;
13:57 p6eval niecza v9-32-g380d891: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 589 (CORE warn @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 21 (CORE Mu.Str @ 12) ␤  at  line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting …
13:57 p6eval ..rakudo cbdd9b: OUTPUT«Hallo\World!␤»
13:57 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped b…
13:59 Juerd feather3:/home/tene/.ccache# find | wc -l
13:59 Juerd 354474
13:59 Juerd That is a bit much.
14:00 Juerd Can anyone write a nice perl or find oneliner to delete old files, say, everything older than a month?
14:00 soh_cah_toa joined #perl6
14:00 Juerd I'm rm -rf'ing ~tene/.ccache
14:00 Juerd Tene: ping
14:02 benabik find <DIR> -mtime +30 -delete # I suggest running it without -delete at least once to see what it'll delete
14:03 benabik Juerd: ^^
14:03 Juerd Thanks :)
14:03 benabik Juerd: Note: untested…
14:04 benabik (Which is why I recommend not using -delete at first. ;-)
14:04 Juerd That's okay; we'll find out if it works in a month or so
14:04 Juerd The rm is still running :)
14:04 benabik Living on the edge.  :-D
14:05 Juerd Inode usage has dropped to 95%
14:05 Juerd This isn't going very fast.
14:05 benabik Deleting 354k files takes a while...
14:05 Juerd Apparently :)
14:07 uasi joined #perl6
14:07 mls_ jnthn: patch that makes Rakudo_cont_store throw an exception if the cont == PMCNULL: https://gist.github.com/1229149
14:08 mls_ (guards against perl6_container_store misuse)
14:09 jnthn mls_: oh, good one.
14:09 jnthn mls_: Will apply later today
14:09 Juerd rm: cannot remove `.ccache/3': Directory not empty
14:09 Juerd But... but... but... that's why I did -r
14:10 moritz Juerd: maybe permission defined for one file?
14:10 Juerd moritz: I'm root
14:10 moritz Juerd: or a new file has been created while the others have been deleted?
14:10 Juerd I'm guessing that something is compiling while I'm deleting stuff. The compile will probably fail.
14:11 benabik Juerd: Probably not?  ccache is pretty conservative.
14:11 moritz htop doesn't show any compilation running
14:11 moritz .oO( not anymore )
14:11 Juerd moritz: That's exactly what I thought too :)
14:11 mls_ jnthn: store_lex_skip_current doesn not exist, right?
14:12 Juerd 88% and still dropping
14:12 Juerd \o/
14:12 mls_ (btw, find_lex_skip_current doesn't seem to get used anymore)
14:12 Juerd By the way, it has had this many files for at least half a year.
14:12 Juerd It's a miracle that it kept working.
14:13 PerlJam Juerd: is this just feather3 you're talking about?
14:13 Juerd Yes.
14:13 [Coke] Juerd++
14:14 jnthn mls_: Maybe not.
14:14 jnthn mls_: Do you need it for something?
14:14 jnthn If so, can always add it... :)
14:14 jnthn mls_: Note that we assign $! in Rakudo now, not bind.
14:14 jnthn mls_: So if it's for that, you should use find and the assign.
14:15 mls_ not sure. seems I have to set $! of the outer ctx in the exception handler somehow
14:15 jnthn (totally taking a wild guess at what you might be working on :))
14:15 jnthn Yeah, you'd do find, and then assign to it.
14:15 jnthn store_lex_skip_current would bind, not assign.
14:15 jnthn (if it existed)
14:16 mls_ true, we want assign nowadays ;)
14:16 jnthn Well, it was only last night that I went through and tried to get us to be consistent on that. :)
14:17 woosley left #perl6
14:17 mls_ (that's why I tried to use perl6_container_store)
14:17 mls_ (which segfaulted because the find_lex returned PMCNULL)
14:18 mls_ (cause I also have a ".lex "$!")
14:18 mls_ (and it doesn't matter that the .lex comes after the find_lex)
14:19 jnthn .lex is declarative, not imperative. So yes, order won't help you. :)
14:20 mls_ Yeah, I saw that when I checked the imcc sources...
14:21 donri joined #perl6
14:23 mls_ So I use find_lex_skip_current to get the $! container of the outer?
14:24 jnthn Should work, yes.
14:24 mls_ ok, thanks!
14:28 thou joined #perl6
14:34 wamba joined #perl6
14:39 moritz now down to 285K used inodes on feather3
14:39 moritz that's still more than on the root partition of my laptop
14:40 moritz but not excessive
14:40 Juerd A few code repositories fills it up easily.
14:40 Juerd That was my first guess. Fortunately I was wrong.
14:40 moritz du -sch /home/*/.cpan/build
14:41 moritz 127M
14:41 Juerd That's not quite as many files as full git repositories with history.
14:41 kaare_ joined #perl6
14:41 moritz right
14:42 Juerd I wonder which filesystems they use at github
14:43 moritz didn't some people invent file systems for nntp servers that were optimized for many small files?
14:45 mux I think you're thinking of ifs which has long since been removed from base; and it wasn't really optimized for small files but for applications who don't actually need a namespace
14:46 mux that is, applications using ifs needed to be explicitely modified to open files by their inode number instead
14:47 mux oh damn, wrong channel, what I just said was actually FreeBSD-specific
14:47 mux I fail at IRC.
14:48 abercrombie joined #perl6
14:50 TimToady well, it's freenode at least :)
14:50 sorear good * #perl6
14:50 sorear hi mux!
14:52 espadrine joined #perl6
14:54 TimToady mls_: I'm trying hard to get rid of $! inside of CATCH, since $! should only mean "the exception that was just handled", and the ones in flight inside CATCH are not handled
14:54 mux sorear: hi there :)
14:54 lateau_ joined #perl6
14:54 TimToady and we already have $_ bound to the current in-flight exception (in a loop)
14:56 TimToady I think use of temp to modify a caller's variable is very smelly.
14:56 moritz agreed
15:00 TimToady and we've already mentioned that control functions need to be transparent to $/ and $! as dynvars
15:04 im2ee joined #perl6
15:04 im2ee Hello :)
15:06 mikemol Hi
15:10 moritz #phasers in 2h20min, right?
15:11 sorear more like 26h20min, no?
15:12 moritz oh right, Wed, not Tue :-)
15:12 moritz glad I asked
15:22 mls_ Hi TimToady!
15:24 mls_ TimToady: what are your thoughts on the return value of blocks that caught an exceptions?
15:24 dalek specs: 58a9ca5 | larry++ | S05-regex.pod:
15:24 dalek specs: get hybrid ** out of my head and into spec
15:24 dalek specs: review: https://github.com/perl6/specs/commit/58a9ca5eeb
15:24 mls_ perl6: say do {die; CATCH {"hello"}};
15:24 p6eval rakudo cbdd9b: OUTPUT«Method 'gist' not found for invocant of class 'Exception'␤  in sub say at src/gen/CORE.setting:4729␤  in <anon> at /tmp/dLQUlyFNma:1␤  in <anon> at /tmp/dLQUlyFNma:1␤␤»
15:24 p6eval ..pugs: OUTPUT«*** Died␤    at /tmp/Qn9K0lODHD line 1, column 9-12␤»
15:24 p6eval ..niecza v9-32-g380d891: OUTPUT«Unhandled exception: Died␤  at /home/p6eval/niecza/lib/CORE.setting line 742 (CORE die @ 2) ␤  at /tmp/1ms6CMP83Y line 1 (MAIN C1_ANON @ 1) ␤  at /tmp/1ms6CMP83Y line 1 (MAIN mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON…
15:24 mls_ should that say hello?
15:25 moritz since the exception is not handled, it should rethrow as niecza does
15:25 TimToady I don't think so, offhand
15:25 moritz more interesting:
15:25 moritz perl6: say do {die; CATCH { default { "hello" }}};
15:25 p6eval niecza v9-32-g380d891: OUTPUT«Nil␤»
15:25 p6eval ..pugs: OUTPUT«*** Died␤    at /tmp/itEC3UwkJm line 1, column 9-12␤»
15:25 p6eval ..rakudo cbdd9b: OUTPUT«Method 'gist' not found for invocant of class 'Exception'␤  in sub say at src/gen/CORE.setting:4729␤  in <anon> at /tmp/E18saprxiD:1␤  in <anon> at /tmp/E18saprxiD:1␤␤»
15:26 mls_ moritz: assume that is handled. I'm wondering if there's a nice way for the handler to set the block return value
15:26 mls_ thus an easy way to return an "error" result
15:26 TimToady CATCH is never implicitly going to set the return value, though we might allow explicit return
15:27 mls_ well, return leaves the Routing. We might need OUTER::leave or something
15:28 TimToady that is, not implicitly set to the return value of the handler.  we should implicitly set it to something undefined, as in p5, I think
15:28 dalek specs: e639b7d | moritz++ | S05-regex.pod:
15:28 dalek specs: [S05] fix typo
15:28 dalek specs: review: https://github.com/perl6/specs/commit/e639b7dbca
15:29 moritz TimToady: did you see the suggestion to use ~** for the <a> ** <delimiter> form, and +** for the <a> ** 1..*  form?
15:29 * moritz liked that, and it's orthogonal to the last S05 patch
15:30 TimToady it seems a bit crufty
15:31 moritz less crufty than using the same operator for two different functions
15:31 envi_laptop joined #perl6
15:31 TimToady there's an underlying sense in which it is the same operator with a different test
15:32 moritz still the problem remains that a mis-typed range on the is usually valid syntax for a separator, resulting in LTA misbehavior
15:34 TimToady trew
15:37 TimToady making it a separate operator still doesn't help with the fact that we have two independent criteria for the same repetition
15:37 TimToady I've also been playing with ways of combining the two right args
15:38 TimToady <a> ** [0..* ',']  or something
15:38 TimToady but don't really like that one enough
15:39 moritz well, <a> +** 0..* ~** ','  would help, but it's not pretty at all
15:39 mux arg, my eyes
15:39 TimToady as for the typo problem, restricting the syntax of the sep form would help
15:40 TimToady for instance, if we required brackets:
15:40 TimToady <a> ** [',']
15:40 TimToady or something that a person would never use near 0..*
15:40 TimToady 'course, you still have the problem that a malformed 0..* can be taken for normal match material
15:41 moritz requiring brackets would work, yes
15:41 TimToady std: / <a> ** 0.. foo /
15:41 p6eval std bb4f150: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed range at /tmp/rZ7j34PsYE line 1:â�¤------> [32m/ <a> ** 0..[33mâ��[31m foo /[0mâ�¤    expecting quantifierâ�¤Parse failedâ�¤FAILED 00:01 121mâ�¤Â»
15:41 TimToady std actually catches some of 'em
15:43 TimToady I wish the other regex folx hadn't stolen ++ for possesive +
15:43 jaldhar joined #perl6
15:44 TimToady ah well, can't be undone
15:49 TimToady still need to come up with a way to combine them though
15:49 TimToady <a> ** {0..*}[','] or something like that
15:51 flussence the first idea that comes to mind for me is [',' xx 0..*]. Is xx already taken in regex?
15:52 TimToady well, they'd be taken literally by default
15:53 TimToady but we can claim keywords if we need to
15:53 TimToady however, your form looks like it's replicating the comma
15:54 flussence I was thinking along the lines of having it look like "$regex ** $list-of-separators"...
15:54 TimToady well, but 0 commas still means 1 of the lhs
15:55 flussence oh, good point.
15:55 TimToady and I think that varying separators is rare enough that we can dehuffmanize it
15:55 TimToady and just make people write it out long
15:57 dukeleto joined #perl6
15:58 TimToady there are also approaches where we make the separator a modifier on any quantifier
15:58 TimToady then you could write <a>* via ',' or some such
16:00 TimToady and for the current <a> ** ',' we'd either force people to write <a>+ via ',' or assume the +
16:02 PerlJam It took me a while to get used to (and even come to like)  A ** B, and now you're gonna change it?!?
16:02 PerlJam :-)
16:02 TimToady I'd be inclined to require the + in order to reduce accidental recognition of whatever keyword we use
16:04 PerlJam <a>+:sep(',')  ?
16:04 TimToady it's not a string, it's a regex
16:04 PerlJam sure ...   <a>+:sep(<foo>)
16:04 TimToady that form is a normal P6 expression inside ()
16:05 TimToady I wouldn't steal a normal adverbial for that
16:05 PerlJam okay, let's just say the "via" in "<a>+ via ','" doesn't quite work for me :)
16:05 PerlJam just  that it's wordy, not the word itself
16:06 PerlJam though, looking at the scroll back, some form that combines range and separator would be nice.
16:07 MayDaniel joined #perl6
16:07 TimToady prejudiced against romance languages, eh?  :P
16:07 TimToady wordy is good when the things around it are symbolic
16:08 mkramer1 joined #perl6
16:09 PerlJam Except that I have this nice rule in my head that says wordy things are literal in a regex and I kind of like it that way
16:09 TimToady and we have, in fact, already reserved all the punctuation
16:10 TimToady we need something that doesn't look like either side
16:11 TimToady <a>+ % ','   # modulo!
16:12 * PerlJam notes that #perl6 once again has me staring at my keyboard
16:13 slavik1 TimToady: I think I realized the trouble you have with designing a language ...
16:13 TimToady std: / <a> % <b>
16:13 p6eval std bb4f150: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/DT0IXDt_L3 line 1:�------> [32m/ <a> %[33m�[31m <b>[0m�Unable to parse regex; couldn't find final '/' at /tmp/DT0IXDt_L3 line 1:�------> [32m/ <a> %[33…
16:13 TimToady std: / <a> % <b> /
16:13 p6eval std bb4f150: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/idkFhHLC3z line 1:�------> [32m/ <a> %[33m�[31m <b> /[0m�Unable to parse regex; couldn't find final '/' at /tmp/idkFhHLC3z line 1:�------> [32m/ <a> %[…
16:13 TimToady I think I like it
16:13 slavik1 we don't have enough symbols ...
16:13 PerlJam I like it, but I worry a bit about that +
16:13 slavik1 on the keyboard
16:14 TimToady which way do you worry about it?
16:14 TimToady requiring it, or not requiring it?
16:14 PerlJam Basically just differentiating between aaa,aaaa,aaa  and  a,a,a,a,a
16:15 TimToady there's always [<a>*] % ','
16:16 moritz % is cute
16:16 TimToady and has two parts, like key/value
16:17 TimToady and means "constrained by" in colloquial usage of "modulo"
16:17 TimToady in fact, I expect people would pronounce it that way in their heads
16:18 arnsholt I agree with moritz. Definitely cute. The modulo mnemonic complements it nicely
16:18 PerlJam and so we'd have   / [<a> % ','] ** 3..5 /  for combinations
16:19 PerlJam (for instance)
16:19 moritz TimToady: so we keep ** $range?
16:19 TimToady that would be the idea
16:19 moritz +1
16:19 TimToady PerlJam: no, inside out from that
16:20 TimToady so % could modify any quantifier
16:20 TimToady including **
16:20 PerlJam Aye, I realized the difficulty as soon as I'd hit enter :)
16:20 TimToady <a> ** 3..5 % ','
16:20 PerlJam so yes ... % is really nice  TimToady++
16:21 TimToady the only remaining question is whether to require a quantifier
16:21 PerlJam I vote no
16:21 TimToady well, and where to allow whitespace, and what whitespace means
16:22 TimToady <a> +% ','  ain't so bad
16:22 TimToady though looks like a numeric prefix
16:23 TimToady <a>+ % ',' is probably better from that perspective
16:23 JimmyZ joined #perl6
16:24 TimToady with ws dependency before and after %, we need to worry just a bit about accidental hashes, as in <a>%foo
16:25 PerlJam TimToady: Where would the ? mod go in either rendition?    / <a> +%? ',' /  or  / <a>+? % ',' /
16:25 tokuhiro_ joined #perl6
16:25 JimmyZ_ joined #perl6
16:26 PerlJam (or disallowed?)
16:28 TimToady the latter
16:29 TimToady er, the second
16:29 TimToady +? %
16:29 TimToady because of the possibility of a hash, I think we have to require the real quantifier
16:30 TimToady it's not like people will write the form all that often that we need to huffmanize it down to nothing
16:30 TimToady and <a>+ indicates we expect some number of them even before we read the %
16:31 mls_ jnthn: your steal_outer hack in perl6lexpad.pmc doesn't seem to work if the outer block doesn't know the lexical
16:31 TimToady and we can give a decent error message: "% doesn't modify a quantifier"
16:31 jnthn mls_: It's not really a hack...
16:31 jnthn mls_: Also, it's only meant to be for $_ these days.
16:32 jnthn (Since $! and $/ are per routine now.)
16:32 mls_ Ok, so you need to remove thr $! $/ part
16:32 jnthn Makes sense...got a test case?
16:32 cosimo joined #perl6
16:32 jnthn It'd have been nice if the spectests had reminded me of this ;)
16:33 PerlJam TimToady: I don't know ... I think most of my uses of ** are really of the % variety rather than ranges.
16:34 PerlJam oh, never mind.  My brain is a tad slow right now.
16:35 PerlJam TimToady: in any case, it doesn't chunk right in my head.  / <a>+ % ',' /  still "looks funny"
16:35 PerlJam TimToady: but that's why you're the languages designer ...  :-)
16:36 Chillance joined #perl6
16:36 bluescreen10 joined #perl6
16:44 im2ee Can i iterate through 001, 002, 003 and so on using only maths? You know.. something like 001+1 = 002
16:44 im2ee :)
16:45 im2ee say 001+1 returns 2.
16:45 im2ee I want 002. :)
16:45 Tene Juerd: I haven't logged into feather3 in years, iirc, and I've never configured ccache
16:45 wolverian rakudo: "002"+1
16:45 p6eval rakudo cbdd9b:  ( no output )
16:46 mls_ jnthn: I can't find a simple testcase. I need an uninitialized .lex $/ ...
16:46 JimmyZ rakudo: say "001" ... "005"
16:46 p6eval rakudo cbdd9b: OUTPUT«001 002 003 004 005␤»
16:46 Juerd Tene: Interesting :)
16:46 wolverian I always forget saying it. thanks, JimmyZ.
16:47 bbkr rakudo: say "01" .. "there is a cake in last test chamber"
16:47 p6eval rakudo cbdd9b: OUTPUT«"01".."there is a cake in last test chamber"␤»
16:47 JimmyZ rakudo: say "001.jpg" ... "005.jpg"
16:47 p6eval rakudo cbdd9b: OUTPUT«001.jpg 002.jpg 003.jpg 004.jpg 005.jpg␤»
16:49 Tene Juerd: at least, I don't remember doing so.  It's a bit long ago for me to be certain.  You could check my .bash-history.
16:49 im2ee Thanks, i will try it. :)
16:49 PerlJam im2ee: you can also just use ++
16:50 [Coke] if you want numbers that are formatted as strings instead of strings that are incremented like numbers, you could do that too.
16:50 PerlJam rakudo: my $str = "001"; for 0..5 { say $str++ }
16:50 p6eval rakudo cbdd9b: OUTPUT«001␤002␤003␤004␤005␤006␤»
16:51 im2ee PerlJam, ++ on this channel (for karma) or in perl (for my program)? :)
16:55 espadrine joined #perl6
16:57 jnthn mls_: Ah, that's not likely to happen...
16:58 jnthn mls_: But anyway, removing it...it's just cruft now.
16:59 dalek rakudo/nom: 7552eb9 | jnthn++ | src/pmc/perl6lexpad.pmc:
16:59 dalek rakudo/nom: Remove now unrequired calls to steal_outer (mls++).
16:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7552eb9424
17:03 Chillance joined #perl6
17:10 saaki joined #perl6
17:11 mberends joined #perl6
17:11 mj41 joined #perl6
17:16 zby_home_ joined #perl6
17:20 sayu joined #perl6
17:23 dalek specs: a455b11 | larry++ | S05-regex.pod:
17:23 dalek specs: old <a>**',' is now written <a>+%','
17:23 dalek specs:
17:23 dalek specs: The separator syntax is now required to be a modifier on a quantifier,
17:23 dalek specs: so the old <a> ** ',' is now written <a>+ % ','.  This allows for other
17:23 dalek specs: quantifiers like * or ** on the left as the basis of the constraint,
17:23 dalek specs: while disambiguating use of ** to only work as a quantifier without
17:23 dalek specs: overloading separator matching.  The C<%> because it can be pronounced
17:23 dalek specs: 'modulo' and because it looks like the relationship of two things.  And
17:23 dalek specs: also because it's unlikely to be confused with other regex forms.
17:23 dalek specs: review: https://github.com/perl6/specs/commit/a455b11b2c
17:24 mls_ jnthn: current state of exception handler change: https://gist.github.com/1229726
17:24 flussence % looks vaguely pythonish :)
17:24 im2ee karma larry
17:24 aloha larry has karma of 134.
17:25 mls_ jnthn: gets rid of the extra block, assigns to OUTER::$!
17:25 mls_ I'll do some testing tomorrow
17:25 mls_ (some more testing, first tests look good)
17:26 jnthn TimToady: Should CATCH blocks declare a $? ?
17:26 jnthn er
17:26 jnthn a $/
17:26 jnthn ?
17:26 mls_ (I hope it's ok to modify $handler<past_block>...)
17:26 jnthn $handler<past_block>.unshift($handler_start);
17:26 jnthn Probably should be
17:26 jnthn $handler<past_block>[1].unshift($handler_start);
17:27 jnthn So you change the imperative bit, not the declaritive bit
17:27 TimToady jnthn: probably, since when clauses may be doing pattern matching
17:27 jnthn OK, then mls++ :)
17:27 jnthn + PAST::Var.new( :scope('lexical_6model'), :name('$_'), :isdecl(1) ),
17:27 jnthn PAST::Op.new( :pasttype('bind_6model'),
17:27 jnthn PAST::Var.new( :scope('lexical_6model'), :name('$_') ),
17:28 jnthn mls_: ^^ here, why the separate :isdecl? Why not just put :isdecl on the one inside the bind?
17:28 dalek rakudo/nom: 7fdc6b4 | jnthn++ | src/binder/container.c:
17:28 dalek rakudo/nom: Apply patch from mls++ to harden container storage.
17:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7fdc6b455b
17:28 TimToady should probably declare a $! too, just to keep it empty, and force people to say OUTER::<$!> if they mean it
17:28 jnthn OK
17:28 TimToady but the SIMPLECATCH doesn't set $!
17:29 mls_ isdecl: I just copied that from the old code
17:29 TimToady it's not like CATCH has to be all that efficient, if expections are really exceptional
17:29 jnthn mls_: In the case of what TimToady just said, the binding to $! should probably be removed.
17:29 jnthn s/case/light/
17:29 mls_ ok, removing...
17:29 jnthn mls_: Ah, OK...feel free to clear up too :)
17:30 jnthn mls_: Feels like the right direction.
17:30 TimToady CONTROL, on the other hand, should probably be transparent
17:30 TimToady and as lightweight as possible
17:31 TimToady since control exceptions are not unusual
17:31 espadrine joined #perl6
17:31 jnthn *nod8
17:32 mls_ so CONTROL should not mess with the outers $!?
17:32 mls_ $! ?
17:32 TimToady outer shouldn't have a $! either
17:33 mls_ Ok, the Routine's $!
17:33 thou joined #perl6
17:33 TimToady statement_control:<while> should not be declared such that it defines a $! or $/
17:33 TimToady it should be transparent to the dynvar
17:34 TimToady if we're going to set the user's $! or $/ dynamically
17:34 TimToady which it looks like we need to do
17:34 TimToady (note that dynvars are still lexically scoped; it's just the lookup that is dynamic)
17:35 TimToady dynvars are temp done right
17:35 felher TimToady++ for '**' in regex. /me searched for that 1 1/2 months ago. :)
17:35 TimToady we could just say that any routine that defines a CONTROL block doesn't get $/ or $! by default
17:36 Sarten-X joined #perl6
17:37 benabik joined #perl6
17:43 mls_ new version of patch: https://gist.github.com/1229760
17:45 mls_ afk -> home...
17:46 jnthn mls_: Thanks
17:52 tadzik perl6lexpad.c: In function ‘Parrot_Perl6LexPad_get_number_keyed_str’:
17:52 tadzik perl6lexpad.c:211:5: warning: passing argument 2 of ‘register_number_for_get’ discards ‘const’ qualifier from pointer target type [enabled by default]
17:52 tadzik perl6lexpad.c:69:15: note: expected ‘struct Hash *’ but argument is of type ‘const struct Hash *’
17:52 tadzik I got plenty of those with the newest patches
17:55 flussence hm
17:56 flussence those showed up between 2011-09-15 and 2011-09-16 according to my cron output
17:56 Chillance joined #perl6
18:07 Woodi perl6 async { say "my tid is ", +self; };
18:08 Woodi perl6: async { say "my tid is ", +self; };
18:08 p6eval rakudo 7fdc6b: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/pca6xM4Cyz:1)␤»
18:08 p6eval ..niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0m��'self' used where no object is available at /tmp/Xv1BMaOA_H line 1:�------> [32masync { say "my tid is ", +self[33m�[31m; };[0m��Action method statement_prefix:async not yet implemented at /tmp/Xv1BMaOA_H line 1:�------> …
18:08 p6eval ..pugs:  ( no output )
18:08 benabik tadzik: Do you compile parrot with g++ or gcc?
18:08 Woodi perl6: async { say "my tid is ", ~ '1213'; };
18:08 p6eval rakudo 7fdc6b: OUTPUT«Could not find sub &async␤  in <anon> at /tmp/bOS42Lcful:1␤  in <anon> at /tmp/bOS42Lcful:1␤␤»
18:08 p6eval ..niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method statement_prefix:async not yet implemented at /tmp/NLgVB6SjkH line 1:�------> [32masync { say "my tid is ", ~ '1213'; }[33m�[31m;[0m��Unhandled exception: Unable to resolve method statement_level in class St…
18:08 p6eval ..pugs: OUTPUT«my tid is 1213␤»
18:09 tadzik benabik: gcc
18:10 dalek rakudo/nom: 79344e0 | jnthn++ | src/pmc/perl6lexpad.pmc:
18:10 dalek rakudo/nom: Try to eliminate a bunch of C compiler warnings tadzik++ is seeing.
18:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79344e05a2
18:10 jnthn tadzik: Lemme know if ^^ helps.
18:10 Woodi pugs: my $thr = async { say "my tid is ", ~ '1213'; }; $thr.started;
18:10 p6eval pugs: OUTPUT«my tid is 1213␤*** No such method in class Thread: "&started"␤    at /tmp/e_rxPalyOf line 1, column 50-62␤»
18:10 tadzik jnthn: will see
18:11 jnthn some of the consting was bogus, we were gonna modify the hash... :)
18:13 tadzik oh you :)
18:16 PerlJam TimToady: I'm still trying to puzzle out the edges of the new %  ....  A non-sigspace repitition separated by comma would look like this?   <a>**2..*%','    Doesn't "*%" run afoul of LTM?  Seems like a space between quantifier and % should be mandatory and not contribute to sigspace
18:20 tadzik jnthn: yeah, that removed the warning from perl6lexpad
18:22 localhost joined #perl6
18:24 jnthn tadzik: nice :)
18:27 espadrine joined #perl6
18:33 espadrine joined #perl6
18:39 TimToady PerlJam: there is no *% token available at that point, so I don't know what would try to match it
18:39 TimToady the next thing must be * or a number
18:40 TimToady and that's a Whatever star, not a quantifier star
18:40 TimToady so it happilly parses **2..* as a quantifier, then %',' as a quant modifier
18:42 TimToady well, it's not a quant modifier in the sense that ? or ! is, since you can have <a>+? % ','
18:43 TimToady I guess a quant mod in the sense of being a quant modulus :)
18:43 PerlJam :-)
18:47 PerlJam TimToady++  good call on using %  :)
19:03 MayDaniel joined #perl6
19:05 worr joined #perl6
19:09 odoacre joined #perl6
19:11 [Coke] joined #perl6
19:15 dalek rakudo/nom: 091c262 | jnthn++ | src/ (2 files):
19:15 dalek rakudo/nom: Fix issue with dynamic compilation of multis belonging to a derived dispatcher. Fixes issues with declaring custom traits and using them in the same compilation unit.
19:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/091c2627c1
19:15 frhodes joined #perl6
19:21 birdwindupbird joined #perl6
19:25 dalek std: c22b2ee | larry++ | STD.pm6:
19:25 dalek std: first step to +% transition, deprecate ** sep
19:25 dalek std:
19:25 dalek std: and also take a whack at parsing the +% form
19:25 dalek std: review: https://github.com/perl6/std/commit/c22b2ee2c0
19:29 bbkr1 joined #perl6
19:34 espadrine joined #perl6
19:45 benabik joined #perl6
19:50 jaldhar joined #perl6
20:11 araujo joined #perl6
20:25 cognominal when I do a break from C to Perl, that does not last. But when I do a last in C, everything breaks. :(
20:30 soh_cah_toa joined #perl6
20:32 mberends cognominal: that is almost true in a philosophical sense as well # double entendre curieux :)
20:34 jnthn :)
20:42 Woodi there is trink in perl5 to generate accessors with closure: for my $field (qw(name first second)) { my $slot = __PACKAGE__."::$field"; ... how to do something like this in v6 ?
20:42 Woodi *trick
20:43 PerlJam Woodi: you're asking how to dynamically create methods?
20:43 Woodi yes i think
20:44 Woodi with nearly same code, different name
20:44 PerlJam Woodi: you use the mop to add methods to a class/object
20:46 Woodi it is documentet somewhere ?
20:47 bbkr1 Woodi: you may check https://github.com/bbkr/jsonrpc/blob/master/lib/JSON/RPC/Client.pm - I install there RPC methods in runtime by composing roles into class
20:48 Woodi k
20:48 PerlJam Woodi: I don't know if it's documented ... try https://github.com/jnthn/6model maybe
20:49 jnthn The introspecty bits of the MOP are in S12, but the declarative bits arne't.
20:49 jnthn *aren't
20:50 PerlJam perhaps there needs to be a S12.5 - the MOP  :)
20:51 jnthn rakudo: class Foo { }; for <bar baz waz> -> $name { Foo.^add_method($name, method () { "method for $name" }); }; Foo.baz
20:51 p6eval rakudo 091c26:  ( no output )
20:51 jnthn rakudo: class Foo { }; for <bar baz waz> -> $name { Foo.^add_method($name, method () { "method for $name" }); }; say Foo.baz
20:51 p6eval rakudo 091c26: OUTPUT«method for baz␤»
20:51 jnthn Woodi: ^^
20:52 jnthn Though, that adds them at runtime
20:52 * Woodi is reading && parsing
20:52 jnthn rakudo: class Foo { BEGIN { for <bar baz waz> -> $name { Foo.^add_method($name, method () { "method for $name" }); } }; say Foo.baz
20:52 p6eval rakudo 091c26: OUTPUT«===SORRY!===␤Method 'dispatch:<.^>' not found for invocant of class 'Foo'␤»
20:52 jnthn oh, yes :)
20:52 jnthn rakudo: class Foo { BEGIN { for <bar baz waz> -> $name { Foo.HOW.add_method(Foo, $name, method () { "method for $name" }); } }; say Foo.baz
20:52 p6eval rakudo 091c26: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
20:53 * jnthn tries to spot his syntax error...
20:53 jnthn rakudo: class Foo { BEGIN { for <bar baz waz> -> $name { Foo.HOW.add_method(Foo, $name, method () { "method for $name" }); } } }; say Foo.baz
20:53 p6eval rakudo 091c26: OUTPUT«method for baz␤»
20:53 jnthn That adds them at BEGIN time.
20:54 jnthn Which basically gives the same effect as if the compiler added them.
20:54 jnthn (So, they're available to participate in role compositon conflict resolution, etc.)
20:54 PerlJam jnthn: when does "dispatch:<.^>" get installed?
20:54 jnthn PerlJam: It's inherited from Mu.
20:55 jnthn PerlJam: But we don't set a default parent until composition time.
20:55 PerlJam gotcha
20:55 Woodi thanx jnthn++ bbkr1++ PerlJam++ :)
20:56 jnthn PerlJam: We could maybe cheat on it a bit. But there's a chance we should be doing .^ by a syntactic re-write anyway. :)
20:56 PerlJam Woodi: why are you creating methods dynamically btw?
20:57 * bbkr1 bets on "database ORM" answer :)
20:57 Woodi PerlJam: to save place in file in some typing. just do not want to have same methods with different names
20:58 PerlJam Woodi: so ... you're just making aliases?
20:58 Woodi bbkr1: s/ORM// :)
21:00 Woodi PerlJam: i didn't write it yet, so don't know exactly. "alias"  sugests identical behaviour
21:00 PerlJam Woodi: not necessarily.
21:00 Woodi do alias means something specyfic in perl6 ?
21:01 bbkr1 Woodi: If you're making aliases just install the same method (it's an object) under many names. my $m = method () {}; Foo.^add_method('name1', $m); Foo.^add_method('name2', $m);
21:01 PerlJam Woodi: you could parameterize a method appropriately then create aliases to curried versions of that method
21:02 Woodi my maind isn't curied yet... what is difference to jnthn++ add_method ?
21:02 arnsholt Or you could write multis, or use keyword arguments/default values in general
21:02 arnsholt Reassuringly, there's more than one way to do it =)
21:03 Woodi i want something like in v5 trick :)
21:03 PerlJam It's all TimToady's fault
21:04 mberends (there's only one way to blame it)
21:05 PerlJam Woodi: Perl 6 has things like the Perl 5 trick, but better/safer.  But the exact nature of those things really depends on what you're trying to achieve.
21:05 bbkr1 off topic - do we have any P6 GTK libs under development?
21:06 PerlJam bbkr1: are you volunteering?  :)
21:06 mberends bbkr1: yes, over here, with Niecza!
21:06 im2ee Good night!
21:06 PerlJam mberends: Shh!  I wanted him to replicate it with Rakudo
21:06 PerlJam :)
21:07 mberends oops
21:07 jnthn Probably need to fix nativecall first...
21:07 bbkr1 PerlJam: no, i plan to spent time on improving Mongo driver after NOM release.
21:08 bbkr1 mberends: do you need any GTK dev packages installed? ssh X forwarding is already enabled so you can test them on MacOS
21:09 PerlJam what's a nom-based R* release waiting on exactly?  pmichaud regex fixes?  something else?
21:09 japhb joined #perl6
21:11 jnthn PerlJam: Largely regexes and grammars.
21:11 jnthn There's other bits in nommap, but we're gradually picking away at them.
21:13 PerlJam Is there any LHF wrt grammars and regex on nom?
21:13 bbkr1 I miss pack/unpack and Str.encode/decode most. That's huge regression for all streaming and serialization usage.
21:19 masak joined #perl6
21:19 masak hi sweet #perl6
21:20 masak just wanted to stop by and wave before I go to sleep :)
21:20 mberends masak: \o/
21:20 masak ingy++ and TimToady++ for the % changes.
21:21 masak I approve of all of it... although I'm not sure I think the negative-numbers stuff was worth the extra complexity.
21:21 jnthn o/ masak
21:27 bbkr1 i flagged 9 RT tickets assigned to me as testneeded, feel free to steal if you want to close them faster, as I won't be able to take care of them as planned during weekend :(
21:28 y3llow_ joined #perl6
21:29 pothos_ joined #perl6
21:31 bbkr1 joined #perl6
21:32 pothos_ joined #perl6
21:33 mberends bbkr1: after some testing, I'll be able answer what Gtk libs are needed, not right now. I look forward to testing it soon. Meantime you could try this mostly working Gtk xclock for Niecza: https://gist.github.com/1224163
21:41 bbkr1 testing...
21:46 dukeleto joined #perl6
21:46 dukeleto joined #perl6
21:46 bbkr1 tons of dependencies for gtk-sharp, installing
21:47 dukeleto joined #perl6
21:47 dukeleto joined #perl6
21:47 tadzik good evening
21:47 masak tadzik! \o/
21:48 dukeleto joined #perl6
21:48 jnthn o/ tadzik
21:48 tadzik lol, masak!
21:48 masak lol!
21:48 tadzik and jnthn! lol!
21:48 masak lolnthn!
21:48 dukeleto joined #perl6
21:48 tadzik how are you guys doing?
21:48 * masak <-- giddy, happy, tired
21:49 dukeleto joined #perl6
21:49 * jnthn kinda tired too
21:49 dukeleto joined #perl6
21:50 dukeleto joined #perl6
21:50 * tadzik well-fed, notmuch tired, quite happy
21:50 dukeleto joined #perl6
21:51 dukeleto joined #perl6
21:51 dukeleto joined #perl6
21:51 masak dukeleto: dude, you need an ark of something.
21:51 masak or*
21:52 dukeleto joined #perl6
21:53 dukeleto joined #perl6
21:53 dukeleto joined #perl6
21:54 dukeleto joined #perl6
21:55 dukeleto joined #perl6
21:55 dukeleto joined #perl6
21:56 dukeleto joined #perl6
21:57 dukeleto joined #perl6
21:57 dukeleto joined #perl6
21:58 dukeleto joined #perl6
22:00 dukeleto joined #perl6
22:00 mberends left #perl6
22:04 dukeleto joined #perl6
22:04 dukeleto joined #perl6
22:04 tokuhiro_ joined #perl6
22:04 dukeleto joined #perl6
22:04 masak 'night, channel
22:04 Juerd left #perl6
22:10 mkramer1 left #perl6
22:10 tokuhiro_ joined #perl6
22:11 Ledrug[RCo] joined #perl6
22:16 tokuhir__ joined #perl6
22:28 Sarten-X joined #perl6
22:36 satyavvd joined #perl6
22:40 Woodi rakudo: class Foo::Bar { BEGIN { for <bar baz waz> -> $name { Foo::Bar.HOW.add_method( Foo::Bar, $name, method () { "method for $name" }); } } }; say Foo::Bar.baz
22:40 p6eval rakudo 091c26: OUTPUT«method for baz␤»
22:41 Woodi this don't work on debian rakudo, build with parrot 3.6.0 0
22:42 Woodi means Star 2011.07 ?
22:43 tadzik rakudo: is the development version, not yet released
22:43 p6eval rakudo 091c26: OUTPUT«Could not find sub &version␤  in <anon> at /tmp/oBHMhTwiip:1␤  in <anon> at /tmp/oBHMhTwiip:1␤␤»
22:43 tadzik yeah, right
22:43 tadzik what you have in debian is most probably b:
22:43 tadzik b: class Foo::Bar { BEGIN { for <bar baz waz> -> $name { Foo::Bar.HOW.add_method( Foo::Bar, $name, method () { "method for $name" }); } } }; say Foo::Bar.baz
22:43 p6eval b 1b7dd1: OUTPUT«Method 'baz' not found for invocant of class ''␤  in main program body at line 22:/tmp/k4hI48T8GD␤»
22:43 Woodi other error
22:44 Woodi Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 10
22:44 Woodi rakudo: class Foo::Bar { BEGIN { for <bar baz waz> -> $name { Foo::Bar.HOW.add_method( Foo::Bar, $name, method  { "method for $name" }); } } }; say Foo::Bar.baz
22:44 p6eval rakudo 091c26: OUTPUT«method for baz␤»
22:44 jnthn Only the current (unreleased) development branch has good BEGIN support.
22:44 tadzik that's just a parse error, I'd bet it's not the same code
22:44 jnthn That's one of the things we've drastically improved in the nom refactors.
22:44 Woodi i spend hour looking on that line
22:45 REPLeffect joined #perl6
22:45 Woodi it isn't the same :)
22:57 Woodi rakudo: class Foo::Bar { BEGIN { for <bar baz waz> -> $name { Foo::Bar.HOW.add_method( Foo::Bar, $name, method()  { "method for $name" }); } } }; say Foo::Bar.baz
22:57 p6eval rakudo 091c26: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
22:58 Woodi give me perl5 perl back...
22:58 Woodi stupid space
22:59 d4l3k_ joined #perl6
22:59 Maddingu1 joined #perl6
23:00 JodaZ_ joined #perl6
23:01 kthakore_ joined #perl6
23:01 jdv79_ joined #perl6
23:01 szabgab_ joined #perl6
23:01 tewk_ joined #perl6
23:02 daemon_ joined #perl6
23:02 apejens_ joined #perl6
23:02 TimToady_ joined #perl6
23:02 ruz joined #perl6
23:03 Tene_ joined #perl6
23:03 Tene_ joined #perl6
23:03 wooden_ joined #perl6
23:03 wooden_ joined #perl6
23:03 yath_ joined #perl6
23:08 bbkr joined #perl6
23:08 phenny joined #perl6
23:11 pmichaud joined #perl6
23:11 hugme joined #perl6
23:11 jrockway_ joined #perl6
23:13 pernatiy joined #perl6
23:13 benabik joined #perl6
23:16 jnthn sleep &
23:19 Woodi rakudo: my $a = 2; given $a { when 2, 3 { say "2 or 4" } }
23:19 p6eval rakudo 091c26:  ( no output )
23:19 Woodi rakudo: my $a = 2; given $a { when 2 { say "2 or 4" } }
23:19 p6eval rakudo 091c26: OUTPUT«2 or 4␤»
23:21 TimToady Woodi: earlier you were asking about checking the type of a parameter; the easiest way to do that is to just put the type in the signature along with the parameter
23:23 Woodi so just use ? :)
23:23 sjohnson given technology!
23:24 TimToady sub foo ( $k, Numeric $v ) {...}
23:25 TimToady and if you want to conditionalize on it, that's when you want multi subs
23:25 Woodi now understud
23:26 molaf_ joined #perl6
23:28 Woodi rakudo: my $a = 2; given $a { when 2|3 { say "2 or 3" } }
23:28 p6eval rakudo 091c26: OUTPUT«2 or 3␤»
23:30 Alias joined #perl6
23:35 dorlamm joined #perl6
23:39 pmichaud joined #perl6
23:39 hugme joined #perl6
23:39 jrockway_ joined #perl6
23:43 TimToady phenny: tell masak the negative quantification has been there a long time; it just got relocated to stay near the ** text
23:43 phenny TimToady: I'll pass that on when masak is around.
23:48 Woodi rakudo: sub a() { 1 }; my $r = a() or die;
23:48 p6eval rakudo 091c26:  ( no output )
23:48 Woodi rakudo: sub a() { 0 }; my $r = a() or die;
23:48 p6eval rakudo 091c26: OUTPUT«␤  in <anon> at /tmp/u1Zv8l6sPh:1␤  in <anon> at /tmp/u1Zv8l6sPh:1␤␤»
23:49 TimToady std: method() {...}
23:49 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'method' interpreted as 'method()' function call; please use whitespace around the parens at /tmp/uHKDkEkCO9 line 1:�------> [32mmethod[33m�[31m() {...}[0m�Unexpected block in infix position (two terms in a row) at /tmp/uHKDkEk…
23:49 TimToady Woodi: note that rakudo gives a substandard error there
23:49 Woodi rakudo: sub a() { 0 }; my $r = a() or say( 'die' );
23:49 p6eval rakudo 091c26: OUTPUT«die␤»
23:50 Woodi yes, i wondered what exactly was that.
23:50 Woodi rakudo: sub a() { 1 }; my $r = a() or say( 'die' );
23:50 p6eval rakudo 091c26:  ( no output )
23:51 Woodi just translating from v5;
23:51 TimToady niecza: method() {...}
23:51 p6eval niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0m��Word 'method' interpreted as 'method()' function call; please use whitespace around the parens at /tmp/MSktHY09ty line 1:�------> [32mmethod[33m�[31m() {...}[0m�Unexpected block in infix position (two terms in a row) at /…
23:52 TimToady note that niecza has a more standard parser, so maybe you want to syntax check with niecza, then get it to run under rakudo
23:52 Woodi i will
23:53 Woodi btw. can Perl6 be more user friendly ? :)
23:54 TimToady well, if you can figure out a way to do that, I'm all ears
23:54 TimToady std: say $?
23:54 Woodi 'my' not needed, self!method is harder then .
23:54 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $? variable as child error; in Perl 6 please use $! at /tmp/x1zw1pWca0 line 1:�------> [32msay $?[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 119m�»
23:55 TimToady $!method is not much harder than $.method
23:55 Woodi thats for readability
23:55 ledrug joined #perl6
23:55 Woodi yes, but it is much different then c/c++/perl5
23:55 TimToady unfortunately we can't just have !method :)
23:56 TimToady sometimes different is better, eventually :)
23:56 Woodi i talk only about call !method, not declaration
23:56 Woodi yes
23:56 TimToady you can call it as $!method(args)
23:57 TimToady supposed to be able to, anyway
23:57 uasi joined #perl6
23:57 Woodi but why ! ? :)
23:58 TimToady ran out of characters :)
23:58 Woodi . for calling ?
23:58 TimToady but also it's a mnemonic for negativity, as in "Don't touch!"
23:58 Woodi aha
23:58 Woodi hard to switch mind to perl6
23:59 Woodi so potentially less users...
23:59 TimToady potentially different users
23:59 TimToady we expect to leave some Perl 5 programmers behind, but gain others

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo