Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-09

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:10 drbean joined #perl6
00:20 fgomez joined #perl6
00:23 fgomez joined #perl6
00:23 fgomez joined #perl6
00:26 jnthn pmichaud: Lemme know if you get chance to time latest and see if it helped for you too.
00:26 jnthn 'night, #perl6
00:32 erkan joined #perl6
00:32 erkan joined #perl6
00:44 icwiener joined #perl6
01:02 felher jnthn++
01:02 felher jnthn: sleep well :)
01:12 drbean joined #perl6
01:43 cognominal joined #perl6
02:11 drbean joined #perl6
02:12 _jaldhar joined #perl6
02:19 _jaldhar joined #perl6
02:30 xinming joined #perl6
02:42 drbean joined #perl6
03:06 Guest9285 joined #perl6
03:06 Guest9285 hi
03:07 moritz hello Guest78369
03:20 JimmyZ_ joined #perl6
03:21 dalek doc: 794a5aa | moritz++ | / (2 files):
03:21 dalek doc: switch pod extration to Pod::To::SectionFilter
03:21 dalek doc: review: https://github.com/perl6/doc/commit/794a5aa85e
04:14 pmichaud phenny: tell jnthn I get about 6% improvement in the parse phase for CORE.setting
04:14 phenny pmichaud: I'll pass that on when jnthn is around.
04:19 tokuhiro_ joined #perl6
04:25 pmichaud phenny: tell jnthn I wasn't able to work on while loop exception handler... it's still on my "to-do" list for the weekend if you don't get to it first :)
04:25 phenny pmichaud: I'll pass that on when jnthn is around.
04:44 araujo joined #perl6
04:44 araujo joined #perl6
04:53 sjohnson hello
04:56 sjohnson :3
05:08 sorear hello, sjohnson.  how are you?
05:09 sjohnson sorear: pretty good.  was wondering how perl6 is doing lately
05:09 sjohnson i had a dream I tried Rakudo out
05:10 sjohnson (probably why I was compelled to visit again)
05:10 * sjohnson googles Rakudo
05:10 sjohnson oh yeah, that reminds me, I also had a dream about Niecza too :)
05:12 sjohnson well, they happened at the same time.
05:21 birdwindupbird joined #perl6
05:26 crab2313 joined #perl6
05:31 fgomez joined #perl6
05:36 fgomez joined #perl6
05:45 sjohnson i am happy they are still actively produced
06:21 GlitchMr joined #perl6
06:27 JimmyZ_ joined #perl6
06:38 GlitchMr What is "=begin pod"
06:38 GlitchMr What does it do aside of annoying GitHub
06:39 brrt joined #perl6
06:41 moritz GlitchMr: see S26
06:46 diakopter moritz: good morning
06:55 Caldrin joined #perl6
06:57 Entonian joined #perl6
06:59 Caldrin Hi! The Perl6 book at https://github.com/perl6/book/downloads says "{%hash}" is interpolated as "key1\tvalue1\nkey2\tvalue2\n..." I tried and got "key1\tvalue1   key2\tvalue2".
06:59 Caldrin Is that an error in the docu or does the doc describe the desired behaviour and the implementation is wrong?
07:00 cosimo joined #perl6
07:00 diakopter which implementation are you using
07:02 Caldrin rakudo-2012.05
07:06 Caldrin My child is awake, I need to care for her. I'll come back to talk about the hashes in like 10 hours. See you later.
07:07 edwin joined #perl6
07:11 NamelessTee joined #perl6
07:15 Guest29823 rakudo: 'abc' ~~ /<[^z]>+/
07:15 p6eval rakudo 0fde4a:  ( no output )
07:15 Guest29823 how do I do that properly?
07:15 Guest29823 [^z] doesn't work for anything but z
07:15 GlitchMr nr: print 'a' => 'b', 'c' => 'd'
07:15 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3: OUTPUT«a  bc      d»
07:15 sorear Guest29823: information/reminder: you need to explicity use 'say' if you want p6eval to return anything
07:16 sorear Guest29823: <-[z]>
07:16 sorear std: /<[^z]>/
07:16 p6eval std f179a1b: OUTPUT«ok 00:00 42m␤»
07:16 Guest29823 sorear: thanks
07:16 sorear std: /[^z]/
07:16 GlitchMr nr: print('a' => 'b', 'c' => 'd')
07:16 p6eval std f179a1b: OUTPUT«Potential difficulties:â�¤  [^z] appears to be an old-school character class; please use <-[z]> if you mean a character class at /tmp/oVgnCzal0t line 1:â�¤------> [32m/[^z][33mâ��[31m/[0mâ�¤ok 00:00 41mâ�¤Â»
07:16 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3: OUTPUT«a  bc      d»
07:17 sorear phenny: tell TimToady perhaps <[^z]> should warn too, for people with some knowledge of p6regex changes
07:17 phenny sorear: I'll pass that on when TimToady is around.
07:17 GlitchMr But [^z] is perfectly fine...
07:17 GlitchMr ... ok... it's pointless
07:18 GlitchMr std: /[a-z]/
07:18 p6eval std f179a1b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid regex metacharacter (must be quoted to match literally) at /tmp/8eMgN2Qczb line 1:â�¤------> [32m/[a-[33mâ��[31mz]/[0mâ�¤Potential difficulties:â�¤  [a-z] appears to be an old-school character class; please use <[a..z]> if you mean …
07:18 GlitchMr std: /[a-z]+/
07:18 p6eval std f179a1b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid regex metacharacter (must be quoted to match literally) at /tmp/Hhi2vOxz_N line 1:â�¤------> [32m/[a-[33mâ��[31mz]+/[0mâ�¤Potential difficulties:â�¤  [a-z] appears to be an old-school character class; please use <[a..z]> if you mean…
07:18 GlitchMr std: /[a]+/
07:18 p6eval std f179a1b: OUTPUT«Potential difficulties:â�¤  [a] appears to be an old-school character class; please use <[a]> if youâ�¤    mean a character class, or quote it like 'a' to matchâ�¤    string as a unit at /tmp/zFYLzKeqGH line 1:â�¤------> [32m/[a][33mâ��[31m+/[0mâ�¤ok 00:00 41mâ�¤Â»
07:18 GlitchMr ... ok
07:19 GlitchMr Is it just me, or it's not in https://github.com/perl6/std/blob/master/STD.pm6
07:19 sorear GlitchMr: check CursorBase.pmc
07:22 fgomez joined #perl6
07:38 fgomez joined #perl6
07:39 fgomez joined #perl6
07:40 GlitchMr How to detect Perl 6, the short way:
07:40 GlitchMr my @perl = 1, 2;
07:40 GlitchMr my $perl = (5, 6)[@perl - 1]
07:40 GlitchMr (I guess that you could make something better than this, but whatever)
07:41 GlitchMr ok...
07:41 GlitchMr my $perl = (5, 6)["\n" ~~ /./];
07:42 GlitchMr ... no
07:42 GlitchMr It doesn't work...
07:42 diakopter eval: my $perl = (5, 6)["\n" ~~ /./];
07:42 buubot_backup diakopter: 5
07:42 GlitchMr perl6: my $perl = (5, 6)[+("\n" ~~ /./)]; print $perl;
07:42 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.​13.20120203/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't locate P…
07:42 p6eval ..rakudo 0fde4a, niecza v18-6-ge52d6c3: OUTPUT«5»
07:42 GlitchMr eval: my $perl = (5, 6)[+("\n" ~~ /./)]; print $perl;
07:42 buubot_backup GlitchMr: 51
07:42 GlitchMr :)
07:42 diakopter heh
07:42 GlitchMr That 1 is result from print, it doesn't count
07:44 moritz r: print eval '1 == True'
07:44 p6eval rakudo 0fde4a: OUTPUT«True»
07:44 moritz r: if ( eval '1 == True' ) { print 'Perl 6' } else { print 'Perl 5' }
07:44 p6eval rakudo 0fde4a: OUTPUT«Perl 6»
07:45 moritz eval: if ( eval '1 == True' ) { print 'Perl 6' } else { print 'Perl 5' }
07:45 buubot_backup moritz: Perl 51
07:45 GlitchMr :)
07:45 moritz eval: if ( 1 == True ) { print 'Perl 6' } else { print 'Perl 5' }
07:45 buubot_backup moritz: Perl 51
07:45 diakopter eval: if ( 1 == True ) { print 'Perl 6' } else {  'Perl 5' }
07:45 buubot_backup diakopter: Perl 5
07:46 moritz won't work under strict though
07:46 GlitchMr True is bareword equal to 0
07:46 GlitchMr Right?
07:47 GlitchMr (or rather, 'True', but that with eq)
07:48 moritz right
07:48 diakopter eval: use strict; 'Perl 5'
07:48 buubot_backup diakopter: Perl 5
07:49 diakopter eval: use strict; True;
07:49 buubot_backup diakopter: ERROR: Bareword "True" not allowed while "strict subs" in use at (eval 20) line 1.
07:49 moritz eval: 10 * 0.1 == 1
07:49 buubot_backup moritz: 1
07:49 diakopter eval: say 3
07:49 buubot_backup diakopter: ERROR: syntax error at (eval 20) line 1, near "say 3"
07:50 GlitchMr I prefer (5, 6)[+("\n" ~~ /./)] way
07:50 GlitchMr (but seriously, checking version is something that you rarely want to do)
07:51 GlitchMr ... actually
07:51 GlitchMr eval: (5, 6)[+'0e0']
07:51 buubot_backup GlitchMr: 5
07:51 GlitchMr perl6: print (5, 6)[+'0e0']
07:51 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3, pugs: OUTPUT«5»
07:51 GlitchMr ...
07:51 GlitchMr ... right
07:52 GlitchMr perl6: print (5, 6)[!!+'0e0']
07:52 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3, pugs: OUTPUT«5»
07:52 GlitchMr perl6: print (6, 5)[!!+'0e0']
07:52 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3, pugs: OUTPUT«6»
07:52 sorear nr: say $*PERL<version>
07:52 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3: OUTPUT«Any()␤»
07:52 GlitchMr eval: (6, 5)[!!+'0e0']
07:52 buubot_backup GlitchMr: 5
07:52 GlitchMr :)
07:52 sorear nr: say $*PERL
07:52 p6eval rakudo 0fde4a: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.05-221-g0fde4a1", "release-number" => "", "build-date" => "2012-06-09T01:12:11Z", "codename" => ""}).hash␤»
07:52 p6eval ..niecza v18-6-ge52d6c3: OUTPUT«Any()␤»
07:52 sorear nr: say $?PERL
07:52 p6eval niecza v18-6-ge52d6c3: OUTPUT«{"build-time" => 1339095605.0433719e0, "name" => "niecza", "version" => "v18-6-ge52d6c3"}␤»
07:52 p6eval ..rakudo 0fde4a: OUTPUT«===SORRY!===␤Variable $?PERL is not declared␤at /tmp/IxNbtaucfk:1␤»
07:53 GlitchMr (6, 5)[!!+'0e0'] looks simple enough...
07:53 sorear I ought to fix that
07:53 sorear '0 but true' works too
07:53 moritz r: say (5, 6)[+":2<1>"]
07:53 p6eval rakudo 0fde4a: OUTPUT«6␤»
07:53 moritz eval: (5, 6)[+":2<1>"]
07:53 buubot_backup moritz: 5
07:54 GlitchMr sorear, unless I've missed something, '0 but true' is not numeric for Perl 6
07:54 GlitchMr nr: print +'0 but true'
07:54 p6eval niecza v18-6-ge52d6c3: OUTPUT«Unhandled exception: Cannot parse number: 0 but true␤  at /home/p6eval/niecza/lib/CORE.setting line 1402 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3480 (ANON @ 11) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3482 (NumSyntax.str2num @ 5) …
07:54 p6eval ..rakudo 0fde4a: OUTPUT«Cannot convert string to number: trailing characters after number in '0⏏ but true' (indicated by ⏏)␤  in method Str at src/gen/CORE.setting:9423␤  in method print at src/gen/CORE.setting:7094␤  in sub print at src/gen/CORE.setting:6965␤  in block <anon> at /tmp/8d_…
07:54 sorear GlitchMr: oops. right.
07:54 pupoque joined #perl6
07:55 GlitchMr It was Perl 5 hack
07:55 GlitchMr You can use 0 but True in Perl 6...
07:57 GlitchMr This code uses fact that "+" prefix in Perl 5 does... nothing
08:02 sergot joined #perl6
08:02 sergot hi o/ :)
08:03 espadrine joined #perl6
08:05 dalek rakudo/require-arglist: 715efa4 | moritz++ | src/Perl6/Actions.pm:
08:05 dalek rakudo/require-arglist: compile-time evaluate argument lists to "require"; check for redeclarations
08:05 dalek rakudo/require-arglist: review: https://github.com/rakudo/rakudo/commit/715efa4410
08:20 kaare_ joined #perl6
08:24 fgomez joined #perl6
08:37 dalek rakudo/require-arglist: 2e974ac | moritz++ | src/Perl6/Actions.pm:
08:37 dalek rakudo/require-arglist: oops, $<EXPR> is an RPA
08:37 dalek rakudo/require-arglist: review: https://github.com/rakudo/rakudo/commit/2e974ac80f
08:54 cosimo joined #perl6
09:14 espadrine left #perl6
09:14 espadrine joined #perl6
09:20 espadrine left #perl6
09:20 espadrine joined #perl6
09:21 tokuhiro_ joined #perl6
09:23 tadzik good morning #perl6
09:24 GlitchMr hi
09:36 brrt left #perl6
09:38 snearch joined #perl6
10:11 moritz \o tadzik
10:12 moritz r: say "a\nb\nc\nd\n".lines(2).perl
10:12 p6eval rakudo 0fde4a: OUTPUT«("a", "b").list␤»
10:12 grondilu joined #perl6
10:13 grondilu Why can't we put a type constraint on a 'our'-scoped variable?
10:14 grondilu r: package { our Int $n }
10:14 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤Cannot put a type constraint on an 'our'-scoped variable at line 2, near "}"␤»
10:14 moritz do { our Str $a }; do { our Int $a } # which type does our $a have?
10:15 grondilu I see.  But if the packages are named there is no problem, is it?
10:16 moritz I don't understand
10:16 grondilu Nevermind.
10:20 dalek specs: 34fddf7 | moritz++ | S32-setting-library/Str.pod:
10:20 dalek specs: [S32::Str] substr is not rw anymore, but substr-rw is
10:20 dalek specs: review: https://github.com/perl6/specs/commit/34fddf7788
10:24 dalek doc: 06dccaf | moritz++ | lib/Str.pod:
10:24 dalek doc: Str.lines, words, flip, sprintf
10:24 dalek doc:
10:24 dalek doc: mostly copied from the specs
10:24 dalek doc: review: https://github.com/perl6/doc/commit/06dccaf5d1
10:28 Caldrin eval: print "{a => 1, b => 2}"
10:28 buubot_backup Caldrin: {a => 1, b => 2}1
10:29 Caldrin r: print "{(a => 1, b => 2)}"
10:29 p6eval rakudo 0fde4a: OUTPUT«a 1 b     2»
10:30 moritz r: print "{}"
10:30 p6eval rakudo 0fde4a:  ( no output )
10:30 moritz so  "{}" eq '{}' is also a nice 5-vs-6 test
10:30 moritz Caldrin++
10:32 whiteknight joined #perl6
10:36 Caldrin r: print "{{a => 1, b => 2}}"
10:36 p6eval rakudo 0fde4a: OUTPUT«a 1 b     2»
10:39 moritz where is hash stringification specced?
10:39 PacoAir joined #perl6
10:39 moritz I haven't found it in S32::Container
10:40 moritz and a quick grep through S02 doesn't reveal anything either
10:42 moritz r: say Hash ~~ Iterable
10:42 p6eval rakudo 0fde4a: OUTPUT«True␤»
10:48 moritz nr: say substr('foo')
10:48 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'substr' will never work with argument types (str) (line 1)␤    Expected: :(Cool $s, $pos, $chars?)␤»
10:48 p6eval ..niecza v18-6-ge52d6c3: OUTPUT«Unhandled exception: No value for parameter '$start' in 'substr'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (substr @ 1) ␤  at /tmp/3pjqrImRsZ line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤  at /home/p6eval/nie…
10:51 dalek doc: f9a1cbe | moritz++ | lib/Str.pod:
10:51 dalek doc: add substr signatures
10:51 dalek doc: review: https://github.com/perl6/doc/commit/f9a1cbedc6
10:53 moritz low-hanging fruit: add the description for substr
11:10 JimmyZ joined #perl6
11:17 thelazydeveloper joined #perl6
11:27 jnthn Well, that was quite some long sleep... :)
11:27 phenny jnthn: 04:14Z <pmichaud> tell jnthn I get about 6% improvement in the parse phase for CORE.setting
11:27 phenny jnthn: 04:25Z <pmichaud> tell jnthn I wasn't able to work on while loop exception handler... it's still on my "to-do" list for the weekend if you don't get to it first :)
11:27 diakopter jnthn: o hai
11:27 jnthn phenny: tell pmichaud well, I eliminated the while loop in !alt now so that is less urgent
11:27 phenny jnthn: I'll pass that on when pmichaud is around.
11:27 diakopter welcome to the land of the awake
11:29 jnthn phenny: tell pmichaud I shove the marks straight onto the bstack in an op now, which saves another GC allocation and a bunch of screwing around. :)
11:29 phenny jnthn: I'll pass that on when pmichaud is around.
11:31 crab2313 joined #perl6
11:42 tadzik emmentaler: 54 modules ok, 47 not ok (101 total), Testing took 21 minutes and 33 seconds
11:43 tadzik GlitchMr: I'm afraid Acme::Addslashes doesn't build
11:44 tadzik moritz: MiniDBI tests failed for me
11:50 GlitchMr Possibly, I haven't tested.
11:50 GlitchMr I couldn't get Rakudo to work...
11:51 GlitchMr It worked for me on Niecza through
11:52 moritz tadzik: DBIish is the new kid in town
11:52 GlitchMr r: module Acme::Addslashes { sub addslashes is export (Str $string) { $string.subst(/ (.) /, { "$0\c[COMBINING LONG SOLIDUS OVERLAY]" }, :g); }; }; print addslashes '3000';
11:52 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/SN7ndqEkPS:1␤»
11:52 moritz tadzik: though I should fix the tests, yes
11:52 GlitchMr n: module Acme::Addslashes { sub addslashes is export (Str $string) { $string.subst(/ (.) /, { "$0\c[COMBINING LONG SOLIDUS OVERLAY]" }, :g); }; }; print addslashes '3000';
11:52 p6eval niecza v18-6-ge52d6c3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'addslashes' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at…
11:53 GlitchMr n: module Acme::Addslashes { sub addslashes is export (Str $string) { $string.subst(/ (.) /, { "$0\c[COMBINING LONG SOLIDUS OVERLAY]" }, :g); }; }; use Acme::Addslashes; print addslashes '3000';
11:53 p6eval niecza v18-6-ge52d6c3: OUTPUT«Unhandled exception: Unable to locate module Acme::Addslashes in @path␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5) ␤  at /home/p6eval/niecza/src/NieczaPathSearch.pm6 line 23 (NieczaPathSearch.load_module @ 17) ␤  at /home/p6eval/niecz…
11:58 moritz tadzik: wait, MiniDBI needs mysql credentials to run the tests; I won't change that
12:01 tadzik oh, I see
12:01 tadzik I've mistaken those two
12:03 moritz oh, I've lost mysql during my upgrade to debian testing
12:09 jnthn phenny: de en "require arglist"?
12:09 phenny jnthn: "require arglist" (de to en, translate.google.com)
12:09 jnthn Dang... :)
12:09 jnthn moritz++ anyways
12:10 moritz phenny: en de "malice"?
12:10 phenny moritz: "Bosheit" (en to de, translate.google.com)
12:10 moritz hm
12:10 moritz phenny: de en "arglist"?
12:10 phenny moritz: "malice" (de to en, translate.google.com)
12:10 moritz ENOROUNDTRIP
12:10 moritz jnthn: stupid question, how do I declare a variablein the actions
12:10 moritz ?
12:11 moritz I've tried to understand make_variable_from_parts, but I have trouble figuring out what's actually going on
12:11 jnthn moritz: declare_variable(...)
12:11 moritz oh.
12:12 jnthn r: use fatal; say $*FATAL
12:12 p6eval rakudo 0fde4a: OUTPUT«True␤»
12:12 jnthn r: say $*FATAL
12:12 p6eval rakudo 0fde4a: OUTPUT«False␤»
12:12 jnthn Yeah
12:12 jnthn The use that sets up $*FATAL works, and isn't tied in to anything much
12:18 jnthn shopping &
12:23 spider-mario joined #perl6
12:29 dalek rakudo/require-arglist: 40e87e0 | moritz++ | src/Perl6/Actions.pm:
12:29 dalek rakudo/require-arglist: stub in symbols from the require arglist
12:29 dalek rakudo/require-arglist: review: https://github.com/rakudo/rakudo/commit/40e87e03b6
12:31 araujo joined #perl6
12:37 cognominal_ joined #perl6
12:49 araujo joined #perl6
12:55 crab2313 joined #perl6
12:55 cognominal joined #perl6
13:00 espadrine left #perl6
13:08 Psyche^ joined #perl6
13:11 moritz r: sub f($sym) { CALLER::{$sym} := 'foo' }; my $x; f('$x'); say $x
13:11 p6eval rakudo 0fde4a: OUTPUT«foo␤»
13:14 moritz r: our class A { }; say OUR::<A>
13:14 p6eval rakudo 0fde4a: OUTPUT«A()␤»
13:20 araujo hello
13:21 wooden joined #perl6
13:21 wooden joined #perl6
13:25 moritz hello araujo
13:28 MayDaniel joined #perl6
13:29 araujo hi moritz o/
13:37 * jnthn back
13:38 jnthn Beer and food supplies now replenished. :)
13:39 moritz jnthn: I'm tryint to patch in importing from require'd modules
13:39 moritz jnthn: and I get "Could not locate compile-time value for symbol PseudoStash"
13:40 moritz jnthn: I suspect that the reason is that I added an import helper in the setting that binds to CALLER::{$sym}
13:40 moritz and the setting doesn't like that
13:40 moritz jnthn: any idea how to fix it?
13:40 moritz oh, maybe I should put it after PseudoStash :-)
13:44 moritz and now I get infinite recursion (with Str, Stringy and infix:<~>)
13:44 moritz :/
13:44 jnthn How are you trying to do the import?
13:44 jnthn I need to see the match, really.
13:44 moritz wait a sec, I'll push the patch
13:45 dalek rakudo/require-arglist: 3862754 | moritz++ | src/ (4 files):
13:45 dalek rakudo/require-arglist: try to import from required modules
13:45 dalek rakudo/require-arglist: review: https://github.com/rakudo/rakudo/commit/3862754c61
13:45 moritz this blows up during setting compilation
13:49 jnthn Hmmm
13:49 jnthn Does it come before or after PseudoStash?
13:49 moritz (the patch is wrong in that it tries to import 'our' symbols, and not exported symbols; but I don't see how fixing that could make it not blow up)
13:49 moritz after
13:49 jnthn Well, it should not even be invoked during setting compilation.
13:50 sftp joined #perl6
13:50 moritz it doesn't blow up with the PseudoStash thing anymore
13:50 moritz 15:44 < moritz> and now I get infinite recursion (with Str, Stringy and  infix:<~>)
13:50 jnthn That tends to mean "tried to report an error and failed to"
13:51 * jnthn builds it
13:51 moritz hm, I can try to compile with --ll--exception
13:52 * jnthn wonders if this is the first use of pseudo-packages in the setting
13:53 moritz why do some things (like binding to an attribute) don't work in the setting?
13:54 moritz but you're right, World.throw appears in the backtrace
13:54 moritz called from variable_declarator
13:54 jnthn Binding to attributes works fine in the setting *in general*.
13:54 moritz so, symbol redeclaration
13:55 jnthn The problem is with attributes added early in the stuff done in BOOTSTRAP
13:55 moritz oh
14:00 jnthn oh
14:00 jnthn my @missing;
14:00 jnthn my $package := ::OUR{$package-name}.WHO;
14:00 jnthn my @missing;
14:00 jnthn ...two @missing
14:00 moritz oops
14:00 * jnthn missed that completely when reading the code on GitHub.
14:00 jnthn .oO( @missing something... )
14:00 moritz double-missed
14:02 moritz is there a way to not make the exceptions go wrong like that?
14:04 jnthn I'm just trying to see if I can figure out why/where it goes wrong here
14:06 pmichaud good morning, #perl6
14:06 phenny pmichaud: 11:27Z <jnthn> tell pmichaud well, I eliminated the while loop in !alt now so that is less urgent
14:06 phenny pmichaud: 11:29Z <jnthn> tell pmichaud I shove the marks straight onto the bstack in an op now, which saves another GC allocation and a bunch of screwing around. :)
14:06 pmichaud jnthn: yes, I saw the op -- I agree that's the way to go :)
14:06 dalek rakudo/require-arglist: 05b24b5 | moritz++ | src/core/operators.pm:
14:06 dalek rakudo/require-arglist: fix setting compilation. jnthn++
14:06 dalek rakudo/require-arglist: review: https://github.com/rakudo/rakudo/commit/05b24b57a9
14:06 jnthn phew :)
14:06 jnthn moritz: It's not immediately obvious to me what's going on there.
14:07 pmichaud I think I'll try the bstack clone here, just to see if I get anything fromit
14:07 pmichaud *from it
14:08 moritz jnthn: (pure speculation) might  it be that stringification of some types isn't working yet, for example get_string vtables not yet set up?
14:11 jnthn moritz: It looks something like that.
14:11 moritz r: use Test; say ::OUR<Test>;
14:11 p6eval rakudo 0fde4a: OUTPUT«Any()␤»
14:12 moritz oh.
14:12 moritz r: use Test; say Test
14:12 p6eval rakudo 0fde4a: OUTPUT«Test()␤»
14:12 jnthn The import is purely lexical.
14:12 jnthn r: use Test; say ::MY<Test>;
14:12 p6eval rakudo 0fde4a: OUTPUT«No such method 'postcircumfix:<{ }>' for invocant of type 'Perl6::Metamodel::ModuleHOW'␤  in block <anon> at /tmp/XXx5UnSuta:1␤␤»
14:12 moritz r: require Test; say OUR<Test>;
14:12 p6eval rakudo 0fde4a: OUTPUT«Any()␤»
14:12 jnthn r: use Test; say MY::<Test>;
14:12 p6eval rakudo 0fde4a: OUTPUT«Any()␤»
14:12 moritz no global merging?
14:13 jnthn Oh...for require?
14:13 jnthn Hmm...we probably *should*, but whether it does or not is another matter.
14:13 moritz it seems it does not
14:14 moritz though we could stub symbol 'A' on 'require A <...>'
14:15 jnthn Stub?
14:15 jnthn Hm
14:15 moritz declare
14:16 jnthn Yeah, I'm not sure if that makes sense.
14:16 jnthn Doing the global merge does though.
14:17 moritz considering that you can also do  require $filename <&foo $bar>;  it probably doesn't make too much sense to declare something
14:17 jnthn Good point.
14:18 spacebat_ hey, trying to build a fresh clone of rakudo on debian testing, it fails linking libparrot with (.text+0x20): undefined reference to `main'
14:20 spacebat_ I can find plenty of references to the error in general, the general advice is that the makefile has a bug
14:20 spacebat_ but I can't find any reference to parrot in these google results
14:20 moritz spacebat_: did you do --gen-parrot in rakudo?
14:20 moritz spacebat_: or are you building parrot HEAD?
14:21 spacebat_ in the rakudo dir perl Configure.pl --gen-parrot
14:21 moritz I've upgraded to debian testing today, and it built rakudo and parrot just fiine
14:21 tadzik I'm on debian testing, works fine
14:22 spacebat_ I've built rakudo in the past and never encountered this
14:22 moritz generic advice in such situations is to wipe out old parrot installations
14:22 moritz and in parrot's dir, type   git clean -xdf
14:22 spacebat_ ok I'll try that
14:22 moritz (removes all files not under version control)
14:23 moritz and in rakudo, rm -rf install/
14:23 moritz and make clean
14:23 moritz and then try again
14:23 moritz oh, but now with --gen-parrot=master I get the same error :(
14:23 moritz though the first error is    /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-l​inux-gnu/Scrt1.o(.debug_info): relocation 0 has invalid symbol index 11
14:24 spacebat_ it is from that object file that the error I see is thrown
14:27 moritz tadzik, spacebat_: do you have libc6-dbg:amd64 installed, and if yes, in which version?
14:28 spacebat_ I don't, but libc:amd64 is 2.13-32
14:30 JimmyZ joined #perl6
14:30 tadzik moritz: 2.13-32
14:30 tadzik (installed)
14:32 birdwind1pbird joined #perl6
14:33 spacebat_ I just installed libc-dbg and trying to build again
14:34 pmurias joined #perl6
14:34 spacebat_ found someone else mentioning it https://gist.github.com/2842279
14:38 moritz phenny: ask timotimo if he ever found a fix for https://gist.github.com/2842279
14:38 phenny moritz: I'll pass that on when timotimo is around.
14:42 spacebat_ he had that problem on 31 may, and subsequently seems to have been using rakudo, so my guess is he found a workaround at least
14:45 spacebat_ moritz: you mentioned that you can reproduce it with --gen-parrot=master
14:45 spacebat_ perhaps I'm doing that implicitly
14:46 moritz spacebat_: I've retried with older version of parrot too. Same failure
14:47 moritz spacebat_: I guess my libc wasn't upgraded when I last built rakudo + parrot successfully
14:47 spacebat_ ah, well I'm glad its not just me being a clutz
15:02 cognominal joined #perl6
15:06 araujo anybody knows if there exist a good reference for built-in methods in perl6?
15:07 pmichaud http://perlcabal.org/syn/S32/   is the closest I know of
15:07 moritz https://github.com/perl6/doc/ # I'm working on it
15:07 moritz and contributions are very welcome
15:09 araujo thanks pmichaud moritz !
15:09 araujo moritz, \o/
15:10 crab2313 great
15:18 pmichaud jnthn: I just rebuilt CORE.settings from latest -- it's now showing about a 8% improvement from before your changes yesterday.  jnthn++
15:18 pmichaud my system yesterday might've had something going on in background
15:18 jnthn pmichaud: Well, noise happens too :)
15:19 jnthn pmichaud: Anyway, getting a matching result in that region is good.
15:19 jnthn It means we're almost back to where things stood before altnfa landed.
15:19 pmichaud yes, within a percentage point or two
15:19 pmichaud I'm about to try my RIA patch and see if that helps or hurts
15:22 moritz lately I've got a lot of parse errors without line numbers
15:22 moritz I suspect they come from failed goals (ie ~ syntax)
15:22 moritz that is very annoying
15:23 jnthn That...doesn't report line number?
15:23 moritz r: { my $a = 3 my $x = 5 }
15:23 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}'␤»
15:24 moritz no line number.
15:24 pmichaud RIA patch seems to make less than 0.1% difference in CORE.setting compile speed
15:24 jnthn hm, it doesn't.
15:24 jnthn pmichaud: Doesn't surprise me entirely. I don't think we ever shift off one, which is where the big savings were.
15:25 pmichaud oh, I was comparing the cost of   new "ResizableIntegerArray"   versus   clone $P0, RIA
15:25 jnthn Oh
15:25 jnthn Oh, sorry, I thought you meant something else. I see now.
15:25 pmichaud apparently we don't create enough of them to make a huge difference
15:25 jnthn Hmm.
15:25 jnthn We create one every time in !cursor_start
15:26 grondilu joined #perl6
15:26 * grondilu failed to compile nqp.  Trying again.
15:28 jnthn moritz: Trying a patch for that.
15:29 JimmyZ Online Perl6 Compiler & Debugging Tool:  http://ideone.com/TRKto
15:30 * JimmyZ wonders who wrote it
15:32 grondilu JimmyZ: cool.  Definitely something that should be on perl6.org imho
15:32 tadzik wow
15:32 grondilu ahhh.  Failed again!
15:32 tadzik there's some Perl 6 person at ideone
15:32 grondilu called from Sub 'MAIN' pc 10508 (src/stage0/NQP-s0.pir:3382) (src\stage2\gen\NQP.pm:2936)
15:32 grondilu called from Sub '_block1000' pc 201 (src/stage0/NQP-s0.pir:106) (src\stage2\gen\NQP.pm:1)
15:32 grondilu make: *** [src/stage1/NQPCORE.setting.pbc] Erreur 1
15:33 grondilu Command failed (status 512): make
15:33 araujo moritz, very cool the doc project ....
15:33 grondilu Command failed (status 512): /usr/bin/perl Configure.pl --with-parrot=/usr/local/sr​c/rakudo/install/bin/parrot --make-install
15:33 tadzik nice how they can afford something that eats 80 MBs :)
15:33 araujo moritz, just checked the Any.pod , .. it seems 'all' and 'none' entries are duplicated there?
15:33 benabik http://ideone.com/GV799
15:33 brrt joined #perl6
15:33 jnthn "Perl 6 (rakudo-2010.08)" - hmm. :)
15:33 tadzik http://ideone.com/howYJ
15:33 tadzik yeah :)
15:33 tadzik we think alike
15:34 grondilu Any help about fail above, please?
15:34 moritz grondilu: you need to show (nopaste) the error, not just the tail of the backtrace
15:34 dalek nqp: ea9ceea | jnthn++ | src/HLL/Grammar.pm:
15:34 dalek nqp: Override FAILGOAL in HLL::Grammar and get it to delegate to panic, so we get a line number.
15:34 dalek nqp: review: https://github.com/perl6/nqp/commit/ea9ceea3ed
15:34 dalek doc: deb2cd9 | moritz++ | lib/Any.pod:
15:34 dalek doc: fix duplicate heading, araujo++
15:34 dalek doc: review: https://github.com/perl6/doc/commit/deb2cd935e
15:35 araujo :D
15:35 araujo hehe
15:35 jnthn moritz: ea9ceea should help
15:35 jnthn pmichaud: Do you know how :dba is meant to work?
15:35 moritz jnthn: thanks
15:35 jnthn I thought it set a $*DBA contextual
15:35 jnthn But now I can't find any evidence of that...
15:35 jnthn (In STD that is)
15:36 grondilu http://s0.barwen.ch/~grondilu/nqp-compile-error
15:37 moritz grondilu: do you have local modifications in nqp?
15:38 pmichaud jnthn: looking
15:38 grondilu moritz: I don't think so.
15:38 grondilu I never touched nqp's code.
15:39 grondilu However, I recently removed old versions of parrot to make some room on my disk.  Maybe it's related.
15:40 * grondilu has quite a small disk storage
15:41 pmichaud grondilu: are there any old versions of parrot remaining on the system?
15:42 jnthn "invoke() not implemented in class 't'"
15:42 jnthn ...class "t"? Sounds...very weird.
15:42 grondilu pmichaud: I'm not sure but I think not.
15:42 moritz indeed
15:43 moritz which is why I asked about local modifications
15:43 grondilu also, I recently update all my perl packages on CPAN. I hope this has nothing to do with it.
15:44 grondilu I also notice there are a LOT of warnings about implicit conversion from void* to mp_digit*
15:44 pmichaud jnthn: I _think_ (but I'm not positive) that  :dba('foo')   sets  $/{'dba'} := 'foo'   in the resulting match object
15:45 jnthn pmichaud: Hmm.
15:45 jnthn pmichaud: Which leads me to wonder how on earth it ends up in the FAILGOAL error.
15:45 pmichaud I think that's a separate path
15:45 jnthn Oh.
15:45 pmichaud but clearly FAILGOAL could look at $/<dba> to get it.
15:46 jnthn Oh, that's true...
15:46 pmichaud i.e.,  FAILGOAL does something similar to   $/<dba> // $rulename
15:46 pmichaud or, if it's not actually in the match hash, it could be $/.dba  that provides it
15:46 pmichaud that might actually be nicer/cleaner
15:47 pmichaud i.e., it could be an attribute instead of an entry in the hash
15:47 jnthn I can imagine it going into the match hash just fine too
15:47 jnthn Well, but then we bloat up Cursor with a $!dba slot for every cursor.
15:47 pmichaud well, using $/.dba would be nice in that   $/.dba could return the rule name if :dba wasn't set
15:48 jnthn True
15:48 pmichaud also, $/<dba>  is kind of "not-nice" in that it's not necessarily a full-fledged match object.
15:48 jnthn Yeah, you'd have to shove the thing on the cstack or something
15:48 pmichaud although we could make it one... but that gets kind of icky too
15:48 moritz shouldn't :dba be a property of the regex?
15:49 grondilu damned it I'm gonna have to leave in 10 minutes.  I'm trying to remove everything and reclone.
15:49 pmichaud I'm find with dba setting a property of the regex, too.  .nqpattr strikes again  :-/
15:49 jnthn moritz: Well, but it can be set multiple times within one regex too.
15:50 jnthn I agree there's a sense in which it's "static" though.
15:50 pmichaud if :dba appears multiple times in a regex, that probably argues for it going on the cstack somehow
15:50 * pmichaud looks for an example
15:50 jnthn Well, or updating a $!dba in the cursor.
15:50 moritz well, I'd think it should be lexically scoped
15:51 Chillance joined #perl6
15:51 pmichaud updating dba in the cursor might have backtracking issues, though
15:51 jnthn pmichaud: ah...good point.
15:51 pmichaud it could go on the cstack but *not* be treated like a capture.
15:51 pmichaud i.e., it goes onto the cstack, but caphash doesn't treat it like a capture.  Instead,  $/.dba knows how to find the latest :dba entry on the cstack, and (perhaps) returns the regex name if one isn't found
15:52 jnthn If we can make the caphash treatement of it cheap, that sounds feasible.
15:52 pmichaud oh, caphash should be really cheap
15:52 pmichaud looking
15:52 jnthn caphash is a hot path in profiles today.
15:53 pmichaud well, I mean not-much-more-expensive than what we have now :)
15:53 jnthn ah, OK :)
15:53 pmichaud keep in mind that there's always a "hot path"  :)
15:53 jnthn .oO( Parsing CORE.setting will always be like walking on burning coals... )
15:54 pmichaud moritz: (lexically scoped)  -- yes, that make some sense also.  In that sense it acts like the other modifiers.
15:56 pmichaud that makes it seem more like a separate slot on the cursor object
15:56 pmichaud er, wait
15:56 jnthn Modulo backtracking issues
15:56 pmichaud well, backtracking is handled already by the lexical scoping
15:57 pmichaud if lexical, then it's something that is set at match object creation instead of being part of the cursor
15:58 pmichaud that's not too bad, if it's just a slot in the match object
15:58 jnthn token statement in STD is a place with multiple uses of :dba, fwiw.
15:58 pmichaud also prevents having to munge with the cstack, and helps to reflect that it's really more static than dynamic
15:59 pmichaud jnthn: (token statement) -- thanks, that's a huge help.
16:01 grondilu joined #perl6
16:01 pmichaud oh, I should leave in about 15
16:03 jnthn pmichaud: OK. I wasn't gonna do :dba "right now", just was in failgoal and remembered it and thought it'd be nice to have in the near future. :)
16:03 pmichaud :dba is something I might like to hack on :)
16:03 jnthn That also works very well for me. :)
16:04 pmichaud I think I might spend a bit of time with the profiler, though
16:04 jnthn *nod*
16:04 pmichaud I still want to improve map performance a bit more, and there's still some eagerness creeping into the process somewhere that needs to be fleshed out
16:05 * grondilu totally underestimate the time it takes to clone and compile rakudo :(
16:05 grondilu s/underestimate/&ed/
16:05 pmichaud cloning parrot takes a really long time :-/
16:06 pmichaud jnthn: I tried special-casing the path where $block.count == 1  (to avoid maniuplating the args array and doing block(args :flat) )   but it didn't seem to make a noticeable difference
16:06 jnthn pmichaud: Interesting...
16:06 jnthn pmichaud: Where did you put the special case?
16:07 pmichaud right before block(args :flat)
16:07 jnthn Was the conditional for it in the loop, or outside of it?
16:07 jnthn Ah, okm.
16:07 pmichaud conditional in the loop
16:07 jnthn Yeah
16:07 jnthn May be that the cost of that noms the advantage.
16:08 pmichaud well, the alternative is two separate Q:PIR sections; that doesn't seem worth it.
16:08 jnthn Pulling it out is messy to deal with though I guess.
16:08 jnthn Right.
16:08 pmichaud I'm guessing   args :flat  must not be that expensive
16:09 pmichaud manipulating the args array isn't that expensive either -- it's basically just a push
16:09 jnthn Can imagine it not being too bad.
16:09 jnthn Yeah
16:09 jnthn Do we re-make the args array each time around the loop?
16:09 pmichaud no
16:09 pmichaud args = 0
16:09 jnthn OK, then you already have that optimization :)
16:09 pmichaud basically it's  args = 0
16:10 pmichaud and then   shiftpush args, items, argc
16:10 jnthn *nod*
16:10 jnthn And the shift is nice and cheap now we have QRPA :)
16:10 pmichaud the shift from items is common, so not expensive (with QRPA)
16:11 pmichaud so I'm guessing that     args = shift items    is about the same cost as   shiftpush args, items, 1
16:11 jnthn Yes.
16:11 jnthn Particularly as the push won't have to allocate
16:11 jnthn (After the intial push, anyway)
16:12 pmichaud anyway, I may do profiling over the next couple of days, unless there's a high-priority issue that needs my attention now that .munch is being addressed
16:12 pmichaud oh, I still need to spread qrpa through out more of the places that we currently use rpa
16:12 jnthn Yeah, performance work is welcome. :dba is nice for errors.
16:12 grondilu the 'receiving objects' part keeps halting for no apparent reason :(
16:12 jnthn If you fancy something hard...operator adverb parsing in EXPR ;)
16:12 pmichaud jnthn: definitely not this week :)
16:13 jnthn pmichaud: Fair enough. I'm not exactly longing to jump in to that one. :)
16:14 jnthn It's some 100s of spectests when we get around to it, though.
16:14 jnthn I don't even really care about it much for infixes.
16:14 jnthn It's more postcircumfixes so we can do the :delete stuff
16:16 jnthn Last time I tried to figure out how the colonpairs end up attached to the correct call in the EXPR_reduce, my head exploded. Maybe this figuring this out needs whisky instead of beer or something...
16:16 moritz it might be worth checking how niecza does it; I have more confidence that it gets it right than STD
16:17 jnthn Good point :)
16:18 jnthn Heh. So a while ago when we gave the ROADMAP its last big overhaul, we had priority 1, 2, 3... Now we've eaten all but one of the priority 1 tasks and everything else is 2s and 3s.
16:18 pmichaud \o/
16:18 tadzik woo
16:19 pmichaud with the priority 1 tasks out of the way, we probably need to focus a bit more on community building again
16:19 moritz p5 interop being the remaining 1 priority item
16:19 jnthn Right.
16:19 pmichaud docs, modules, installs, etc.
16:19 moritz +1
16:19 jnthn Indeed.
16:19 pmichaud moritz++ for starting http://github.com/perl6/doc
16:19 jnthn Yeah, I love that it's in a git repo. It looks easy to contribute to.
16:21 * jnthn clones it
16:21 pmichaud afk
16:22 jnthn o/
16:22 jnthn moritz: Where are we documenting things that have function forms, but not method ones?
16:23 jnthn moritz: for example, "nextsame"
16:23 moritz jnthn: nowhere yet
16:23 jnthn ok
16:23 moritz jnthn: but we can have a 'Functions.pod' or so
16:23 tadzik 2 ***   throwing typed exceptions (moritz)
16:23 tadzik isn't that one completed?
16:24 moritz tadzik: the grant is completed (I hope :-), but that only covers typed exceptions from within the setting
16:25 tadzik where else would you want them? Panda has its own typed exceptions and uses them
16:26 moritz compiler, meta model, C land
16:26 moritz compiler and C partially throw typed exceptions already
16:26 tadzik I see
16:27 grondilu once it has received objects and delta, I can suspend and continue offline later, right?
16:27 moritz yes, I think so
16:28 grondilu ok I'll try that.
16:37 moritz spacebat_: removing all instances of -pie from Makefile and config_lib.pir in parrot has fixed the build for me
16:38 moritz ... except that compiling dynops in NQP is now broken, "Can't read '/home/moritz/p6/rakudo/install/ru​ntime/parrot/include/config.fpmc' : No such file or directory"
16:38 moritz well yes, that file is in install/lib/parrot/4.4.0-devel/include/config.fpmc
16:40 fgomez joined #perl6
16:41 TimToady http://rosettacode.org/wiki/Count_the_coins#Perl_6
16:41 phenny TimToady: 07:17Z <sorear> tell TimToady perhaps <[^z]> should warn too, for people with some knowledge of p6regex changes
16:41 TimToady ^^ hangs in rakudo, btw
16:42 * [Coke] finds an answer at rosetta code for C with the comment /* copied from Perl6 code */
16:43 * diakopter pulls out the caddy and golf bag
16:45 diakopter TimToady: how long did you wait for it to hang
16:45 * TimToady recommends installing a 'say "$n $coin"' in the routine to track the point at which it hangs
16:45 diakopter does it hang or loop
16:45 TimToady diakopter: er, the first time?  3 hours  <hangs head in shame>
16:45 TimToady then my computer overheated and shut down
16:46 TimToady but it looks like a deep recursion issue of some sort
16:51 diakopter why is it ways($n - $coin, @now)
16:51 diakopter all of @now?
16:53 * diakopter binary searches it
16:54 TimToady it's looking for all the ways of making change with one more dollar coin
16:55 TimToady @now is all the coins under consideration now
16:56 diakopter what *should* be the growth rate of the run-time? hm
16:56 TimToady nr: say 100000 - 67400
16:56 p6eval rakudo 0fde4a, niecza v18-6-ge52d6c3: OUTPUT«32600␤»
16:56 TimToady that's probably a clue, since it hangs on 67300
16:57 TimToady s/hangs/loops/ if you prefer
16:57 TimToady so it's some signed 16-bit limitation
16:59 TimToady well, mebbe
16:59 birdwind1pbird joined #perl6
16:59 TimToady if so, it seems like it would have to be in the match, since it's counting down by 100's there
16:59 TimToady *math
17:00 screencast joined #perl6
17:01 TimToady so it's only ~327 deep, not 32767 deep in recursion
17:03 screencast in
17:03 screencast Hi
17:03 tadzik hello screencast
17:03 TimToady howdy
17:04 screencast I am fine
17:04 screencast how about you ??
17:04 screencast I am new to perl 6 I need some help ..
17:04 tadzik I'm fine, thanks.
17:04 tadzik Sure. What's the problem?
17:04 sjohnson screencast: what would to know?
17:05 TimToady *you like
17:05 sjohnson erg, still haven't woken up yet
17:05 * sjohnson cat stretches
17:05 screencast I am unable to write subroutines and use them in code,,
17:05 tadzik ( `ー´)
17:05 tadzik screencast: can you show us the code?
17:06 tadzik r: say "like this, for example"
17:06 p6eval rakudo 0fde4a: OUTPUT«like this, for example␤»
17:06 TimToady or by nopasting to gist.github.com
17:06 screencast I didn't understand it..
17:07 [Coke] r: sub hi() { say "yo"}; hi
17:07 p6eval rakudo 0fde4a: OUTPUT«yo␤»
17:07 * sjohnson wonders if we are being filmed for a youtube tutorial, i saw this happen before on this chan
17:08 screencast Thnaks..
17:08 tadzik sjohnson: I was about to ask, "are you szabgab recording another screencast?" :)
17:08 sjohnson hehe
17:08 [Coke] I'm trying to look at kcachegrind data on one of the rosettacode examples. the highest self entry is in function <cycle 2> in CORE.setting
17:09 screencast no..
17:09 screencast I am a student from India..
17:09 screencast new to perl
17:13 tadzik you're welcome
17:13 TimToady a statement like "I am unable to..." does not describe your problem very well, though
17:14 sjohnson it cannot be done!
17:14 TimToady what did you try?
17:14 TimToady and what did it say?
17:15 TimToady you can show us what you tried by pasting it into gist.github.com, hitting the button for "public gist", then pasting the new URL into this channel
17:15 sjohnson or by sending us the youtube link :)
17:16 sjohnson TimToady: on the side, I would like to ask you:  did you have a hand in the new edition of the Camel Book?  while I have the old one, I'm thinking about buying it again
17:16 TimToady I heavily edited/rewrote the first 11 chapters
17:17 sjohnson perfect
17:17 sjohnson if you only fixed 5 typos, then i might just keep mine :)
17:17 sjohnson but, that sounds like it's worth buying again
17:17 sjohnson does it over some of the cute new switches as seen in 5.14 ?
17:17 TimToady well, a lot of that was cleaning up the prose of my co-author, so I don't know how much that counts...
17:18 TimToady it's supposed to be all about 5.14
17:18 TimToady but switches are after chapter 11, so I can't tell you :)
17:19 sjohnson should I just sit down and get a new version of perldoc, and read it top to bottom instead, or is it okay just to go with my 4th edition Camel BOok idea
17:19 TimToady the book is funnier
17:20 TimToady (than the docs)
17:20 sjohnson i definitely got a few laughs for sure out of 3rd edition
17:20 TimToady some of the jokes are new, and some of them never get old :)
17:21 cognominal joined #perl6
17:21 sjohnson i wonder if there will be one of those pointy-sun looking stickers on the book, that says, "Updated with new jokes!"
17:21 sjohnson heheh
17:22 sjohnson by the way, do you ever overlook what actually goes into perldoc?
17:22 sjohnson or is it mostly handled by others without you needing to be distracted from perl6
17:23 sjohnson i'm sort of thinking the camel book might be the way to get the knowledge straight from the "camel's mouth"
17:32 sjohnson erg, sorry bout that.  the cover itself says, "5.14" right on it.
17:33 * sjohnson rubs his eyes
17:33 sjohnson .oO(today's not starting out so well)
17:33 diakopter don't look a gift camel in the mouth
17:34 snearch joined #perl6
17:42 TimToady or anywhere else
17:44 sjohnson TimToady: it seems tr/// is covered in Chapter 5
17:44 * sjohnson is looking at the TOC on amazon
17:45 sjohnson maybe i shouldn't have said "switches", i think i'm at fault
17:56 * sjohnson spanks himself
17:56 sjohnson well, TimToady, I would say now, the chances of you writing about tr///r are probably very high now
17:57 * sjohnson buys the book
18:00 not_gerd joined #perl6
18:01 not_gerd hello, #perl6
18:01 not_gerd r: multi foo(:$bar where 1) {}; multi foo(:$baz) {}; foo
18:01 p6eval rakudo 0fde4a: OUTPUT«use of uninitialized variable $a of type Any in numeric context  in sub foo at /tmp/pKF4TX3qON:1␤␤»
18:01 not_gerd there's no variable $a...
18:03 moritz there is, in the setting :(
18:04 felher The problem is that 'where 1' tries to smartmatch Any against '1', because ':$bar' isn't declare to be mandatory, right?
18:04 moritz right
18:05 felher :)
18:05 jnthn Yes, it's just that.
18:06 moritz it#s just LTA that rakudo reports a variable name that's not in the user program
18:06 jnthn r: multi foo(:$bar = 0 where 1) {}; multi foo(:$baz) {}; foo
18:06 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/6gjp2WuA9n:1␤»
18:06 jnthn Hmm... :)
18:06 not_gerd r: multi foo(:$bar where *.defined) {}; multi foo(:$baz) {}; foo
18:06 p6eval rakudo 0fde4a:  ( no output )
18:06 tokuhiro_ joined #perl6
18:06 jnthn Anyway, if you're doing "where 1" you probably may as well make it required
18:06 jnthn :$bar!
18:08 moritz which type should I document next?
18:08 moritz hm, List maybe?
18:09 jnthn There's no shortage ;)
18:10 jnthn List is a nice choice
18:10 jnthn Hash also
18:10 adu joined #perl6
18:10 moritz well, we'll need to figure out some stuff
18:10 moritz like
18:10 * jnthn may take on documenting some of the methods on code objects
18:11 moritz if the user says p6doc Array.join, it should pick up the one from List
18:13 jnthn Well, if p6doc is written in p6 then .^mro is your friend ;)
18:13 adu .^>
18:13 adu ?
18:13 not_gerd I failed to get the multidispatcher to dipatch to the correct multi MAIN() via named parameters
18:13 tadzik I guess making p6doc a module will require finally understanding "where should modules install non-code resources and how to access them"
18:14 not_gerd ie `foo --bar` vs `foo --baz`
18:14 moritz adu: dispatch on the meta class
18:14 not_gerd (I'm now doing it git-style instead)
18:15 moritz r: multi sub MAIN('foo', $bar!)  { }  multi sub MAIN('foo', :$baz!) { }
18:15 p6eval rakudo 0fde4a: OUTPUT«===SORRY!===␤Confused␤at /tmp/LSxPLsG0xU:1␤»
18:15 jnthn missing ;
18:15 moritz r: multi sub MAIN('foo', $bar!)  { };  multi sub MAIN('foo', :$baz!) { }
18:15 p6eval rakudo 0fde4a: OUTPUT«Usage:␤  /tmp/APACkipZBM foo <bar> ␤  /tmp/APACkipZBM --baz=<Any> foo ␤»
18:15 moritz r: multi sub MAIN('foo', Bool $bar!)  { };  multi sub MAIN('foo', Bool :$baz!) { }
18:15 p6eval rakudo 0fde4a: OUTPUT«Usage:␤  /tmp/FHhUybtbB6 foo <bar> ␤  /tmp/FHhUybtbB6 --baz foo ␤»
18:16 adu what's the exclaimation point for?
18:16 moritz adu: see S06
18:16 adu ok
18:18 TimToady well, the first ! is redundant, but perhaps usefully so from a documentation point of view
18:19 moritz erm , I meant Bool :$bar!
18:23 adu oh ic
18:23 adu $bar is positional, and :$baz is named so it's optional by default
18:28 baest_ joined #perl6
18:35 dalek doc: 4d7d3f0 | moritz++ | lib/List.pod:
18:35 dalek doc: start with List.pod
18:35 dalek doc: review: https://github.com/perl6/doc/commit/4d7d3f07e3
18:38 * araujo pulls
18:42 araujo multi method join(List:D: Str:D $separator) returns Str:D .... should be= multi method join(List:D:, Str:D $separator) returns Str:D ?
18:42 araujo moritz, ^^
18:42 araujo (missing ',' for the first parameter)
18:43 not_gerd left #perl6
18:46 TimToady added iterative solution to http://rosettacode.org/wiki/Count_the_coins#Perl_6 but it also blows up in rakudo, albeit for a different reason
18:46 birdwindupbird joined #perl6
18:47 jnthn Because Rakudo doesn't do capture stuff that way yet
19:10 moritz araujo: no
19:10 moritz araujo: the : is the delimiter if the first parameter is the invocant
19:11 adu joined #perl6
19:12 moritz araujo: it's wrong in grep
19:14 dalek doc: 49782b4 | moritz++ | lib/List.pod:
19:14 dalek doc: List.first, .classify
19:14 dalek doc: review: https://github.com/perl6/doc/commit/49782b4e65
19:17 moritz r: say keys <a b c>
19:17 p6eval rakudo 0fde4a: OUTPUT«0 1 2␤»
19:18 dalek doc: 1c3828a | moritz++ | lib/List.pod:
19:18 dalek doc: [List] fix heading levels
19:18 dalek doc: review: https://github.com/perl6/doc/commit/1c3828a22f
19:18 dalek doc: 3a341a7 | moritz++ | lib/List.pod:
19:18 dalek doc: [List] end, elems
19:18 dalek doc: review: https://github.com/perl6/doc/commit/3a341a73d8
19:18 moritz r: say keys(<a b c>).WHAT
19:18 p6eval rakudo 0fde4a: OUTPUT«List()␤»
19:28 MayDaniel joined #perl6
19:28 dalek doc: 09c424c | moritz++ | lib/List.pod:
19:28 dalek doc: [List] key, values, kv
19:28 dalek doc: review: https://github.com/perl6/doc/commit/09c424c9cb
19:29 araujo moritz, ah I see :)
19:33 moritz r: say List.new(List.new(1, 2), List.new(3, 4)).perl
19:33 p6eval rakudo 0fde4a: OUTPUT«(1, 2, 3, 4).list␤»
19:39 moritz r: my @a := (1, 2, 3).list; say @a[1] = 'b'; say @a;
19:39 p6eval rakudo 0fde4a: OUTPUT«Cannot assign to a non-container␤  in block <anon> at /tmp/CE4lrGBd6u:1␤␤»
19:44 dalek doc: 5e7a325 | moritz++ | lib/List.pod:
19:44 dalek doc: [List] notes on items, sigils and flattening
19:44 dalek doc: review: https://github.com/perl6/doc/commit/5e7a325cb5
19:49 moritz r: say (1, 2, 3).list.Str
19:49 p6eval rakudo 0fde4a: OUTPUT«1 2 3␤»
19:51 brrt joined #perl6
19:51 dalek doc: 560b0ce | moritz++ | lib/List.pod:
19:51 dalek doc: [List] Int and Str coercion methods
19:51 dalek doc: review: https://github.com/perl6/doc/commit/560b0ce6ae
19:52 moritz r: say <a b c>.pick.WHAT
19:52 p6eval rakudo 0fde4a: OUTPUT«Str()␤»
19:57 tadzik http://news.perlfoundation.org/2012/0​6/hague-grant-report-structured.html :)
20:03 moritz \o/
20:03 dalek doc: a14449d | moritz++ | lib/List.pod:
20:03 dalek doc: [List] roll, pick
20:03 dalek doc: review: https://github.com/perl6/doc/commit/a14449d835
20:05 dalek doc: d7636e4 | moritz++ | / (2 files):
20:05 dalek doc: add artistic license
20:05 dalek doc: review: https://github.com/perl6/doc/commit/d7636e4f09
20:14 dalek doc: 9356804 | moritz++ | lib/List.pod:
20:14 dalek doc: [List] Bool, eager, reverse
20:14 dalek doc: review: https://github.com/perl6/doc/commit/93568040f2
20:20 adu joined #perl6
20:22 pmichaud You cannot assign to list elements. Use Arrays for that use
20:22 pmichaud case instead.
20:22 pmichaud (from the List.pod)
20:22 pmichaud actually, assigning to lists and list elements is quite common.
20:22 pmichaud as long as the list elements are containers.
20:22 adu hmm
20:23 pmichaud r:  my $b = 'one';  (1, 2, $b).[2] = 'two'; say $b
20:23 p6eval rakudo 0fde4a: OUTPUT«two␤»
20:26 adu .u 𝑖
20:26 phenny U+1D456 MATHEMATICAL ITALIC SMALL I (𝑖)
20:26 pmichaud for many of the list things, do you want me to change doc to match what Rakudo currently does, or to open the items up for discussion?
20:27 pmichaud For example,  List.pod claims
20:27 pmichaud multi sub    elems(*@list)  returns Int:D
20:27 sporous joined #perl6
20:27 pmichaud but in Rakudo it's
20:27 pmichaud src/core/Any.pm:336:multi elems($a) { $a.elems }
20:29 pmichaud n:  my @a = 1..5;  say elems(@a,@a);  # curious
20:29 p6eval niecza v18-6-ge52d6c3: OUTPUT«Unhandled exception: Excess arguments to elems, used 1 of 2 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (elems @ 1) ␤  at /tmp/necG4Eg65l line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤  at /home/p6ev…
20:35 dalek doc: 4cfb847 | pmichaud++ | lib/List.pod:
20:35 dalek doc: A few documentation improvements.
20:35 dalek doc: review: https://github.com/perl6/doc/commit/4cfb84706e
20:38 moritz pmichaud: my plan was to document the methods and subs where they logically belong, and then add the coercers later on
20:39 pmichaud in this case my question is not about where it occurs, but the signature of the sub itself
20:39 pmichaud List.pod claims that sub elems takes a slurpy, but neither Rakudo nor Niecza implement it that way
20:39 moritz oh
20:39 pmichaud same for kv, values, keys, etc.
20:39 moritz then the docs are wrong
20:40 moritz and should be fixed
20:40 pmichaud okay, fixing
20:41 araujo also add a nice example for map or/and grep
20:41 araujo :P
20:41 moritz araujo: do you want to do that?
20:42 moritz pmichaud++ # doc updates
20:42 dalek doc: b72a3db | pmichaud++ | lib/List.pod:
20:42 dalek doc: Correct elems, keys, values, kv signatures.
20:42 dalek doc: review: https://github.com/perl6/doc/commit/b72a3db127
20:43 araujo moritz, well, I think there is something in rosetta that could be re-used
20:44 pmichaud also, I think in many cases it's better to repeat the answer than to simply say "same as .X(foo)"; i.e., don't needlessly make the user request a second entry.
20:44 moritz agreed
20:44 moritz I was just lazy
20:45 pmichaud compilers are allowed to be lazy, implementors are not.  :)
20:47 pmichaud also, in e.g. join, the separator isn't constrained to be Str.  should I remove the constraint or replace them with Cool or ... ?
20:49 dalek doc: 4f8e2aa | pmichaud++ | lib/List.pod:
20:49 dalek doc: The $separator argument to .join isn't constrained to Str.
20:49 dalek doc: review: https://github.com/perl6/doc/commit/4f8e2aa759
20:50 moritz pmichaud: well, that's part of what I want to do with the coercers
20:50 moritz pmichaud: though I don't yet have a clear mental model of how I want to present it
20:50 pmichaud what's p6's syntax for coercion these days (in signatures)?
20:50 pmichaud or is it still nebulous?
20:51 moritz A(B)
20:51 moritz though I can't remember which one comes where :-)
20:51 pmichaud me neither
20:52 jnthn Same way around as coercion syntax in general
20:52 jnthn Int($x) # coerce $x to Int
20:52 pmichaud so, Str(Any)
20:52 jnthn Int(Foo) # accept a Foo and coerce it to an Int
20:52 moritz ok, I'd be fine with using that in the docs
20:52 jnthn Trouble is these coercion types need to be first class, not just syntaxy stuff.
20:52 pmichaud i.e., method join would be     method join(Str(Any) $separator)
20:53 jnthn So it's not entirely trivial to get them in place.
20:53 moritz well,  multi method join(Str:D(Any): Str:D(Any) $separator) returns Str:D
20:54 pmichaud huh?
20:54 moritz they tend to become a bit bulky :/
20:54 pmichaud invocant is a Any there
20:54 moritz erm
20:54 moritz List:D(Any): for the invocant
20:54 pmichaud nononono
20:54 pmichaud *ANY*
20:54 pmichaud 1.join(' ') is valid.
20:55 moritz that's why there's an Any inside the invocant
20:55 moritz but we do interpret the invocant as a list (even if a one-element list)
20:55 pmichaud it doesn't have to be the case that the invocant is coerced to a List, though.
20:55 pmichaud anyway, I'd be willing to let that slide
20:56 pmichaud wouldn't   List(Any:D) be a better syntax, ooc?
20:56 AndreasX joined #perl6
20:56 pmichaud it's the invocant that has to be defined, not the List that is produced from it
20:56 pmichaud same for   Str(Any:D)
20:56 jnthn Why does it have to be defined?
20:56 AndreasX left #perl6
20:57 pmichaud I'm just saying that the :D seems to fall more naturally as part of the constraint than the coercion
20:57 jnthn r: Any.list
20:57 p6eval rakudo 0fde4a:  ( no output )
20:57 jnthn r: Any.list.perl.say
20:57 p6eval rakudo 0fde4a: OUTPUT«(Any,).list␤»
20:57 jnthn Ah. Yeah, I'm not sure what putting :D on the coercion target type means relaly
20:57 jnthn *really
20:57 moritz well, we never coerce to a Str type object for jion
20:57 moritz *join
20:57 pmichaud we do for the separator
20:58 pmichaud i.e.,   Str(Any:D)  makes a lot more sense to me than  Str:D(Any)
20:58 pmichaud the second seems like it would allow :U objects to be coerced
20:58 moritz Str(Any:D) would reject Cool.join('')
20:58 moritz pmichaud: yes, and we do that
20:58 moritz r: say Cool.join('')
20:58 p6eval rakudo 0fde4a: OUTPUT«use of uninitialized value of type Cool in string context  in block <anon> at /tmp/liY8sFGJHR:1␤␤␤»
20:58 moritz we warn, but we still coerce to ''
20:58 moritz which matches Str:D
20:58 pmichaud that's the invocant, not the separator.
20:59 moritz well, same story
20:59 pmichaud my example is
20:59 moritz r: say (1, 2).join(Cool)
20:59 p6eval rakudo 0fde4a: OUTPUT«use of uninitialized value of type Cool in string context  in block <anon> at /tmp/gLHOcpk6_4:1␤␤12␤»
20:59 pmichaud okay
20:59 pmichaud the :D seems unneeded in Str:D(Any) then.
20:59 jnthn Str:D($x) # what does this mean?
21:00 moritz jnthn: dunno
21:00 jnthn Right, and I dunno what Foo:D(Bar) means either. :)
21:00 moritz pmichaud: well, from the perspective of the compiler writer there's a big difference between a coercion to Str and to Str:D
21:00 moritz pmichaud: because if we can assume that the coercion does not return a type object, we can unbox it
21:01 jnthn Hmm.
21:01 moritz so IMHO our type system should be able to express that
21:01 moritz so maybe Str:D($x) means something like  Str($x) // die "Coercion returned an undefined value, but should not"
21:01 cognominal_ joined #perl6
21:01 pmichaud can we multidispatch on the success of the coercion?
21:02 jnthn No
21:02 moritz anyway, time for me to sleep
21:02 pmichaud i.e.,  would Str:U(Any)  and Str:D(Any)  be valid multidispatch criteria?
21:02 jnthn The multi-dispatcher sees the desired type
21:02 jnthn At the very most it might tie break on that.
21:02 jnthn But "ability to coerce" hasn't been a tie-breaker so far.
21:03 jnthn er, desired type was really unclear
21:03 jnthn It sees the type that we need to pass in the first place.
21:03 jnthn The Any, in the above examples.
21:03 pmichaud the way moritz++ is describing :D/:U on the coercion type acts more like a constraint than a coercer though
21:03 pmichaud i.e., "we know it's defined, therefore we can ... "
21:04 pmichaud anyway, not important for today; I just want to be sure we're not documenting constraints that don't really exist.  There's already enough confusion about the meaning of   my Int $x = "2";
21:04 pmichaud and    method join(Str $x)
21:05 araujo multi method map(List:D:, &code) returns List:D
21:05 araujo moritz, need to remove the ',' ?
21:06 dalek doc: b155c7d | pmichaud++ | lib/List.pod:
21:06 dalek doc: Remove commas after invocant colons in signatures; araujo++.
21:06 dalek doc: review: https://github.com/perl6/doc/commit/b155c7da75
21:07 dalek doc: 7233ae8 | pmichaud++ | CREDITS:
21:07 dalek doc: Fix CREDITS file -- usernames for this repo are GitHub, not subversion.
21:07 dalek doc: review: https://github.com/perl6/doc/commit/7233ae87ee
21:08 dalek rakudo/nom: 9ad893e | pmichaud++ | CREDITS:
21:08 dalek rakudo/nom: Fix CREDITS to reflect GitHub usernames as well as Subversion.
21:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ad893ed0c
21:09 dalek nqp: d82864d | pmichaud++ | CREDITS:
21:09 dalek nqp: Fix CREDITS to reflect that usernames are for GitHub.
21:09 dalek nqp: review: https://github.com/perl6/nqp/commit/d82864d09f
21:35 benabik joined #perl6
21:44 benabik joined #perl6
21:48 adu joined #perl6
21:48 cognominal_ joined #perl6
22:23 raiph joined #perl6
22:35 spaceships joined #perl6
22:36 spaceships joined #perl6
22:37 spaceships joined #perl6
22:43 raiph re: old/new p6 on ideone.com http://ideone.com/veE3O
22:43 espadrine joined #perl6
23:12 espadrine left #perl6
23:55 araujo is latest rakudo commit compiling fine?
23:58 whiteknight joined #perl6

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

Perl 6 | Reference Documentation | Rakudo