Camelia, the Perl 6 bug

IRC log for #perl6, 2010-09-23

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:36 Chillance joined #perl6
00:39 patspam joined #perl6
00:55 Limbic_Region joined #perl6
00:57 Limbic_Region can anyone tell me where the synopses live these days?  They used to be linked on dev.perl.org but not so anymore
00:57 Limbic_Region at least I couldn't find em
00:57 Limbic_Region nevermind - found them
00:58 Limbic_Region had to go to http://www.perl6.org/ and then to http://perlcabal.org/syn/
00:58 \xF0 :D
00:59 \xF0 that's the first google result for me
01:02 diakopter .g me
01:02 phenny diakopter: http://www.me.com/
01:04 \xF0 diakopter: by "me" I mean my legal name, of course, "Perl 6. Synopses"
01:05 ash_ http://try.rakudo.org/ is useful if you want to try out rakudo
01:05 diakopter heh
01:06 Limbic_Region left #perl6
01:07 mjk joined #perl6
01:10 diakopter ...
01:10 diakopter Stub code executed
01:10 diakopter in main program body at line 1
01:10 diakopter Rakudo REPL has closed... restarting
01:10 diakopter ash_: ^^
01:11 diakopter (is that intended?)
01:11 ash_ what input did you put in?
01:11 diakopter ...
01:11 ash_ if you kill rakudo for some reason, it automattically restarts
01:11 ash_ oh, ya, that was a fail
01:11 * diakopter fail
01:12 ash_ rakudo: sub a { ... }; my $a = eval 'a'; say $a.WHAT;
01:12 p6eval rakudo 8156be: OUTPUT«Failure()␤»
01:12 ash_ Failure in the repl closes it
01:12 diakopter oh
01:12 ash_ so it caused the repl to exit, so it got restarted as a result
01:12 diakopter cool
01:13 ash_ rakudo: ...
01:13 p6eval rakudo 8156be:  ( no output )
01:14 diakopter star: ...
01:14 p6eval star 2010.07:  ( no output )
01:14 ash_ my guess is that closed too, but i am not sure
01:14 diakopter std: ...
01:14 p6eval std : OUTPUT«ok 00:01 114m␤»
01:14 ash_ rakudo: die 'foo'
01:14 diakopter std: ... ...
01:14 p6eval rakudo 8156be: OUTPUT«foo␤  in main program body at line 22:/tmp/mSlYdPD3Qm␤»
01:14 p6eval std : OUTPUT«ok 00:02 115m␤»
01:14 diakopter std: ... ... ...
01:14 p6eval std : OUTPUT«ok 00:02 115m␤»
01:20 [hudnix] hmm, so how do a get a method into a variable to call later? $meth = &.whatever isn't doing it.
01:24 synth left #perl6
01:24 ash_ rakudo: sub foo { 'foo' }; my $a = &foo; say $a();
01:24 p6eval rakudo 8156be: OUTPUT«foo␤»
01:25 diakopter yeah but that's not a method
01:25 ash_ it should work the same with methods
01:25 TimToady use .can
01:30 ash_ std: class A { method a { 'a' }; method b { return self.^can('a'); }; }; say A.new.b
01:30 p6eval std : OUTPUT«ok 00:03 116m␤»
01:30 ash_ rakudo: class A { method a { 'a' }; method b { return self.^can('a'); }; }; say A.new.b
01:30 p6eval rakudo 8156be:  ( no output )
01:30 ash_ locally: get_string() not implemented in class 'P6Invocation'
01:31 ash_ rakudo: class A { method a { 'a' } }; say A.^can('a');
01:32 p6eval rakudo 8156be:  ( no output )
01:32 Chillance left #perl6
01:33 thowe joined #perl6
01:34 [hudnix] rakudo: class A {method a {'a'}; method b {my $meth = &.a; say self.$meth}} say A.new.b # my best shot at it
01:34 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "class A {m"␤»
01:37 [hudnix] rakudo: class A {method a {'a'}; method b {my $meth = &.a; say self.$meth}}; say A.new.b
01:37 p6eval rakudo 8156be: OUTPUT«invoke() not implemented in class 'Perl6Str'␤  in 'A::b' at line 22:/tmp/IutXhfVZr4␤  in main program body at line 22:/tmp/IutXhfVZr4␤»
01:38 ash_ rakudo: class A { method a { 'a' }; method b { -> { self.a } }; }; say A.new.b.();
01:38 p6eval rakudo 8156be: OUTPUT«a␤»
01:39 [hudnix] sure, but that's just aliasing one method to another
01:39 TimToady rakudo: class A { method a { 'a' } }; say A.^can('a')(A)
01:40 p6eval rakudo 8156be: OUTPUT«a␤»
01:40 leprevost left #perl6
01:40 ash_ ah, i guess thats what i was doing wrong
01:41 TimToady well, it was returning something weird and parroty that only works by calling it, I guess
01:41 ash_ ah
01:42 diakopter rakudo: class A { method a { 'a' } }; say A.^can('a').PARROT
01:42 p6eval rakudo 8156be: OUTPUT«Method 'PARROT' not found for invocant of class 'P6Invocation'␤  in main program body at line 22:/tmp/l0q0Mxo9Ub␤»
01:43 [hudnix] rakudo: class A { method a { 'a' } method b {my $meth = self.^can('a'); say self.$meth}}; say A.new.b
01:44 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
01:44 diakopter need ;
01:44 [hudnix] rakudo: class A { method a { 'a' }; method b {my $meth = self.^can('a'); say self.$meth}}; say A.new.b
01:44 p6eval rakudo 8156be: OUTPUT«a␤1␤»
01:45 [hudnix] rakudo: class A { method a { 'a' }; method b {my $meth = self.^can('a'); say self.$meth}}; A.new.b
01:45 p6eval rakudo 8156be: OUTPUT«a␤»
01:45 [hudnix] ok
01:51 molaf left #perl6
01:52 mikehh left #perl6
01:52 ash_ rakudo: class A { method a { 12 }; method b { return self.^can('a').assuming(self) }; }; my $a = A.new.b
01:52 p6eval rakudo 8156be: OUTPUT«Method 'assuming' not found for invocant of class 'P6Invocation'␤  in 'A::b' at line 22:/tmp/8K_MOysCY4␤  in main program body at line 22:/tmp/8K_MOysCY4␤»
01:53 ash_ that seems kinda leaky
01:54 [hudnix] is is there going to be a more robust way to do that sort of thing? a run-time lookup of a stringified method name isn't very appealing.
01:56 ash_ std: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); say $b();
01:56 p6eval std : OUTPUT«ok 00:03 123m␤»
01:57 ash_ rakudo: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); say $b();
01:57 p6eval rakudo 8156be: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
01:57 ascent_ left #perl6
01:57 ash_ something like that might work one day
01:57 ash_ i am not sure where the Null PMC access is coming from
01:57 ash_ rakudo: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); say $b.WHAT
01:57 p6eval rakudo 8156be: OUTPUT«Code()␤»
01:59 TimToady rakudo: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); say $b()
01:59 p6eval rakudo 8156be: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
01:59 TimToady &A::b doesn't name method b
01:59 TimToady not unless you intentionally poke its name into the package namespace
01:59 TimToady rakudo: class A { our method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); say $b()
01:59 p6eval rakudo 8156be: OUTPUT«b␤»
01:59 TimToady like that
02:00 ash_ ah
02:00 ash_ hmm
02:00 TimToady but that's considered smelly
02:00 ash_ well, i tried :P i duno any way to make that 'prettier'
02:01 TimToady use .can, it's the way that knows about inheritance
02:01 ash_ rakudo: say "foo".^methods<split>
02:01 p6eval rakudo 8156be:  ( no output )
02:02 ash_ is there a reason to return an array of methods instead of a hash of methods?
02:03 ruoso joined #perl6
02:03 ash_ rakudo: "foo".^methods.grep(* eq 'split').say
02:03 molaf joined #perl6
02:03 p6eval rakudo 8156be: OUTPUT«split␤»
02:04 TimToady a hash might make more sense; I could argue it either way
02:05 ash_ its not that much work to find what i am looking for with an array
02:06 ash_ but a hash seems to make sense, to me anyway
02:10 synth joined #perl6
02:10 leprevost joined #perl6
02:12 mjk left #perl6
02:20 ggoebel joined #perl6
02:27 meppl left #perl6
02:27 ggoebel left #perl6
02:39 ash_ i think i fixed the leaky method? maybe... i am testing it
02:54 ash_ nope
02:54 ash_ this is weird, it doesn't complain about some methods, like ones on core objects
02:54 ash_ rakudo: say "foo".can("split");
02:54 p6eval rakudo 8156be: OUTPUT«split␤»
02:54 ash_ rakudo: class A { method a { 1 }}; say A.can("a");
02:54 p6eval rakudo 8156be:  ( no output )
02:55 ash_ returns: get_string() not implemented in class 'P6Invocation' locally
03:08 ash_ left #perl6
03:18 cdarroch left #perl6
03:18 ash_ joined #perl6
03:20 ash__ joined #perl6
03:21 ash_ left #perl6
03:21 ash__ is now known as ash_
03:22 mantovani left #perl6
03:25 envi^home joined #perl6
03:26 ash_ rakudo: class A { multi method a { 1 } }; say A.can('a');
03:27 p6eval rakudo 8156be:  ( no output )
03:52 DemoFreak left #perl6
03:58 patspam left #perl6
04:03 DemoFreak joined #perl6
04:13 qw3rty joined #perl6
04:13 qw3rty hi all
04:13 qw3rty i was browsing a message board and saw this code....
04:14 qw3rty for 1..60 -> $n { say "n=$n"; for 1..$n { $n %% $^a ?? say "\t$a/" ~ $n/$a !! 0 } }
04:14 ash_ rakudo: for 1..60 -> $n { say "n=$n"; for 1..$n { $n %% $^a ?? say "\t$a/" ~ $n/$a !! 0 } }
04:14 p6eval rakudo 8156be: OUTPUT«(timeout)n=2␤      1/2␤      2/1␤n=3␤  1/3␤      3/1␤n=4␤   1/4␤     2/2␤      4/1␤n=5␤  1/5␤      5/1␤n=6␤  1/6␤      2/3␤      3/2␤      6/1␤n=7␤  1/7␤      7/1␤n=8␤  1/8␤      2/4␤     4/2␤     8/1␤n=9␤    1/9␤    3/3␤      9/1␤n=10␤   1/10␤    2/5␤     5/2␤      10/1␤n=11␤
04:14 p6eval ..1/11␤     11/1␤n=12␤ 1/12␤     2/6␤      3/4␤    4/3␤      6/2␤      12/1␤n=13␤        1/13␤     13/1␤n=14␤ 1/14␤    2/7␤      7/2␤     14/1␤n=15␤ …
04:14 qw3rty i understand most of it except the $^a part...
04:14 ash_ thats a placeholder variable
04:14 qw3rty what is $â
04:14 qw3rty like $_ ?
04:15 ash_ um...
04:15 ash_ -> $a, $b { } # takes 2 params, a and b right?
04:15 qw3rty right
04:15 ash_ { $^a + $^b } # also takes 2 params
04:16 eternaleye joined #perl6
04:16 ash_ in this case they are called $^a and $^b
04:16 ash_ or, depending on how fancy you want to be, you can just use *
04:16 ash_ and say: * + *
04:16 ash_ rakudo: my &a = * + *; say a(1, 2);
04:16 qw3rty so that part could have been written    for 1..$n -> $a { ... ??
04:16 p6eval rakudo 8156be: OUTPUT«3␤»
04:17 ash_ ya
04:17 qw3rty ahh i see...
04:18 qw3rty rakudo: for 1..60 -> $n { say "n=$n"; for 1..$n -> $a { $n %% $a ?? say "\t$a/" ~ $n/$a !! 0 } }
04:18 p6eval rakudo 8156be: OUTPUT«(timeout)n=2␤      1/2␤      2/1␤n=3␤  1/3␤      3/1␤n=4␤   1/4␤     2/2␤      4/1␤n=5␤  1/5␤      5/1␤n=6␤  1/6␤      2/3␤      3/2␤      6/1␤n=7␤  1/7␤      7/1␤n=8␤  1/8␤      2/4␤     4/2␤     8/1␤n=9␤    1/9␤    3/3␤      9/1␤n=10␤   1/10␤    2/5␤     5/2␤      10/1␤n=11␤
04:18 p6eval ..1/11␤     11/1␤n=12␤ 1/12␤     2/6␤      3/4␤    4/3␤      6/2␤      12/1␤n=13␤        1/13␤     13/1␤n=14␤ 1/14␤    2/7␤      7/2␤     14/1␤n=15␤ …
04:18 qw3rty thanks :)
04:19 ash_ http://perlcabal.org/syn/S06​.html#Placeholder_variables
04:19 ash_ has more details, if you don't mind reading technical stuff
04:19 * plobsing wonders if locale-based collation order can change how placeholders are arranged
04:20 mantovani joined #perl6
04:20 ash_ rakudo: my $a = { my $b = $^b + $^c; say "b: $b ^b: $^b ^c: $^c" }; $a(1, 2);
04:20 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Multiple declarations of lexical '$b'␤␤»
04:21 ash_ :-\
04:21 ash_ std: my $a = { my $b = $^b + $^c; say "b: $b ^b: $^b ^c: $^c" }; $a(1, 2);
04:21 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤$b has already been used as a non-placeholder in the surrounding block,␤  so you will confuse the reader if you suddenly declare $^b here at /tmp/WMcTvXD30R line 1:␤------> [32mmy $a = { my $b = $^b[33m⏏[31m + $^c; say "b: $b ^b: $^b ^c: $^c" }; $…
04:21 ash_ hmm
04:21 ash_ i think some of the spec might be out of date on that... or std is from the future
04:22 ash_ rakudo: my $a = { say "$^b" }; $a(1)
04:22 p6eval rakudo 8156be: OUTPUT«1␤»
04:23 ash_ std: 'a'..'zzz'
04:23 p6eval std : OUTPUT«ok 00:02 116m␤»
04:24 plobsing the spec says placeholders are sorted in "unicode order". how does that deal with combined characters that don't have a single codepoint?
04:24 qw3rty rakudo: my $funk = { my @val = @^placeholder; say [+]@val }; $funk(<1 2 3>);
04:24 p6eval rakudo 8156be: OUTPUT«6␤»
04:24 qw3rty :D
04:24 qw3rty rakudo: my $funk = { my @val = @^placeholder; say [+]@val }; $funk(1, 2, 3);
04:24 p6eval rakudo 8156be: OUTPUT«Nominal type check failed for parameter '@placeholder'; expected Positional but got Int instead␤  in <anon> at line 22:/tmp/wTSe6rZ1AE␤  in main program body at line 22:/tmp/wTSe6rZ1AE␤»
04:26 qw3rty rakudo: my $funk = { my @val = @^placeholder; say [+]@val }; $funk(1);
04:26 ash_ rakudo: my $fn = { say [+] @^v }; $funk <1 2 3>;
04:26 p6eval rakudo 8156be: OUTPUT«Nominal type check failed for parameter '@placeholder'; expected Positional but got Int instead␤  in <anon> at line 22:/tmp/EDwC0_0snc␤  in main program body at line 22:/tmp/EDwC0_0snc␤»
04:26 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "$funk <1 2"␤»
04:27 ash_ rakudo: my $fn = { say [+] @^v }; $funk(1..3);
04:27 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Symbol '$funk' not predeclared in <anonymous> (/tmp/9WOFbigMCe:22)␤»
04:27 ash_ rakudo: my $fn = { say [+] @^v }; fn(1..3);
04:27 p6eval rakudo 8156be: OUTPUT«Could not find sub &fn␤  in main program body at line 22:/tmp/AdqC0KkwQb␤»
04:27 * ash_ can't type currently o.0
04:27 plobsing rakudo: my &fn = { say [+] @^v }; fn(1..3);
04:27 p6eval rakudo 8156be: OUTPUT«6␤»
04:27 ash_ rakudo: my $fn = { say [+] @^v }; $fn(1..3);
04:27 p6eval rakudo 8156be: OUTPUT«6␤»
04:28 ash_ plobsing: i have no idea how sorting of unicode works
04:29 qw3rty rakudo: my $fn = { say [+] @^v }; $fn(1,1,3,5,8);
04:29 p6eval rakudo 8156be: OUTPUT«Nominal type check failed for parameter '@v'; expected Positional but got Int instead␤  in <anon> at line 2:/tmp/4Z7fJ3xR1Q␤  in main program body at line 22:/tmp/4Z7fJ3xR1Q␤»
04:29 qw3rty rakudo: my $fn = { say [+] @^v }; $fn(1,2,4,8..100);
04:29 p6eval rakudo 8156be: OUTPUT«Nominal type check failed for parameter '@v'; expected Positional but got Int instead␤  in <anon> at line 2:/tmp/dBbcIGGzOB␤  in main program body at line 22:/tmp/dBbcIGGzOB␤»
04:29 qw3rty rakudo: my $fn = { say [+] @^v }; $fn( (1,2,4,8..100) );
04:29 p6eval rakudo 8156be: OUTPUT«5029␤»
04:29 plobsing ash_: when dealing with humans, it is usually appropriate to sort based on a culturally-varying "collation order". But I assume "unicode order" means by asscending codepoint.
04:30 plobsing problem is, sorting by codepoint goes against the perlish notion of using glyphs by default.
04:31 ash_ rakudo: my $fn = { say [+] @^v }; $fn( 1, 1, * + * ... 21 ); # 1 to 21 in fib added together
04:31 plobsing but there is no unique sort order over glyphs.
04:31 p6eval rakudo 8156be: OUTPUT«54␤»
04:31 plobsing However, I could be completely wrong on this point.
04:31 plobsing We'd better ask someone who knows unicode better.
04:31 qw3rty rakudo: my $fn = { say [+] @^ñ }; $fn(1..3);
04:32 p6eval rakudo 8156be: OUTPUT«6␤»
04:32 plobsing or the spec better. preferably both.
04:32 ash_ rakudo: say å..∫
04:32 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "say \x{e5}..\u222b"␤»
04:33 xinming left #perl6
04:33 ash_ ya, that could get confusing if you use unicode heavily in your block
04:34 plobsing rakudo: my $fn = { say ^ñ - ^n }; $fn(1, 2);
04:34 p6eval rakudo 8156be: OUTPUT«Too many positional parameters passed; got 2 but expected between 0 and 1␤  in <anon> at line 2:/tmp/meuRCm5lBL␤  in main program body at line 22:/tmp/meuRCm5lBL␤»
04:34 xinming joined #perl6
04:34 plobsing rakudo: my $fn = { say $^ñ - $^n }; $fn(1, 2);
04:35 p6eval rakudo 8156be: OUTPUT«1␤»
04:41 qw3rty here's the original problem for the line i posted "Create an ordered list of fractions which product of the numerator and denominator equals a specific integer n.
04:41 qw3rty ex: n=60
04:41 qw3rty 1/60, 2/30, 3/20, 4/15, 5/12, etc....
04:41 qw3rty then do it with a list of integers."
04:49 jaldhar left #perl6
04:52 ash_ left #perl6
04:54 jaldhar joined #perl6
05:00 justatheory left #perl6
05:01 qw3rty left #perl6
05:05 frodwith left #perl6
05:07 leprevost left #perl6
05:08 leprevost joined #perl6
05:29 avuserow rakudo: sub foo {say "$^b $^a"}; foo(1, 2);
05:29 p6eval rakudo 8156be: OUTPUT«2 1␤»
05:31 avuserow rakudo: sub foo {say "$^b $^a $^b"}; foo(1, 2);
05:31 p6eval rakudo 8156be: OUTPUT«2 1 2␤»
05:31 nymacro left #perl6
05:45 Guest23195 joined #perl6
05:52 leprevost left #perl6
06:03 sorear good * #perl6
06:04 araujo hi sorear
06:04 araujo :)
06:05 sorear std: say $^á
06:05 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Placeholder variable $^á may not be used outside of a block at /tmp/oDi_Y0lUFU line 1:␤------> [32msay $^á[33m⏏[31m<EOL>[0m␤Check failed␤FAILED 00:01 116m␤»
06:07 wtw joined #perl6
06:26 Su-Shee joined #perl6
06:26 Su-Shee good morning.
06:31 araujo left #perl6
06:33 moritz_ good morning
06:47 nymacro joined #perl6
06:47 plobsing left #perl6
06:50 mberends joined #perl6
07:01 dalek 6model: 50c3af1 | mberends++ | java/runtime/Rakudo/Init.java:
07:01 dalek 6model: [Init.java] tidying the source code
07:01 dalek 6model: review: http://github.com/jnthn/6model/commit/5​0c3af1c12e40cb7bd2781956c9df114269af1a7
07:11 Ross joined #perl6
07:11 Ross left #perl6
07:11 Ross joined #perl6
07:17 Ross left #perl6
07:21 Ross joined #perl6
07:21 Ross left #perl6
07:21 Ross joined #perl6
07:23 qwebirc81609 joined #perl6
07:31 Ross left #perl6
07:48 qwebirc81609 left #perl6
07:49 qwebirc21296 joined #perl6
07:58 thowe left #perl6
08:21 araujo joined #perl6
08:29 ascent_ joined #perl6
08:34 dakkar joined #perl6
08:36 nymacro left #perl6
08:44 nymacro joined #perl6
08:48 wamba joined #perl6
08:48 wamba left #perl6
08:49 envi_home joined #perl6
08:50 envi^home left #perl6
08:51 wamba joined #perl6
08:57 svetlins left #perl6
09:18 tadzik joined #perl6
09:18 tadzik good morning
09:25 tadzik http://trac.parrot.org/parrot/changeset/49269 -- wow, makes me feel like bumping PARROT_REVISION
09:32 svetlins joined #perl6
09:37 betterworld How can I have two modules use one another and avoid endless recursion?
09:42 betterworld if I create A.pm with the contents "use B; module A;" and B.pm similar, then rakudo dies of "maximum recursion depth exceeded"
09:42 betterworld if I swap "use" and "module", it dies of "Illegal redeclaration of symbol 'A'"
09:46 tadzik duh, it's up to 33% faster with the latest Parrot revision
10:00 Guest23195 left #perl6
10:02 moritz_ tadzik: wait a day until after release
10:02 tadzik so we're going for 2.8.0 for the release?
10:03 moritz_ sure
10:03 moritz_ we're always targeting parrot releases
10:03 moritz_ we still need a release name... suggestions?
10:03 tadzik the hardest part
10:08 ggoebel joined #perl6
10:08 masak joined #perl6
10:09 masak hello, 6ers.
10:09 svetlins left #perl6
10:09 moritz_ oh hai masak
10:10 tadzik hello masak
10:11 masak rakudo: enum A::B <a b c>; say b
10:11 p6eval rakudo 8156be:  ( no output )
10:11 masak :(
10:11 masak thought I could close http://rt.perl.org/rt3/Tic​ket/Display.html?id=71460
10:12 moritz_ rakudo: enum A::B <a b c>; say b.WHAT
10:12 p6eval rakudo 8156be: OUTPUT«Failure()␤»
10:13 moritz_ std: 123b
10:13 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Whitespace is required between alphanumeric tokens at /tmp/8Zk7lTSUX1 line 1:␤------> [32m123[33m⏏[31mb[0m␤Two terms in a row at /tmp/8Zk7lTSUX1 line 1:␤------> [32m123[33m⏏[31mb[0m␤    expecting any of:␤       POST␤   bracketed infix␤   infix or
10:13 p6eval ..meta-i…
10:13 moritz_ std: a::123b
10:13 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/BTVYOetk6z line 1:␤------> [32ma::[33m⏏[31m123b[0m␤    expecting any of:␤     POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier
10:13 p6eval ..loop␤Undeclared routine:␤      'a:…
10:14 moritz_ in perl 5 that was allowed
10:14 sftp joined #perl6
10:16 moritz_ http://www.perlmonks.org/?node_id=861457 # my continued perlmonks trolling :-)
10:17 tadzik that may make people say "Perl 5" when they mean Perl 5
10:18 tadzik "Dear Perlmonks, how do I bla bla bla **IN PERL 5**"
10:18 moritz_ right; if they ask for perl 5, I won't give Perl 6 answers (unless somebody else asks for other inspiration)
10:20 tadzik moritz_: Math-Rungekutta has failing tests
10:21 moritz_ :(
10:22 moritz_ tadzik: thanks for the notification... did you clean out all .pir files before trying?
10:22 tadzik moritz_: let me check
10:22 masak ooh, NPW in Reykjavik in November! http://events.linkedin.com/Nordi​c-Perl-Workshop-2010/pub/257403
10:22 masak tempting, very tempting...
10:23 tadzik moritz_: yep, alike on the fresh clone
10:23 Su-Shee masak: because the workshop might last 4 weeks due to volcano activity? ;)
10:24 tadzik :D
10:24 masak Su-Shee: that's only part of the allure :)
10:24 daxim joined #perl6
10:24 tadzik moritz_: I'm doing smoketesting and I was feeling bad for Math-Model not being ok :)
10:25 moritz_ right, if M::RK fails, Math::Model can't work
10:26 Su-Shee masak: hmmm.. darkness, rain and HOT BATHS...
10:26 masak Su-Shee: I hear the Icelanders are stern, yet sensual.
10:27 moritz_ tadzik: seems to be a problem in the test, not the actual module code
10:27 tadzik moritz_: yep
10:27 * moritz_ wipes the sweat off his forehead
10:28 moritz_ fix pushed
10:28 tadzik time is not a function?
10:28 tadzik or can't be used as such?
10:28 moritz_ nope, it's a term
10:29 tadzik huh
10:29 tadzik rakudo: say time.WHAT
10:29 p6eval rakudo 8156be: OUTPUT«Int()␤»
10:29 moritz_ which allows you to write time - 3  and have it not mean time(-3)
10:29 tadzik bah, that wasn't smart
10:29 tadzik that was changed recently, no?
10:29 masak <TimToady> :D is the P6 equivalent to Haskell's 'just' types
10:29 moritz_ right
10:29 * masak reaches enlightenment
10:30 masak nice.
10:31 tadzik sounds nice, shame I don't know what is it about :)
10:38 Guest23195 joined #perl6
10:48 ruoso left #perl6
10:48 nymacro left #perl6
11:08 gfldex rakudo: my $a = "abc"; say $a.list[0];
11:08 p6eval rakudo 8156be: OUTPUT«abc␤»
11:09 gfldex is that intentional?
11:10 nymacro joined #perl6
11:11 Trashlord left #perl6
11:14 Trashlord joined #perl6
11:16 tadzik and how should it be?
11:16 tadzik rakudo: my $a = "abc"; $a.list.perl.say
11:16 p6eval rakudo 8156be: OUTPUT«("abc")␤»
11:17 gfldex confused haskell folks will be confused
11:17 gfldex and not just them :)
11:18 tadzik C folks too :)
11:19 dju left #perl6
11:19 dju_ joined #perl6
11:19 dju_ left #perl6
11:19 dju_ joined #perl6
11:37 plobsing joined #perl6
11:38 meppl joined #perl6
11:42 PacoLinux left #perl6
11:46 kjeldahl joined #perl6
11:55 masak gfldex: yes; intentional.
11:56 gfldex can't we just get rid of scripts that don't do one thing after another? :->
11:57 tadzik hm?
11:57 masak rakudo: my $a = "abc"; say $a[0];
11:57 p6eval rakudo 8156be: OUTPUT«abc␤»
11:57 gfldex my point is if the worlds would be optimised for programmers, it would be much easier to avoid bugs :)
11:57 tadzik postcircumfix<[ ]> won't be bad on Strings
11:57 gfldex you can't do that
11:58 gfldex there are languages that do fairly funcy things when written
11:58 masak tadzik: I don't think postcircumfix:<[ ]> for indexing strings is negotiable.
11:58 moritz_ gfldex: well, at least we write a programming language that's optimized for the programmer (and not for the compiler writer, as is the case with C)
11:58 masak tadzik: there's nothing to stop you from making a lexical pragma that does that, though.
11:58 tadzik why not?
11:58 tadzik or just augment Str, no?
11:59 moritz_ augmenting types is a global operation
11:59 moritz_ which can break other people's code
11:59 tadzik well, yes
11:59 masak but I bet the effect of the pragma could be made local.
11:59 gfldex tadzik: what if that string is a stream that does not support rewind in any case?
11:59 tadzik but who does Str[x] anyway? :)
12:00 moritz_ tadzik: the whole concept of Perl 6 is to see scalars and one-item lists as identical
12:00 tadzik String being a Stream?
12:00 moritz_ that's why <foo bar> returns a List of Str, but <foo> a plain Str
12:00 envi_home left #perl6
12:00 envi^home joined #perl6
12:00 tadzik mhm
12:00 moritz_ so if you do <foo bar>[0], you get foo
12:00 moritz_ and if you do <foo>[0], you also get foo
12:01 moritz_ unless you introduce string indexing, in which case you'll get 'f'
12:01 moritz_ but that only makes sense, if you distinguish one-element lists from single items
12:01 moritz_ and do it throughout the whole language
12:03 masak moritz_++ # explanation
12:03 masak what moritz_ said.
12:07 moritz_ tadzik: as another data point: in perl 5, reverse() in list context reverses lists, in scalar context reverses strings
12:07 moritz_ so
12:07 moritz_ print reverse("foo");  # prints foo
12:08 moritz_ in Perl 6, we had a very similar case: it did list reversing when a list was passed, and string reversion when a single string was passed
12:09 moritz_ 90% of the tests for reverse() were about picking those two cases apart, finding corner cases etc.
12:09 moritz_ now we have flip() for string reversal, and I could delete all those edge-case-checking tests - the language got a lot simpler
12:10 masak and invert() for hash reversal. made things simpler and more expressive.
12:10 moritz_ in my view, string indexing being done by substr() instead of .[] is a similar case of language simplification: if two operations don't do the same thing (even if it looks like the same at first sight),
12:10 moritz_ ... give them different names.
12:11 moritz_ it really makes things easier
12:12 * moritz_ should turn that into a blog post
12:12 tadzik good idea
12:13 moritz_ for the "people of perl 6" interview, chromatic asked for a moment of ephiphany with Perl 6. In retrospect, the reverse -> reverse/flip/invert split was a (late) moment of epiphany
12:13 moritz_ because it really carried the right ideas further than previously thought
12:15 masak I have a blog post about that. hold on.
12:15 * mathw likes that split
12:16 masak http://strangelyconsistent.org/blog/th​e-taming-of-the-newbie-a-comedy-on-irc
12:16 moritz_ I know you do. I remember a hackernews discussion about it.
12:17 masak me too. can't find that discussion right now, though.
12:18 masak ah -- here: http://news.ycombinator.com/item?id=1064622
12:18 masak first occasion of ddg failing and Google finding something for me.
12:19 * moritz_ likes the ddg results when searching for 'perl 6'
12:19 Juerd masak: I think that in p5, localtime is a better target for explaining context
12:19 masak Juerd: I bet it is.
12:19 Juerd In efnet #perlhelp I used to explain localtime when someone asked about reverse.
12:19 masak Juerd: but localtime didn't figure in my path to learning about context. reverse did.
12:20 Juerd Just saying that if you ever need to explain it to someone, localtime is easier :)
12:20 * moritz_ thinks that localtime() is another great example where it's much more intuitive to return smart objects than to be context sensitive
12:20 Juerd moritz_: Definitely.
12:20 masak Juerd: I'll remember that. I'm coaching a younger Perl student right now, so I'll have use for it. thanks.
12:20 Juerd If only Perl <5 had objects... :)
12:21 nymacro masak: Nice blog post; I can relate. Only difference is I still feel stupid ;D
12:21 masak nymacro: no difference there; I feel stupid all the time :D
12:22 Juerd Well, I feel stupider than you do!!1
12:24 tadzik oh, Juerd. How do I run PSGI apps on feather?
12:25 Juerd I don't know what PSGI is
12:25 ruoso joined #perl6
12:26 Juerd But my honest guess would be that you run it on feather exactly the same way you'd run it on any other linux box
12:26 mathw good answer!
12:27 Juerd I can't say the description on its website is very helpful:
12:27 Juerd Superglue interface between perl web application frameworks and web servers, just like Perl is the duct tape of the internet.
12:27 Juerd PSGI is an interface between Perl web applications and web servers, and Plack is a Perl module and toolkit that contains PSGI middleware, helpers and adapters to web servers.
12:27 Juerd Oh, middleware! And it's an interface, sitting in between things.
12:27 Juerd Right. But what does it DO!
12:27 masak :)
12:27 masak it middles in other applications' affairs.
12:28 Juerd And the "Getting started" goes no further than installing the thing
12:28 Juerd Which is interesting. Apparently you install it and then get back to work, or something.
12:29 Juerd s/Getting/Get/
12:29 daxim you know like catalyst has adapters for apache1, apache2, fastcgi and so on?  and any other framework would need to reimplement those adapters all over again?
12:29 daxim this piece is standardised in PSGI, Plack is the name of an implementation of that standard
12:29 daxim makes sense?
12:30 Juerd So it's an adapter adapter?
12:30 daxim no, it's a standard adapter
12:30 Juerd Which you'd then need another adapter for
12:30 Juerd Or do frameworks like Catalyst now ship without the other ones?
12:31 moritz_ no, but future frameworks can get away with only one adapter
12:31 daxim not switched over yet
12:31 moritz_ mojo and catalyst are older than Plack/PSGI
12:43 tadzik bah
12:44 tadzik Juerd: I need feather.perl6.nl/~tjs/ to be forwarded to some local deamon listetning on a port
12:45 Juerd That won't happen
12:45 Juerd However, if it's going to be a full and maintained website, I could forward or even reverse-proxy a subdomain
12:46 tadzik so the only way is CGI?
12:47 moritz_ tadzik: read again what Juerd wrote
12:49 redicaps joined #perl6
12:49 redicaps left #perl6
12:51 tadzik so what defines "full and maintained website"?
12:52 tadzik that sounds scary said after "forwarding won't happen"
12:53 Juerd In all other cases, use the port number in the URL: http://feather.perl6.nl:8002/
12:53 moritz_ that = "feather.perl6.nl/~tjs/ to be forwarded", not "forwarding in general"
12:54 tadzik oh, ok
12:54 Juerd But no, no ~ thing will be forwarded in the central apache config. You could, of course, use an index.html that redirects :)
12:54 tadzik right
12:54 Juerd But apache config changes are made only for actual websites or projects, not for development and playing :)
12:55 tadzik what about both? :)
12:57 grew left #perl6
12:57 tadzik or whatever, I was afraid that ports might be blocked from the outside world
12:57 Juerd Not ot feather
12:57 grew joined #perl6
12:58 Juerd s/ot/on/
12:58 plobsing left #perl6
12:58 plobsing joined #perl6
13:00 NordQ joined #perl6
13:02 _sri moritz_: mojolicious ships with psgi support out of the box these days, but it's unlikely we'll ever standardize entirely on it
13:03 plobsing left #perl6
13:04 _sri the web of the future will be built with persistent streams, not the request/response model
13:05 florz which is horrible, indeed
13:05 masak the request/response model isn't going away anytime soon.
13:06 _sri nope, but it will become much less important
13:06 _sri more like a handshake (as in websockets)
13:06 masak it works very well for a large number of sites out there.
13:07 masak not everyone will make the switch.
13:07 florz _sri: any ideas how to stop that from happening?
13:07 _sri florz: it is already in motion
13:07 florz yeah, that's how I know it's a horrible idea
13:07 _sri just look at what the mozilla labs and apple are cooking
13:08 _sri one thing i'm afraid of is that javascript becomes a requirement on the server side
13:09 florz in particular calling it "the web", given that it lacks all of what defines "the web"
13:09 _sri lots of experimenting with server side DOMs atm, that sync to the browser....thats really scary stuff
13:10 florz it's more of a remote GUI protocol, I'd say, not much about documents at all anymore
13:10 _sri yes, streaming dom events
13:10 _sri javascript people keep begging for it to happen :S
13:11 _sri it would lock out basically everything else
13:11 moritz_ masak: and with "works really well" you mean "we're so used to the workarounds and limitations that we barely notice them anymore"?
13:12 _sri websockets are awesome, because perl can support them well
13:12 masak moritz_: no; I mean, sometimes I don't need a webpage to be dynamic.
13:12 moritz_ masak: right; but those that are dynamic are often a huge pile of workarounds
13:12 florz workarounds around non-existent problems, to be exact
13:12 _sri not like ajax made the web worse
13:13 masak moritz_: oh, I don't doubt that web sockets will make things better for those power users.
13:13 moritz_ I mean, take any typical web 2.0 web app
13:13 _sri it's the next ajax wave
13:13 moritz_ and check the back button works as it should
13:13 florz _sri: missing irony indicators? =:-)
13:13 _sri florz: :)
13:13 moritz_ I know just one (gmail) where it works properly. All others are a huge FAIL in that regard
13:13 florz ... :-)
13:14 _sri btw. anyone working on javascript for parrot yet?
13:14 masak didn't always work in Gmail either. it was redesigned at some point to have it work right.
13:14 _sri being able to mix perl6 and javascript could turn out to be a killer feature in a few years
13:14 florz and it's not just the back button - it's essentially the whole navigation model of hypertext that's thrown overboard
13:14 moritz_ florz: correct
13:15 moritz_ wow, somebody inventing a meta object protocol for PHP: http://dhotson.tumblr.com/post/1167021666/​php-object-oriented-programming-reinvented
13:15 masak rakudo: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a) # from backlog
13:15 p6eval rakudo 8156be:  ( no output )
13:16 masak rakudo: class A { method b { 'b' } }; my $a = A.new; my $b = &A::b.assuming($a); $b()
13:16 p6eval rakudo 8156be: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
13:16 moritz_ LTA error
13:16 florz instead making the browser an execution environment for completely inconsistent user interfaces - which people build in the belief of improving on what the browser does
13:16 masak rakudo: class A { method b { 'b' } }; my $a = A.new; &A::b.assuming($a)()
13:16 p6eval rakudo 8156be: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
13:16 masak rakudo: class A {}; my $a = A.new; &A::b.assuming($a)()
13:16 p6eval rakudo 8156be: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
13:16 _sri gotta love the acronym PHP Object Oriented Programming
13:16 * masak submits rakudobug
13:16 moritz_ rakudo: class A { our method b { 'b' } }; my $a = A.new; &A::b.assuming($a)()
13:16 florz heh :-)
13:16 p6eval rakudo 8156be:  ( no output )
13:17 Patterner left #perl6
13:17 moritz_ &A::b won't work for has-scoped methods
13:17 patspam joined #perl6
13:17 masak ash_++ and TimToady++ for discovering it.
13:18 Psyche^ joined #perl6
13:18 Psyche^ is now known as Patterner
13:19 tadzik left #perl6
13:20 _sri guess javascript on parrot could turn out to be a huge reality shock
13:21 _sri considering the surreal amount of optimizations in v8 and friends
13:22 masak moritz_: right. that's by spec. I kinda like the division between my/our/has.
13:23 [Coke] _sri: in that it would be slow? No, I don't think anyone would be shocked.
13:23 [Coke] <-- parrot guy.
13:24 Holy_Cow joined #perl6
13:24 _sri [Coke]: ah, so far my impression has been that parrot folks are a bit more shy about that :)
13:24 PerlJam _sri: take new impressions :)
13:25 moritz_ _sri: there are parrot guys and parrot guys.
13:25 * _sri will gladly accept new ones
13:25 moritz_ _sri: typically those that work only on parrot have different opinions than those working on languages on parrot (and often on parrot itself too)
13:28 nymacro moritz_: no parrot girls?
13:29 moritz_ nymacro: I know of one parrot "girl" (woman, actually). She has yet another view.
13:31 nymacro so where are all the cute Perl 6 girls at then?
13:31 moritz_ interesting views, but sometimes it's hard for me to map them to same reality as I see
13:31 PerlJam moritz_: she's got operating systems and python on the brain  :)
13:31 timbunce joined #perl6
13:31 moritz_ nymacro: all over the world, I hope
13:32 nymacro heres to hoping
13:32 * moritz_ 's wife sometimes wears the camelia t-shirt, and has asked if there's a baby cloth variant of it :-)
13:32 nymacro nice catch ;)
13:34 qwebirc21296 left #perl6
13:35 * PerlJam sees that chromatic was in good humor yesterday
13:37 NordQ left #perl6
13:37 NordQ joined #perl6
13:39 NordQ left #perl6
13:43 moritz_ another other deprecations for the 2010.11 release, besides Bool stringifcation?
13:49 LoRe left #perl6
13:50 dalek rakudo: 08317ed | moritz++ | docs/announce/2010.09:
13:50 dalek rakudo: [release] mention "now" and "time" being terms; deprecation notice for Bool stringification
13:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​8317edb1fdefbe9a89c37179442785fa1271300
13:50 PacoLinux joined #perl6
13:51 LoRe joined #perl6
13:53 LoRe left #perl6
13:56 pjcj joined #perl6
13:58 wamba left #perl6
14:15 mfollett joined #perl6
14:15 rgrau_ joined #perl6
14:19 mfollett left #perl6
14:33 masak I don't think I'll ever really get used to map not having a comma after its first argument in Perl 5.
14:33 masak that, and the occasional sigil-invariant hash access, is what gives me the most inscrutable syntax errors.
14:35 mfollett joined #perl6
14:36 flussence it's the lack of a Z operator that gets me
14:37 masak flussence: patch perl5i to have one :P
14:37 masak that would actually be quite fun.
14:37 flussence having to type "my %x; @x{qw(const keys i already know)} = list_returning_sub;" drives me insane sometimes
14:38 moritz_ List::MoreUtils has a zip() function, iirc
14:38 masak flussence: why? not sure I understand.
14:39 flussence ...where list_returning_sub is usually unpack()
14:41 moritz_ http://www.reddit.com/r/programming/comments/dh​bm6/php_object_oriented_programming_reinvented/ it's kinda funny to the incomprehension of many programmers there
14:41 moritz_ paraphrased: "if we have meta classes, that allows us to do powerful things. That's DANGEROUS"
14:41 masak flussence: ah. it breaks DRY. I see.
14:42 moritz_ or "why would you ever want something apart from the language's standard object model?"
14:45 wtw left #perl6
14:46 masonkramer joined #perl6
14:47 masonkramer left #perl6
14:48 aloha left #perl6
14:49 tadzik joined #perl6
14:51 tadzik new test results: http://tjs.azalayah.net/
14:52 tadzik soon to be moved on feather and done daily with archives and other fun stuff
14:53 * moritz_ wants an 'author' column, and the ability to sort by it :-)
14:53 tadzik well said! But, you know, well done is better than well said :)
14:53 [hudnix] Should the series operator really short-circuit on non-number values? I had the idea of returning a segment of a linked list like so: return ($.right, *.right ... $last_item), but it's returning a random number of items, I gues based on whether an intermediate item has an address that's greater than $last_item.
14:55 moritz_ [hudnix]: if you have a proper infix:<cmp> operator defined for your type, it should work
14:55 moritz_ or infix:<eqv>, not sure
14:56 moritz_ maybe you need ... { $_ === $last_item }  right now
14:56 moritz_ rakudo has trouble picking up custom operators in its setting
14:57 [hudnix] moritz_: ooh, nice, I'll try those, thanks
14:58 moritz_ wait, easier
14:58 moritz_ the series operator smart-matches against $last
14:59 moritz_ so if it's a custom type, defining a sensible  method ACCEPTS($other) { .. } should do the trick
14:59 [hudnix] { $_ === $last_item } goes on forever...
14:59 moritz_ try eqv instead of ===
15:00 [hudnix] same thing
15:01 [hudnix] ... {Bool::true} goes forever :)
15:01 moritz_ of what type are the list items?
15:01 moritz_ that's bad
15:01 moritz_ rakudo: say (1, *+1, True)
15:01 p6eval rakudo 08317e: OUTPUT«1_block1251␤»
15:02 moritz_ rakudo: say ~(1, *+1 ... True)
15:02 [hudnix] My own type, basically a circular linked list
15:02 p6eval rakudo 08317e: OUTPUT«1␤»
15:02 moritz_ rakudo: say ~(1, *+1 ... {True})
15:02 p6eval rakudo 08317e: OUTPUT«1␤»
15:02 moritz_ [hudnix]: which version of Rakudo are you using?
15:05 [hudnix] last months I think :)
15:05 IllvilJa left #perl6
15:05 moritz_ update :-)
15:05 [hudnix] your last construct goes forever on my rakudo :)
15:06 moritz_ I know; there was a huge series refactor (and spec change)
15:06 moritz_ there'll be another compiler release later today
15:07 [hudnix] Will do, thanks
15:12 justatheory joined #perl6
15:14 mberends left #perl6
15:14 plainhao joined #perl6
15:14 risou_ joined #perl6
15:16 risou left #perl6
15:19 IllvilJa joined #perl6
15:20 patspam left #perl6
15:22 nymacro left #perl6
15:28 nymacro joined #perl6
15:31 kjeldahl_ joined #perl6
15:34 uniejo joined #perl6
15:36 miso_soup joined #perl6
15:42 Ross joined #perl6
15:42 Ross left #perl6
15:42 Ross joined #perl6
15:43 huf left #perl6
15:44 ruoso left #perl6
15:53 huf joined #perl6
15:53 fridim joined #perl6
15:55 nymacro left #perl6
15:58 huf left #perl6
15:58 mfollett left #perl6
15:59 masak why is the operator for generating sequences of things called "the series operator", by the way?
15:59 tadzik from mathematical series maybe?
15:59 justatheory left #perl6
16:00 Eevee left #perl6
16:00 daxim misleading, hm.  http://en.wikipedia.org/wiki/Series_(mathematics)  http://en.wikipedia.org/wiki/Sequence
16:01 ruoso joined #perl6
16:03 jfried joined #perl6
16:03 masak right. in mathematics, a series is the sum of a sequence.
16:03 huf joined #perl6
16:04 masak hence, the series operator in math is ∑
16:05 jnthn evening, 6folk :-)
16:06 tadzik evening jnthn
16:07 masak jnthn! \o/
16:07 jnthn masak! \o/
16:09 tadzik masak, look
16:09 tadzik http://feather.perl6.nl:8050/
16:09 tadzik updates every 00:01, at lest I hope so
16:09 * masak looks
16:09 tadzik and you can see archives, like http://feather.perl6.nl:8050/23-09-10
16:09 masak impressive.
16:09 masak tadzik++
16:09 tadzik ugly :)
16:09 tadzik patches welcome
16:10 masak where's the source code?
16:10 huf left #perl6
16:10 tadzik can push to GH or somewhere
16:11 tadzik so, there is some privacy on feather? :)_
16:11 Eevee joined #perl6
16:15 risou joined #perl6
16:17 fridim left #perl6
16:18 Juerd tadzik: There is next to no privacy on feather.
16:18 risou_ left #perl6
16:19 Juerd I wouldn't store a private key on it.
16:20 tadzik so does masak have access to my files?
16:21 masak (mwhahaha)
16:21 masak tadzik: even if I do, I'd recommend putting the code up on github or similar.
16:22 tadzik masak: there's a tiny dancer app, neutro and a script generating html table
16:22 tadzik will put it on GH, why not
16:22 tadzik oh, and a cronjob
16:23 masak tadzik++
16:23 Juerd tadzik: cat /etc/sudoers
16:23 Juerd tadzik: And I'll allow other people access to your files without your approval
16:23 Juerd So no, don't put your secrets on feather
16:23 tadzik Juerd: they may be readable to anyone, I don't mind
16:24 Juerd And writable
16:24 tadzik hrm
16:24 Juerd Feather is for community stuff
16:24 tadzik alright
16:24 Juerd And the community will behave, in general :)
16:25 fridim joined #perl6
16:25 tadzik sure thing
16:25 tadzik the only non-perl stuff I put there recently was a Train Ticket and my Girlfriend's picture :)
16:26 Juerd Go ahead, but don't blame me if people abuse that :)
16:26 tadzik that was only temporary :)
16:27 * masak tries to quickly put together a joke about enjoying that train journey with tadzik's girlfriend
16:28 tadzik masak: http://imagemacros.files.word​press.com/2009/06/oh_you.jpg
16:28 masak :)
16:28 jnthn masak: At least you had the nouns in that order. :P
16:29 masak jnthn: I'm not even going to try to figure out what you're implying. :)
16:30 masak it was a very platonic train journey. she's taken, after all.
16:30 jnthn :-)
16:30 tadzik :)
16:31 * jnthn 's train journey this evening was packed (as usual) and on time (less usual).
16:31 * [Coke] wishes he could regularly take the train. one car per commuter is insane.
16:31 masak [Coke]: it'll come to a natural end soon enough.
16:31 masak the insanity, I mean.
16:32 tadzik masak: http://github.com/tadzik/emmentaler
16:32 miso_soup left #perl6
16:32 masak tadzik: danke.
16:32 masak tadzik++ # realizing ideas
16:33 jnthn What a cheesy project name.
16:33 justatheory joined #perl6
16:33 tadzik jnthn: it's masak's idea :)
16:33 tadzik masak: want a commit bit?
16:33 jnthn tadzik: Clearly I should blame the hole thing on him. :-)
16:34 tadzik hah, punny
16:34 tadzik hah, sergenerator.pl, I thought that's a temporary script it's a with a temporary name
16:34 tadzik ser is cheese in Polish
16:34 jnthn :-)
16:34 masak tadzik: sure, why not? don't know when I will have tuits to look at it, though.
16:34 jnthn syr po Slovensky. :-)
16:34 tadzik that's why the resulsts used to be url.com/ser.html
16:35 icwiener joined #perl6
16:35 masak "Сыр" на русском языке
16:36 jnthn masak: Сырслы?
16:36 jnthn ;-)
16:36 masak 哈哈
16:37 masak I wish more people could read Cyrillic. that was Сырслы funny.
16:37 jnthn If you average Сыр and syr then you'll probably get the Ukrainian. :-)
16:37 * masak wonders if the slavic word can be traced back to the same root as the Germanic one
16:38 tadzik masak: commit bit added
16:39 masak danke.
16:39 tadzik de nada
16:39 tadzik ...is that Spanish?
16:39 jnthn Yeah
16:39 masak seems not; "cheese" comes from Latin cāseus, seemingly unrelated to "ser".
16:39 tadzik good. I have to practice, I'm starting Spanish this year at my uni
16:40 tadzik Juerd: cat: /etc/sudoers: Permission denied
16:40 Juerd Oh, I didn't know that
16:41 tadzik . o O ( tadzik talks to Juerd talks to cat talks to /etc/sudoers)
16:41 jnthn masak: What root does the the Swedish "ost" kommer from?
16:41 Juerd tadzik: Anyway, 16 usernames.
16:42 jnthn *come :-)
16:42 jnthn masak: Not the same one as cheese/käse, I guess...
16:42 masak jnthn: ultimately Sanskrit, it seems. http://g3.spraakdata.gu.se/saob/​show.phtml?filenr=1/177/32.html
16:42 masak jnthn: Swedish has many Sanskrit loans.
16:43 jnthn Oh?
16:43 jnthn I didn't know that.
16:44 Trashlord left #perl6
16:45 daxim chmete si přičichnout k mému syru?
16:46 huf joined #perl6
16:46 Trashlord joined #perl6
16:47 tadzik biking &
16:48 szabgab left #perl6
16:54 dakkar left #perl6
16:55 huf left #perl6
16:55 masak left #perl6
16:58 dalek specs: 1779592 | TimToady++ | S (4 files):
16:58 dalek specs: s/series/sequence/ to accord with math culture
16:58 dalek specs:
16:58 dalek specs: To a mathematician, a series is the sum of a sequence.  We don't want
16:58 dalek specs: to confuse the poor mathematicians any more than they already are.
16:58 dalek specs: review: http://github.com/perl6/specs/commit/17​795925bc48affda10275bd2768e1f2d9ef6345
17:02 mberends joined #perl6
17:06 icwiener left #perl6
17:09 uniejo left #perl6
17:12 Intensity left #perl6
17:15 wamba joined #perl6
17:17 huf joined #perl6
17:19 snearch joined #perl6
17:21 Intensity joined #perl6
17:22 sjn left #perl6
17:24 bluescreen joined #perl6
17:25 sjn joined #perl6
17:25 molaf left #perl6
17:27 cdarroch joined #perl6
17:27 cdarroch left #perl6
17:27 cdarroch joined #perl6
17:31 hudnix joined #perl6
17:31 [hudnix] left #perl6
17:36 Ross left #perl6
17:39 rainerschuster joined #perl6
17:40 uniejo joined #perl6
17:41 bluescreen left #perl6
17:44 Mowah left #perl6
17:45 Mowah joined #perl6
17:48 nullkuhl joined #perl6
17:49 nullkuhl am trying to reverse a string x , then repeat each word in it N times, could it be shorter than this ? $n=<>;print"@{[map{($_)x$n}split' ',reverse<>]}"
17:50 nullkuhl left #perl6
17:50 moritz_ get.flip.words Zx get
17:51 snearch left #perl6
17:53 moritz_ sorry, Xx, not Zx
17:53 moritz_ $ echo "foo bar baz" | perl6 -e 'say get.flip.words Xx 3'
17:53 moritz_ zabzabzabrabrabraboofoofoof
17:54 ash_ joined #perl6
17:54 Su-Shee <doorstaysclosed>
17:54 moritz_ substitute the trailing 3 for get
17:54 fridim left #perl6
17:55 moritz_ $ echo -e "foo bar baz\n3" | perl6 -e 'say get.flip.words Xx get'
17:55 moritz_ zabzabzabrabrabraboofoofoof
17:55 moritz_ and it's not even really golfed, it's close to idiomatic Perl 6
17:56 bluescreen joined #perl6
17:57 envi^home left #perl6
17:57 flussence moritz_++ # wow
17:58 ash_ flussence: last night i made some changes to the timeout handling for try.rakudo.org if you want to test any of them out, now there are 3 different levels of timeouts, the repl server can time out waiting on the perl6 instance, if it does it kills the perl6 instance and restarts it, the server can timeout waiting on the repl server, and the client can timeout waiting on the web server
17:59 nullkuhl joined #perl6
17:59 flussence ash_: will do.
18:00 ash_ apparently in IO::Socket::INET the timeout code is commented out for some reason, even though the docs say that it accepts a timeout and has a timeout function to set the timeout, but it doesn't actually ever timeout
18:01 flussence that's... weird
18:01 astrojp joined #perl6
18:01 flussence I've used it in other stuff and I'm pretty sure timeouts worked before, maybe something changed in the meantime
18:02 nullkuhl moritz_: get.flip.words Xx get  , are you sure that this takes the number of repetitions before the string itself ?
18:02 nullkuhl moritz_: the input would be "3\nHello world"
18:03 moritz_ nullkuhl: oh, I thought it would be the other way round
18:03 moritz_ as my example input shows
18:03 ash_ flussence: http://cpansearch.perl.org/src/GB​ARR/IO-1.25/lib/IO/Socket/INET.pm toward the bottom, someone pointed that out in a forum so i double checked it, i am not sure why its commented out :-\
18:03 nullkuhl moritz_: nop, does that make it longer ? :)
18:04 PerlJam nullkuhl: one char longer.
18:04 ash_ i was wondering why i never saw timeouts in it before, then i finally realized the timeouts weren't happening at all
18:04 fod joined #perl6
18:05 nullkuhl PerlJam: hmm am listening :)
18:05 PerlJam (assuming I know what I'm talking about ;)
18:05 PerlJam let my perl6 finish compiling on this box so I can test it for sure
18:05 flussence wow, the ->new(Timeout => ...) option seems completely ignored...
18:05 moritz_ nullkuhl: with the R meta operator you can reverse the arguments
18:06 moritz_ so:  get RXx get.flip.words
18:06 PerlJam meta-ops++
18:06 moritz_ however you need get()RXx instead
18:06 nullkuhl moritz_: hmm why ? get() instead of get
18:06 moritz_ because after 'get', a term is expected, not an operator
18:06 nullkuhl aha
18:07 moritz_ $ echo -e "3\nfoo bar baz" | perl6 -e 'say get()RXx get.flip.words'
18:07 moritz_ zabzabzabrabrabraboofoofoof
18:08 nullkuhl moritz_: well there is a small issue though
18:08 flussence on closer inspection... it seems my IO::Socket::INET-using code should never have worked, that timeout stuff is commented out in every version on CPAN...
18:08 nullkuhl it seems that it takes alot of time at execution
18:08 nullkuhl :(
18:08 flussence unless it's doing weird things at a distance
18:09 moritz_ nullkuhl: well, rakudo has a high startup time
18:09 moritz_ we're working on it.
18:09 PerlJam is it my imagination or does rakudo compilation take longer than it used to?
18:09 PerlJam (I don't recall ever waiting this long for a compile on  this box)
18:09 TimToady revised http://rosettacode.org/wik​i/Equilibrium_index#Perl_6 and also added a cute "pure FP" version
18:10 nullkuhl PerlJam: rakudo is this RXx ?
18:10 ash_ flussence: beats me, i use an alarm now, with a interrupt handler
18:10 nullkuhl oh wait
18:10 flussence ah well, whatever works.
18:10 nullkuhl moritz_: it seems it doesnt print the output
18:10 moritz_ nullkuhl: it does here
18:10 nullkuhl http://ideone.com/cwqqG
18:11 silug left #perl6
18:11 moritz_ nullkuhl: I can't reproduce that on a local rakudo
18:12 flussence PerlJam: what timespan are you talking about for compilation times? It seems more or less the same for me
18:12 nullkuhl moritz_: is there a print call or so that can be added ??
18:12 flussence admittedly the only data points I've got are the cronjob I've been running for 5 days...
18:12 PerlJam flussence: like several  minutes longer
18:13 moritz_ nullkuhl: my example included a 'say' :-)
18:13 PerlJam flussence: I don't have any hard timespans, just feel.  It's always been "just a few minutes", but now it seems like "several minutes"
18:14 nullkuhl moritz_: where ?
18:14 PerlJam maybe because I'm watching it.
18:14 moritz_ PerlJam: are you on parrot HEAD? or  on the recommended revision?
18:14 moritz_ nullkuhl: at the beginning
18:15 flussence PerlJam: you'd be surprised how much CPU a terminal's text rendering can eat sometimes...
18:15 PerlJam moritz_: what's in build/PARROT_REVISION
18:15 nullkuhl moritz_: so it would be say(get()RXx get.flip.words) ?
18:15 moritz_ nullkuhl: the outer parens aren't necessary. Just take the code I pasted.
18:15 flussence (my slow-ass work machine regularly eats up 50% CPU to output bitmap fonts)
18:15 timbunce left #perl6
18:16 PerlJam ah, there's some stuff currently running in the background.
18:16 flussence oh well, at least you're not in my situation :)
18:20 mfollett joined #perl6
18:20 dalek rakudo: 74a156f | moritz++ | / (3 files):
18:20 dalek rakudo: [release] name is Milan. Bump VERSION
18:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​4a156f328d6cc54a0ba32770381aaff4d151364
18:20 moritz_ not quite released yet
18:22 timbunce joined #perl6
18:23 nullkuhl moritz_: it works but it exceeds the time limit :( i think IO is the issue, is there a faster way to deal with IO ?, or perhaps different calls for reversing or repeating? )
18:24 moritz_ nullkuhl: either golf or optimize :-)
18:24 moritz_ nullkuhl: but it's not very slow here... are you sure that IO works on that server?
18:24 moritz_ http://moritz.faui2k3.org/​tmp/rakudo-2010.09.tar.gz # preview of the current release - please test!
18:24 nullkuhl moritz_: it worked with classic perl
18:25 moritz_ nullkuhl: since they need to have customized scriped for each language, that's not very convincing
18:26 daxim left #perl6
18:26 nullkuhl moritz_: https://www.spoj.pl/problems/REVINPUT/
18:27 Mowah left #perl6
18:27 nullkuhl if you check best solutions, ull find about 20 languages or more
18:28 Mowah joined #perl6
18:28 TimToady it's tempting to define [+/] to mean reverse [\+] reverse
18:29 Mowah left #perl6
18:32 ash_ moritz_: do you know anyone that would like to help write tutorials for try.rakudo?
18:33 tadzik oh, SPOJ
18:33 Mowah joined #perl6
18:34 tadzik haha, my pal from Warsaw.pm is one the first place. He likes Perl 6 exactly for some golfing capabilities
18:34 justatheory left #perl6
18:34 Mowah left #perl6
18:38 dual left #perl6
18:38 Mowah joined #perl6
18:44 TimToady rakudo: say (<a b c d e> Zxx 0,1,0,1,0)
18:44 TimToady rakudo: say (<a b c d e> Zxx 0,1,0,1,0).Str
18:44 p6eval rakudo 08317e: OUTPUT«bd␤»
18:44 p6eval rakudo 08317e: OUTPUT«e e␤»
18:45 TimToady ran into this bug with my latest risottocode
18:46 tadzik where are those ZX operators documented?
18:46 TimToady S03:4612
18:47 tadzik thanks TimToady
18:47 tadzik „Summary of Perl 6 Operators”, I could have guessed :)
18:53 s1n left #perl6
19:02 tadzik moritz_: did you forget to tag the release on GH?
19:04 tadzik rakudo: say (<a b c d e> Zxx 0,1,0,1,0).perl.eval.Str
19:04 p6eval rakudo 74a156: OUTPUT«b d␤»
19:06 s1n joined #perl6
19:07 moritz_ tadzik: not forgot, just haven't done it yet
19:07 moritz_ tadzik: wanted to test first
19:08 tadzik oh, sure
19:08 rschuster joined #perl6
19:09 rainerschuster left #perl6
19:09 rschuster is now known as rainerschuster
19:10 ggoebel left #perl6
19:13 plobsing joined #perl6
19:14 moritz_ uploading tarball now. Tags pushed.
19:15 dalek rakudo: c50ac91 | moritz++ | build/Makefile.in:
19:15 dalek rakudo: [build] release should not rely on dead pugs svn. Quick and ugly Unix-only hack.
19:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​50ac91490fe658d9354c783baa3e0844fd1b719
19:16 ggoebel joined #perl6
19:16 wamba left #perl6
19:18 rschuster joined #perl6
19:19 risou left #perl6
19:19 rainerschuster left #perl6
19:19 rschuster is now known as rainerschuster
19:21 dalek rakudo: 0d3c66e | moritz++ | docs/release_guide.pod:
19:21 dalek rakudo: [docs] update release guide
19:21 dalek rakudo:
19:21 dalek rakudo:  * VERSION bumping
19:21 dalek rakudo:  * remove section on spectest numbers
19:21 dalek rakudo:  * update description of t/spec handling to git usage
19:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​d3c66ef35eb12c60bbc29bd7aca565fd8101f0e
19:22 nullkuhl left #perl6
19:27 robinsmidsrod left #perl6
19:27 plainhao left #perl6
19:29 robinsmidsrod joined #perl6
19:30 rainerschuster left #perl6
19:39 colomon joined #perl6
19:40 cbk left #perl6
19:41 uniejo left #perl6
19:45 colomon left #perl6
19:45 justatheory joined #perl6
19:45 moritz_ rakudo release finished. Everybody, feel free to commit again
19:46 frettled \o/
19:47 TimToady rakudo: say (<a b c d e> Zxx 0,1,0,1,0).perl
19:47 p6eval rakudo 74a156: OUTPUT«((), ("b"), (), ("d"), ())␤»
19:48 TimToady very odd how that turns into e e
19:49 * moritz_ says "bug"
19:49 TimToady rakudo: say (<a b c d e> Zxx 0,1,0,1,0).flat.perl
19:49 p6eval rakudo 74a156: OUTPUT«("b", "d")␤»
19:49 TimToady rakudo: say (<a b c d e> Zxx 0,1,0,1,0).flat.Str
19:49 p6eval rakudo 74a156: OUTPUT«e e␤»
19:49 tadzik (<a b c d e> Zxx 0,1,0,1,0).Str
19:49 TimToady sure, "bug", but not an obvious one
19:49 tadzik rakudo: (<a b c d e> Zxx 0,1,0,1,0).Str
19:49 tadzik pff
19:49 p6eval rakudo 74a156:  ( no output )
19:50 tadzik rakudo: (<a b c d e> Zxx 0,1,0,1,0).Str.say
19:50 p6eval rakudo 74a156: OUTPUT«e e␤»
19:50 tadzik and still not what I wanted
19:50 tadzik rakudo: ((), ("b"), (), ("d"), ()).Str.say
19:50 p6eval rakudo 74a156: OUTPUT«b d␤»
19:51 flussence rakudo: (<e> Zxx 0,1,0,1,0).Str.say # ?
19:51 p6eval rakudo 74a156: OUTPUT«␤»
19:52 TimToady rakudo: say (eager(<a b c d e>) Zxx 0,1,0,1,0).Str
19:52 p6eval rakudo 74a156: OUTPUT«e e␤»
19:52 TimToady rakudo: say ((<a b c d e>[*] Zxx 0,1,0,1,0).Str
19:53 p6eval rakudo 74a156: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
19:53 flussence rakudo: (<one two three four five> Zxx 0,1,2,1,0).Str.say
19:53 TimToady rakudo: say ((\<a b c d e>[*] Zxx 0,1,0,1,0).Str
19:53 p6eval rakudo 74a156: OUTPUT«five five five five␤»
19:53 p6eval rakudo 74a156: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
19:53 TimToady rakudo: say (<a b c d e>[*] Zxx 0,1,0,1,0).Str
19:53 p6eval rakudo 74a156: OUTPUT«e e␤»
19:53 kjeldahl left #perl6
19:53 TimToady rakudo: say (<a b c d e>».clone Zxx 0,1,0,1,0).Str
19:54 p6eval rakudo 74a156: OUTPUT«e e␤»
19:54 jnthn o_O
19:54 timbunce left #perl6
19:54 jnthn oh, maybe it's that pesky take bug
19:54 TimToady rakudo: say (<a b c d e> Zx 0,1,0,1,0).Str
19:54 Ross^ joined #perl6
19:54 Ross^ left #perl6
19:54 Ross^ joined #perl6
19:54 p6eval rakudo 74a156: OUTPUT« b  d ␤»
19:54 flussence rakudo: (0,1,{$^a,$^b}..*)[^5].perl.say
19:54 p6eval rakudo 74a156: OUTPUT«Method 'succ' not found for invocant of class 'Block'␤  in 'RangeIter::reify' at line 4723:CORE.setting␤  in 'List::at_pos' at line 1␤  in 'Any::postcircumfix:<[ ]>' at line 1688:CORE.setting␤  in 'Parcel::at_pos' at line 1␤  in 'Any::postcircumfix:<[ ]>' at line
19:54 p6eval ..1688:CORE.setting␤…
19:55 flussence d'oh
19:55 jnthn flussence: Did you want ... ?
19:55 jnthn TimToady: I guess xx may be implemented using gather/take
19:55 jnthn Oh
19:55 jnthn But that still doesn't explain e very well
19:55 jnthn oh, maybe it does.
19:55 flussence jnthn: after testing it locally, seems my whole line was wrong...
19:55 jnthn If it's at the end of the string...
19:56 colomon joined #perl6
19:57 jferrero joined #perl6
19:58 flussence argh. repl without readline support is really nasty, but with it utf8 input breaks...
19:59 TimToady someone should kick gnu screaming and kicking out of the 1990s
19:59 tadzik why, they have good lawyers
19:59 TimToady s:1st/kick/drag/
19:59 ash_ flussence: NotFound in the #parrot channel things that its a bug in the way they handle readline input
20:00 mfollett left #perl6
20:00 Eevee left #perl6
20:00 LionMadeOfLions left #perl6
20:00 Khisanth left #perl6
20:00 larsen left #perl6
20:00 dukeleto left #perl6
20:00 bartolin left #perl6
20:00 TimToady left #perl6
20:00 TimToady joined #perl6
20:00 dukeleto joined #perl6
20:00 larsen joined #perl6
20:00 bartolin joined #perl6
20:01 Eevee joined #perl6
20:01 Khisanth joined #perl6
20:01 LionMadeOfLions joined #perl6
20:01 timbunce joined #perl6
20:03 patspam joined #perl6
20:03 ash_ flussence: http://trac.parrot.org/parrot/changeset/49252 is something that will help, the only problem is telling the interp which encoding to use
20:03 ash_ that alone doesn't fix the problem, somehow you still need to set the interp's encoding to utf8
20:04 ash_ but that ensures that readline is using the same encoding as the interp, we as before it didn't set the encoding so it defaulted to ascii
20:04 ash_ s/we/were
20:04 ash_ /
20:06 flussence I find it bizarre that anything would pick bare ascii as a default these days... maybe it's a posix thing.
20:06 Khisanth left #perl6
20:08 rainerschuster joined #perl6
20:08 ash_ well, now with the most recent trunk it takes the encoding from the interp and uses that, but i don't know how to set the interp's encoding to utf8
20:08 ruoso left #perl6
20:08 flussence LC_ALL doesn't work?
20:10 ash_ whats LC_ALL?
20:10 flussence env var
20:11 flussence LC_ALL=en_US.UTF-8 or whatever's on the system ought to do something
20:12 ash_ hmm, on OS X its LANG=en_US.UTF-8 (on my computer anyway)
20:12 flussence the `locale` command prints out the current settings of stuff
20:12 flussence LC_ALL sets all the related vars at once
20:12 sjohnson TimToady: please elaborate on the gnu stuff
20:12 Khisanth joined #perl6
20:13 ash_ NotFound was saying that he couldn't think of a safe 'default' and we kinda left it at that, i am going to email the parrot mailing list about it though
20:13 ash_ locale still leaves LC_ALL blank, sets a bunch of other things though
20:13 ash_ maybe OS X is configured differently than linux (assuming your on linux)
20:13 flussence I think LC_ALL might be a "magic" variable
20:15 flussence fwiw, I've seen perl5 scream loudly if the vars are left at whatever the default is
20:16 ash_ ah that could be true, i don't know much about locales, i hardly speak english well enough so anything else is way beyond me
20:17 flussence heh, I'm using en_GB which might as well be another language as far as computers are concerned :)
20:18 ash_ if is still spelled if, right?
20:18 ash_ :P
20:20 stkowski joined #perl6
20:21 flussence it gets annoying writing CSS sometimes... (why'd they use "color" instead of "foreground", to go with "background"?)
20:21 flussence (if anything it should really be huffman-coded as "hue", but whatever)
20:23 silug joined #perl6
20:25 ash_ it is odd looking at some code, like ruby code thats written in japanese, but still has english keywords like do, end, while, true, etc.
20:26 moritz_ flussence: "hue" only describes a limited aspect of color
20:27 jnthn flussence: At least they didn't choose the proper^WEnglish^WBritish spelling of colour. ;-)
20:28 ruoso joined #perl6
20:30 tadzik ash_: how is Ruby written in Japanese?
20:30 justatheory left #perl6
20:32 flussence tadzik: I assume that means it's got decent unicode support
20:32 ash_ ruby lets you use japanese for variables names and sub names
20:32 moritz_ Perl too
20:32 tadzik yup
20:32 LoRe joined #perl6
20:34 rainerschuster left #perl6
20:36 flussence php lets you use utf8 chars in some places too, but only because it's too dumb to complain
20:38 flussence (it'll happily take unicode whitespace as variable names, whereas perl5 seems to explode :( )
20:38 sorear good * #perl6
20:39 flussence hi
20:39 ash_ unicode whitespace as a var name seems scary
20:39 moritz_ perl only allows \w characters for names
20:40 ash_ for a given definition of \w though, which thankfully is pretty comprehensive
20:40 flussence perl5's error for "my $\x{2002}" seems a bit wrong...
20:40 flussence Can't use global $^ÿ¿¿¿¿¿¿¿¿¾¢ in "my" at f.pl line 1, near "my $â"
20:41 moritz_ .u U+2002
20:41 phenny moritz_: Sorry, no results
20:42 flussence U+2002 EN SPACE
20:42 moritz_ std: so()
20:42 p6eval std : OUTPUT«ok 00:01 114m␤»
20:42 sorear flussence: $ has weak quoting behavior, basically any char except ' ' and '\n' is forced to be part of the variable name if immediately after $
20:42 ash_ rakudo: my $å = 3;
20:42 sorear flussence: also, $<unprintable> is treated as a global
20:42 p6eval rakudo 74a156:  ( no output )
20:42 sorear flussence: so you can't my it
20:43 sorear $^X is shorthand for $(U+0018)
20:43 moritz_ is (so($b) + 1), ((so $b) + 1), 'so($b) is (so $b)';
20:43 moritz_ where $b = 0
20:43 moritz_ is this test correct?
20:43 justatheory joined #perl6
20:45 flussence moritz_: (if I'm understanding it correctly...) it looks right to me
20:46 ash_ is there a character for 'end of current functions params'?
20:46 ash_ kinda how comma (,) is for next param
20:46 moritz_ notreally
20:46 ash_ i suppose ( ) around the params helps
20:46 moritz_ right
20:47 ash_ but it would be kinda nice to have: say foo 123<char> + bar 123;   and it not get confused
20:49 sorear moritz_: that test seems... tautological
20:49 sorear so($b)+1 and (so $b)+1 generate exactly the same parse tree in niecza and rakudo
20:50 moritz_ sorear: nevertheless rakudo fails it, if I fix Bool stringification
20:50 alester left #perl6
20:50 sorear What.
20:51 * moritz_ thought that 'so' was a low precedence prefix op, not a function
20:51 moritz_ or is it both?
20:51 sorear so( with no whitespace is a function call
20:52 flussence so($b).WHAT returns 0 for me, which makes no sense
20:52 mberends left #perl6
20:53 moritz_ rakudo: say (so($b)).WHAT
20:53 p6eval rakudo 74a156: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/o8O4yQUPbv:22)␤»
20:53 moritz_ rakudo: say (so(0)).WHAT
20:53 p6eval rakudo 74a156: OUTPUT«Bool()␤»
20:53 moritz_ rakudo: say so(0).WHAT
20:53 p6eval rakudo 74a156: OUTPUT«0␤»
20:53 moritz_ rakudo: say so  (0).WHAT
20:54 p6eval rakudo 74a156: OUTPUT«0␤»
20:54 flussence oh, precedence
20:54 * moritz_ thinks it's a parsing bug in rakudo
20:55 dalek roast: 29b04a9 | moritz++ | S0 (4 files):
20:55 dalek roast: fix tests for Bool stringification
20:55 dalek roast: review: http://github.com/perl6/roast/commit/29​b04a9899223e741077fd98dbcc1789018b2735
20:55 M_o_C joined #perl6
20:56 M_o_C left #perl6
20:57 kingn0thing joined #perl6
21:00 dual joined #perl6
21:01 dalek rakudo: 40d0d49 | moritz++ | src/builtins/Bool.pir:
21:01 dalek rakudo: make True and False stringify as Bool::{True,False} as per spec
21:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​0d0d49983cf70038a472c567570a9b0e2fde4db
21:01 dalek rakudo: a820a44 | moritz++ | src/builtins/Bool.pir:
21:01 dalek rakudo: Merge branch 'bool-str'
21:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​820a447622bbe4ae19161f7de2a623523e07769
21:01 ash_ rakudo: class A { method b { 1 } }; say A.can('b');
21:01 p6eval rakudo 74a156:  ( no output )
21:01 ash_ moritz_: do you have any idea whats up with that? you might need to try it locally to see the error message
21:02 bbkr left #perl6
21:02 moritz_ rakudo: say (method () { }).WHAT
21:02 p6eval rakudo 74a156: OUTPUT«Method()␤»
21:03 moritz_ ash_: a low-level type leaking through
21:03 ash_ rakudo: say "string".can("split");
21:03 p6eval rakudo 74a156: OUTPUT«split␤»
21:03 ash_ it doesn't happen with all methods though
21:03 ash_ ^^ worked with Str.split but my A.b fails
21:03 Su-Shee left #perl6
21:04 moritz_ rakudo: class A { multi method b { 1 } }; say A.can('b');
21:04 ash_ i tried tracking down that one but i didn't have any luck
21:04 jnthn ash_: .can doesn't return the method itself but rathre something that is meant to be able to serve as an iterator through the methods, but if invoked it'll invoke the method itself.
21:04 p6eval rakudo 74a156:  ( no output )
21:04 ash_ hehe tried that too
21:04 jnthn I think it's horribly behind with the current ideas of iterators though.
21:04 orafu joined #perl6
21:06 stkowski left #perl6
21:07 sjohnson what is the p6 way of taking a string and making a list of chars?
21:07 sjohnson is it still split //?
21:07 tadzik comb?
21:07 ash_ anyway, i filed a bug on it, just wanted to see if anyone else know about it
21:08 tadzik rakudo: "asd".comb.perl.say
21:08 p6eval rakudo 0d3c66: OUTPUT«("a", "s", "d")␤»
21:08 ash_ rakudo: say ~"comb".comb
21:08 p6eval rakudo 0d3c66: OUTPUT«c o m b␤»
21:08 tadzik I always think it's 'chop', like you're chopping a potato
21:08 sjohnson rakudo: "confusing\nstring\0chars".comb.perl.say
21:08 p6eval rakudo 0d3c66: OUTPUT«("c", "o", "n", "f", "u", "s", "i", "n", "g", "\n", "s", "t", "r", "i", "n", "g", "\x[0]", "c", "h", "a", "r", "s")␤»
21:09 sjohnson ... works for me!
21:09 * sjohnson kisses perl6
21:09 tadzik so why is it comb, like a thing for brushing hair instead of chop, like chopping a potato?
21:09 flussence rakudo: "waffle".comb(/../).perl.say
21:10 p6eval rakudo 0d3c66: OUTPUT«("wa", "ff", "le")␤»
21:10 flussence yay
21:10 flussence rakudo: "waffle".comb(/ <[^f]>+ /).perl.say
21:11 p6eval rakudo 0d3c66: OUTPUT«("ff")␤»
21:11 kingn0thing left #perl6
21:11 flussence (is ^ correct there?)
21:11 jnthn <-[f]> iirc
21:11 flussence ah
21:12 jnthn It's not ^ any more, I'm farily sure of that.
21:12 flussence rakudo: "waffle".comb(/ <-[f]>+ /).perl.say
21:12 p6eval rakudo 0d3c66: OUTPUT«("wa", "le")␤»
21:12 jnthn ah, there you go :-)
21:13 alester joined #perl6
21:15 bluescreen left #perl6
21:16 Mowah left #perl6
21:19 ruoso left #perl6
21:24 ash_ rakudo: say "Julián".chars;
21:24 p6eval rakudo 0d3c66: OUTPUT«6␤»
21:25 svetlins joined #perl6
21:25 sorear rakudo: say "七".chars
21:25 p6eval rakudo 0d3c66: OUTPUT«1␤»
21:27 ash_ tryrakudo returns 7
21:28 flussence → say "七".chars
21:28 flussence 1
21:28 kjeldahl_ left #perl6
21:28 flussence works locally
21:28 ash_ really?
21:28 flussence tryrakudo returns 3 for me...
21:28 ash_ hmmm wonder why the server is doing it wrong then
21:28 sorear ash_: tryrakudo returns 7 for 七!?
21:28 sorear not 3 or 4?
21:28 ash_ no, for say "Julián".chars;
21:28 sorear ah
21:29 ash_ say "Julián".chars; => 7 on try.rakudo.org
21:29 Raynes left #perl6
21:29 flussence oh, I see
21:29 flussence they both return correct numbers locally, maybe the server needs a kick
21:30 ash_ hehe
21:30 ash_ locally, if i do perl6 p6safe.pl
21:30 ash_ and try say "Julián".chars; it returns 7 too
21:30 ash_ even if i do perl6 --encoding=utf8 p6safe.pl
21:30 flussence :(
21:30 Raynes joined #perl6
21:30 ash_ same with the server :-(
21:30 flussence I'm using p6safe and it seems OK
21:31 ash_ hmmm
21:31 ash_ i wonder whats different
21:31 flussence can you see the log output from the frontend/backend scripts on tryrakudo?
21:31 flussence everything in my copy looks correct
21:32 flussence it could be the perl5 parts too...
21:33 ash_ why would perl5 change 6 to 7?
21:33 ash_ :P
21:33 ash_ say "Julián".chars is in the log properly on the perl persist.pl part
21:34 Holy_Cow left #perl6
21:35 synth left #perl6
21:38 * ash_ just updated rakudo to latest trunk on the try.rakudo server
21:40 * flussence bbl
21:41 cosimo rakudo: my $x = "perl6" ; $x ~= " "; $x ~= "rocks" ; say $x
21:41 p6eval rakudo 0d3c66: OUTPUT«perl6 rocks␤»
21:41 synth joined #perl6
21:42 Guest23195 left #perl6
21:43 jfried left #perl6
21:43 cosimo rakudo: my $x = "123"; $x.chop; $x.chop; say $x
21:43 p6eval rakudo 0d3c66: OUTPUT«123␤»
21:43 jnthn Use .= for inplace cho
21:43 cosimo rakudo: my $x = "123"; $x .= chop; say $x
21:43 p6eval rakudo 0d3c66: OUTPUT«12␤»
21:43 cosimo jnthn: thanks :)
21:44 cosimo jnthn: and to chop twice?
21:44 tadzik rakudo: my $x = "123"; $x .= chop.chop; say $x # hi hi
21:44 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Confused at line 22, near "$x .= chop"␤»
21:44 tadzik and it looked so funny :(
21:44 cosimo rakudo: my $x = "abc" ; $x .= chop**2; say $x
21:45 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
21:45 cosimo cool
21:45 orafu left #perl6
21:45 cosimo rakudo: my $x = "abc" ; $x .= chop .= chop; say $x
21:45 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
21:45 cosimo rakudo: my $x = "abc" ; $x .= chop, .= chop; say $x
21:45 p6eval rakudo 0d3c66: OUTPUT«Null PMC access in find_method('chop')␤  in main program body at line 22:/tmp/PFB8PoaV1C␤»
21:46 cosimo rakudo: my $x = "abc" ; ($x .= chop) .= chop; say $x
21:46 p6eval rakudo 0d3c66: OUTPUT«a␤»
21:46 sorear rakudo: my $x = "abc"; $x ~~ s/..$//; say $x
21:46 p6eval rakudo 0d3c66: OUTPUT«a␤»
21:48 jnthn $x .= chop for ^2 # ;-)
21:48 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; my @x = map { "$_\r\n" } split ("\r\n", $s); say @x.perl;
21:48 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Confused at line 22, near "my @x = ma"␤»
21:49 jnthn missing , before split
21:49 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; my @x = $s.split("\r\n"); say @x.perl;
21:49 p6eval rakudo 0d3c66: OUTPUT«["abc", "123", "def", ""]␤»
21:50 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; my @x = $s.split("\r\n").map("$_\r\n"); say @x.perl;
21:50 p6eval rakudo 0d3c66: OUTPUT«No applicable candidates found to dispatch to for 'map'. Available candidates are:␤:(Mu : &block;; *%_)␤␤  in main program body at line 22:/tmp/cVhLjyNELR␤»
21:50 ggoebel left #perl6
21:50 jnthn rakudo: my $s = "abc\r\n123\r\ndef\r\n"; $s.split("\r\n") ==> map { "$_\r\n" } ==> my @x; say @x.perl # also cute
21:50 p6eval rakudo 0d3c66: OUTPUT«["abc\r\n", "123\r\n", "def\r\n", "\r\n"]␤»
21:51 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; my @x = $s.split("\r\n").map {"$_\r\n"}; say @x.perl;
21:51 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Confused at line 22, near "my @x = $s"␤»
21:51 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; $s.split("\r\n") ==> map {"$_\r\n"} ==> my @x; say @x.perl;
21:52 p6eval rakudo 0d3c66: OUTPUT«["abc\r\n", "123\r\n", "def\r\n", "\r\n"]␤»
21:52 cosimo cool, thanks jnthn
21:53 cosimo rakudo: my $s = "abc\r\n123\r\ndef\r\n"; say ($s.split("\r\n") ==> map {"$_\r\n"}).perl
21:53 p6eval rakudo 0d3c66: OUTPUT«("abc\r\n", "123\r\n", "def\r\n", "\r\n")␤»
21:53 dju_ left #perl6
21:54 tadzik rakudo: "thgindoog syas kizdat".flip.say
21:54 p6eval rakudo 0d3c66: OUTPUT«tadzik says goodnight␤»
21:54 cosimo rakudo: sub x($s) { return $s.split("\r\n") ==> map {"$_\r\n"} }; say x("a\r\n1\r\n2\r\n");
21:54 tadzik left #perl6
21:54 p6eval rakudo 0d3c66: OUTPUT«a12␤»
21:54 cosimo rakudo: sub x($s) { return $s.split("\r\n") ==> map {"$_\r\n"} }; say x("a\r\n1\r\n2\r\n").perl;
21:54 p6eval rakudo 0d3c66: OUTPUT«("a", "1", "2", "")␤»
21:54 cosimo rakudo: sub x($s) { my @l = $s.split("\r\n") ==> map {"$_\r\n"}; return @l }; say x("a\r\n1\r\n2\r\n").perl;
21:55 p6eval rakudo 0d3c66: OUTPUT«["a", "1", "2", ""]␤»
21:55 dju_ joined #perl6
21:55 cosimo rakudo: sub x($s) { $s.split("\r\n") ==> map {"$_\r\n"} ==> my @l; return @l }; say x("a\r\n1\r\n2\r\n").perl;
21:55 p6eval rakudo 0d3c66: OUTPUT«["a\r\n", "1\r\n", "2\r\n", "\r\n"]␤»
21:55 ash_ ==> works in rakudo now?
21:55 ash_ o.0 news to me, thats cool
21:55 lichtkind joined #perl6
21:57 cosimo rakudo: my $x = "OK\r\n"; if $x ~~ /(?:OK|END|ERROR)\r\n$/ { say "matches!" } else { say "boo" }
21:57 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 22, near "OK|END|ERR"␤»
21:57 cosimo rakudo: my $x = "OK\r\n"; if $x ~~ /(?:<OK|END|ERROR>)\r\n$/ { say "matches!" } else { say "boo" }
21:57 dju joined #perl6
21:57 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 22, near "<OK|END|ER"␤»
21:58 dju_ left #perl6
22:00 ash_ ?: isn't right in perl6
22:00 cosimo rakudo: my $x = "OK\r\n"; if $x ~~ / [ OK | END | ERROR ] \r\n$/ { say "matches!" } else { say "boo" }
22:00 p6eval rakudo 0d3c66: OUTPUT«matches!␤»
22:00 cosimo rakudo: my $x = "BLAH\r\n"; if $x ~~ / [ OK | END | ERROR ] \r\n$/ { say "matches!" } else { say "boo" }
22:00 p6eval rakudo 0d3c66: OUTPUT«boo␤»
22:00 cosimo rakudo: my $x = "END\r\n"; if $x ~~ / [ OK | END | ERROR ] \r\n$/ { say "matches!" } else { say "boo" }
22:00 p6eval rakudo 0d3c66: OUTPUT«matches!␤»
22:00 cosimo rakudo: my $x = "zorro"; if $x ~~ / [ OK | END | ERROR ] \r\n$/ { say "matches!" } else { say "boo" }
22:00 p6eval rakudo 0d3c66: OUTPUT«boo␤»
22:02 patspam left #perl6
22:03 cosimo jnthn: are labels supported in rakudo? like 'BLOCK: for @this { last BLOCK if ... }'
22:04 dju left #perl6
22:04 ash_ last i checked, no, labels weren't implemented yet
22:04 jnthn cosimo: Not yet
22:04 dju joined #perl6
22:06 dju_ joined #perl6
22:06 dju left #perl6
22:09 cosimo jnthn: not a big deal really
22:09 cosimo I'm converting Cache::Memcached to perl6...
22:10 cosimo now the code passes compilation just fine
22:10 cosimo I need to try it against a memcached now :)
22:10 sjohnson perl 6 have any built in base 32/64 stuff?
22:13 cosimo rakudo: my $x = 4096; say :64($x);
22:13 p6eval rakudo 0d3c66: OUTPUT«DON'T PANIC! The radix is out of range (2..36 only)␤  in main program body at line 1␤»
22:13 cosimo rakudo: my $x = 4096; say :16($x);
22:13 p6eval rakudo 0d3c66: OUTPUT«16534␤»
22:13 jnthn cosimo: Nice! :-)
22:14 cosimo rakudo: my $x = 4096; say :32($x);
22:14 p6eval rakudo 0d3c66: OUTPUT«131366␤»
22:14 cosimo sjohnson: not sure if you meant that though :)
22:15 cosimo rakudo: my $x = 4095; say :2($x);
22:15 cosimo jnthn: thanks
22:15 p6eval rakudo 0d3c66: OUTPUT«DON'T PANIC! Invalid character (4)! Please try again :) ␤  in main program body at line 1␤»
22:15 cosimo rakudo: my $x = '1101'; say :2($x);
22:15 p6eval rakudo 0d3c66: OUTPUT«13␤»
22:15 ash_ rakudo: 16.base(:2).perl
22:15 p6eval rakudo 0d3c66: OUTPUT«===SORRY!===␤Malformed radix number at line 22, near ").perl"␤»
22:15 ash_ rakudo: 16.base(2).perl.say
22:16 p6eval rakudo 0d3c66: OUTPUT«Method 'base' not found for invocant of class 'Int'␤  in main program body at line 22:/tmp/pxPQ__K9sm␤»
22:16 sjohnson rakudo: my $x = "something"; say :64($x);
22:16 p6eval rakudo 0d3c66: OUTPUT«DON'T PANIC! The radix is out of range (2..36 only)␤  in main program body at line 1␤»
22:16 jnthn Time for some rest
22:16 sjohnson ya, PHP won't let you go past 36 either
22:16 sjohnson i am confused
22:17 ash_ :2($x) => returns base 10 value $x
22:17 patspam joined #perl6
22:17 ash_ where $x is in base 2
22:18 ash_ rakudo: 1.^methods.sort.perl.say
22:18 p6eval rakudo 0d3c66: OUTPUT«({ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
22:18 p6eval ..}, { …
22:18 ash_ rakudo: say ~1.^methods
22:18 p6eval rakudo 0d3c66: OUTPUT«perl pred succ WHICH Str Bridge Int Rat Num sign ACCEPTS Real Bool Complex reals isNaN abs exp ln sqrt roots floor ceiling truncate round cis unpolar rand sin asin cos acos tan atan sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech
22:18 p6eval ..cotanh…
22:19 cosimo rakudo: 1.^methods.sort.say
22:19 p6eval rakudo 0d3c66:
22:19 p6eval ..OUTPUT«ACCEPTSACCEPTSBUILDBUILDALLBoolBoolBridg​eCREATECaptureComplexIOIntIntNumNumNumericNumeric​NumericPARROTRatRatRealRealSeqStrStrWALKWHENCEWHE​REWHICHWHICHabsabsacosacosacosecacosecacosechacos​echacoshacoshacotanacotanacotanhacotanhallanyasec​asecasechasechasinasinasinhasinhat_keyat_posat…
22:19 plobsing rakudo: say ~1.^methods(:local)
22:19 p6eval rakudo 0d3c66: OUTPUT«perl pred succ WHICH Str Bridge Int Rat Num sign ACCEPTS Real Bool Complex reals isNaN abs exp ln sqrt roots floor ceiling truncate round cis unpolar rand sin asin cos acos tan atan sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech
22:19 p6eval ..cotanh…
22:19 alester left #perl6
22:20 leprevost joined #perl6
22:24 * ash_ doesn't know how to convert between bases
22:24 ash_ in perl6
22:26 ash_ rakudo: "foo".^methods.say
22:26 p6eval rakudo 0d3c66:
22:26 p6eval ..OUTPUT«ACCEPTSperlpredsuccWHICHBoolStrencodeNum​ericRealIntRatNumabsexploglog10sqrtrootsto-radian​sfrom-radiansfloorceilingroundtruncatesigncisunpo​larchrrandsincostanseccoseccotansinhcoshtanhsechc​osechcotanhasinacosatanatan2asecacosecacotanasinh​acoshatanhasechacosechacotanhbytescapitalizech…
22:26 ash_ rakudo: say ~"foo".^methods.say
22:26 p6eval rakudo 0d3c66:
22:26 p6eval ..OUTPUT«ACCEPTSperlpredsuccWHICHBoolStrencodeNum​ericRealIntRatNumabsexploglog10sqrtrootsto-radian​sfrom-radiansfloorceilingroundtruncatesigncisunpo​larchrrandsincostanseccoseccotansinhcoshtanhsechc​osechcotanhasinacosatanatan2asecacosecacotanasinh​acoshatanhasechacosechacotanhbytescapitalizech…
22:27 sorear Is it reasonable to require subs and methods with is rw parameters to be predeclared?
22:30 sbp ash_:
22:30 sbp rakudo: my $x = 4096; say :16($x)
22:30 p6eval rakudo 0d3c66: OUTPUT«16534␤»
22:31 sbp can't remember the way to do non-decimal to others
22:31 sbp rakudo: my $x = :16("4096"); say :10($x)
22:31 sbp er
22:31 p6eval rakudo 0d3c66: OUTPUT«16534␤»
22:31 sbp well that didn't work anyway
22:32 sbp rakudo: my $x = :16(16534); say :10($x)
22:32 p6eval rakudo 0d3c66: OUTPUT«91444␤»
22:32 sbp meh
22:32 leprevost left #perl6
22:32 ash_ :\d() doesn't work that way
22:33 sbp demonstrably
22:33 ash_ it confused me too :P
22:33 sbp :-)
22:33 leprevost joined #perl6
22:34 sbp hmm. Sep 01 22:41:38 <TimToady>      however, as a short term expedient, .fmt('%32X', :base($r)) could override the 16-ness of X
22:46 sjohnson rakudo: say ~("pig".^methods)
22:46 p6eval rakudo 0d3c66: OUTPUT«ACCEPTS perl pred succ WHICH Bool Str encode Numeric Real Int Rat Num abs exp log log10 sqrt roots to-radians from-radians floor ceiling round truncate sign cis unpolar chr rand sin cos tan sec cosec cotan sinh cosh tanh sech cosech cotanh asin acos atan atan2 asec acosec
22:46 p6eval ..acotan as…
22:46 sjohnson rakudo: say ~"pig".^methods
22:46 p6eval rakudo 0d3c66: OUTPUT«ACCEPTS perl pred succ WHICH Bool Str encode Numeric Real Int Rat Num abs exp log log10 sqrt roots to-radians from-radians floor ceiling round truncate sign cis unpolar chr rand sin cos tan sec cosec cotan sinh cosh tanh sech cosech cotanh asin acos atan atan2 asec acosec
22:46 p6eval ..acotan as…
22:46 timbunce left #perl6
22:47 dju_ is now known as dju
22:48 dju left #perl6
22:52 dju joined #perl6
22:55 leprevost left #perl6
22:56 sorear let's get rid of cosec, cotan, cosech, cotanh, acosec, acotan, etc
22:56 dju left #perl6
22:56 dju joined #perl6
22:57 flussence maybe stick them behind a "use Trig;"?
22:57 sorear perhaps
22:57 sjohnson damn perl is handy.
22:58 sorear but nobody (well, not me) will look for cosec.  cosecant, or csc
22:58 sorear idiosyncratic abbreviations don't do anyone good
22:59 ash_ aren't they part of Cool?
22:59 sorear right
22:59 ash_ rakudo: say ~"Stuff".^methods(:local)
22:59 p6eval rakudo 0d3c66: OUTPUT«ACCEPTS perl pred succ WHICH Bool Str encode␤»
22:59 ash_ rakudo: say ~Cool.^methos(:local)
22:59 p6eval rakudo 0d3c66: OUTPUT«Method 'methos' not found for invocant of class 'ClassHOW'␤  in main program body at line 22:/tmp/63RirSifki␤»
22:59 sorear most of the Str, Num, List methods are actually in COOL
23:05 Ross^ left #perl6
23:05 Intensity left #perl6
23:12 stkowski joined #perl6
23:14 Intensity joined #perl6
23:15 TimToady I think perhaps the default scope of .^methods is wrong
23:16 TimToady by default it should not include Cool, but maybe everything up to Cool
23:16 flussence a .^methods(:grouped) would be helpful
23:16 TimToady or that
23:18 sorear TimToady: What's so special about Cool that it gets special treatment by ClassHOW?
23:19 TimToady it defines language more than it defines a particular type
23:19 jhuni joined #perl6
23:20 TimToady likewise for listy methods in Any
23:20 ingy when is teh next R*?
23:20 ingy sorear: you going to PPW?
23:22 sorear no
23:22 ingy :(
23:22 ingy so sad
23:22 ingy TimToady: you?
23:23 TimToady well, if you look at who is supposedly giving the keynote...
23:23 ingy MOTHER OF PERL! sorry...
23:23 ingy so when is teh next R*?
23:23 perigrin ingy: Father of Perl ... do we need gender identification flash cards?
23:24 ingy I got a couple mods to get in...
23:24 Limbic_Region joined #perl6
23:24 ingy perigrin: oh right, I was thinking of /me....
23:24 ingy MOTHERF***ER OF PERL
23:24 perigrin :)
23:25 TimToady I identify with all genders, one way or another.
23:26 ingy *gender
23:29 Limbic_Region For perl 6 implementations like Rakudo that do not also implement their own VM and rely on Parrot, is there any reason to believe that user defined data structure will perform worse than a built-in as is the case in perl 5?
23:30 TimToady that would depend on how you define "Parrot"
23:30 sorear Limbic_Region: all Rakudo data structures are user-defined from Parrot's current POV
23:30 sorear an object is likely to perform much better than an array because you aren't paying for lazy iterator extension
23:31 Limbic_Region sorear - right, that's my point
23:31 Limbic_Region TimToady - let me try and rephrase then
23:31 sorear (there are planned major overhauls to Parrot and Rakudo object handling)
23:31 sorear in some senses, Rakudo does implement its own VM; it builds on top of Parrot in much the way Perl 5 builds on top of C89
23:32 sorear although Rakudo is a considerably thinner layer
23:32 TimToady so by the current definition of "Parrot", it's a bit like P5
23:32 Limbic_Region hrm, having a hard time being clear in what I am asking
23:33 sorear In Perl 5, objects are (generally) a kind of hash
23:33 sorear In Perl 6, Hash.isa(P6opaque)
23:34 sorear (is it bad that I use 'local' a LOT more now?)
23:35 TimToady er, huh?
23:35 Limbic_Region ok, I recently wrote a solution to a problem of finding the top-N of a list using a heap implemented in pure perl using an array
23:36 Limbic_Region as a counter benchmark data point, I used an array that was always in sorted order (use bin search to find insertion point and then use splice)
23:36 Limbic_Region according to the math, the heap should have won hands down but didn't
23:36 Limbic_Region my guess is that splice is implemented as highly optimized C using memcpy and what not
23:36 TimToady right
23:36 Limbic_Region where as the heap has to do many heapify-up and heapify-down operations that aren't
23:36 sorear p5 or p6?
23:37 TimToady p5 I presume
23:37 Limbic_Region this was in p5, but it made me wonder about perl 6
23:37 Limbic_Region so I am thinking, splice's equivalent in perl 6 will be written in perl 6 and will be translated into PIR/PASM/flavor of the month and run on parrot
23:38 Limbic_Region there isn't any specific optimization to make that go faster (unless someone spends time tuning it)
23:38 Limbic_Region so, give the same scenario in perl 6, could I expect the same unexpected results or the expected expected results?
23:38 TimToady in P6, a memcopy of the pointers would look more like @array[@foo] »:=« @array[@bar]
23:39 Limbic_Region or is the answer, it depends on how naive you implement the heap in perl 6
23:39 Limbic_Region s/ve/vely/
23:39 sorear Limbic_Region: PIR has a single instruction 'splice' which is ultimately used by the Perl 6 method
23:40 TimToady my point is that P6 has binding that is one step closer to the metal than assignment
23:40 sorear TimToady: How would the impl be expected to know that @foo and @bar are ranges?
23:40 saaki left #perl6
23:40 sorear also, my brain is currently breaking at the notion of »:=«
23:41 perigrin my eyes are tripping over it
23:41 TimToady well, okay, dispatch it on two range objects, if it makes you happier :)
23:42 TimToady and yes, hyper binding is probably not as bare metal as a memcopy
23:42 flussence am I close in guessing that means "copy-on-write all these over to the left"?
23:42 TimToady but maybe it could be
23:42 * sorear wonders if it would make sense to say that my int @foo; @foo[0] := 2; is legal but ... = 2 is not
23:43 TimToady it means bind @array[$n] := @array[$m], $array[$n+1] := @array[$m+1], etcl
23:43 Limbic_Region incidently, the same exact implementation when using Heap::Simple::XS instead of pure perl heap ended up beating the splice() solution hands down
23:43 TimToady and presumably you'd want some way to manage when $m < $n as well as $m > $n
23:44 * flussence doesn't understand the binding operator all that well
23:48 rjbs joined #perl6
23:48 ash_ flussence: do you know C pointers?
23:48 flussence vaguely...
23:48 ash_ its kinda similar to that
23:49 rjbs So, I'm looking for the documentation of Str and Buf.  I'm not sure exactly where I'd find these.  I started at http://perl6.org/ and then http://perlcabal.org/syn/
23:49 flussence I'm looking at S03... are they like p5's tie() stuff?
23:49 ash_ str specifically is at http://perlcabal.org/syn/S32/Str.html
23:49 ash_ Buf is at http://perlcabal.org/syn/S32/Containers.html#Buf
23:49 TimToady note that Buf is only slightly implemented yet
23:50 rjbs Thanks.
23:50 TimToady though I'm currently using one in Real Code
23:50 rjbs Mostly, I want to look at them to steal for some ByteString / TextString library I am likely to end up writing for use in p5 at work.
23:51 rjbs (But I am also interested in them, in general, anyway!)
23:51 TimToady given $tty.read(10)[*]».chr.join { ... }
23:51 Limbic_Region TimToady - I haven't noticed a significant number of Synopsis commits lately.  Does this mean that we are nearly converged, that you have been busy with other things, that you are "thinking" or something else entirely?
23:51 TimToady it mostly means I'm been pretending to be a user and actually programming in Perl 6 a lot
23:51 rjbs What does the [*] do there?
23:51 TimToady but hopefully we're also converging
23:51 TimToady treats the Buf as an array and returns all the chars as numbers
23:52 rjbs (I assumed the 10 means 'read 10 octets')
23:52 TimToady yes, I have the tty in raw mode, and it hands me an entire escape sequence as a single buf
23:52 saaki joined #perl6
23:52 TimToady actually using     run "stty raw -echo min 1 time 1";
23:53 rjbs Cool.  So (I am only baby-literate in p6) the [*] latches on to the fact that the Buf does Array (or some Array-like role) and the * here is a Whatever-y slurpy "everything"?
23:53 TimToady currently the Buf type is happier being treated as Positional than as Stringy
23:53 TimToady correct
23:54 rjbs Neat, thanks.
23:54 TimToady hopefully we'll eventually get native bufs of various bit-nesses
23:55 TimToady then we can do heaps of ints with »=« instead of »:=« and still be efficient, hopefully
23:56 TimToady that is, with a compact native representation of ints, hyper assignment can turn into memcopy
23:57 rjbs That's kind of sick. :-)
23:57 TimToady but I need to think about overlap issues some, and whether that needs to be user-visible
23:57 TimToady memcopy hides it, after all
23:57 rjbs Seeing all the funny chars in here reminds me, you may be amused by: http://met.al/at1
23:57 TimToady you think that's sick, how about »+=« and such?
23:58 rjbs What "that" is it that you're considering the user-visibility of?
23:58 rjbs Oh, nevermind, I've been enlightened.
23:58 * rjbs also only does baby C.
23:59 Limbic_Region rjbs - I am currently porting a red-black tree implementation from C to perl only so that I can then turn bits of it into XS
23:59 Limbic_Region if I knew C better, I would just go C -> XS

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs