Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-08-11

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:05 frew__ joined #perl6
00:08 jferrero joined #perl6
00:09 tann rakudo: my $f = '.'; given $f { when ~~ :f { say "f" } when ~~ :d { say "d" } when ~~ :l { say "l" } default { say "unknown type" } };
00:09 p6eval rakudo af3efa: OUTPUT«Statement not terminated properly at line 2, near "default { "␤in Main (src/gen_setting.pm:3369)␤»
00:11 meppl good night
00:25 maja joined #perl6
00:55 mikehh rakudo (af3efaf) builds on parrot r40480 make test/make spectest (up to 27955) PASS - Ubuntu 9.04 amd64
01:08 SmokeMachine joined #perl6
01:19 eternaleye tann: 'when' has an implicit ~~
01:19 eternaleye Also, file test operators aren't specced as :<test> anymore
01:20 eternaleye rakudo: my $f = '.'; given $f { when :f { say "f" }; when :d { say "d" } when :l { say "l" }; default { say "unknown type" }; };
01:20 p6eval rakudo af3efa: OUTPUT«d␤»
01:20 eternaleye You were missing some semicolons, too
01:21 hcchien joined #perl6
01:41 rhr joined #perl6
01:53 TimToady std: my $f = '.'; given $f { when :f { say "f" }; when :d { say "d" } when :l { say "l" }; default { say "unknown type" }; };
01:53 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤Statements must be separated with semicolon at /tmp/jd75sBe4Tk line 1:␤------> [32mhen :f { say "f" }; when :d { say "d" } [33m⏏[31mwhen :l { say "l" }; default { say "unkn[0m␤    expecting any of:␤      infix stopper␤    statement␤FAILED 00:04
01:53 p6eval ..38m␤»
01:53 TimToady rakudo shouldn't have accepted yours either :)
02:20 alester joined #perl6
02:24 frew__ joined #perl6
02:29 eternaleye TimToady: Whoops
03:03 japhb joined #perl6
03:07 Jedai joined #perl6
03:11 molaf joined #perl6
03:20 donaldh joined #perl6
03:25 ihrd left #perl6
03:38 dduncan joined #perl6
03:39 sri_kraih_ joined #perl6
03:40 dduncan Is there a comparison somewhere about how complete Rakudo is compared to Pugs?  Eg, is there any Perl 6 conforming the current spec which will run under Pugs but not Rakudo?
03:40 dduncan I tried the smoke server that used to exist for Pugs but it isn't contactable now.
03:42 dduncan Also, a few years ago, it was possible to write a Perl 6 module, put it in ext/ of the Pugs project, and it had a Makefile.PL and you could run its test suite as if it were a Perl 5 module.
03:42 dduncan Can you do this with Rakudo now?  Does a basic toolchain exist for TAP with Perl 6 under Rakudo?
03:42 dduncan for modules
03:43 dduncan depending on how complete things are, I'm thinking to try porting my new Set::Relation module to Perl 6 any day now
03:43 dduncan but at this point I only care about running it under Rakudo
03:43 dukeleto joined #perl6
03:45 dalek rakudo: 11a2934 | (Kyle Hasselbacher)++ | docs/release_guide.pod:
03:45 dalek rakudo: [release_guide] Volunteer to do the next release
03:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/11a2934e67a0a88e9e6e10bf186dbc51ec437362
04:32 sparc joined #perl6
04:42 missingthepoint joined #perl6
04:46 frew__ joined #perl6
04:50 eternaleye joined #perl6
04:56 tann joined #perl6
05:03 missingthepoint morning all :)
05:04 kst` joined #perl6
05:04 dukeleto missingthepoint: good localtime()
05:06 missingthepoint dukeleto: how did you know it's not actually morning here !?!
05:06 missingthepoint ;)
05:06 tann rakudo: say time;
05:06 p6eval rakudo 11a293: OUTPUT«1249967207.51737␤»
05:07 dduncan good for youuuuuu
05:07 dukeleto rakudo: say localtime
05:08 p6eval rakudo 11a293: OUTPUT«Could not find non-existent sub localtime␤»
05:11 eternaleye rakudo: say time().^methods.join(', ');
05:11 p6eval rakudo 11a293: OUTPUT«asec, cotanh, acotanh, sech, ACCEPTS, atan, asech, acos, tanh, asin, atanh, cosec, cosh, succ, acosh, perl, WHICH, cotan, atan2, Scalar, sec, tan, cos, sin, pred, acosec, sinh, asinh, cosech, acotan, acosech, Str, ceiling, p5chomp, 1, pairs, 1, 1, comb, unpolar, ord, chop, 1,
05:11 p6eval ..1, ro…
05:12 duckyd joined #perl6
05:12 eternaleye rakudo: say Temporal.methods(Temporal.new).join(', ');
05:12 p6eval rakudo 11a293: OUTPUT«Null PMC access in getprop()␤in Main (src/gen_setting.pm:3369)␤»
05:13 eternaleye rakudo: say Temporal.new
05:13 p6eval rakudo 11a293: OUTPUT«Null PMC access in getprop()␤in Main (src/gen_setting.pm:3369)␤»
05:13 tann ouch
05:14 eternaleye rakudo: say Temporal::DateTime.methods(Temporal::DateTime.new).join(', ');
05:14 p6eval rakudo 11a293: OUTPUT«Method 'methods' not found for invocant of class ''␤»
05:15 kane_ joined #perl6
05:15 eternaleye rakudo: say Temporal::DateTime.new.^methods.join(', ');
05:15 p6eval rakudo 11a293: OUTPUT«timezone, Int, date, time, epoch, Num, Str, iso8601, flip, 1, does, p5chop, lc, 2, 1, 1, end, 1, reduce, 1, ceiling, p5chomp, 1, pairs, 1, 1, comb, unpolar, ord, chop, 1, 1, roots, uc, reverse, keys, isa, ucfirst, 1, fmt, bytes, 2, 1, join, trim, chr, floor, rand, 1, 1, round,
05:15 p6eval ..1, 1…
05:15 eternaleye rakudo: say Temporal::DateTime.new.date
05:15 p6eval rakudo 11a293: OUTPUT«Date()␤»
05:16 eternaleye rakudo: say Temporal::DateTime.new.time.Str
05:16 p6eval rakudo 11a293: OUTPUT«Time()␤»
05:17 eternaleye rakudo: say Temporal::DateTime.new.iso8601
05:17 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤0000-00-00T00:00:00+0000␤»
05:17 eternaleye rakudo: say Temporal::DateTime.new(:epoch(time)).iso8601
05:17 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤0000-00-00T00:00:00+0000␤»
05:18 eternaleye rakudo: say Temporal::DateTime.new(time).iso8601
05:18 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤0000-00-00T00:00:00+0000␤»
05:18 eternaleye hm
05:18 eternaleye Spec-reading time
05:19 tann oh boi, if eternaleye is having trouble with Temporal, how on earth can a novice survive this ordeal? :)
05:20 eternaleye tann: I am a novice - I've just been lurking in the channel for a long time
05:20 tann that makes you a lurking expert
05:20 eternaleye Temporal has gotten relatively little use, so I haven't had much chance to learn by osmosis. Most of the corrections I make are just repeating corrections I've seen the real experts make ;D
05:22 tann Temporal might not be much of an interest of the gurus but web dev and others certainly appreciate its ease of use
05:24 dduncan I'm interested now in the easiest way to make and test a Perl 6 module under Rakudo, eg if there's an example template with a t/*.t etc where I can run something like 'make test' and it runs under Rakudo
05:24 dduncan or where should I look for existing Perl 6 modules with automated tests, easily runnable under Rakudo
05:24 dduncan I know about the ext/ of the Pugs repo but I don't want to build Pugs, just use Rakudo
05:24 duckyd does .substr(/$var/, 'foo'); not work yet?  or will it never be valid?
05:25 tann dduncan, if you run the spectest, that should be pulled in
05:25 tann the 't' dir that is
05:25 tann and you can peek at those tests
05:25 dduncan okay
05:25 dduncan and it can pull in my own new modules?
05:25 tann dduncan: no, you have to place your stuff in there
05:26 dduncan looking ...
05:26 tann look at Test.pm
05:26 dduncan okay
05:27 tann rakudo: my $s = "oh hai"; my $x = "hai"; $s.=subst(/$x/, "bai"); say $s;
05:27 p6eval rakudo 11a293: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block58 (/tmp/NMkcAlc8Fr:1)␤called from Main (/tmp/NMkcAlc8Fr:2)␤»
05:27 duckyd tann: yea, that's what I'm getting :)
05:27 tann doesn't look like it works yet
05:27 duckyd funny thing is, it doesn't barf the same way for $_
05:28 duckyd rakudo: my $foo = "foo"; say "foo bar baz".subst(/$foo/, "abc");
05:28 p6eval rakudo 11a293: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block55 (/tmp/ob1uDPYyYl:1)␤called from Main (/tmp/ob1uDPYyYl:2)␤»
05:28 duckyd rakudo: say "foo bar baz".subst($_, "abc");
05:28 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤foo bar baz␤»
05:28 duckyd what's the equivalient of qr// ?
05:29 tann rakudo: $_ = 'hah"; say "hah ha ha".subst($_, "oh");
05:29 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "= 'hah\"; s"␤in Main (src/gen_setting.pm:3369)␤»
05:29 tann rakudo: $_ = 'hah"; say "hah ha ha".subst(/$_/, "oh");
05:29 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "= 'hah\"; s"␤in Main (src/gen_setting.pm:3369)␤»
05:30 tann rakudo: $_ = "hah"; say "hah ha ha".subst(/$_/, "oh");
05:30 p6eval rakudo 11a293: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block54 (/tmp/5lX2xHAAiE:1)␤called from Main (/tmp/5lX2xHAAiE:2)␤»
05:30 duckyd oh!
05:30 duckyd rakudo: $_ = "foo"; say "foo bar baz".subst($_, "abc");
05:30 p6eval rakudo 11a293: OUTPUT«abc bar baz␤»
05:30 eternaleye duckyd: regexes are now first-class citizens and are a language in and of themselves, rather than being treated as strings (Quoted Regex). If you want a regex object, rx// is probably what you want.
05:31 eternaleye duckyd: What is it you're trying to do?
05:31 duckyd eternaleye: ah!  is that why subst wants subst($foo,..  not subst(/$foo/,...?
05:31 tann i thought, 1st arg of subst was a regex?
05:32 eternaleye Well, .subst has two variants now
05:32 eternaleye One takes a string, one takes a regex
05:33 eternaleye Multi-method dispatch means Perl 6 can distinguish functions and methods based on the types of their arguments
05:33 duckyd is the one that takes a regex broken?
05:33 duckyd or is the syntax /$foo/ no longer valid?
05:34 missingthepoint duckyd: i think interpolating variables in regexes is not yet implemented in rakudo
05:34 duckyd missingthepoint: okee dokee
05:34 missingthepoint (see the example above where .subst with a constant string worked)
05:34 eternaleye rakudo: my $foo = 'bar baaar baz boz'; say $foo.subst( /ba+/, 'flu' );
05:34 duckyd it's funny to me that the version with $foo rather than /$foo/ works
05:34 p6eval rakudo 11a293: OUTPUT«flur baaar baz boz␤»
05:34 tann rakudo: my $x = "hai"; say "oh hai" ~~ /$x/;
05:34 p6eval rakudo 11a293: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block54 (/tmp/InA8SWueQh:1)␤called from Main (/tmp/InA8SWueQh:2)␤»
05:35 eternaleye rakudo: my $foo = 'bar baaar baz boz'; say $foo.subst( /ba+/, 'flu', :g );
05:35 p6eval rakudo 11a293: OUTPUT«flur flur fluz boz␤»
05:35 missingthepoint rakudo: say "fruhe weinachten".subst(/<[aeiou]+>/, '')
05:35 p6eval rakudo 11a293: OUTPUT«perl6regex parse error: Error parsing enumerated character class at offset 49, found '>'␤in Main (src/gen_setting.pm:3369)␤»
05:36 missingthepoint gah
05:36 missingthepoint rakudo: say "fruhe weinachten".subst(/<[aeiou]>+/, '')
05:36 p6eval rakudo 11a293: OUTPUT«frhe weinachten␤»
05:36 missingthepoint rakudo: say "fruhe weinachten".subst(/<[aeiou]>+/, '', :g)
05:36 p6eval rakudo 11a293: OUTPUT«frh wnchtn␤»
05:36 missingthepoint duckyd: so regexes work with .subst, but s/// and interpolating vars in regexes is NIY in rakudo
05:37 eternaleye duckyd: You can pass a closure as the second argument to .subst as well, in which case $0 is the first parentheses, and $<foo> gives the text matched by the subrule 'foo'
05:38 eternaleye $/ is the whole match
05:38 duckyd eternaleye: ah, that will be useful :)
05:39 tann rakudo: say "Rakudo *".subst("*", "Star");
05:39 p6eval rakudo 11a293: OUTPUT«Rakudo Star␤»
05:39 eternaleye duckyd: The new grammar system has some core concepts in common with Parse::RecDescent, especially with subrules
05:40 orafu joined #perl6
05:40 duckyd I always knew I'd have to learn Parse::RecDecent someday :p
05:41 eternaleye duckyd: I highly recommend checking out the specs at http://perlcabal.org/syn/
05:41 duckyd rakudo: if "foo bar baz".match("foo") { say "foo"; }
05:41 p6eval rakudo 11a293: OUTPUT«Method '!invoke' not found for invocant of class 'Str'␤»
05:41 eternaleye Especially S05, which deals with the new grammars system
05:41 duckyd eternaleye: I have been, but I guess I need to look at S05 again
05:42 eternaleye duckyd: m// works
05:42 duckyd google has been leading me to misleading things, at times
05:42 missingthepoint duckyd: i second that advice from eternaleye... the specs can be rather dense, but they yield to thinking and experimentation
05:42 eternaleye rakudo: if "foo bar baz" ~~ /foo/ { say "foo"; }
05:42 p6eval rakudo 11a293: OUTPUT«foo␤»
05:42 tann rakudo: @*ARGS = <a b c d>; sub MAIN($a, $b, *@c) { say $a; say $b; say @c.perl }; MAIN;
05:42 p6eval rakudo 11a293: OUTPUT«too few arguments passed (0) - 3 params expected␤in sub MAIN (/tmp/UGS5ZTRXPZ:1)␤called from Main (/tmp/UGS5ZTRXPZ:2)␤»
05:43 eternaleye tann: MAIN gets called before you set @*ARGS
05:43 eternaleye In fact, the assignment is never called IIUC
05:43 eternaleye since MAIN is the root of execution if defined
05:44 tann i thought the mainline code got called first
05:45 tann and what's left in ARGS would be handed off to MAIN at the last cleanup?
05:46 dduncan left #perl6
05:46 tann rakudo: @*ARGS = <a b c d>; sub MAIN($a, $b, *@c) { say $a; say $b; say @c.perl }; MAIN(@*ARGS);
05:46 p6eval rakudo 11a293: OUTPUT«too few arguments passed (1) - 3 params expected␤in sub MAIN (/tmp/tTFvD2RQKR:1)␤called from Main (/tmp/tTFvD2RQKR:2)␤»
05:46 eternaleye tann: maybe, I'm not entirely sure mystelf
05:46 eternaleye *myself
05:46 cookys joined #perl6
05:46 tann it's specced here http://perlcabal.org/syn/S06.html#Declaring_a_MAIN_subroutine
05:47 eternaleye duckyd: Have you seen 'when' yet?
05:47 eternaleye rakudo: given "foo bar baz" { when /foo/ { say "Foo found, friend!"; }; };
05:47 p6eval rakudo 11a293: OUTPUT«Foo found, friend!␤»
05:48 duckyd eternaleye: when is new to me.  But there are a lot of perl6isms I've looked at but not played with yet, and mostly forgotten
05:49 eternaleye duckyd: given/when is basically switch/case, but smarter and with fallthrough _off_ by default
05:49 duckyd currently trying to figure out how to accomplish $foo.subst(/$bar(.*)$baz/, $first$1$second);
05:49 tann eternaleye: is 'as' a keyword?
05:49 duckyd sorry
05:49 duckyd $foo.subst(/$bar(.*)$baz/, $baz$1$bar);
05:50 eternaleye given $foo sets $_, and when $bar calls $bar.ACCEPTS( $foo ). If true, it runs the following block
05:50 eternaleye tann: Not that I know of
05:50 tann then i like given ... as   better
05:50 tann 'when' is too much typing for me :D
05:51 eternaleye tann: Think of it as "given the object $foo, when it is $bar, do this"
05:52 eternaleye duckyd: try this
05:53 eternaleye rakudo: regex bar { qux }; regex baz { corge }; my $foo = "quxtastycorge"; say $foo.subst( rx/<bar>(.*?)<baz>/, { $<baz> ~ $0 ~ $<bar> } );
05:54 p6eval rakudo 11a293: OUTPUT«corgetastyqux␤»
05:54 missingthepoint eternaleye: thank you! :)
05:55 eternaleye duckyd: Cool, huh?
05:55 duckyd holy moly
05:56 eternaleye the '?' makes the * non-greedy, so that it doesn't eat the 'qux'. I could have left it out, though, and it would have backtracked since it couldn't match the subrule <baz>, and then matched correctly
05:57 eternaleye infix:<~> is string concatenation
05:57 eternaleye duckyd: Also, all (and I mean _all_) operators are specced as user-overridable. Also, you can define new ones.
05:59 tann eternaleye: builtin functions/methods as well?
05:59 eternaleye rakudo: sub infix:<cow>( Str $cow, Str $obj ) { say "$cow moos at $obj" }; 'Bessie' cow 'the barn';
05:59 p6eval rakudo 11a293: OUTPUT«Bessie moos at the barn␤»
05:59 eternaleye tann: Yep
06:00 eternaleye duckyd: There are also hyperoperators, which take regular operators and apply them to collections
06:00 eternaleye rakudo: sub infix:<cow>( Str $cow, Str $obj ) { say "$cow moos at $obj" }; ('Bessie', 'Daisy', 'Shirley') >>cow<< ('the barn', 'Farmer Bill', 'a dog');
06:01 p6eval rakudo 11a293: OUTPUT«Bessie moos at the barn␤Daisy moos at Farmer Bill␤Shirley moos at a dog␤»
06:01 eternaleye the 'wide end' goes towards a list
06:02 eternaleye so >>op<< applies element one of each list together, and so on; >>op>> applies each element of the left list to the single element on the right
06:11 duckyd eternaleye: I've played a bit with hyperoperators, they're neat
06:12 moritz_ good morning
06:12 missingthepoint good morning moritz :)
06:13 tann rakudo: my $f = IO::FSNode.new("."); say $f ~~ :d; say $f ~~ :f;
06:13 p6eval rakudo 11a293: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/1nltbgizJz:2)␤»
06:14 tann i like to greet moritz with a «Null PMC access in Main»
06:16 moritz_ what a friendly welcome ;-)
06:17 tann parrots are always friendly creatures
06:17 moritz_ unless they bite you ;-)
06:18 moritz_ ok, even then they don't mean to be unfriendly, it's just their way of playing
06:19 duckyd rakudo: my $qux = "qux"; my $corge = "corge"; regex bar { $qux }; regex baz { $corge }; my $foo = "quxtastycorge"; say $foo.subst( rx/<bar>(.*?)<baz>/, { $<baz> ~ $0 ~ $<bar> } );
06:19 p6eval rakudo 11a293: OUTPUT«Null PMC access in get_string()␤in regex bar (/tmp/2DNPaGW0KM:1)␤called from regex PGE::Grammar::_block63 (/tmp/2DNPaGW0KM:2)␤called from Main (/tmp/2DNPaGW0KM:2)␤»
06:19 rfordinal joined #perl6
06:20 * duckyd scratches his head
06:21 moritz_ duckyd: interpolation of variables into regexes is not yet implemented
06:22 duckyd moritz_: well, one way or another I'm trying to do the equivalent of
06:22 duckyd $foo.subst(/$bar(.*)$baz/, $baz$1$bar);
06:24 moritz_ uhm, isn't that a no-op?
06:24 duckyd no, $bar and $baz get reversed
06:24 moritz_ oh, yuck ;-)
06:25 moritz_ you can use eval to build a regex
06:25 duckyd rakudo: my $foo = "one two three"; regex bar { one }; regex baz { three }; say $foo.subst( rx/<bar>(.*?)<baz>/, { $<baz> ~ $0 ~ $<bar> } );
06:25 p6eval rakudo 11a293: OUTPUT«three two one␤»
06:25 duckyd moritz_: hrm.  something like eval { regex bar { $bar } }; ?
06:28 moritz_ rakudo: my $bar = "foo"; $bar = eval "rx { $bar }"; say "seefood" ~~ $bar
06:28 p6eval rakudo 11a293: OUTPUT«0␤»
06:28 moritz_ rakudo: my $bar = "foo"; $bar = eval "/ $bar /"; say "seefood" ~~ $bar
06:28 p6eval rakudo 11a293: OUTPUT«foo␤»
06:29 duckyd ah!
06:31 eternaleye duckyd: String eval is now the only eval, block eval (which caught exceptions) isn now try { } (with CATCH { } blocks _inside_ it, not after it)
06:32 zamolxes joined #perl6
06:42 duckyd rakudo: my $one = "one"; my $three = "three"; my $foo = "one two three"; my $bar = eval "regex { $one }"; my $baz = eval "regex { $three }"; say $foo.subst( rx/<bar>(.*?)<baz>/, { $<baz> ~ $0 ~ $<bar> } );
06:42 p6eval rakudo 11a293: OUTPUT«Unable to find regex 'bar'␤in regex PGE::Grammar::_block91 (/tmp/YzkAZNsfDP:2)␤called from Main (/tmp/YzkAZNsfDP:2)␤»
06:44 duckyd rakudo: my $one = "one"; my $three = "three"; my $foo = "one two three"; my $my_regex = eval "regex { $one(.*)$three }"; say $foo.subst( rx/<my_regex>/, { $<baz> ~ $0 ~ $<bar> } );
06:44 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "(.*)$three"␤in Main (src/gen_setting.pm:3369)␤»
06:46 moritz_ duckyd: note that { ... } in double quoted strings is execute as a closure
06:46 zamolxes joined #perl6
06:46 moritz_ rakudo: "foo { say 'hi' } "
06:46 p6eval rakudo 11a293: OUTPUT«hi␤»
06:46 mzedeler joined #perl6
06:48 eMaX joined #perl6
06:48 eternaleye duckyd: Also, matches nest. if <foo> is defined as <bar><baz>, you access baz through $<foo><baz>
06:52 duckyd rakudo: my $one = "one"; my $three = "three"; my $foo = "one two three"; my $bar = eval "/ $one /"; my $baz = eval "/ $three /"; say $foo.subst( rx/<bar>(.*?)<baz>/, { $<baz> ~ $0 ~ $<bar> } );
06:52 p6eval rakudo 11a293: OUTPUT«Unable to find regex 'bar'␤in regex PGE::Grammar::_block79 (/tmp/yIKXd97sTg:1)␤called from Main (/tmp/yIKXd97sTg:2)␤»
06:54 moritz_ if you don't declare a regex named 'bar' then it can't find one
06:54 duckyd what does my $bar = eval "/ $one /"; do?
06:54 rfordinal joined #perl6
06:55 moritz_ rakudo: eval "regex bar \{ 'arg' \}"; say "bargain" ~~ /<bar>/
06:55 p6eval rakudo 11a293: OUTPUT«arg␤»
06:56 moritz_ rakudo: my $one = 'one'; my $three = 'three'; eval "regex bar \{ $one \}; regex baz \{ $three \}; "; say 'onetwothree'.subst(/ <bar> (.*) <baz> /, { $<baz> ~ $0 ~ $<bar> });
06:56 p6eval rakudo 11a293: OUTPUT«threetwoone␤»
06:57 moritz_ rakudo: my $one = 'one'; my $three = 'three'; eval "regex bar \{ $one \}; regex baz \{ $three \}; "; say 'onetwothree'.subst(/ <bar> (.*) <baz> /, { join ', ', $<baz>, $0,  $<bar> });
06:57 p6eval rakudo 11a293: OUTPUT«three, two, one␤»
06:57 duckyd ah
06:57 duckyd I have to define the regex by name inside of the eval?
06:58 moritz_ only if you want to use it by name later on
07:00 szabgab joined #perl6
07:01 finanalyst joined #perl6
07:16 Su-Shee joined #perl6
07:16 Su-Shee good morning. :)
07:16 moritz_ oh hai Su-Shee
07:16 mberends \o
07:16 finanalyst good morning
07:17 finanalyst just read all the comments on comments on p6l
07:18 finanalyst seems like comments (like POD) and whitespace have several functions, associated but not a part of code
07:18 moritz_ Su-Shee: one step closer to world domination and home made truffles: PerlJam and I have commit access to the java2perl6 translator, committed some small fixes, and have an IRC channel with logs, bots etc ;-)
07:19 finanalyst will java2perl6 translate all java or just a subset
07:20 Su-Shee moritz_: on sept 1st the new cholocate season starts :)
07:21 moritz_ finanalyst: just declarations
07:21 donaldh joined #perl6
07:21 Matt-W Good morning
07:22 duckyd thanks for all your help #perl6 :)
07:22 finanalyst Su-Shee: "new" chocolate season. didnt know there were seasons. do you mean the actual coca plant harvest?
07:23 Matt-W finanalyst: the whole comments/Pod thing is really weird
07:23 Su-Shee finanalyst: in summer, no truffle-making food ist available in online shops due to heat.
07:31 missingthepoint duckyd, thankyou for your questions.
07:31 missingthepoint hi Matt-W, Su-Shee :)
07:32 missingthepoint hi finanalyst
07:32 finanalyst missingthepoint: hi
07:32 Matt-W hi missingthepoint
07:33 finanalyst Su-Shee: where I live, truffles possible even in summer
07:33 finanalyst how come 'online' shops suffer from heat?
07:33 finanalyst :)
07:33 Su-Shee finanalyst: I should move there, I hate summer.
07:33 Su-Shee finanalyst: well there's the way from the shop to your house ;)
07:33 finanalyst probably hate winter more
07:34 Matt-W deliveries
07:34 Matt-W I don't like summer very much
07:34 Matt-W there are occasional days when it seems worthwhile
07:34 finanalyst when the sun shines?
07:34 Matt-W but when you're stuck at work in the middle of a relatively grubby city in the Midlands, it loses a lot of its charm
07:34 Matt-W I prefer summer back home
07:35 Su-Shee well more or less _everything_ I like to do isn't very nice when it's hot.
07:35 Matt-W Definitely moving back there one day
07:35 Matt-W Su-Shee: I find aikido much less fun when it's hot
07:35 Su-Shee Matt-W: exactly.
07:36 Matt-W After a while you don't notice the heat anymore
07:36 Matt-W But you do notice the smell afterwards
07:36 Su-Shee :)
07:42 mberends fascinating: re-mildew (after a complicated build process on ubuntu 9.04) passes stuff in its 'make test' :)
07:45 mberends after a bit more experience I'll update http://www.perlfoundation.org/perl6/index.cgi?smop_dependencies
08:20 timbunce joined #perl6
08:34 masak joined #perl6
08:37 payload joined #perl6
08:39 masak morning #perl6, you wonderful channel you.
08:39 moritz_ o/ masak
08:40 cotto joined #perl6
08:41 masak moritz_: would you say writing tests has taught you a lot of the Perl 6 you know?
08:42 moritz_ masak: yes. Writing tests, reading the synopsis and hanging out here
08:43 moritz_ masak: you should ask KyleHa++ too :-)
08:43 masak yes, I plan to. :)
08:44 pmurias joined #perl6
08:44 pmurias ruoso: hi
08:44 masak to me, learning happens when I pause when writing an application, and go "hm, this is Perl 6. is there a more idiomatic/nicer way to do this?"
08:45 moritz_ there are often constructs that scream for a better way
08:45 moritz_ if you listen to it, that is :-)
08:46 moritz_ however when writing tests I ususally try to focus on one thing to test, and keep the rest simple
08:46 masak indeed.
08:46 moritz_ so I don't write idiomatic Perl 6 code very often
08:46 masak that's an oddity with the tests.
08:46 masak they should be viewed from the perspective of feature constraints.
08:46 moritz_ but when I do, I cram my code with too many idioms
08:46 masak :)
08:47 moritz_ making it look like golfed code far too often
08:47 masak during summer 2008, we often put in Perl 6 idioms, only to discover that Rakudo blew up.
08:47 masak that doesn't happen anymore, not nearly to the same degree anyway.
08:48 moritz_ confirmed.
08:48 masak but at that time, one had to think about how to write the code _less_ idiomatic, and closer to the constituent instructions.
08:48 moritz_ but you still use $str.subst(...) instead of $str ~~ s///
08:48 masak that is, less Perl, more assembly.
08:48 masak moritz_: yes, that's a lingering anti-idiom.
08:49 masak (.=subst, btw) :)
08:49 moritz_ right
08:52 frettled masak: that means you have quite a challenge in refactoring your code afterwards.
08:52 moritz_ that means that masak++ needs a good test suite
08:53 masak frettled: I wouldn't know about challenge. the projects I've been on have been quite ruthlessly refactoring things as soon as Rakudo has enabled that.
08:54 masak I think of it as code that constantly seeks a point of lowest potential energy.
08:54 masak seen that way, refactoring is not challenging at all; it's just a matter of giving the code a little push.
08:55 moritz_ and if you don't let it do that, it builds up latent heat
08:55 moritz_ and burns you when you touch it
08:55 * moritz_ likes that analogy
08:56 frettled masak: :)
08:56 masak maybe -- I haven't experienced the heat bit :)
08:56 frettled moritz_: you may think that's cute today ... ;)
08:56 masak :P
08:57 frettled masak: that was one of the better running gags during YAPC :)
08:57 masak but I can say that having a personal relation to the bugs sure helps in remembering to refactor. it means I often go "oi, RT #xxx is fixed! now I can make piece Y of codebase Z nicer!"
08:57 frettled masak: that's quite true.
08:58 frettled masak: being the perpetrator of said code helps a lot ;)
08:58 masak moritz_: "you think that's cute today..." was apparently something that TheDamian told TimToady occasionally. he had it as one of the (language designer) error messages in his talk.
08:59 eldragon2 joined #perl6
08:59 masak frettled: oh, I don't do the shame bit very much, actually. I have the ultimate excuse: Rakudo is under construction. :)
08:59 frettled masak: nyar nyar nyar :D
09:00 masak I should collect more war stories, though.
09:00 masak the one I told about in the NPW talk is one of the more extreme.
09:00 moritz_ I'd love to have a switch that turns off all the Perl 5 deprecation warnings
09:00 frettled Yes, some day, these anecdotes may be interesting to someone.
09:01 moritz_ std: while (my $x = <foo> )  { }
09:01 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤This appears to be Perl 5 code at /tmp/RlHY3tOZ0T line 1:␤------> [32mwhile (my $x = <foo>[33m⏏[31m )  { }[0m␤FAILED 00:02 36m␤»
09:01 moritz_ std: <STDIN>
09:01 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of <STDIN>; in Perl 6 please use $*IN.lines instead at /tmp/HF0gBk9apz line 1:␤------> [32m<[33m⏏[31mSTDIN>[0m␤FAILED 00:02 36m␤»
09:01 Matt-W they're not very helpful to people who don't know Perl 5
09:01 masak nowadays, you youngsters can do '$file.IO ~~ :f'. we had to do 'my $exists = 0; try { open $file, :r; $exists = 1 };'
09:02 payload1 joined #perl6
09:02 masak Matt-W: why would people who don't know Perl 5 write <STDIN>?
09:02 moritz_ Matt-W: aye. If there's a new generation of Perl 6 programmers they will ask "why can't I make a list quote that's made only of STDIN? what kind of artificial restriction is that?"
09:02 moritz_ masak: why wouldn't they? it's a perfectly valid list quote construct
09:03 moritz_ or at least it looks like one
09:05 frettled std: my @x = <STDIN>;
09:05 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of <STDIN>; in Perl 6 please use $*IN.lines instead at /tmp/1UyWfjChYA line 1:␤------> [32mmy @x = <[33m⏏[31mSTDIN>;[0m␤FAILED 00:02 37m␤»
09:06 frettled std: my @x = <STDIN STDOUT>;
09:06 p6eval std 27955: OUTPUT«ok 00:02 38m␤»
09:06 frettled Nanny! The standard is mocking me!
09:13 dakkar joined #perl6
09:14 masak fwiw, I don't think disallowing <STDIN> is ever going to bite anyone so innocent as not to know about Perl 5.
09:14 moritz_ std: <>
09:14 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of <>; in Perl 6 please use lines() or () instead at /tmp/WLKSv6UL8A line 1:␤------> [32m<[33m⏏[31m>[0m␤FAILED 00:02 36m␤»
09:14 moritz_ masak: what about this one?
09:15 masak moritz_: that one has slightly more of a case going for it, yes.
09:15 masak moritz_: however, is it only in void context?
09:16 moritz_ std: my @a = <>;
09:16 p6eval std 27955: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of <>; in Perl 6 please use lines() or () instead at /tmp/XuxVO5OHxb line 1:␤------> [32mmy @a = <[33m⏏[31m>;[0m␤FAILED 00:02 37m␤»
09:16 moritz_ masak: no
09:16 masak ah.
09:16 masak I feel it should be a warning, not a parse error.
09:19 M_o_C joined #perl6
09:19 Matt-W there are problems when it stops you doing things which are actually valid Perl 6
09:20 moritz_ which is why I'd like to have a switch to turn it off
09:20 araujo joined #perl6
09:20 moritz_ but that can wait for post-6.0
09:20 krunen joined #perl6
09:25 pmurias moritz_: the hardest part to come up with seems the name for the switch
09:26 moritz_ 'no legacy;'
09:26 * masak likes that
09:26 masak 'no looking-back;'
09:27 pugs_svn r27956 | jani++ | Added myself to AUTHORS
09:28 * frettled == jani
09:28 Matt-W no regrets;
09:28 frettled With that massive contribution to the Perl community, I'll need a brief break.  ;)
09:29 Matt-W as long as you spend it all thinking about embedded comment syntax and Pod directives
09:30 Matt-W It strikes me that part of the problem with Rakudo Star is that while we're all excited about an evolving language, the ignorant masses want a 'finished product' and can't understand why such things don't exist in the happy world.
09:32 jferrero joined #perl6
09:32 masak after writing the embedded-comments email to p6l, I felt a slight twinge of concern that my last paragraph might actually discourage people entirely from responding.
09:32 masak my concern was unwarranted.
09:32 frettled masak: oh?
09:32 Matt-W :)
09:33 frettled I see that there's a mailing list I should join.
09:33 Matt-W perl6-language
09:33 masak and yes, you should definitely join.
09:33 Matt-W I'm trying to stay out of the comments one
09:33 Matt-W instead diving into the one about Pod
09:33 Matt-W and I didn't once say that it's not called POD anymore
09:33 Matt-W I think I was very restrained
09:34 masak :)
09:34 Matt-W Maybe I'll save that for my response to someone else's response to my response
09:35 pmurias perl6: my $foo is context = 1;sub foo {my $foo;say $*foo};foo();
09:35 p6eval rakudo 11a293: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:is'␤in Main (/tmp/DH4hzlveL1:2)␤»
09:35 p6eval ..elf 27956, pugs: OUTPUT«␤»
09:35 pmurias perl6: my $foo is context = 1;sub foo {my $foo = 2;say $*foo};foo();
09:35 p6eval rakudo 11a293: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:is'␤in Main (/tmp/EgXRKHgFAu:2)␤»
09:35 p6eval ..elf 27956, pugs: OUTPUT«␤»
09:35 masak why isn't mildew in the list of implementations run when 'perl6: ' is issued?
09:35 Matt-W it doesn't seem to know what to do with 'is context'
09:36 pmurias masak: mildew doesn't support enough stuff yet
09:36 masak pmurias: neither do the others. :P
09:37 pmurias that's true
09:37 moritz_ secondly mildew is rather slow
09:38 moritz_ and third of all its build system has been whacky in the past, leading to errors quite often
09:41 pmurias ruoso: what should $foo is context desugar to?
09:43 Matt-W hah
09:43 Matt-W Rakudo White Bikeshed
09:43 Matt-W One day we have to have Rakudo "Now with s///"
09:43 masak :D
09:44 * masak is looking forward to Rakudo Macros
09:44 donaldh joined #perl6
09:44 Matt-W oooh yes
09:44 Matt-W that'll be fun
09:45 Matt-W every control structure you ever wanted but couldn't persuade TimToady about will be within your grasp
09:45 masak I know!
09:45 Matt-W no more life without random-if
09:45 masak people won't _have_ to bikeshed anymore. it'll be a brave new world.
09:46 Matt-W :)
09:46 frettled I'm scared now.
09:48 Matt-W Just sit back and enjoy it
09:48 Matt-W you can always use sanity;
09:49 masak .oO( who would want to use that? :P )
09:49 Matt-W masak: I don't know, but it might be reassuring for some people :D
09:50 Matt-W corporate types
09:50 masak use suit-and-tie;
09:50 Matt-W run :screaming
09:51 masak oh, oh, and here's another complaint I have: I'm apparently totally incompetent when it comes to telling pairs and named arguments apart.
09:51 masak it bites me all the time, often silently or with action-at-a-distance.
09:52 masak and because I'm inept at telling them apart, there's obviously something wrong with the language. :P
09:52 masak just FYI.
09:52 frettled masak: what is it about them that makes it hard to tell them apart?
09:52 masak here's an example of what's surprising:
09:53 masak rakudo: my $a = :foo<bar>; say $a
09:53 p6eval rakudo 11a293: OUTPUT«foo        bar␤»
09:53 masak rakudo: say :foo<bar>
09:53 p6eval rakudo 11a293: OUTPUT«␤»
09:53 masak o_O
09:53 frettled eh uh. yes.
09:53 Matt-W yes
09:53 Matt-W remembering all the rules is a bit sticky
09:53 Matt-W say (:foo<bar>)
09:54 Matt-W rakudo: say (:foo<bar>)
09:54 p6eval rakudo 11a293: OUTPUT«foo        bar␤»
09:54 Matt-W I tend to say to myself 'to pass a pair, put it in brackets'
09:54 Matt-W but that's only in argument lists
09:54 dakkar rakudo: say(:foo<bar>)
09:54 masak good idea, I'll try that.
09:54 p6eval rakudo 11a293: OUTPUT«␤»
09:54 frettled So without the parentheses, it's a named argument.  hmm.
09:54 Matt-W frettled: correct
09:54 Matt-W it is something that's likely to catch people out
09:55 Matt-W I don't know if it's something that's worth trying to find a solution for though
09:55 Matt-W then there's the => syntax for them
09:55 frettled Okay, I agree that the syntax is confusing here, especially considering that quite a bit of work has been put into reducing the amount of syntax surprises elsewhere.
09:55 dakkar no, in an argument list, it's a named argument; in an expression it's a pair
09:55 Matt-W rakudo: say foo => bar;
09:55 p6eval rakudo 11a293: OUTPUT«Could not find non-existent sub bar␤»
09:55 Matt-W aaah
09:55 Matt-W hah
09:55 dakkar rakudo: say foo => 'bar'
09:55 p6eval rakudo 11a293: OUTPUT«␤»
09:55 Matt-W wake up matt
09:56 Matt-W rakudo: say "foo" => 'bar'
09:56 p6eval rakudo 11a293: OUTPUT«foo        bar␤»
09:56 dakkar argh!
09:56 Matt-W that's the one that *really* surprises me
09:56 dakkar i'm pretty sure this is a bug
09:56 Matt-W even though it makes sense in that named arguments have to be identifiers, so will always autoquote
09:56 Matt-W no that's not a bug, it's in the spec
09:56 dakkar really?
09:56 Matt-W yup
09:56 dakkar it's more confusing than I expected, then
09:56 Matt-W there's no point making a named argument out of => with a quoted lhs, because it might not be valid
09:57 Matt-W because a name argument's name can't be "hello there"
09:57 frettled aha
09:57 Matt-W because identifiers can't have spaces in them
09:57 frettled I forget: can an identifier have NBSP?
09:57 Matt-W the rules are fairly logical, but they're going to surprise a lot of people
09:57 dakkar so a pair in argument list is intepreted as a named argument, unless the key is explicitly quoted?
09:57 Matt-W frettled: nbsp counts as whitespace, so no
09:58 frettled Matt-W: thank goodness :D
09:58 donaldh joined #perl6
09:58 frettled Hmm.  Lunch.
09:58 Matt-W dakkar: yes, or the pair is enclosed in its own set of parens
09:58 rfordinal joined #perl6
09:58 Matt-W rakudo: say (foo => "bar"); say (:foo<bar>); say "foo" => "bar";
09:58 p6eval rakudo 11a293: OUTPUT«foo        bar␤foo   bar␤foo  bar␤»
09:59 Matt-W I don't recommend the parens thing with subs called without parens though... that whitespace is too missable given how many other languages would interpret the ( as opening the argument list
10:00 dakkar true
10:03 Matt-W basically the problem is really with passing pairs in as arguments
10:03 Matt-W try to avoid it :)
10:10 dakkar rakudo: my $a=:foo<bar>;say |$a
10:10 p6eval rakudo 11a293: OUTPUT«elements() not implemented in class 'Perl6Pair'␤in Main (/tmp/qDqmltw6Kv:2)␤»
10:11 dakkar rakudo: my %a=:foo<bar>;say |%a
10:11 p6eval rakudo 11a293: OUTPUT«␤»
10:11 dakkar should the first one work?
10:19 timbunce where can I find docs on the rakudo perl6 --trace flags? docs/running.pod isn't very enlightening
10:20 icwiener joined #perl6
10:20 timbunce or, failing any docs, how can I see what file is being parsed at the time there's an error?
10:29 missingthepoint timbunce: i'm afraid it's "failing any docs" ATM...
10:36 ruoso pmurias, it depends... is the "is context" applied to the container or to the lexical scope itself/
10:36 ruoso ?
10:41 pmurias ruoso: to the variable
10:41 pmurias like $foo is context
10:41 pmurias and what should $*foo desugar to?
10:42 minskman joined #perl6
10:44 minskman joined #perl6
10:44 mzedeler rakudo: say foo => "bar"; say(foo => "bar");
10:45 p6eval rakudo 11a293: OUTPUT«␤␤»
10:45 mzedeler Eh?
10:45 pmurias ruoso: but on the desugared layer i would guess that it should be applied to the container
10:46 pmurias * lexical scop
10:46 pmurias e
10:47 meppl joined #perl6
10:47 mzedeler rakudo: say (foo => "bar1"); say(foo => "bar2");
10:47 p6eval rakudo 11a293: OUTPUT«foo        bar1␤␤»
10:49 mzedeler Now I learned something too.
10:51 dakkar eh, the whitespace "trap"
10:52 dakkar an open parenthesis immediately after a name is intepreted as a function call
10:52 dakkar if there's whitespace in the middle, it's the regular grouping parenthesis of expressions
10:52 mzedeler Yes. Thats what I realized now.
10:52 dakkar s/function call/start of an argument list/
10:53 mzedeler ...and I guess the "foo" in say(foo => .. ) just becomes a named parameter not recognized by say.
10:53 dakkar precisely
10:55 mzedeler Maybe if say could complain about it, when receiving unknown named parameters.
11:00 mzedeler rakudo: say +1; say 1; say (+1);
11:00 p6eval rakudo 11a293: OUTPUT«1␤1␤1␤»
11:00 mzedeler Of course. Didn't manage to catch it off guard.
11:00 mzedeler :-)
11:07 guest_007 joined #perl6
11:08 guest_007 hi, i am curious why perl6 use that obscure @array.elems instead of @array.size ?
11:10 guest_007 or @a.length or @a.count
11:11 guest_007 that's really strange, because i feel that "elements" err "elems" should return an array of elements
11:11 guest_007 if anyone care :)
11:12 guest_007 looking specifications i feel that perl6 is going to become obscure as php with thousands of hard-to-remember functions
11:12 Matt-W it's less obscure
11:13 Matt-W what does 'size' mean?
11:13 Matt-W 'elems' unambiguously means the elements
11:13 Matt-W size could be... how many bytes to store them
11:14 guest_007 count?
11:14 frettled Matt-W: but 'length' wouldn't be too bad.
11:15 carlin elems is a bit obscure
11:16 dakkar might it be related to the fact that there is no "length" for strings?
11:16 dakkar (for strings, "length" is so ill-defined to be completely useless)
11:17 frettled dakkar: perhaps, I haven't read the apocalypse or exegesis for that.
11:18 guest_007 as Perl don't operate with bytes as C so size does not matter the real size like type_size * count
11:19 dakkar guest_007: I *think* the idea is that people do operate at that level, some times
11:19 frettled hmm, the exegesis for operators uses 'length' for the number of elements in an array/list.
11:19 dakkar but I'm no expert
11:19 dalek joined #perl6
11:20 dakkar I see it this way: "some string".chars gives you the number of characters; "some string".bytes gives you the number of bytes, <some list>.elems gives you the number of elements
11:20 dakkar (and yes, it took me a while to figure out that .elems returns an integer instead of a list)
11:21 guest_007 the most funny thing that i've found at this moment, that foreach shifted to for and for shifted to loop :) the most obscure thing that can be imagined :) when people doing for($i=0;$i<x;$i++) for > 20 years, we rename it to loop :)))
11:21 frettled Not only does it give you the number of elements, but in a sparse list, it should give you the actual number of elements present.
11:21 frettled guest_007: �foreach� was deprecated in Perl 5.
11:21 donaldh joined #perl6
11:21 guest_007 dunno. i use for for lists and loops
11:21 frettled That is, using �foreach� was recommended _against_.
11:22 guest_007 i really don't care about foreach
11:22 dakkar guest_007: the idea is that people should just stop doing C-style loops when they can avoid it
11:22 frettled guest_007: Try removing the �each� part while coding in Perl 5 and observe the huge changes :)
11:22 guest_007 frettled: i use for (@a) or for (1..100)
11:23 dakkar (and having the two completely different syntaxes introduced by different keywords simplifies the parser and helps extensibility)
11:23 dakkar oh, and loop { ... } is an infinite loop
11:23 dakkar rakudo: my $i=0; loop { say $i; last if $i++ > 3 }
11:23 p6eval rakudo 11a293: OUTPUT«0␤1␤2␤3␤4␤»
11:24 guest_007 while($condition) was perfect
11:24 pmurias guest_007: no, while $condition is better
11:24 Matt-W frettled: the exegesis is out of date
11:24 Matt-W frettled: synopsis is the only thing that's maintained usually
11:25 dakkar guest_007: what's "while" got to do with "for"?
11:25 dakkar (nobody killed "while")
11:25 frettled Matt-W: I know, but the exegesis shows some of the rationale behind the synopsis.
11:26 frettled Matt-W: just like the exegesis is an attempt at explaining the apocalypse :)
11:26 guest_007 i see- "can also"
11:26 Matt-W yes, but it's out of date, so the fact that it mentions .length (which was indeed what was correct at one point) isn't really relevant
11:27 guest_007 so loop is "throw -away" function like "goto"
11:27 dakkar guest_007: uh??
11:27 Matt-W no, loop is a control structure
11:27 guest_007 sure, control structure
11:27 frettled Matt-W: I think we're talking past eachother :)
11:27 Matt-W it's the most general type of loop
11:28 pmurias guest_007: length is not used anywhere in perl 6 as it does not specify the unit
11:28 Matt-W frettled: quite possibly
11:28 * Matt-W has to go for a bit &
11:28 frettled . o O ( one could specify a length role? )  ;)
11:29 guest_007 personally i say "array size" or "array elements count"
11:30 frettled guest_007: what would you call the size of a sparse array ranging from 0 to 100, where 27 positions are populated?
11:31 guest_007 count i think
11:32 frettled I was looking for a number, 100 or 27?
11:32 frettled In the case of �array size�
11:32 moritz_ or 101?
11:32 frettled moritz_: hush :D
11:33 frettled moritz_: (at first, I wrote �1 to 100�, then conflated it with �0 to 99�, but forgot to replace the �100�, haha)
11:33 ejs joined #perl6
11:34 guest_007 @a.number
11:34 lambdabot Unknown command, try @list
11:35 frettled guest_007: or, to put it in other words: If an array is specified as having elements ranging from 0 to 99, but only 27 positions are populated, is the "array size" 27 or 100?
11:36 guest_007 what is the element count? 27
11:37 guest_007 i don't propose anything particular, i am trying to find something that fit better
11:37 pmurias but the general convention is that you get the size of something by specifing the unit
11:37 guest_007 yes, size is more like @a.end + 1 if @a.start == 0;
11:37 frettled 27 out of the 100 positions are populated.  In your words, that may be the "array size", "array elements count", or something else.  I don't know, that's why I'm asking.
11:38 guest_007 i think that "count" fit better
11:38 pmurias guest_007: i don't really matter
11:39 pmurias even if it would be slightly better it would be inconsistent with the getting the size of the string
11:39 frettled mm
11:39 guest_007 character count, element count
11:40 pmurias byte count, graphem count
11:40 guest_007 so count is more universal?
11:42 pmurias it's ambiguous
11:42 carlin PHP uses count(), Python uses len(), we'll use elems, can't make everyone happy
11:43 pmurias characters aren't as clearly defined when you go from ASCII to unicode
11:43 guest_007 $str.elems ?
11:43 pmurias is an error
11:43 moritz_ carlin: one can always use +@array to avoid bikeshedding :-)
11:44 pmurias but $array.chars works
11:44 moritz_ rakudo: say "foo".elems # 1?
11:44 p6eval rakudo 11a293: OUTPUT«1␤»
11:44 pmurias argh $array.graphems
11:44 moritz_ .graphs actually
11:44 pmurias yes... :/
11:46 payload joined #perl6
11:48 guest_007 404: http://feather.perl6.nl/syn/Perl6%3A%3AFAQ%3A%3ACapture.html
11:49 frettled rakudo: my @arr = <foo bar baz>; say +@arr;
11:49 p6eval rakudo 11a293: OUTPUT«3␤»
11:50 frettled ...which is like saying $#arr+1 in P5
11:50 frettled rakudo: my @arr[10]; @arr[1] = "foo"; @arr[8] = "bar"; say +@arr;
11:50 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "[10]; @arr"␤in Main (src/gen_setting.pm:3369)␤»
11:50 guest_007 +@arr is not equal to $#arr
11:51 frettled hmm, I thought that would be valid
11:51 guest_007 $#arr is @a.end
11:51 frettled guest_007: I didn't say it was equal :)
11:51 moritz_ frettled: sized arrays are not yet implemented in Perl 6
11:51 guest_007 after eight years? O_O
11:52 frettled moritz_: aha!
11:52 moritz_ rakudo isn't 8 years old.
11:54 masak right. it's more like two years old or something.
11:55 frettled maybe pugs supports them?
11:55 masak looking at what's happened in that time, the growth of features has been amazing.
11:55 masak I'm not so sure it does.
11:56 moritz_ pugs: my @a[10]; @a[5] = 5; say @a
11:56 p6eval pugs: OUTPUT«5␤»
11:56 moritz_ pugs: my @a[10]; @a[5] = 5; say @a.perl
11:56 p6eval pugs: OUTPUT«\(undef, undef, undef, undef, undef, 5)␤»
11:56 moritz_ pugs: my @a[10]; @a[12] = 5; say @a.perl
11:56 p6eval pugs: OUTPUT«\(undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, 5)␤»
11:56 moritz_ it just ignores the count
11:57 guest_007 should it?
11:57 moritz_ no
11:57 frettled pugs: my @arr[10]; @arr[1] = "foo"; @arr[8] = "bar"; say +@arr;
11:57 p6eval pugs: OUTPUT«9␤»
11:58 frettled So with pugs, +@arr == .end, then.
12:00 dakkar uh… no
12:00 dakkar .end is the last index
12:00 frettled hmm, ah, right, I had arr[8]
12:00 frettled pugs: my @arr[10]; @arr[1] = "foo"; @arr[6] = "bar"; say +@arr;
12:00 p6eval pugs: OUTPUT«7␤»
12:00 frettled Better put: pugs adds undef elements to the array until the last defined element
12:05 frettled That's an interesting case of autovivification, btw.
12:05 dakkar i'm not sure if they're really there, or just a limitation of the .perl form
12:06 frettled shouldnt +@arr be equivalent to @arr.elems?
12:06 dakkar I think so
12:06 dakkar or maybe not…
12:06 masak yes, it should.
12:07 masak unless it's multidimensional, maybe.
12:07 dakkar even in the case of non-existing elements in the middle of the array?
12:07 masak I don't really know what happens then. but I think .shape is for multi-dim things.
12:07 masak dakkar: yes, even then.
12:08 dakkar rakudo: my @a;@a[10]=';say +@a;say @a.elems
12:08 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "=';say +@a"␤in Main (src/gen_setting.pm:3369)␤»
12:08 dakkar rakudo: my @a;@a[10]=1;say +@a;say @a.elems
12:08 p6eval rakudo 11a293: OUTPUT«11␤11␤»
12:08 dakkar 11, or 1?
12:08 masak 11.
12:08 guest_007 lol
12:08 dakkar all right. is there no pre-defined way to get 1?
12:09 masak dakkar: I think you'll find S09 enlightening.
12:09 frettled rakudo: my @a;@a[4]=1;say ~@a;
12:09 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤    1␤»
12:09 * dakkar re-reads S09
12:09 frettled masak: or confusing :D
12:09 masak dakkar: +(grep { defined $_ }, @a)
12:09 dakkar masak: not "defined", "existing"
12:09 dakkar (see the "delete" method)
12:10 masak isn't that for hashes?
12:10 dakkar also arrays (even in Perl 5)
12:10 masak ok.
12:10 * masak did not know that
12:10 guest_007 rakudo: my @a; @a[1_000_000]=1; say "aah:" _ +@a;
12:10 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "_ +@a;"␤in Main (src/gen_setting.pm:3369)␤»
12:10 guest_007 rakudo: my @a; @a[1_000_000]=1; say +@a;
12:10 moritz_ delete on arrays is mostly borken in Perl 5
12:10 dakkar guest_007: ~ instead of _
12:10 p6eval rakudo 11a293:  ( no output )
12:10 masak guest_007: _ is ~ nowadays.
12:11 moritz_ when was it ever _ ?
12:11 masak moritz_: before your time :)
12:11 moritz_ rakudo: my @a; @a[1000]=1; say +@a;
12:11 p6eval rakudo 11a293: OUTPUT«1001␤»
12:11 guest_007 you mean the split char?
12:11 guest_007 rakudo: my @a; @a[1000000]=1; say +@a;
12:11 dakkar guest_007: no, the concatenation operator
12:11 p6eval rakudo 11a293:  ( no output )
12:11 moritz_ strong concatenation is ~
12:11 moritz_ *string
12:11 masak :)
12:12 guest_007 in p5 the 1_000_000 == 1000000 - just the visual representation, because 10000000 is not readable
12:12 cono in perl6 we have strong concatenation :D
12:12 cono j/k
12:12 moritz_ rakudo: say 1_0 == 10
12:12 p6eval rakudo 11a293: OUTPUT«1␤»
12:12 moritz_ guest_007: still works in Perl 6
12:12 guest_007 rakudo: my @a; @a[1_000_000]=1; say +@a;
12:12 moritz_ it was the second _ that upset rakudo
12:12 p6eval rakudo 11a293:  ( no output )
12:13 guest_007 rakudo: my @a; @a[1_000]=1; say +@a;
12:13 p6eval rakudo 11a293: OUTPUT«1001␤»
12:13 guest_007 rakudo: my @a; @a[1_0_00]=1; say +@a;
12:13 p6eval rakudo 11a293: OUTPUT«1001␤»
12:13 guest_007 rakudo don't want to create large array ))
12:14 guest_007 rakudo: say 1_2_3;
12:14 p6eval rakudo 11a293: OUTPUT«123␤»
12:14 cono i guess p6eval just have limit
12:14 guest_007 fine
12:14 Su-Shee left #perl6
12:14 cono limits.conf or something
12:14 moritz_ BSD::ResourceLimits actually
12:15 cono what about forks?
12:15 cono BSD::ResourceLimits though?
12:15 moritz_ the code is all in the pugs repo, feel free to find out :-)
12:16 cono moritz_: p6eval's ?
12:16 moritz_ cono: yes
12:16 cono k,ty
12:16 moritz_ in misc/evalbot/
12:16 cono ty, ty
12:16 alester joined #perl6
12:48 moritz_ rakudo: constant Int $x = 4; say $x
12:48 p6eval rakudo 11a293: OUTPUT«4␤»
12:48 moritz_ rakudo: constant Int $x = 4; say ++$x
12:48 p6eval rakudo 11a293: OUTPUT«Cannot assign to readonly variable.␤in Main (/tmp/M2A8dFmLPZ:2)␤»
12:49 moritz_ rakudo: module Foo { constant Int $x = 4; }; say $Foo::x
12:49 p6eval rakudo 11a293: OUTPUT«Use of uninitialized value␤␤»
12:49 moritz_ rakudo: module Foo { constant Int x = 4; }; say Foo::x
12:49 p6eval rakudo 11a293: OUTPUT«Null PMC access in type()␤in Main (/tmp/g8yK3pIsBj:2)␤»
12:50 Matt-W BUG!
12:51 masak oh hai
12:51 guest_007 rakudo: my $file = open('/etc/passwd') err die "Can't read file: $!";
12:51 p6eval rakudo 11a293: OUTPUT«Statement not terminated properly at line 2, near "err die \"C"␤in Main (src/gen_setting.pm:3369)␤»
12:51 masak Matt-W: : but that one's submitted already.
12:51 guest_007 rakudo: my $file = open('/etc/passwd') or die "Can't read file: $!";
12:51 p6eval rakudo 11a293: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
12:52 guest_007 ;)
12:52 Matt-W masak: by you?
12:52 ruoso joined #perl6
12:52 masak Matt-W: think so.
12:52 frettled masak: how many percent of the submitted bugs are yours?  :)
12:53 masak submitting duplicate bug requests is so yesterday.
12:53 masak frettled: a guess would be somewhere over 50%.
12:53 frettled masak: I'm not surprised.
12:53 masak frettled: I actually pulled down the data the other day to find out. hold on.
12:54 frettled you lovely nerd you :)
12:55 masak hm, 36.82%, it seems.
12:55 masak that can't be right. :P
12:55 frettled No, there must be a mistake somewhere, perhaps you accidentally submitted some bugs with a different e-mail address?  :D
12:56 masak no, don't think so.
12:56 masak but my analysis tool (grep) might be missing something.
12:56 masak I now get 38.11%, hardly an improvement.
12:57 * masak mumbles "need to submit more bugs"
12:57 cono destroyer :D
12:57 Matt-W I think there must be a lot of old ones from other people before masak really got involved
13:00 moritz_ Matt-W: not so very many
13:00 masak actually, no.
13:00 Matt-W hopefully though most of them would have been closed a long time ago
13:00 frettled masak: what's the ratio before and after NPW?
13:01 masak frettled: I think about the same.
13:01 masak I've made one graph so far. we've been fairly constant in bug report frequency since beginning of last summer.
13:02 moritz_ rakudo: class A::B { }; sub foo (--> A::B ) { }; say "alive"
13:02 masak that's sort of the clear breakpoint between two phases in bug reports.
13:02 p6eval rakudo 11a293: OUTPUT«alive␤»
13:02 frettled masak: aha
13:03 frettled masak: as in the period between when it was 20/80 and now?
13:05 masak 20/80 in what sense?
13:08 SmokeMachine joined #perl6
13:10 p6eval joined #perl6
13:13 frettled masak: in your talk at YAPC, you mentioned something about rakudo being at a 20/80 stage a year ago (perhaps it was useful/cool, I've forgotten)
13:15 Front_slash joined #perl6
13:18 masak frettled: ah, you're mixing up two things. the 80/20 in my talk was between scripty/appy things (or, similarly, whipuptitude/manipulexity). the 80/20 of Rakudo is from this post: http://use.perl.org/~masak/journal/39322 (also features in pmichaud++'s Hacking Rakudo talk)
13:19 frettled Of course, you're expected to recall such details from the mere mention of �20/80� without any useful context.  ;)
13:19 frettled masak: ah.  yes, but I thought that the rate of bug reports might be correlated to those numbers.
13:19 masak hm, no. not directly anyway.
13:20 masak I've been steadily submitting an average of one bug ticket a day since June 2008.
13:20 masak Rakudo seems to get better, but the number of discovered bugs doesn't seem to be slacking off.
13:20 moritz_ there's the well-known 20/80 rule (in variations)
13:21 moritz_ that it takes you 20% of the time to code the first 80% of your application
13:21 moritz_ or so
13:22 * PerlJam wonders what relation the first and second 90% has to the 20/80 rule   :)
13:24 moritz_ masak: as rakudo grows it also offers more surface to attack
13:26 masak moritz_: aye. another feeling I have is that I'm mostly discovering bugs from yet-untested features.
13:27 masak actually, that's usually a good tip for actively looking for bugs.
13:32 guest_007 parrot: my $a = 1; {my $a = 2;}; say $a;
13:32 guest_007 rakudo: my $a = 1; {my $a = 2;}; say $a;
13:32 p6eval rakudo 11a293: OUTPUT«1␤»
13:32 guest_007 mistakae:)
13:33 guest_007 rakudo: {my $a = 2;}; say $a;
13:33 p6eval rakudo 11a293: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/RT6CqPoljn:2)␤in Main (src/gen_setting.pm:3369)␤»
13:33 moritz_ the bots don't forgive - they just ignore :-)
13:33 frettled moritz_: the 20/80 - 80/20 rule is applied to almost every area where some sort of effort or skill is involved :)
13:33 moritz_ it seems the 80/80 rule is, too
13:34 moritz_ for the first 20% you need 80% of the time, and for the next 80% you need again 80% of the time :-)
13:34 frettled haha
13:36 guest_007 дщд
13:36 guest_007 lol
13:43 Matt-W moritz_: yes that's not uncommon
13:44 cono guest_007: дщд ;)
13:44 cono guest_007: ru/ua ?
13:45 guest_007 ак
13:45 guest_007 bg
13:46 cono guest_007: are you was at YAPC?
13:48 molaf joined #perl6
13:52 takadonet morning all
13:52 masak takadonet: o/
13:52 takadonet how are you doing masak?
13:55 masak takadonet: I am extremely well, thank you. I hope you are, too. :)
14:05 masak I'm writing a longish use.perl post called "Perl 6 is my MMORPG". http://gist.github.com/165851 -- I'd like some feedback/criticism on it before I post. especially the RPG parts, where I'm admittedly very weak, since my experience is limited to thousands of hours of playing Angband.
14:05 __ash__ joined #perl6
14:05 masak so, comments welcome. I'll post it in an hour or so.
14:07 frettled Angband is to role-playing games what a hammer and chisel is to a computer. ;)
14:07 mkelly32 joined #perl6
14:08 alester joined #perl6
14:09 masak frettled: I'm not sure either of me or Angband deserved that. :P
14:09 frettled masak: hee-hee.
14:09 frettled But it's rather true; Angband is a single player game, with extremely little role playing per se.
14:10 masak frettled: if what you mean is that Angband is simplistic, I think you haven't played it enough.
14:10 mkelly32 hi. i stopped in here a few weeks ago asking about where to send smoke test reports. is there anywhere that would be useful to send those right now? or, if i just throw them up somewhere web-accessible, would anyone be interested in looking at them?
14:10 frettled masak: no.
14:10 masak mkelly32: smoke-reports of what? Pugs?
14:10 PerlJam masak++ nice article.
14:10 masak PerlJam: thanks. :) any particular comments?
14:11 frettled masak: but you don't do role-playing, do you?  Do you enter as a warrior, and imagine your armour, the great new stuff, and shout �have at you, fiend!� when striking with your sword?  Do you cry or moan when you're hurt?  and so on.
14:11 PerlJam masak: nothing stood out as needing change or improvement or clarification to me.
14:11 mkelly32 masak: rakudo running the spec tests
14:11 masak frettled: oh, is _that_ role-playing. I tend to call that "overacting". :P
14:11 PerlJam masak: so the only comment I have is "great job!"  :)
14:11 masak PerlJam: ok. gotcha. :)
14:12 dakkar masak: "LFA"?
14:12 frettled masak: role playing is to _play_ a _role_, a part, a character in a setting, usually with other people :)  In MMORPG, you'll find these separated between the hack'n'slash types, the �real men�, the loons and the �real roleplayers�.
14:12 masak mkelly32: either a smoke upload somewhere, or a summary of what failed for you here on-channel would be good.
14:12 masak dakkar: ok, I looked that one up. "Looking For Adventure".
14:13 frettled masak: but it's about experiencing the game.  :)
14:13 masak dakkar: I thought it might give a sense of genuineness to someone. :)
14:13 dakkar ow. couldn't find it (google, wikipedia, acronymfinder)
14:13 * [particle] has posted a reply to correct the inaccuracies and miscategorizations in http://news.softpedia.com/news/Perl-6-Coming-Soon-118819.shtml, which awaits moderator approval
14:13 masak [particle]++
14:14 moritz_ obra++ # "Rakudo White Bikeshed"
14:14 frettled Anyhow, the analogy between Perl 6 and MMORPG (or possibly just a traditional over-the-table RPG, like D&D) is cute, it may work, but I'd skip the references to Eve Online, which is a science fiction setting -- your examples are from a fantasy setting, and that jars abit.
14:14 masak nonsense! the bikeshed should be pink!
14:14 PerlJam masak: I don't see which one of your character roles would best fit myself, but maybe it's a not seeing the forest for the trees kind of thing.  :-)
14:14 [particle] (google alerts)++
14:15 masak frettled: so I should cut the first part? I can do that.
14:15 frettled masak: another way to look at it is that the Perl 6 community is more like a MUD, where the players actually contribute not only by playing (using the game), but also by building and changing the game (coding)
14:15 PerlJam frettled: I take it you're a gamer geek?  :)
14:15 frettled PerlJam: I've been playing role-playing games on and off since 1991, so, possibly yes.
14:16 * cono lineage2 more than 5 years ;(
14:16 PerlJam That first part seems fine to me as an introduction into the material, especially if that's what really happened :)
14:16 frettled But I quit playing computer games five or six years ago, and I never joined any MMORPG setting, although plenty of friends have.
14:16 frettled PerlJam: that's a good point, yes.
14:17 * frettled also learned object-oriented programming by programming in LPC on Viking MUD.
14:17 frettled ...which is kind of weird, considering that my _theoretical_ background is from studying computer science/informatics at a university at the same time.
14:17 frettled go figure :)
14:17 masak ok, keeping the first part.
14:18 masak gist.github won't let me edit the gist anyway, it seems. :/
14:19 frettled masak: oh, and I might have swapped the �mage� and �priest� descriptions, BTW.
14:19 frettled compiler implementation and deep language stuff is like magic, you know ;)
14:20 frettled Now all you lack is descriptions for paladins, rogues and rangers ;)
14:20 frettled (And in case it wasn't clear - I wouldn't bother spending time commenting on this if there wasn't merit to the thing!)
14:21 masak frettled: good idea, switching mage and priest.
14:21 masak it's exactly this kind if feedback I need. :)
14:22 masak frettled: is there a priest equivalent of 'mana'?
14:22 frettled masak: favour from the gods!
14:22 masak thanks.
14:22 masak that fits in very well.
14:22 frettled or �favor� if you prefer American English.
14:23 moritz_ it's "karma points" in other RPGs
14:23 frettled masak: you're very welcome.
14:23 frettled moritz_: I don't think I've played those other RPGs, or maybe I've just forgotten that one :)
14:23 masak I tend to want to write in Commonwealth English.
14:25 moritz_ frettled: "The Dark Eye"
14:25 frettled In D&D, the most-played system, you have something else.  I think Mage: the Ascension uses something peculiar.  Ars Magica doesn't use spell points, either.
14:25 moritz_ very popular in Germany
14:25 frettled moritz_: Never even heard of it.
14:26 frettled Ah, it first appeared in English in late 2003.
14:27 frettled Apparently the most popular one in Germany.
14:27 moritz_ right
14:27 frettled See all the cool things you can learn by being interested in Perl 6?
14:27 masak here's the post again, with "mage" and "priest" reversed: http://gist.github.com/165861
14:28 masak I hope I got all the substitutions right.
14:28 finanalyst how about adding TheProphet instead of a special Healer?
14:28 mkelly32 masak: http://test.pioto.org/rakudo/smoke/
14:28 finanalyst after all He wrote the appocalypses
14:28 masak finanalyst: no, I sincerely believe that it's not a singleton class.
14:28 frettled masak: wisdom would also be useful to a �priest�
14:28 mkelly32 aether is an exherbo linux x86_64 box. domusporta is an i386 freebsd 7 box.
14:29 finanalyst true Healer is not singleton, but Prophet could be
14:29 frettled masak: It looks good enough that you'll get all sorts of irrelevant feedback now.  :D
14:29 masak frettled: yes, useful, but not strictly necessary.
14:29 finanalyst And Trolls!
14:29 frettled masak: as in �you may think it's cute now�?  ;)
14:29 masak frettled: indeed. :) posting.
14:29 masak frettled: heh. :)
14:32 moritz_ masak: there's another good reason why warriors need karma... ;-)
14:32 moritz_ masak: they have to convince the implementors to actually fix their blocker bugs
14:33 dalek rakudo: 8d7fc7d | moritz++ | docs/ChangeLog:
14:33 dalek rakudo: [docs] updated ChangeLog. Corrections welcome
14:33 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8d7fc7d4a16b26b4b539de8c08a030cfecfe1bb5
14:33 KyleHa joined #perl6
14:33 masak moritz_: I find that to be not that hard at all, actually.
14:33 masak well, there's #58392, of course... :)
14:33 masak the mythical ticket.
14:34 moritz_ so mythical that you still remember its number? ;-)
14:35 masak in my sleep.
14:35 PerlJam moritz_: did :local and such get added just before the 2009-07 release?
14:37 moritz_ PerlJam: not sure
14:37 masak frettled: another disadvantege of naming the class 'TheProphet': it actually shadows the significant role played by the community itself nowadays.
14:42 masak there, posted. http://use.perl.org/~masak/journal/39445
14:42 masak thanks, y'all, for your feedback.
14:43 frettled masak: yes, quite
14:45 nihiliad joined #perl6
14:45 frettled Back to my proposed change to S09, here's a diff -- is there anything else/anywhere else I should write this?  I was thinking about putting it under the header for autosorted, but it didn't seem right: http://gist.github.com/165868
14:47 PerlJam frettled: what is that "except for successive calls" clause all about?  Each call should result in the same (arbitrary) order barring any insertions or deletions in the mean time?
14:47 frettled Apparently, I don't have a gist user even if I have a github user.  Hmm.  What do I do to get there, I wonder ...
14:47 frettled PerlJam: See S32 :)
14:48 PerlJam S32 isn't exactly small :)
14:48 frettled PerlJam: but yes, that's the meaning I glean from it.
14:48 masak frettled: I found the reference in S32. I do, however, think that it's better to re-state what it says than to refer to S32.
14:48 frettled Or there could be other changes than insertions and deletions that �change� the hash.
14:48 masak frettled: apart from that, it looks good.
14:49 finanalyst masak: i looked at #58392 on RT and it was resolved. Why did you call it 'mythical'?
14:50 frettled Hmm.  Perhaps it should be the same for _any_ iterator, I mean, it shouldn't be iterator specific, should it?
14:50 masak finanalyst: in a way, you had to be there.
14:51 masak finanalyst: it's one of those "in my time, we didn't even have proper lexical pads, and we were happy" things.
14:51 finanalyst masak: ok. :)
14:51 finanalyst nostalgia already!
14:51 finanalyst have to go.
14:52 finanalyst left #perl6
14:52 masak oh, there was reason to be nostalgic way before #58392. :)
14:53 cosimo hey guys, is there a template I can take as "well-written" perl6 class? like with documentation and perl6 best practices?
14:53 masak cosimo: yes.
14:53 cosimo ok
14:53 masak oh, you'd like examples? :)
14:54 masak I've always like how Druid turned out.
14:54 masak that said, I plan to re-write the Pod comments there in some other way that better reflects my ideal of how to use Pod.
14:54 masak but the code is very idiomatic, I'd say. I'm proud of it.
14:55 masak it even uses a Listener Pattern!
14:56 mzedeler But that .+ invocation you showed me could be replaced....
14:56 mzedeler s/could/should/
14:56 cosimo it sounds awe^Wgrand, but unfortunately I know nothing about it
14:56 cosimo this one? http://github.com/masak/druid/tree/master
14:56 masak cosimo: aye.
14:57 frettled Is the text better now?  Comprehensible enough?  http://gist.github.com/165868
14:57 masak mzedeler: sorry, I have a bad memory; which .+ invocation?
14:58 cosimo masak: thanks
14:59 masak here's where I first blogged about Druid: http://use.perl.org/~masak/journal/37885
15:00 mzedeler I am not sure if it was .* or .+, but the intention was to make an abstract parent class do proper initialization, except it seemed that it was the responsibility of the code outside the class to have the parent class called.
15:00 moritz_ frettled: s/', and may be//
15:00 moritz_ frettled: s/', and may be'// I meant ;-)
15:00 masak mzedeler: ok, then it was the BUILD one.
15:00 frettled masak: ah, that's the one that had the LEGO implementation magically appearing on the table in my livingroom during NPW?  :D
15:01 masak mzedeler: but the nice thing is that that one already is implicit. it's BUILDALL that does a .* on all the BUILD submethods.
15:01 masak frettled: yep, that's the one. :)
15:01 frettled moritz_: well, it doesn't have to be arbitrary?
15:01 mzedeler Can I find it somewhere here? http://github.com/masak/druid/tree/b2f6c896d251278c12bb0cbfa377f9854da030fd/lib/Druid
15:01 * Matt-W appears to be a Priest/Warrior/Mage multiclass build
15:01 moritz_ frettled: it *is* arbitrary. Sorted (or insertion order) is also a form of being arbitrary
15:02 mzedeler :-)
15:02 frettled moritz_: ah, I meant to suggest that it may be arbitrary between implementations, not arbitrary within an implementation.
15:03 frettled moritz_: perhaps something like this, then: �implementation dependent and arbitrary, but should be consistent within an implementation�?
15:03 moritz_ anyway, either version is fine to commit
15:03 moritz_ frettled: no need for that
15:03 masak mzedeler: well, http://github.com/masak/druid/blob/b2f6c896d251278c12bb0cbfa377f9854da030fd/lib/Druid/View/Text.pm on line 74. and http://github.com/masak/druid/blob/b2f6c896d251278c12bb0cbfa377f9854da030fd/lib/Druid/View.pm on line 14.
15:03 frettled moritz_: okay, I'll change it to �dependent and arbitrary� then.
15:04 mzedeler I also found it. Still cant see why nextsame or nextwith aren't sufficient. Honestly, I consider any use of .* and .+ harmful.
15:04 moritz_ for example in perl 5  perl -wE 'say for keys %ENV' is always the same - until you provide enough hash collisions, then it will randomize
15:04 moritz_ that's reasonable, IMHO
15:05 moritz_ and should not be forbidden
15:05 frettled moritz_: good point.
15:05 frettled re-hashing should be allowed at any time.
15:06 frettled the point to make is that one shouldn't rely on any specific behaviour, unless you (or something else) alters the hash.
15:06 masak mzedeler: I, for one, would like to see you expand on this in a p6l thread.
15:06 moritz_ yes, that's very clear
15:06 masak mzedeler: your arguments sound interesting, but my brain is very small, and I often need to read things several times.
15:08 pugs_svn r27957 | jani++ | Clarification of hash key sort order, based on S32
15:09 frettled masak: for a small brain, yours is amazingly efficient.
15:09 PerlJam the electrical impulses don't have as far to travel.
15:10 frettled exactly!
15:10 huf watch out for that "small brain" trick, fenyman used it too
15:10 PerlJam huf++
15:10 huf +spelling.
15:10 frettled PerlJam: I would have thought of that as well, but it takes a while to think things up with this huge brain of mine.
15:11 frettled huf: spleling is opitonal ;)
15:12 PerlJam My brain is large and efficient.  The only problem is that I can't control it :)
15:12 PerlJam I'll be trying to focus on something that's nominally important and my brain will tell me, "that's not as important as this small shiny object glittering out of the corner of your eye"
15:13 __ash__ the internet is a dangerous place with that attitude then
15:13 PerlJam Next thing you know, my brain has hijacked my focus to its own nefarious purposes.
15:13 frettled __ash__: there's a kitten picture illustrating that.
15:14 * frettled patiently waits for someone to google it.
15:14 __ash__ http://shogun.shafted.com.au/temp/domokuns-kitten.jpg
15:14 mzedeler Sorry - I was afk.
15:15 mzedeler masak: where should I post something about the .+ and .* invocation operators?
15:16 * mzedeler is rebooting brain after seeing kitten chased by brick shaped chocolate cupcakes.
15:16 masak mzedeler: p6l.
15:17 mzedeler The usenet group?
15:17 moritz_ the mailling list
15:18 frettled mzedeler: http://dev.perl.org/perl6/lists/
15:18 mzedeler Thanks.
15:19 frettled I've been a subscriber for almost six hours, so I'm very inveterate.
15:20 masak I've been a subscriber for four years, and some emails still make me feel like I don't understand Perl 6 at all. :)
15:20 masak hm, five years.
15:20 moritz_ masak: same here (although I'm not subscribed that long)
15:20 donaldh joined #perl6
15:22 PerlJam moritz_, masak: same here and I've been subscribed since it was created (I don't know when that was)
15:29 KyleHa1 joined #perl6
15:36 mzedeler Thanks for the pointer anyway. I'll prepare some kind of posting, but first I have to do some research into the history of those two operators.
15:38 masak mzedeler: what kind of history did you have in mind?
15:38 masak mzedeler: I think the important point is the different uses of those operators in different contexts. (multi dispatch, inheritence, list of candidates...)
15:41 PerlJam mzedeler: .* and .+ have bothered me  too, but I haven't thought about it enough to come up with some specific, coherent arguments against them.
15:42 moritz_ if you don't like them, don't ues them?
15:42 PerlJam I don't.
15:42 PerlJam But I primarily think that I just don't understand them.   What problem do they solve?
15:43 mzedeler I'll try excavating the original justification and possible use cases first.
15:43 alester ping masak
15:44 masak alester: pong.
15:44 alester may I rerun your MMORPG story on Perlbuzz?
15:44 masak alester: yes.
15:44 mzedeler First argument is that most problems you can solve with .+ or .* can be done cleaner by explicit calls inside the classes themselves.
15:44 alester I need a bio for you, then, and a URL for me to link yr name to.
15:45 mzedeler Second argument is that outside code shouldn't know about any class implementation and how calls are subdivided into other calls.
15:45 masak alester: ok. I'm on the phone, so plz hold on for a few minutes.
15:45 alester sure.
15:46 mzedeler Third, try to imagine the wierd call chains that shows up if you have multiple inheritance with some diamond shaped inheiritance paths.
15:47 moritz_ mzedeler: TimToady mentioned here multiple times that for .+ and .* your classes have to be specially designed
15:47 mzedeler I have to go and cook. Sorry for throwing all that stuff at you and then leaving. Anyone who'd like to talk more are welcome to send a mail to me at michael@zedeler.dk.
15:47 mzedeler moritz_: I'd like to see such design.
15:47 mzedeler Sorry, have to go.
15:47 moritz_ mzedeler: so would I ;-)
15:47 moritz_ bye
15:49 PerlJam moritz_: or rather than being specially designed, you get a lazy Capture out of using .* or .+ that encapsulates the inheritance graph somehow.
15:49 moritz_ PerlJam: sounds like you're about to re-invent WALK or ^methods or so ;-)
15:52 pmichaud good afternoon, #perl6
15:53 * TimToady continues to lurque
15:53 masak alester: URL: that'd be either http://masak.org/carl or http://feather.perl6.nl/~masak -- bio: how long? does the one on use.perl suffice?
15:53 masak pmichaud: good afternoon.
15:53 moritz_ pmichaud: still wrong time zone? ;-)
15:54 alester masak, i can adapt that.
15:54 PerlJam good morning pmichaud
15:54 pmichaud moritz_: just adopting whatever time zone seems appropriate
15:55 moritz_ http://asset.soup.io/asset/0420/8585_49f9_500.jpeg why does that remind me of Perl 6? ;-)
15:56 TimToady because everything reminds one of Perl 6... :P
15:56 masak moritz_: wonderful! :D
15:57 abra joined #perl6
15:59 * pmichaud notes the increased level of bikeshed discussions taking place on p6l
16:00 moritz_ aye
16:00 * masak looks at the "embedded comments" thread, thinking "what have I done?"
16:00 TimToady well, you predicted it too, so that's okay :)
16:01 masak "all is fair if you pre-predict"
16:02 TimToady it's an interesting aspect of human psychology that the less abstract issues get more bikeshedding, since everyone says "Ooh, something I understand well enough to have an opinion on."
16:04 pmichaud KyleHa++  # volunteering to do the august release!
16:04 KyleHa1 *bow*
16:05 moritz_ should I comment on the (#...) / {#...} proposal, or is it clear that we don't adopt it anyway?
16:05 masak moritz_: comment on it.
16:05 TimToady that one's not going to fly, but if you want to elucidate some of the reasons it won't, go ahead
16:06 masak exactly.
16:06 PerlJam Ask yourself how much longer you are willing to put up with the bikeshedding first  :)
16:06 TimToady Oh, I'm very patient on that subject :)
16:06 pmichaud Is #= still in the running for indented pod, ooc?  I haven't seen that in the thread.  (more)
16:06 pmichaud if #= is still available, then perhaps embedded is   #=(...)     :-P
16:06 TimToady the more people bikeshed, the more they realize they need a Designer. :)
16:06 TimToady or at least a Decider...
16:07 TimToady I'm reserving #= for TheDamian if he wants it
16:07 pmichaud #=(...)   would seem to avoid many of the inadvertent cases.  On the wrong hand, it would seem that (...) should then be pod-ish somehow, because of the '='
16:07 TimToady nodnod
16:09 pmichaud there's a self proclaimed Decider that lives just a few miles from me.  I wish he hadn't ever gotten that job.   1/2  :-)
16:10 TimToady yes, well, I'm hopeful the best Deciders are the ones who don't actually like deciding things arbitrarily
16:11 TimToady "I am overcome with a sudden burst of wishy-washiness." --Charlie Brown
16:11 pmichaud http://news.softpedia.com/news/Perl-6-Coming-Soon-118819.shtml  # nice to see a good (accurate) summary of things
16:13 masak did [particle]'s proposed changes go in already?
16:14 pugs_svn r27958 | kyle++ | [t/spec] Update some more filetest-using code.
16:14 pugs_svn r27958 | kyle++ |
16:14 pugs_svn r27958 | kyle++ | These tests are not run in Rakudo's spectest.data, so I haven't
16:14 pugs_svn r27958 | kyle++ | fudged them.
16:14 pmichaud I didn't see the proposed changes
16:14 [particle] no, that have not
16:14 moritz_ speaking of changes... I think it would be a good idea to apply Ben Morrow's patches
16:15 moritz_ I don't know if the behaviour he proposes is the most sensible, but we should at very least be explicit about what we do
16:15 lisppaste3 particle pasted "comments on softpedia article" at http://paste.lisp.org/display/85200
16:19 KyleHa1 I haven't gotten to look at Ben's patches yet, but I was excited to see their existence.
16:21 TimToady Um, I thought it was the San Diego Times
16:21 pmichaud particle has it right.  I had mistaken the name a few months ago as well.
16:22 TimToady sudo apt-get install rar
16:22 TimToady ah, so I see
16:23 TimToady huh, how did it do that paste?
16:23 Matt-W joined #perl6
16:23 TimToady maybe a cosmic ray hit my mouse button
16:24 kane_ joined #perl6
16:24 pmichaud particle++ raises some good factual corrections, but I don't think the article is as wrong as particle's comments make it seem to be
16:24 Matt-W rakudo: class A { }; class B { }; class C { has A|B @.a; }; say "alive";
16:24 p6eval rakudo 8d7fc7: OUTPUT«Malformed declaration at line 2, near "A|B @.a; }"␤in Main (src/gen_setting.pm:3369)␤»
16:24 pmichaud yes, the author has confused "rakudo" and "parrot"
16:24 TimToady it just comes across as a bit more aggrieved than it needs to be, I think
16:25 pmichaud but just because an article contains factual inaccuracies doesn't automatically put it into the realm of "opinion".  It just makes it incorrect.
16:25 PerlJam [particle]: I think your tone is a little harsh and some of the comments have a bit of a knee-jerk feel to them, but I thought several of the same things that you said :)
16:25 pmichaud TimToady: I agree.
16:26 [particle] PerlJam: you're right about my tone.  it was a 6am reply with a bit of a birthday hangover
16:27 PerlJam birthdays++
16:28 pmichaud ....birthday?
16:28 TimToady it's because you're so old now
16:28 [particle] i'm crankier at 36, i guess.
16:28 SolitoMortis joined #perl6
16:28 PerlJam [particle]: have you told anyone to get off of your lawn yet?  (whether you actually have a lawn or not)
16:29 [particle] every blade of grass growing in my yard has been classified as a weed
16:29 [particle] i have fewer than 1000 left, i think
16:30 TimToady yards? weeds? blades?
16:30 Infinoid people to tell to get off your lawn?
16:30 pmichaud in general I hope our collective approach will be to gently correct the misconceptions about rakudo, perl 6, and parrot.  I think it's entirely understandable that people outside the project can't immediately see how the pieces fit together, especially since it is substantially different from the perl 5 ecosystem
16:31 TimToady aikido, and all that...
16:31 [particle] instead, i've got plum, asian pear, strawberry, blueberry, raspberry, tomato, fava, peppers, beets, radishes, pole beans, lettuce, zucchini, broccoli, ...
16:31 PerlJam pmichaud: not to mention that the people writing the copy may not necessarily be the most technically minded.
16:31 TimToady gently assist them to a stable position where they cannot harm themselves :)
16:31 [particle] pmichaud: i should rewrite that reply
16:31 pmichaud sounds a bit like my place.  We have 17 trees on our lot.  But all those trees leave very little sunlight for any grass beneath them
16:32 [particle] all on 0.06 acres, including the house
16:32 PerlJam [particle]: are you a master of vertical development?
16:32 [particle] yes :)
16:33 [particle] oh, i forgot the three varieties of onions, plus garlic
16:34 pmichaud [particle]: anyway, happy belated birthday.  I'm guessing your birthday is the same as my father's birthday.  He doesn't have a lawn either.  :-P
16:35 [particle] yesterday? yes, i think i remember that. thanks, and :P
16:35 PerlJam pmichaud: spekaing of birthdays ... I'm going to wish you yours early in case I forget in a couple of days:  Happy Birthday!  :)
16:35 pmichaud PerlJam: thanks
16:35 [particle] coke's is friday, i think
16:35 pmichaud (Thursday, for those keeping track of such things)
16:35 pmichaud And yes, I was born on a Friday the 13th.  :-)
16:38 PerlJam next year Aug 13 will be a friday again.
16:39 Matt-W silly questions
16:39 pmichaud indeed it will.
16:39 Psyche^ joined #perl6
16:39 Matt-W if I make an object in $o and then say my $j = $o, does it copy by value or will methods called on $j affect $o?
16:39 pmichaud Matt-W:  most objects act like references, as in P5
16:39 PerlJam Matt-W: $j and $o will refer to the same object.
16:40 Matt-W pmichaud: okay
16:40 Matt-W so I need to manually copy
16:40 Matt-W does this also apply to @arrays
16:40 pmichaud depends on what you mean by "apply to @arrays"
16:41 Matt-W does @a = @b copy @b into @a, or just duplicate the reference to the Array object that's sitting behind them?
16:41 pmichaud it copies the elements of @b into @a
16:41 Matt-W excellent
16:41 Matt-W thanks :)
16:41 Matt-W a semantic difference between storing your arrays in @ and $ variables
16:41 Matt-W marvellous!
16:42 pmichaud oh, drat.
16:42 pmichaud I just remembered that my driver's license expires on thursday
16:42 Matt-W doh
16:42 pmichaud guess I get to wait in line today or tomorrow
16:42 Matt-W that'll be fun
16:45 frettled Is there already an overview of what things are copied by value, name or reference in Perl 6?  (They are probably defined in the spec, but are they listed somewhere in that particular context?
16:46 pmichaud alester: fwiw, here are my "missed the boat" comments that just occurred in another location.  http://darkeside.blogspot.com/2009/08/perl-6-gets-release-date.html
16:46 pmichaud (these were independent from the ubuntu forums thread that you were commenting on)
16:48 alester In general I've grown less tolerant of backseat drivers.
16:49 frettled Clive seems to have taken the feedback rather well, I think.
16:49 pmichaud agreed, very well.
16:49 frettled @karma birthdays
16:49 lambdabot birthdays has a karma of 1
16:49 frettled tsk, tsk.
16:49 frettled birthdays++
16:52 moritz_ (ben morrow)++
16:52 moritz_ (I really want to suggest £, just to teach USAnians '#' isn't called
16:52 moritz_ 'pound'... :) )
16:52 frettled heh
16:52 moritz_ nice idea ;-)
16:53 pmichaud moritz_: you'll never be able to pound that into our heads
16:53 frettled moritz_: the closure traits patch?
16:53 pmichaud moritz_: most of us don't have a pound of sense
16:53 moritz_ frettled: that was from the comments discussion
16:53 frettled moritz_: oh!
16:53 PerlJam moritz_: "pound" is easier to say than "octothorpe"
16:53 pmichaud and everyone knows that "hash" is "%"  :-P
16:54 frettled hehe
16:54 zamolxes joined #perl6
16:54 pmichaud and "tic-tac-toe symbol" is a bit cumbersome as well
16:54 frettled "grid" works.
16:54 moritz_ call it "crosshatch" then ;-)
16:54 moritz_ or U+0023 NUMBER SIGN
16:54 PerlJam ETOOMANYSYLLABLES
16:55 * pmichaud starts thinking about the "Rakudo Pound" release :-P
16:55 frettled pmichaud++
16:55 frettled Using "sharp" is right out.
16:56 pmichaud "Rakudo ♯"   ?
16:56 frettled moritz_: How about U+2116? :D
16:57 frettled pmichaud: perhaps Rakudo flat instead?
16:57 frettled U+266D
16:57 pmichaud We'll do "Rakudo Natural" first.
16:57 simcop2387 joined #perl6
16:57 PerlJam As long as we don't ever get "Rakudo ?"
16:57 frettled wonderful :)
16:58 moritz_ meh, the bikeshedding swapped over to #perl6, and it's my fault again
16:58 simcop2387-vnc joined #perl6
16:58 pmichaud "Rakudo ‽"
16:58 PerlJam hrh
16:58 PerlJam er, heh
16:58 TimToady actually, it's going to be #`{ your ad here }
16:59 alester The Tostitos / FedEx Perl 6
16:59 PerlJam Have a Rakudo and a Smile
17:00 frettled moritz_: but do you prefer Italian craftsmanship or Japanese fishing equipment?  ;D
17:00 moritz_ frettled: yes
17:00 moritz_ ;-)
17:00 frettled darnit, that came right back in my face, didn't it ...
17:00 alester Handcrafted from pure Silicon Valley bits, Perl 6 provides you the power you need for your toughest computing problems, plus the arcane syntax women love.
17:01 frettled alester: May I quote you?
17:01 alester Sure.
17:01 moritz_ alester++
17:01 frettled Now I only need to find some examples of tough computing problems that Perl 6 solves powerfully, and arcane syntax that women love.
17:02 frettled alester++
17:02 japhb frettled: any use of the butterfly operator.
17:02 japhb (see topic)
17:03 takadonet this channel starting to get little weird.....
17:03 pmichaud masak++  # http://use.perl.org/~masak/journal/39445
17:04 moritz_ takadonet: starting? you're not here very long, are you? ;-)
17:04 plarett joined #perl6
17:04 takadonet on and off the last 6 months
17:04 plarett ok just wondering whats discrete optimization
17:04 plarett integer programming
17:04 frettled japhb: that will be interesting ...
17:05 [particle] hey, i was born on a friday, too....
17:05 japhb I was born.  I'm pretty sure of that.  The rest I don't really know.
17:06 pmichaud Somehow I'd like to see "Perl 6 is my MMORPG" linked or summarized on perl6-projects.org
17:06 alester it's goin' up on Perlbuzz right now.
17:06 moritz_ maybe we need an -Ofun box
17:06 pmichaud -Ofun +2
17:07 frettled moritz_: yes!
17:07 pmichaud we can reshuffle the boxes and move "download"
17:07 mikehh joined #perl6
17:07 frettled �Download� should be closer to the top, anyway.
17:07 guest_007 will perl6 be fast as perl 5.10?
17:07 frettled yesno
17:07 PerlJam guest_007: Is english as fast as spanish?
17:07 * frettled knew the answer to that one.
17:08 frettled ...especially after all the comparisons of performance between 5.6.x, 5.8.x and the prereleases of 5.10.x...
17:08 guest_007 do you agree that Java is slow?
17:08 frettled no.
17:09 guest_007 will perl6 be as slow as Java?
17:09 __ash__ doesn't that depend on how many cores and the quality of the code being written?
17:09 PerlJam guest_007: you are asking questions devoid of anything meaningful.
17:09 frettled guest_007: do you agree that the RISC 4k processor had a superior architecture to Intel 686?  :D
17:09 guest_007 :))
17:10 pmichaud guest_007: I'm guessing that someday Perl 6 will be fast enough that we don't care if it's faster than perl 5.10
17:10 guest_007 i want someday
17:10 pmichaud guest_007: another way of asking:   is perl 5.10 faster than awk?
17:10 PerlJam pmichaud: or perl 4 even.
17:11 PerlJam I know one of the things that worried me for a while after perl 5 came out was how slow it was as compared with perl 4.  It didn't take very long for me to get to the "who cares?" stage
17:11 pmichaud I think it's useful to remember that 5.8 and 5.10 are not really my targets at the moment.  These days I'm more inclined to ask "Is Perl 6 faster than Perl 5.004?"
17:11 guest_007 )
17:12 pmurias guest_007: actually it's the java app which are horribly slow
17:12 pmurias java itself is quite fast
17:12 frettled pmichaud: Then rakudo is doing far better than I would expect at this point in time.
17:12 Matt-W Java with a decent JIT is quite nippy
17:13 pmichaud frettled: well, Rakudo still has some serious speed issues.  But we know where some of them are, and they're being addressed.
17:13 japhb pmichaud: Why 5.004?
17:13 pmichaud japhb: because 5.8 and 5.10 have had 15 years of optimizations in them
17:13 japhb pmichaud: Ah, I see.
17:14 japhb How much cumulative difference has that actually made?
17:14 pmichaud if I want to compare speed, then in some sense I should ask if Perl 6 ten years from now is faster than 5.8 or 5.10 of today
17:14 * japhb would be mildly surprised (though happy) if 5.8/5.10 were even 2x faster than 5.004
17:14 guest_007 pmichaud: perl6 will be faster then perl 5.10 in 2025
17:15 moritz_ who can see that far in the future?
17:15 japhb guest_007: well volunteered.
17:15 frettled :)
17:15 frettled In some respects, Perl 6 is already faster than 5.8 in several ways that make eminent sense.
17:16 frettled E.g. programmer time.
17:16 guest_007 perl6: say 1; say 2; say 3; say 123;
17:16 frettled And later: maintenance time.
17:16 p6eval elf 27958, pugs, rakudo 8d7fc7: OUTPUT«1␤2␤3␤123␤»
17:17 PerlJam frettled: that sounds like a really good topic for a blog post or a short article of some sort.
17:17 hercynium joined #perl6
17:17 frettled PerlJam: Yes, I should think so, and I think that masak or mberends would be good people for writing that.  They're both pretty darn good at such.
17:18 frettled Another thing that would be cute (�I may think it's cute now�), would be to compare the speed of a small test program with Perl 5.10.1 + Moose.
17:18 frettled But it would have to be a program that did some RL things.
17:19 frettled Hmm.  Do we have a replacement module for DateTime in Perl 6, BTW?
17:19 frettled I've already pissed off Dave Rolsky once, so I might as well give it a second try.
17:19 frettled :-/
17:20 cdarroch joined #perl6
17:20 pmichaud frettled: lib/Temporal.pm in the rakudo repo
17:20 frettled aha!
17:21 frettled That reminds me that I should check out a recent version of Rakudo, instead of fiddling with one that was current during NPW.
17:22 frettled Regarding pissing off Dave Rolsky: no, I didn't and don't mean to.  :)
17:23 * takadonet loving having 8 CPU at work
17:28 pugs_svn r27959 | lwall++ | change embedded comment syntax to #`[...] and variants
17:28 pugs_svn r27959 | lwall++ | define statement_prefix:<void> to return Nil
17:28 pugs_svn r27959 | lwall++ | more s/Capture/Parcel/ mods
17:29 PerlJam TimToady++  that's bound to irk everybody equally  :)
17:29 moritz_ TimToady++ # finding a use for the last unused printable ASCII character
17:29 TimToady I think ` is highly unlikely to occur in typical Perl 6 programs :)
17:31 guest_007 rakudo: #`[lwall did this]
17:31 p6eval rakudo 8d7fc7:  ( no output )
17:31 PerlJam See? It's already implemented  ;>
17:31 kane_ joined #perl6
17:32 SmokeMachine joined #perl6
17:32 frettled \o/
17:32 [particle] editors will love you
17:32 frettled TimToady++
17:32 guest_007 What will happen if Larry Wall work with Bill Gates?
17:32 [particle] why don't you ask him?
17:33 frettled guest_007: Error: imagination out of bounds at line 23456.
17:33 PerlJam Larry might be a tad richer
17:33 PerlJam But then he might also be more like Darth Vader than we would like  ;)
17:34 frettled Nah, Bill Gates wouldn't be more like Darth Vader then.  ;)
17:35 guest_007 they will need John Window and Mary Roof
17:36 * PerlJam continues consuming an inordinate amount of well-seasoned and smoked brisket
17:38 guest_007 vista will become stable
17:40 Matt-W nah
17:40 Matt-W windows 7 is what vista should've been
17:40 Matt-W forget vista
17:41 guest_007 ubuntu is what vista should have been :)
17:41 pmichaud should I switch Rakudo to use the #`(...) form now, or should we transition to allow #(...) for a while longer yet?
17:41 moritz_ pmichaud: if you switch now, I'll try to update the tests
17:42 pmichaud well, I think I can allow both for a while :-)
17:42 pmichaud but better is probably to just use the #` form
17:42 guest_007 i agree
17:43 moritz_ can I assume that it's also #`[comment] in char classes?
17:43 pugs_svn r27960 | lwall++ | [STD] deprecate backticklessness
17:44 pmichaud Ah, STD deprecates it with a worry
17:44 guest_007 i think that lwall know what are you talking about!
17:44 TimToady the deprecation will disappear soon
17:45 TimToady well, it was the logical next thing to do, I suspect
17:45 pmichaud I wonder if it's worthwhile to add <worry> to Rakudo's current grammar somehow
17:45 guest_007 r27961 | lwall++ | I know everything, my children
17:46 TimToady I can fix everything in the test suite, but I can't fix rakudo's darkpan :)
17:46 pmichaud We don't (yet?) support the darkpan
17:46 frettled SEP
17:46 PerlJam TimToady: rakudo's darkpan have active developers.
17:46 PerlJam er, has
17:47 PerlJam (anyone using rakudo at this point isn't relying on things NOT changing)
17:47 moritz_ TimToady: are you going to update the test suite, or should I?
17:47 TimToady well, if you want to do it, I won't stop you :)
17:48 TimToady make snaptest should tell you everything that needs changing
17:48 frettled Hmm, now that we have Parcel, where is Part?
17:48 TimToady I think we'll add Post first
17:49 frettled And at a later point in time, Farce.
17:49 TimToady once we have Post, we can add Modern
17:49 frettled :)
17:51 pugs_svn r27961 | moritz++ | [t/spec] embedded comments and unspaces now have a backtick
17:53 guest_007 r27962 | guest_007++ | [fix] Perl6 now runs faster
17:54 frettled For some reason, pugs_svn is not fooled.
17:54 TimToady @karma guest_007
17:54 lambdabot guest_007 has a karma of 0
17:54 TimToady nor is lambdabot :)
17:54 frettled heh
17:55 japhb guest_007 += e**(pi * i) + 1;
17:55 japhb (No sigil on nicks, you see.)
17:55 TimToady shouldn't that be -i ?
17:56 moritz_ bikeshed harder!
17:56 japhb heh
18:03 nihiliad joined #perl6
18:09 payload joined #perl6
18:09 minskman joined #perl6
18:12 dalek rakudo: 1d75a78 | pmichaud++ | src/ (2 files):
18:12 dalek rakudo: Embedded comments now require backticks.
18:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1d75a78c376b602cbccb2cf701a5e5c76babbdb4
18:18 hanekomu joined #perl6
18:31 mzedeler_ joined #perl6
18:31 [particle] -Obikeshed
18:37 molaf joined #perl6
18:53 pmurias how can i read in a 32 bit little endian number portably in C?
18:53 Matt-W use a library which provides the function for you
18:53 pmurias :)
18:53 Matt-W otherwise you need a pile of configs and #defines, I think
18:54 Matt-W don't think anything comes as standard which can figure it out
18:54 Matt-W because you have to know if you're big-endian or not
18:54 Matt-W and how big your target variable is
18:54 Matt-W reading it is easy, it's putting it somewhere that's hard :)
18:54 szabgab joined #perl6
19:02 alester_ joined #perl6
19:04 nihiliad joined #perl6
19:07 nihiliad left #perl6
19:15 frettled rakudo: my $year=1993; ((time - Temporal::DateTime.new(date => Temporal::Date.new(:year($year), :month(9)), time => Temporal::Time.new()).epoch) / 86400).ceiling.fmt("September %d, $year").say;
19:15 p6eval rakudo 1d75a7: OUTPUT«September 5824, 1993␤»
19:17 TimToady any Perl 6 code containing the constant 86400 is probably wrong anyway, at least until the astronomers give up on leap seconds
19:17 japhb .oO( Another warning like concatenating the string 19 in front of something? )
19:18 frettled TimToady: Yes, there's a high risk for failure around midnight.
19:19 frettled I was thinking about the leap second problem the other day, and I've come to the realization that it's just a bloody nuisance that one either has to live with or ignore.
19:20 frettled Anyway, there doesn't appear to be a reasonably easy way to compare date and time yet. :-/
19:20 donaldh joined #perl6
19:21 [particle] run an external perl 5 script
19:22 frettled /o\
19:22 frettled Of course, I could try to reimplement that part of the DateTime module, hahahahahaa.
19:24 rindolf joined #perl6
19:26 M_o_C joined #perl6
19:27 [particle] pick your poison :)
19:28 frettled Hmm.  And there is implied some difference in what will happen if I use time instead of gmtime, since gmtime is always UTC, which means it includes leap seconds.
19:28 * frettled checks the code for september.pl.
19:29 frettled Ooh, this is ooold:
19:29 frettled require "timelocal.pl";
19:31 frettled Hmm.
19:32 moritz_ alester: on http://perlbuzz.com/2009/08/perl-6-is-my-mmorpg.html all the side bars appear below the post contents, all on the left side (firefox 3.0, linux)
19:43 frettled aha, aha (I think).
19:44 _timbunce joined #perl6
19:45 frettled alester: what moritz_ said happens in Opera 9.64 as well.
19:51 angelixd joined #perl6
19:52 frettled rakudo: (Time.new.gmtime - time.truncate).say;
19:52 p6eval rakudo 1d75a7: OUTPUT«0␤»
19:52 frettled Shouldn't the result be 23?
19:53 moritz_ rakudo: say TIme.new.gmtime
19:53 japhb rakudo: say Q:PIR{ %r = time };
19:53 p6eval rakudo 1d75a7: OUTPUT«Could not find non-existent sub TIme␤»
19:53 p6eval rakudo 1d75a7: OUTPUT«The opcode 'time_p' (time<1>) was not found. Check the type and number of the arguments␤in Main (src/gen_setting.pm:3369)␤»
19:53 moritz_ rakudo: say Time.new.gmtime
19:53 p6eval rakudo 1d75a7: OUTPUT«2009-08-11T19:53:32+0000␤»
19:53 moritz_ no fractional seconds here
19:54 japhb How do you feed a carriage return *into* the evalbot?
19:54 moritz_ japhb: with ␤
19:54 frettled A result of 23 would indicate that it included leap seconds, as it should according to S32::Temporal, because gmtime is supposed to be in UTC, which has had 23 leap seconds added since 1972.
19:55 japhb rakudo: say Q:PIR{ $N0 = time␤%r = $N0 };
19:55 p6eval rakudo 1d75a7: OUTPUT«Null PMC access in set_number_native()␤in Main (/tmp/wT0ySePYtA:2)␤»
19:55 japhb rakudo: say Q:PIR{ $N0 = time␤%r = box $N0 };
19:55 p6eval rakudo 1d75a7: OUTPUT«1250020542.9451␤»
19:55 moritz_ japhb++
19:55 japhb There we go.  Sheesh.
19:56 frettled japhb: and then you need to either use truncate or ceiling (depending on what's actually correct, you'll only be off by max 1 second) :)
19:57 frettled japhb: btw, what did you do to insertthe newline?
19:58 japhb GNOME Unicode-char-by-hex-codepoint.  CTRL-SHIFT-U, type hex, ENTER  (Or alternately hold CTRL-SHIFT, U, hex, release CTRL-SHIFT)
19:58 moritz_ or simply copy&paste it ;-)
19:59 frettled Ah, so _now_ I get to suggest Rakudo ?
19:59 * moritz_ doesn't understand the question
19:59 moritz_ note that the line break stuff is not a rakudo feature, but one of p6eval
20:00 frettled Or, as pmichaud suggested, Rakudo ?
20:00 frettled moritz_: which question now?  :d
20:00 moritz_ bah.
20:00 frettled hmm, s/d/D/
20:03 braceta joined #perl6
20:04 frettled moritz_: but seriously, it appears to me that Rakudo should have returned a result of 23 (or 22 because of rounding error).
20:04 moritz_ frettled: feel free to submit a bug report
20:08 frettled Ah, rakudobug@...
20:12 frettled Hmm, now how do I find the version number of Rakudo?
20:13 frettled Just 2009-08?
20:14 [particle] did you build from source?
20:14 [particle] or install a package?
20:14 frettled proto did it for me.
20:14 [particle] proto installed rakudo?
20:15 frettled it downloads and builds.
20:15 frettled (well, and installs, FSVO �installs�)
20:15 [particle] proto, written in perl 6?
20:15 * [particle] is missing something
20:16 [particle] if you have a git checkout of rakudo, change to that directory and type 'git rev-parse HEAD'
20:16 frettled No, proto is written in Perl 5.
20:16 japhb [particle]: proto is partly written in perl 5
20:16 [particle] ah
20:16 frettled okay, partially, then.
20:16 * [particle] was missing something :)
20:16 japhb [particle]: you must be weakly interacting today.
20:17 mkelly32 `git describe` is slightly prettier, potentially.
20:17 frettled So when that gives me this nice string, that's sort of the version?  8d7fc7d4a16b26b4b539de8c08a030cfecfe1bb5
20:17 frettled mkelly32: FSVO "pretty", I suppose.  :)  2009-07-90-g8d7fc7d
20:17 japhb frettled: that is exactly the version.  DVCS software tends to treat nodes in the version graph as opaque hashes.
20:17 mkelly32 frettled: so, that's 90 revisions after 2009-07 was tagged, iirc
20:17 [particle] yep, git uses hashes to identify commits, not versions or revisions
20:17 frettled mkelly32: aha.
20:18 frettled japhb: oki!
20:18 mkelly32 the longer thing is the sha1 hash of the commit pointed to by HEAD
20:18 timbunce joined #perl6
20:19 mkelly32 which references the sha1 hash of the 'tree' representing the code at that revision, as well as the hash of the 'parent', the revision which came before it.
20:19 japhb Apparently Linus got bored last week and rewrote the sha1 code in git.
20:23 moritz_ is it faster now?
20:24 aindilis joined #perl6
20:26 KyleHa1 How much faster would it have to be for the time savings to add up to the time spent on the rewrite?
20:29 frettled smaller than ? (git-using programmer time)
20:31 frettled Hmm, the test for time stuff doesn't check this leap second thing either.
20:36 frettled It's all TimToady's fault for that innocent comment 79 minutes ago!  ;)
20:37 moritz_ http://perlgeek.de/blog-en/perl-6/timeline-for-a-syntax-change.html
20:38 frettled nice!
20:38 frettled I hope that's on Iron Man.
20:39 moritz_ it is not.
20:39 moritz_ I had some problems with my RSS feed
20:39 japhb moritz_: I believe it is in some cases ... but the major goal was apparently to speed up startup for all the git commands by not needing a whole crypto lib for just that one function.
20:40 moritz_ and after they removed my feed twice without any notification I had no more motivation left to ask them what's wrong this time.
20:40 japhb KyleHa1: well, if git gets used by a great many people, using it quite a few times a day ....
20:42 KyleHa1 japhb:  Good point.
20:50 payload rakudo: say ?(" " ~~ /<-[\s]>/)
20:50 p6eval rakudo 1d75a7: OUTPUT«1␤»
20:50 payload did i sai it wrong to match something _not_ ?
20:51 moritz_ rakudo: say ?(" " ~~ /<-\s>/)
20:51 p6eval rakudo 1d75a7: OUTPUT«perl6regex parse error: Error parsing enumerated character class at offset 26, found '\'␤in Main (src/gen_setting.pm:3369)␤»
20:51 donaldh_ joined #perl6
20:53 Whiteknight joined #perl6
20:53 dalek rakudo: 012b1ab | (Kyle Hasselbacher)++ | docs/ChangeLog:
20:53 dalek rakudo: [docs/ChangeLog] Add a line for the embedded comments change
20:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/012b1ab7e128e7fcbfad614b44da6b26881ca6d0
20:55 moritz_ the S02 change broke a smartlink in t/spec/S02-whitespace_and_comments/comments.t (line 141)
21:01 pugs_svn r27962 | kyle++ | [t/spec] new style filetests in unlink.t
21:02 KyleHa1 Is it possible for me to define my own tags for rt.perl.org ?
21:02 moritz_ don't think so
21:02 KyleHa1 I'd like to flag things as [tested] so I can easily skip over them in searches and maybe even [untested] (or [testable]) so I can target them.
21:03 KyleHa1 Oh.  Bleah.  I guess I'll stick to my personal spreadsheet.
21:03 moritz_ yes, I'd love that too
21:03 moritz_ if we can convince pmichaud++ to suggest such a tag I'm sure he can convince the rt.perl.org admins
21:04 frettled I have this hunch that he won't be hard to convince.
21:05 dalek rakudo: a5dfe96 | (Kyle Hasselbacher)++ | t/spectest.data:
21:05 dalek rakudo: [spectest.data] unlink.t also regressed due to filetest changes
21:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a5dfe96dbfae85aefefa6b92373611e0fe3cebf3
21:16 hercynium joined #perl6
21:18 pmichaud I'm not sure how such things are done, tbh
21:20 Jedai joined #perl6
21:20 moritz_ pmichaud: you send a mail to perlbug-admin I suppose?
21:22 moritz_ saying you want a tag 'testscommited', and a rule that if an email contains an appropriate moniker the ticket is marked automatically with that tag
21:22 moritz_ just like it is for [PATCH] right now
21:23 pmichaud so we'd like "[tested]"  as the tag?
21:23 KyleHa1 I think [testscommitted] is more accurate, less ambiguous.
21:25 KyleHa1 Someone could think 'tested' means "independently verified" or something.
21:26 pmichaud hmmm, looks like I might be able to add the tag myself.
21:26 pmichaud I'm not sure I can get it to automatically tag from email, though
21:26 frettled btw, that should be testscommitted
21:26 pmichaud Let's try.
21:26 frettled Hmm, I somehow missed KyleHa1's line, sorry.
21:27 pmichaud Results:  "Permission denied"  :-(
21:27 KyleHa1 Actually, I probably should have highlighted my spelling change, frettled++
21:27 takadonet left #perl6
21:32 Limbic_Region joined #perl6
21:34 pmichaud message to perlbug-admin sent
21:34 pmichaud we'll see what kind of response we get :)
21:34 KyleHa1 Thank you, pmichaud++
21:42 pmichaud afk, dinner
21:44 KyleHa1 S10-packages/basic.t is packed full of regression tests.
21:44 pugs_svn r27963 | moritz++ | [t/spec] test for RT #67450 - +* as array index
21:44 KyleHa1 They step on each other a lot because of the heavy use of eval and the i
21:45 KyleHa1 "inner runloop" thing.
21:45 KyleHa1 I'm thinking about creating S10-packages/rt.t, but I'm afraid I'm just getting lazy.
21:45 moritz_ I'm not at all against removing eval, and #?rakudo skip the tests that fail now
21:46 KyleHa1 Time for my commute, so I'll think about it.
22:10 PacoLinux joined #perl6
22:16 nihiliad joined #perl6
22:18 _timbunce joined #perl6
22:29 leedo_ joined #perl6
22:30 leedo_ left #perl6
22:31 jan joined #perl6
22:31 ruoso joined #perl6
22:48 ak-11 joined #perl6
22:48 ak-11 left #perl6
22:59 zamolxes joined #perl6
23:01 colomon_ That reminds me, I never got a satisfactory answer to my bignums question the other day.
23:01 colomon_ Is it possible to enable them in Rakudo?
23:06 pmichaud colomon_: we're waiting a bit to see how Parrot's bignum support evolves
23:09 colomon_ Fair enough.
23:09 pmichaud I'll add it to the ROADMAP, though (if it's not already there)
23:10 colomon_ If you need a guinea pig, I'd be happy to do insane Project Euler-esque testing on them.
23:10 pmichaud (It is.  It's listed as "ought to have", although I think we might be leaning a bit towards "nice to have" instead.)
23:12 colomon_ Yeah, I must admit that while they are very fun for little toy mathematical scripts, I don't think I've ever used them in a real-world application (in Perl 5).
23:16 frew__ joined #perl6
23:19 jonjj joined #perl6
23:20 donaldh joined #perl6
23:25 jonjj joined #perl6
23:29 jonjj hello guys ... i am new here .. i have a doubt about perl6 grammar .... say i am wrting simple scripts which dont use any  oop or avanced aspects of perl6 will my scripts pay an overhead at parsing time ??
23:29 adm joined #perl6
23:34 adm left #perl6
23:35 jonjj joined #perl6
23:38 japhb jonjj: Are you concerned about the complexity of the Perl 6 grammar?  If so, note that there was extensive work put into the grammar design so that the theoretical performance can be faster than Perl 5 (fewer places where backtracking is necessary) -- but the currently implementations are simply not yet speed-optimized.  We're more in the 'completeness' phase than the 'speed' phase.
23:38 japhb BAH
23:40 * jnthn is back from @travel
23:40 jnthn Was sick most of the time I was in the UK, but enjoyed it for the most part anyway.
23:40 jnthn Sleep now, and will be back hacking on Rakudo tomorrow. :-)
23:40 japhb *yay*
23:51 mikehh joined #perl6
23:51 mikehh rakudo (a5dfe95) builds on parrot r40495 - make test/make spectest (up to 27963) PASS - Ubuntu 9.04 i386
23:53 rml_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo