Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-09-04

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:06 satrac joined #perl6
00:06 satrac left #perl6
00:07 jnthn OK, night all - may be here in the morning before I head for the airport...
00:15 andy_ left #perl6
00:15 diakopter @tell japhb ping
00:15 lambdabot Consider it noted.
00:18 japhb joined #perl6
00:20 colomon rakudo: for <a b c> -> $x { say $x; }
00:20 p6eval rakudo b51d94:  ( no output )
00:20 colomon rakudo: for ("a", "b", "c") -> $x { say $x; }
00:20 p6eval rakudo b51d94:  ( no output )
00:27 SmokeMachine joined #perl6
00:28 pmichaud p6eval may need to bump the timeout a bit
00:28 pmichaud rakudo:  for 1..3 -> $x { say $x; }
00:28 p6eval rakudo b51d94: OUTPUT«1␤2␤3␤»
00:28 pmichaud rakudo:  for <a b c> -> $x { say $x; }
00:28 p6eval rakudo b51d94: OUTPUT«a␤b␤c␤»
00:33 colomon pmichaud: I was testing the syntax because it was flopping on me in my test code.  Of course, turned out to be a missing ) on the previous line.
00:37 ruoso hmm... I was just presented with an interesting challenge
00:38 ruoso how to, using regex, match all the possible selections of two "a" in "aaaa". i.e.: aa.. a.a. a..a .a.a ..aa
00:38 ruoso and .aa.
00:45 jeekobu In Perl6?  :exhaustive or something...  and a.*a
00:45 phenny jeekobu: 02 Sep 10:06Z <masak> tell jeekobu thanks for a nice explanation of an alternative algorithm. actually, some of my early labyrinth programs used that (or a very similar) technique. I found that it was biased towards long corridors and depended on the starting position. your algorithm doesn't seem to have that problem, though.
00:45 ruoso jeekobu, yeah... Perl 6
00:49 jeekobu http://perlcabal.org/syn/S05.html#line_460
00:49 jeekobu Although I'm not sure I completely understand what you want to match (all substrings with two a's?)
00:50 tak11 joined #perl6
00:50 jeekobu rakudo: "aaaa" ~~ m:ex/(a.*?a)/; say "@()"
00:51 p6eval rakudo b51d94:  ( no output )
00:51 jeekobu rakudo: "aaaa" ~~ m/(a.*?a)/; say "@()"
00:51 p6eval rakudo b51d94: OUTPUT«@()␤»
00:51 jeekobu rakudo: "aaaa" ~~ m/(a.*?a)/; say @()
00:51 p6eval rakudo b51d94:  ( no output )
00:51 jeekobu hm
00:55 jeekobu I guess all substrings with exactly two a's would be [^a]*a[^a]*a[^a]*, with :ex, translated into p6.
00:56 synth joined #perl6
01:00 pugs_svn r28187 | colomon++ | [t/spec] Refactor sin tests a bit more, and add a full set of sin tests on Rats.
01:01 synth joined #perl6
01:06 FCO joined #perl6
01:06 syntheticore how does one implement the === operator in perl6?
01:07 syntheticore Is read that ~~ is implemented indirectly through ACCEPTS
01:07 syntheticore and declaring a multi sub infix:<===> gives me a Null PMC access
01:13 FCO reakudo: $a="aaaaa"; ($a.split(//) X $a.split(//)).grep("aa").elements
01:13 FCO rakudo: $a="aaaaa"; ($a.split(//) X $a.split(//)).grep("aa").elements
01:13 p6eval rakudo b51d94: OUTPUT«Confused at line 2, near "(//) X $a."␤in Main (src/gen_setting.pm:3454)␤»
01:13 FCO sorry!
01:26 syntheticore left #perl6
01:26 meppl joined #perl6
01:27 agentzh joined #perl6
01:35 synth joined #perl6
01:37 s1n joined #perl6
01:46 alester joined #perl6
01:53 ruoso rakudo: my $a = 'aaaa'; $a ~~ m:ex/(.*)(a)(.*)(a)(.*)/; say ~@()
01:53 p6eval rakudo b51d94: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":ex/(.*)(a"␤in Main (src/gen_setting.pm:3454)␤»
01:53 pmichaud rakudo doesn't understand : flags on regexes yet
01:53 ruoso any work around?
01:54 pmichaud you're trying to get all matches?
01:54 ruoso all possible matches
01:54 ruoso yes
01:54 pmichaud rakudo:  my $a = 'aaaa'; $a ~~ m:ex/(.*)(a)(.*)(a)(.*)/;   while $/ { say $/;  $/.next; }
01:54 p6eval rakudo b51d94: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":ex/(.*)(a"␤in Main (src/gen_setting.pm:3454)␤»
01:54 pmichaud oops
01:54 pmichaud rakudo:  my $a = 'aaaa'; $a ~~ /(.*)(a)(.*)(a)(.*)/;   while $/ { say $/;  $/.next; }
01:55 p6eval rakudo b51d94:  ( no output )
01:55 pmichaud hmmm
01:55 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/(.*)(a)(.*)(a)(.*)/; say ~@()
01:55 pmichaud rakudo:  my $a = 'aaaa'; $a ~~ /(.*)(a)(.*)(a)(.*)/;  say $/;
01:55 p6eval rakudo b51d94:  ( no output )
01:55 p6eval rakudo b51d94:  ( no output )
01:55 pmichaud rakudo:  my $a = 'aaaa'; $a ~~ /(.*)(a)(.*)(a)(.*)/;  say $/;
01:55 ruoso rakudo?
01:55 p6eval rakudo b51d94: OUTPUT«aaaa␤»
01:55 pmichaud rakudo's running a bit slower now due to some parrot changes; I think we need to bump the timeout
01:56 pmichaud rakudo:  my $a = 'aaaa'; $a ~~ /(.*)(a)(.*)(a)(.*)/;  say $/; $/.next;  say $/
01:56 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/(.*)(a)(.*)(a)(.*)/; say $/.perl
01:56 p6eval rakudo b51d94: OUTPUT«aaaa␤aaaa␤»
01:56 p6eval rakudo b51d94: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => "aaaa",␤ Str => "aaaa",␤ from => 0,␤ to   => 4,␤ positional => [␤  Match.new(␤    ast  => "aa",␤    Str => "aa",␤    from => 0,␤    to   => 2,␤   ),␤  Match.new(␤    ast  => "a",␤
01:56 p6eval ..  St…
01:56 pmichaud if we end up with two rakudo processes at the same time, they'll tend to cancel each other out
01:56 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/(.*)(a)(.*)(a)(.*)/; say @($/).join: ","
01:57 p6eval rakudo b51d94: OUTPUT«aa,a,,a,␤»
01:57 pmichaud rakudo:  my $a = 'abacada';  $a ~~ /.*a.*a.*/;  while $/ { say $/;  $/.next; }
01:58 p6eval rakudo b51d94: OUTPUT«abacada␤abacada␤abacada␤abacad␤abaca␤abacada␤abacada␤abacad␤abaca␤abacada␤abacad␤abaca␤abac␤aba␤bacada␤bacada␤bacada␤bacad␤baca␤acada␤acada␤acada␤acad␤aca␤cada␤ada␤»
01:58 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/(.*)(a)(.*)(a)(.*)/; say @($/).join: "," while $/.next
01:58 p6eval rakudo b51d94: OUTPUT«Null PMC access in get_bool()␤in Main (/tmp/WoT9189uL5:2)␤»
01:58 ruoso oosp
01:59 pmichaud @($/) isn't likely to do what you're wanting
01:59 lambdabot Unknown command, try @list
01:59 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/(.*)(a)(.*)(a)(.*)/; { say @($/).join: ","; $/.next } while $/;
01:59 p6eval rakudo b51d94: OUTPUT«aa,a,,a,␤a,a,a,a,␤a,a,,a,a␤a,a,,a,␤,a,aa,a,␤,a,a,a,a␤,a,a,a,␤,a,,a,aa␤,a,,a,a␤,a,,a,␤a,a,,a,␤,a,a,a,␤,a,,a,a␤,a,,a,␤,a,,a,␤»
01:59 pmichaud depending on what you're wanting
01:59 pmichaud anyway, ".next" is PGE's method on a match object to say "give me the next match"
02:00 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/.*(a).*(a).*/; { say @($/).map({ $_.pos }).join: ","; $/.next } while $/;
02:00 p6eval rakudo b51d94: OUTPUT«Method 'pos' not found for invocant of class 'Match'␤»
02:01 pmichaud rakudo:  my $a = 'a man, a plan, a canal, panama';  $a ~~ /a./;  while $/ { say $/.from; $/.next; }
02:01 p6eval rakudo b51d94: OUTPUT«0␤3␤7␤11␤15␤18␤20␤25␤27␤»
02:01 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/.*(a).*(a).*/; { say @($/).map({ $_.from }).join: ","; $/.next } while $/;
02:01 p6eval rakudo b51d94: OUTPUT«2,3␤1,3␤1,2␤1,2␤0,3␤0,2␤»
02:02 ruoso interesting... there are some matches missing
02:02 pmichaud I think it's because p6eval may be timing out
02:02 * ruoso trying locally
02:03 ruoso ah... indeed
02:03 pmichaud http://gist.github.com/180689
02:04 ruoso it's still interesting that it finds duplicates
02:04 pmichaud sure, of course
02:04 pmichaud you asked for exhaustive :-)
02:04 ruoso but why do we get a match twice/
02:04 ruoso ?
02:04 pmichaud for 1,2
02:04 pmichaud you're matching
02:05 pmichaud both "aaa" and "aa"
02:05 pmichaud look at it this way:
02:05 ruoso rakudo: my $a = 'aaaa'; $a ~~ m/^.*(a).*(a).*$/; { say @($/).map({ $_.from }).join: ","; $/.next } while $/;
02:05 pmichaud my $a = 'abcd';   m/.*(.).*(.).*/
02:05 p6eval rakudo b51d94: OUTPUT«2,3␤1,3␤1,2␤0,3␤0,2␤0,1␤»
02:05 ruoso ahá!
02:06 ruoso pmichaud++
02:06 ruoso ;)
02:08 agentzh1 joined #perl6
02:17 cognominal joined #perl6
02:28 TimToady phenny: tell syntheticore sets should be defined in terms of === so that sets of objects work; === should autothread; === is defined as $x.WHICH eqv $y.WHICH to compare identity
02:28 phenny TimToady: I'll pass that on when syntheticore is around.
02:55 markjreed joined #perl6
02:57 markjreed rakudo: for  «a b c» { .say }
02:57 p6eval rakudo b51d94: OUTPUT«a␤b␤c␤»
02:58 markjreed That's what  I thought.  Only the REPL has the encoding issue....
03:00 markjreed left #perl6
03:02 sri_kraih joined #perl6
03:06 SmokeMachine joined #perl6
03:11 jaldhar joined #perl6
03:20 donaldh joined #perl6
03:21 dukeleto_ joined #perl6
03:23 jaldhar joined #perl6
03:24 xomas joined #perl6
03:26 alester joined #perl6
03:27 justatheory_ joined #perl6
03:33 markjreed joined #perl6
03:34 markjreed rakudo: %*ENV.values[0].perl.say
03:34 p6eval rakudo b51d94: OUTPUT«""␤»
03:36 alester joined #perl6
03:37 markjreed rakudo: my %h = { 'a' => 1, 'b' => 2 }; %h.values[0].perl.say
03:37 p6eval rakudo b51d94: OUTPUT«1␤»
03:40 markjreed rakudo: my %h = { 'a' => 1, 'b' => 2 }; %h.values.perl.say
03:40 p6eval rakudo b51d94: OUTPUT«[1, 2]␤»
03:49 SmokeMachine joined #perl6
04:01 meppl joined #perl6
04:25 stephenl1 joined #perl6
04:30 asciiville joined #perl6
04:48 jaldhar joined #perl6
05:13 payload joined #perl6
05:17 pmichaud TimToady: for contextual variables, after we scan outward and reach the GLOBAL package, do the symbols in GLOBAL retain the twigil or do we strip it at that point?
05:18 pmichaud i.e., would $*FOO look for GLOBAL::<$FOO>  or GLOBAL::<$*FOO>  ?
06:07 flip913 joined #perl6
06:11 flip913 In S12 I found has $.fur handles (s/^furget_/get_/);
06:12 flip913 But if the intention is that the get_ functions of fur should be named furget_ in this class, isn't that the wrong way?
06:12 flip913 ie. shouldn't that be s/get_/furget_/?
06:27 iblechbot joined #perl6
06:37 justatheory joined #perl6
06:38 zloyrusskiy joined #perl6
06:50 ihrd joined #perl6
07:04 Matt-W Good morning
07:06 mberends good morning Matt-W, are you at work early?
07:13 rfordinal joined #perl6
07:17 Matt-W not really
07:17 Matt-W on time for a change :)
07:17 Matt-W well, on intended time, 8am might be considered early by some
07:18 Matt-W I have a singing lesson afterwards though, so I can't be too late leaving today
07:18 mberends :)
07:21 donaldh joined #perl6
07:21 eMaX joined #perl6
07:25 buu 8am!
07:25 buu What a terrifying prospect.
07:30 Matt-W Ah but I get to leave at 4pm
07:31 raig joined #perl6
07:34 viklund joined #perl6
07:34 viklund Hello all,
07:34 viklund there's a lot more ppl here now ;)
07:36 Matt-W it happens
07:36 Matt-W the word gets around
07:37 viklund indeed it does
07:39 drbean_ joined #perl6
07:41 BooK by the way, I don't see any link to a vector-graphics file for camelia
07:41 BooK how are we supposed to change the colors or make a variant?
07:45 reqamst joined #perl6
07:50 carlin joined #perl6
07:50 carlin_ joined #perl6
07:51 carlin BooK: http://svn.pugscode.org/pugs/misc/camelia.svg
07:51 Su-Shee joined #perl6
07:51 Su-Shee good morning. :)
07:51 drbean joined #perl6
07:55 buubot joined #perl6
07:57 BooK carlin: ah of course. thanks
08:05 jferrero joined #perl6
08:08 orafu joined #perl6
08:19 flip913 Anyone for help with S12?
08:20 agentzh joined #perl6
08:20 Matt-W possibly...
08:21 flip913 Matt-W: Here we go ...
08:21 flip913 In S12 I found "has $.fur handles (s/^furget_/get_/);"
08:21 flip913 But if the intention is that the get_ functions of fur should be named furget_ in this class, isn't that the wrong way?
08:21 flip913 ie. shouldn't that be s/get_/furget_/?
08:22 flip913 Or do I just don't understand that, and it is meant that the fur class has its methods named furget_?
08:22 flip913 But that would be a bit strange, I think.
08:25 Matt-W I read that as saying that the class declaring the has responds to furget_ methods, but translates them into get_ methods when it passes them along to $.fur
08:25 Matt-W so you call $obj.furget_foo and it delegates to $obj.fur.get_foo
08:26 flip913 Ah, so the "incoming" side is the function that should be called, and "handles" just specifies how to transform the name ...
08:26 flip913 Ok, understood.
08:26 Matt-W I think so, yes
08:26 flip913 I thought that's some kind of import declaration - "take all methods on $.fur, and import them with changed names into me."
08:27 flip913 Another one?
08:27 Matt-W no, handles is more about 'pass these methods along' than 'bring these methods in'
08:27 flip913 There's "multi sub fib(0) { return 0; }"
08:27 flip913 "multi sub fib(1) { return 1; }"
08:27 flip913 and similar
08:27 Matt-W yup
08:27 flip913 Is there a short way to define the type of the parameter?
08:28 drbean joined #perl6
08:28 Matt-W Well in that case the type's defined by the type of the constant used in the signature
08:28 spinclad multi sub fib(Int 0) {...}
08:28 flip913 So that fib(0) and fib(0.0) and fib(Rat(1/3)) can do different things
08:28 spinclad i venture
08:28 Matt-W spinclad: it's possible...
08:28 Matt-W std: multi sub fib(Int 0) { ... }
08:28 p6eval std 28187: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/8S9l7r11u5 line 1:␤------> [32mmulti sub fib(Int 0[33m⏏[31m) { ... }[0m␤    expecting any of:␤        type_constraint␤  whitespace␤FAILED 00:02 39m␤»
08:29 Matt-W interesting
08:29 dukeleto joined #perl6
08:29 Matt-W std: multi sub fib (Int $i where { $i == 0 }) { ... }
08:29 spinclad std: multi sub foo(Cat Dog $pet) {...}
08:29 p6eval std 28187: OUTPUT«ok 00:03 41m␤»
08:29 p6eval std 28187: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse signature; couldn't find final ')' at /tmp/6M8LkknuS6 line 1:␤------> [32mmulti sub foo(Cat [33m⏏[31mDog $pet) {...}[0m␤    expecting any of:␤      constraint␤       param_sep␤       parameter␤       trait␤    type_constraint␤
08:29 p6eval ..typename␤FAILED 00:02 39m␤»
08:29 Matt-W so that's a possible albeit clunky alternative
08:29 Matt-W you just use a where clause
08:30 Matt-W I think that's quite likely for any seriously complicated case
08:30 flip913 And I'd believe that this is supposed to do type casting ... if only a fib(0) is defined, a call with "$x=0.0; fib($x)" should work, too (in absence of something more specific), no?
08:31 Matt-W rakudo: multi fib(0) { say "0"; }; multi fib($x) { say "x"; }; $x = 0.0; fib($x);
08:31 p6eval rakudo b51d94: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/nQNsS7bvSz:2)␤in Main (src/gen_setting.pm:3454)␤»
08:31 Matt-W rakudo: multi fib(0) { say "0"; }; multi fib($x) { say "x"; }; my $x = 0.0; fib($x);
08:31 p6eval rakudo b51d94: OUTPUT«x␤»
08:31 Matt-W looks like it doesn't
08:31 spinclad std: multi sub fib(Int $ where * == 0) {...}
08:31 p6eval std 28187: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/hES7cAZ8wW line 1:␤------> [32mmulti sub fib(Int $ where * ==[33m⏏[31m 0) {...}[0m␤FAILED 00:03 43m␤»
08:31 Matt-W rakudo: multi fib(0) { say "0"; }; multi fib($x) { say "x"; }; my $x = 0.0; fib($x); say $x.WHAT;
08:31 p6eval rakudo b51d94: OUTPUT«x␤Num()␤»
08:31 Matt-W mmm yes, it doesn't automatically cast Num to Int
08:31 Matt-W because it could lose precision
08:32 flip913 rakudo: multi a(0) { say 0; } multi a(1) { say 1; } a(1.0);
08:32 Matt-W rakudo: multi fib(0.0) { say "0"; }; multi fib($x) { say "x"; }; my $x = 0.0; fib($x); say $x.WHAT;
08:32 p6eval rakudo b51d94: OUTPUT«Confused at line 2, near "multi a(1)"␤in Main (src/gen_setting.pm:3454)␤»
08:32 p6eval rakudo b51d94: OUTPUT«0␤Num()␤»
08:32 flip913 rakudo: multi a(0) { say 0; }; multi a(1) { say 1; }; a(1.0);
08:32 spinclad std: multi sub fib(Int $ where (* == 0)) {...}
08:32 p6eval rakudo b51d94: OUTPUT«No applicable candidates found to dispatch to for 'a'␤in Main (/tmp/hWDnGkIQJm:2)␤»
08:32 p6eval std 28187: OUTPUT«ok 00:03 40m␤»
08:32 Matt-W so it looks like fib(0.0) and fib(0) are distinct
08:32 flip913 rakudo: multi a(0) { say 0; }; multi a(1) { say 1; }; a(2);
08:32 Matt-W so that's basically what you wanted
08:32 p6eval rakudo b51d94: OUTPUT«No applicable candidates found to dispatch to for 'a'␤in Main (/tmp/EukkhzC3Y3:2)␤»
08:32 flip913 rakudo: multi a(0) { say 0; }; multi a(1) { say 1; }; a(0);
08:32 p6eval rakudo b51d94: OUTPUT«0␤»
08:33 flip913 rakudo: multi a(0) { say 0; }; multi a(1) { say 1; }; multi a(Num $a) { a(Int($a));}; a(0.0);
08:33 p6eval rakudo b51d94: OUTPUT«invoke() not implemented in class 'Integer'␤in sub a (/tmp/yW9ZjQTgYv:2)␤called from Main (/tmp/yW9ZjQTgYv:2)␤»
08:34 flip913 ok, I think I'm convinced
08:34 flip913 still, another one ;-)
08:34 flip913 (I expect you can tell that I'm reading this currently ;-)
08:34 flip913 There are subsets ...
08:34 flip913 the example is "subset Positive of Int"
08:34 Matt-W It's okay, this kind of thing helps my understanding as well
08:35 flip913 are subsets hierarchical, so that a "Positive of Int" is distinct of a "Positive of Num"?
08:35 flip913 Or are these more like roles, so that the same restriction can be mixed to another type as well?
08:35 flip913 (Like Rat, too)
08:36 flip913 The way I'm reading that it should be hierarchical, but the names must not conflict
08:36 Matt-W Positive of Int would be different to Positive of Num
08:36 Matt-W but you couldn't have both, because the names would collide
08:36 Matt-W as they're both called Positive
08:36 flip913 So we'd need a "PositiveInt of Int" and a "PositiveRat of Rat" and a "PositiveNum of Num" with the same constraint
08:36 ihrd left #perl6
08:36 Matt-W yes
08:37 flip913 Well, there could be a macro
08:37 Matt-W PositiveInt is usually called Natural though :)
08:37 flip913 no, the names would still collide
08:37 flip913 and what do you do to NegativeInt?
08:37 Matt-W Unnatural? :P
08:38 Matt-W don't know if there's a proper name for that set
08:38 flip913 No, not the name ...
08:38 flip913 But I'm wondering whether there should be some way to clone a class hierarchy with a constraint
08:39 flip913 so eg. clone "Num" with all below (Int, Rat, etc.), all with a common constraint
08:39 flip913 Maybe I'm just confused, but I'm not sure about type casts between subsets (from PositiveInt to PositiveNum eg)
08:40 flip913 rakudo: subset PI of Int where { * > 0 };
08:40 p6eval rakudo b51d94:  ( no output )
08:41 flip913 rakudo: subset PI of Int where { * > 0 }; subset PN of Num where { * > 0 }; my PI $pi=3; my PN $pn=3.2; say $pn > $pi;
08:41 p6eval rakudo b51d94: OUTPUT«1␤»
08:41 flip913 ok, that works
08:41 flip913 rakudo: subset PI of Int where { * > 0 }; subset PN of Num where { * > 0 }; my PI $pi=3; my PN $pn=3.2; say $pn < $pi;
08:41 p6eval rakudo b51d94: OUTPUT«0␤»
08:41 flip913 rakudo: subset PI of Int where { * > 0 }; subset PN of Num where { * > 0 }; my PI $pi=3; my PN $pn=3.2; say $pn == $pi;
08:41 p6eval rakudo b51d94: OUTPUT«0␤»
08:41 flip913 rakudo: subset PI of Int where { * > 0 }; subset PN of Num where { * > 0 }; my PI $pi=3; my PN $pn=3.2; say PI($pn) == $pi;
08:41 p6eval rakudo b51d94: OUTPUT«invoke() not implemented in class 'Integer'␤in Main (/tmp/Jqw50v2zYF:2)␤»
08:42 Matt-W I'm not sure how that works
08:42 flip913 rakudo: subset Integer::Positive of Int where { * > 0 }; subset Num::Positive of Num where { * > 0 }; my Integer::Positive $pi=45;
08:42 p6eval rakudo b51d94:  ( no output )
08:42 flip913 rakudo: subset Integer::Positive of Int where { * > 0 }; subset Num::Positive of Num where { * > 0 }; my Integer::Positive $pi=-45;
08:42 Matt-W It's possible it could look up to the parent type for the conversion to the parent type of the new subset, and then see if it satisfies the subset constraint of the target type...
08:42 p6eval rakudo b51d94:  ( no output )
08:43 flip913 oops? I'd expect an error
08:43 flip913 rakudo: subset Integer::Positive of Int where { * > 0 }; subset Num::Positive of Num where { * > 0 }; my Integer::Positive $pi=-45; say $pi;
08:43 p6eval rakudo b51d94: OUTPUT«-45␤»
08:43 Matt-W hmm
08:43 flip913 ok, subsets don't work yet
08:43 Matt-W that's a bug, I think
08:43 Matt-W subsets partially work
08:44 flip913 rakudo: subset PI of Int where { * > 0 }; my PI $pi=-3; say $pi;
08:44 p6eval rakudo b51d94: OUTPUT«-3␤»
08:44 flip913 well, at least it seems to be possible to use some namespace-like hierarchy for the subset names, to avoid confusion
08:44 flip913 rakudo: subset PI of Int where { * > 0 }; my PI $pi=1; say $pi; $pi--; say $pi;
08:44 p6eval rakudo b51d94: OUTPUT«1␤0␤»
08:45 flip913 neither init nor run time checks
08:49 carlin joined #perl6
08:49 flip913 Matt-W: Thanks for the attention, time and effort!
08:49 flip913 I'll be back with more questions, I think.
08:50 Matt-W Feel free
08:58 moritz_ good morning
08:59 Matt-W hey moritz_
08:59 Matt-W Guten Morgen
08:59 Matt-W or is it Morgan
08:59 Matt-W I always got them confused
08:59 Matt-W Morgen is tomorrow?
09:00 moritz_ "Morgen" is both morning and tomorrow
09:00 moritz_ "Morgan" is the name of a witch in the King Arthur tale, I believe ;-)
09:02 drbean joined #perl6
09:07 drbean joined #perl6
09:09 huf_ joined #perl6
09:21 cognominal joined #perl6
09:23 moritz_ I finally figured out how to draw circle arcs of arbitrary angle in SVG
09:24 moritz_ which means that I can prototype a pie chart plotter for SVG::Plot
09:34 Juerd SVG++
09:34 moritz_ indeed
09:35 moritz_ I've been doing quite some fun stuff with it lately
09:35 Juerd I like how SVG brings graphics within Perl6's reach already.
09:44 Su-Shee why don't you fellows not just bind Cairo?
09:45 moritz_ because I kinda like SVG ;-)
09:46 arnsholt Also, I think outputting SVG is a lot easier than binding to a C library
09:46 moritz_ and so far my experiences with binding libs are small, and not very encouraging
10:02 Matt-W I looked into the Parrot binding stuff for C libraries
10:02 Matt-W it didn't look much fun
10:05 drbean joined #perl6
10:07 moritz_ I have a blog post about SVG stuff with a little bit Perl 6 content
10:08 moritz_ should I post it in the perl 6 category, so that it shows up on planetsix?
10:08 moritz_ or in misc/, so that you're not bothered with 70% SVG content?
10:10 sharada joined #perl6
10:17 cognominal rakudo:    say  eval  "@a", :lang<perl5>
10:17 p6eval rakudo b51d94: OUTPUT«␤»
10:17 cognominal rakudo:    say  eval  "\@a", :lang<perl5>
10:17 p6eval rakudo b51d94: OUTPUT«␤»
10:17 moritz_ rakudo: say eval '3', :lang<perl5>
10:17 p6eval rakudo b51d94: OUTPUT«␤»
10:17 moritz_ I suspect that the blizkost build is broken
10:18 cognominal yes, that what I wanted to check
10:20 moritz_ rakudo: say %*VM<config><prefix>
10:20 p6eval rakudo b51d94:  ( no output )
10:20 Juerd moritz_: perl6 category because it shows how perl6 is useful already :)
10:20 moritz_ rakudo: say eval '3', :lang<perl5>
10:20 Juerd It's like calling a module SVG even though it's just doing XMLish stuff :)
10:20 p6eval rakudo b51d94: OUTPUT«␤»
10:20 jferrero joined #perl6
10:21 moritz_ Juerd: I'll do it, thanks
10:42 dalek joined #perl6
10:45 spinclad joined #perl6
10:45 clkao joined #perl6
10:45 hcchien_ joined #perl6
10:45 [particle]1 joined #perl6
10:45 jferrero joined #perl6
10:45 drbean joined #perl6
10:45 cognominal joined #perl6
10:45 huf joined #perl6
10:45 carlin joined #perl6
10:45 dukeleto joined #perl6
10:45 orafu joined #perl6
10:45 reqamst joined #perl6
10:45 viklund joined #perl6
10:45 raig joined #perl6
10:45 eMaX joined #perl6
10:45 donaldh joined #perl6
10:45 rfordinal joined #perl6
10:45 zloyrusskiy joined #perl6
10:45 iblechbot joined #perl6
10:45 payload joined #perl6
10:45 jaldhar joined #perl6
10:45 meppl joined #perl6
10:45 xomas joined #perl6
10:45 s1n joined #perl6
10:45 japhb joined #perl6
10:45 Guest1515 joined #perl6
10:45 frew_ joined #perl6
10:45 Lorn joined #perl6
10:45 jan__ joined #perl6
10:45 silug joined #perl6
10:45 PZt joined #perl6
10:45 szabgab joined #perl6
10:45 xalbo joined #perl6
10:45 Patterner joined #perl6
10:45 lisppaste3 joined #perl6
10:45 r0bby joined #perl6
10:45 andreasg_ joined #perl6
10:45 nicomen joined #perl6
10:45 mee joined #perl6
10:45 jnthn joined #perl6
10:45 eldragon2 joined #perl6
10:45 Trey joined #perl6
10:45 arnsholt joined #perl6
10:45 cosimo joined #perl6
10:45 edenc joined #perl6
10:45 bigpresh_ joined #perl6
10:45 bloonix_ joined #perl6
10:45 sunnavy joined #perl6
10:45 zol joined #perl6
10:45 cookys joined #perl6
10:45 wolverian joined #perl6
10:45 tomaw` joined #perl6
10:45 Caelum joined #perl6
10:45 z joined #perl6
10:45 eiro joined #perl6
10:45 mattp_ joined #perl6
10:45 sjn joined #perl6
10:45 Ryan52 joined #perl6
10:45 xinming joined #perl6
10:45 rhr joined #perl6
10:45 TimToady joined #perl6
10:45 he_ joined #perl6
10:45 tarbo2_ joined #perl6
10:45 literal joined #perl6
10:45 cblaptop joined #perl6
10:45 Rint joined #perl6
10:45 Grrrr joined #perl6
10:45 awwaiid joined #perl6
10:45 p6eval joined #perl6
10:45 szbalint joined #perl6
10:45 nsh joined #perl6
10:45 breinbaas joined #perl6
10:45 ewilhelm joined #perl6
10:45 cono joined #perl6
10:45 gbacon joined #perl6
10:45 zaphar_ps joined #perl6
10:45 pjcj joined #perl6
10:45 ruz_ joined #perl6
10:45 Jedai joined #perl6
10:45 krunen joined #perl6
10:45 jantore joined #perl6
10:45 Gothmog_ joined #perl6
10:45 felipe joined #perl6
10:45 quietfanatic joined #perl6
10:45 obra_ joined #perl6
10:45 broquaint joined #perl6
10:45 ascent joined #perl6
10:45 ingy joined #perl6
10:45 yahooooo joined #perl6
10:45 Aisling joined #perl6
10:45 kolibrie joined #perl6
10:45 Juerd joined #perl6
10:45 renormalist joined #perl6
10:45 omega joined #perl6
10:45 integral joined #perl6
10:45 Khisanth joined #perl6
10:45 kst joined #perl6
10:45 kent\n joined #perl6
10:45 cxreg joined #perl6
10:45 yves joined #perl6
10:45 BinGOs joined #perl6
10:45 shachaf joined #perl6
10:45 frettled joined #perl6
10:45 BooK joined #perl6
10:45 mberends joined #perl6
10:45 ssm joined #perl6
10:45 elmex joined #perl6
10:45 nothingmuch joined #perl6
10:45 buu joined #perl6
10:45 JarJarBinks joined #perl6
10:45 athomason joined #perl6
10:45 PerlJam joined #perl6
10:45 patmat_ joined #perl6
10:45 Maddingue joined #perl6
10:45 c9s joined #perl6
10:45 PacoLinux joined #perl6
10:45 frodwith joined #perl6
10:45 KatrinaTheLamia joined #perl6
10:45 lambdabot joined #perl6
10:45 akl joined #perl6
10:45 Matt-W joined #perl6
10:45 chipdude joined #perl6
10:45 hatseflats joined #perl6
10:45 diakopter joined #perl6
10:45 pioto joined #perl6
10:45 cj joined #perl6
10:45 krakan joined #perl6
10:45 betterwosld joined #perl6
10:45 psychoschlumpf joined #perl6
10:45 Tene joined #perl6
10:45 meteorjay joined #perl6
10:45 christine joined #perl6
10:45 sbp joined #perl6
10:45 phenny joined #perl6
10:45 simcop2387 joined #perl6
10:45 pugs_svn joined #perl6
10:45 ezra joined #perl6
10:45 jeekobu joined #perl6
10:45 colomon joined #perl6
10:45 pmichaud joined #perl6
10:45 mtve joined #perl6
10:45 Woody2143 joined #perl6
10:45 REPLeffect joined #perl6
10:45 jjore joined #perl6
10:45 jrockway joined #perl6
10:45 leedo joined #perl6
10:45 solarion joined #perl6
10:45 mikehh joined #perl6
10:45 rjh joined #perl6
10:45 baest joined #perl6
10:45 gfldex joined #perl6
10:45 rafl joined #perl6
10:45 mj41 joined #perl6
10:45 Infinoid joined #perl6
10:45 ilogger2 joined #perl6
10:45 dmpk2k joined #perl6
10:46 RonOreck joined #perl6
10:46 avar joined #perl6
10:46 michaelr joined #perl6
10:52 pmurias joined #perl6
10:54 larsen joined #perl6
10:59 abra joined #perl6
11:00 hanekomu joined #perl6
11:01 carlin left #perl6
11:08 moritz_ oh wow, I managed to get a "Null PMC access in isa()" on the last line of my script, which is a ccomment
11:10 moritz_ rakudo: say [+] "1 2 3"
11:10 p6eval rakudo b51d94: OUTPUT«1 2 3␤»
11:13 moritz_ rakudo: my @a = [1, 2], [3, 4];
11:13 p6eval rakudo b51d94:  ( no output )
11:13 moritz_ rakudo: my @a = [1, 2], [3, 4]; my @b := @a[0]; say [+] @b
11:13 p6eval rakudo b51d94: OUTPUT«1 2␤»
11:13 moritz_ I expected that to print 3
11:14 moritz_ but it seems the binding doesn't dereference
11:14 moritz_ bug in rakudo, or bug in my expectation?
11:15 moritz_ rakudo: my @a := [1, 2]; say [+] @a
11:15 p6eval rakudo b51d94: OUTPUT«1 2␤»
11:15 moritz_ same here
11:20 donaldh joined #perl6
11:31 masak joined #perl6
11:33 viklund hello masak ;)
11:33 carlin joined #perl6
11:35 cognominal rakudo:  my %a; %a{1} ='a';  say (keys %a)[0].WHAT
11:35 p6eval rakudo b51d94: OUTPUT«Str()␤»
11:36 cognominal hash keys must still be strings in Perl 6?
11:37 Juerd By default, yes
11:38 Juerd rakudo my %a{Any}; %a{1} = 'a'; %a.keys.[0].WHAT.say;
11:38 Juerd rakudo: my %a{Any}; %a{1} = 'a'; %a.keys.[0].WHAT.say;
11:38 p6eval rakudo b51d94: OUTPUT«Confused at line 2, near "{Any}; %a{"␤in Main (src/gen_setting.pm:3454)␤»
11:38 Juerd Not implemented apparently
11:38 Juerd See S09, "To declare a hash that can take any object as a key rather than just a string or integer"
11:39 cognominal ok
11:39 rfordinal left #perl6
11:41 masak viklund: be greeted, oh viklund.
11:42 masak viklund: long time no hackathon...
11:46 viklund masak: indeed
11:46 masak how's life and family?
11:47 masak did you come here due to a prophetic dream you had last night?
11:47 masak did I figure in it? :)
11:49 viklund ah, no, my parental leave is over so now I'm Back At Work
11:49 viklund otherwise, good, Alva started day-care a week ago and it works like a charm
11:50 viklund Just thought i'd pop in and see what's happening (noticed that the channel has grown)
11:50 masak it has.
11:51 masak we're working on a deadline nowadays.
11:51 masak everyone has something to do, it seems.
11:51 viklund yes, sounds like fun!
11:51 masak it kinda is.
11:51 cognominal rakudo:  my %a{*}; %a{1} ='a';  say (keys %a)[0].WHAT
11:51 p6eval rakudo b51d94: OUTPUT«Confused at line 2, near "{*}; %a{1}"␤in Main (src/gen_setting.pm:3454)␤»
11:51 masak cognominal: NYI.
11:52 masak cognominal: same for a lot of stuff from S09.
11:57 masak I'm currently reading PGE source, and greatly enjoying myself.
11:57 masak pmichaud++
12:03 takadonet joined #perl6
12:03 takadonet morning all
12:04 masak o/
12:07 drbean_ joined #perl6
12:08 mberends hi masak, did you dream about proto?
12:09 masak mberends: hm, that might be why I woke up in a cold sweat... :)
12:10 moritz_ Null PMC access in find_method()
12:10 moritz_ in method SVG::serialize (SVG.pm:5)
12:10 moritz_ now that's interesting...
12:11 masak indeed.
12:11 masak moritz_: care to submit a bug report?
12:12 moritz_ sub empty { for 1..3 { 4 } };
12:12 moritz_ SVG.serialize(empty());
12:12 moritz_ that triggers the bug
12:12 moritz_ masak: I will, once I figured out what causes it
12:13 masak nice catch.
12:13 masak I'd suggest both minimizing it for a Rakudobug, and submitting a bug report to the SVG github bug tracker.
12:16 masak rakudo: sub foo { for 1 {} }; sub bar($x) {}; bar(foo)
12:16 p6eval rakudo b51d94: OUTPUT«Null PMC access in find_method()␤in sub bar (/tmp/Wf45L47gN6:2)␤called from Main (/tmp/Wf45L47gN6:2)␤»
12:16 masak there's the bug.
12:16 moritz_ just found the same, only with a method
12:17 * moritz_ submits
12:17 masak the error occurs in dispatch.
12:17 masak thus making it hard to fix from SVG.pm itself.
12:17 moritz_ I won't submit a SVG bug then
12:18 masak at most, we could warn about it in the README or Pod or something.
12:18 moritz_ rakudo: sub foo { }; sub bar($x) {}; bar(foo)
12:18 agentzh joined #perl6
12:18 p6eval rakudo b51d94:  ( no output )
12:19 moritz_ sent.
12:20 masak moritz_++
12:22 drbean joined #perl6
12:25 masak Google-searching on Perl 6, I just found http://www.programmersheaven.com/2/Perl6-FAQ
12:25 masak it's complete and very informative, but 2 years old...
12:26 masak I can't see that it even mentions Rakudo. :/
12:26 moritz_ and spam in the comments
12:27 cognominal jnthn++  # again
12:27 masak ah, missed the spam.
12:27 masak "We will be updating this FAQ over time to include more answers; particularly answers to your suggestions!"
12:27 masak perhaps I should try and make some...
12:29 moritz_ who has write access to that page?
12:40 drbean joined #perl6
12:50 viklund joined #perl6
12:54 drbean joined #perl6
12:54 ruoso joined #perl6
13:05 sri_kraih_ joined #perl6
13:06 Eevee joined #perl6
13:09 takadonet Programmersheaven was my first tutorial on Perl6
13:09 drbean joined #perl6
13:11 moritz_ I think mine too
13:12 masak the Apocalypses were my first. :)
13:15 drbean_ joined #perl6
13:16 * moritz_ just produced a colorful pie chart with SVG::Plot
13:16 moritz_ how could I write tests for SVG::Plot?
13:18 SmokeMachine joined #perl6
13:19 moritz_ I don't want to test for the exact output structure
13:19 eMaX joined #perl6
13:19 moritz_ because every small modification will change that
13:19 drbean joined #perl6
13:23 masak moritz_: perhaps write something that loosely matches on the XML tree?
13:23 moritz_ masak: that's an idea, but I would only get *very* loose informations
13:24 moritz_ like "is this text included as a label somewhere"
13:24 masak I've been thinking of writing an XPath matcher for a while now... haven't had the concentration to begin such a project in earnes.
13:24 [particle]1 what do you want to test?
13:24 masak s/nes/nest/
13:24 moritz_ [particle]1: it would be ideal if I could test that now two text elements overlap, for example
13:24 moritz_ or overlap with axis, labels
13:24 moritz_ or are outside the canvas
13:25 moritz_ or something
13:25 drbean_ joined #perl6
13:25 moritz_ but thats... hard
13:25 moritz_ because I use coordinate transforms
13:25 [particle] non-trivial
13:25 moritz_ and I don't know the size of the text until it's rendered
13:25 masak "knowing the size of text" seems to be the recurring limitation of SVG...
13:26 [particle] you may get hints from Test::Image::GD
13:26 moritz_ basically a sensible piece of test code would be orders of magnitudes harder than writing the module itself, it seems
13:26 [particle] s/::GD//
13:26 masak moritz_: only because we don't have the plumbing for it.
13:27 moritz_ masak: well, it needs quite some plumbing
13:27 moritz_ basically an SVG renderer
13:28 moritz_ and some geometrical algorithms which search for overlaps
13:29 masak nod.
13:31 Matt-W masak: people who react to the image of Perl 6 haven't been entranced by the language itself yet, but an image that people don't like might prevent that from happening because they'll never look
13:32 _jaldhar joined #perl6
13:34 molaf joined #perl6
13:34 drbean_ joined #perl6
13:35 masak Matt-W: granted.
13:35 masak but anything could be a turnoff.
13:35 Matt-W True, but image is something that's very, well, visible
13:35 masak this guy is turned off by dashes: http://twitter.com/mcmire/status/3743953120
13:36 masak (I'm not, I like them)
13:36 Matt-W I find it liberating
13:36 Matt-W someone I told about said it looks like infix:<->
13:36 moritz_ masak: SVG.pm doesn't escape text - should it?
13:36 Matt-W so I gave them the rant about whitespace around operators
13:37 masak Matt-W: that seems to be the prevailing attitude of colour coders out there, too.
13:37 masak moritz_: yes, definitely.
13:37 Matt-W colour coders?
13:37 masak moritz_: seems you got your bug report, then. :)
13:37 masak Matt-W: hm, color coding algorithms. in editors.
13:37 moritz_ masak: I'd submitted a patch, not a bug report...
13:37 masak moritz_++
13:38 Matt-W masak: oh, people writing syntax highlighters
13:38 masak Matt-W: no, the syntax highlighters themselves. :) never mind.
13:38 Matt-W oh
13:38 Matt-W I don't know
13:38 Matt-W perl6.vim handles it fine :)
13:38 masak exception, not rule. :)
13:39 Matt-W to be honest, if having - in identifiers makes more people space their operators nicely I'm all for it
13:41 literal hm, does that guy know that he can use ' too? :P
13:41 masak I'll let him know. :)
13:42 masak http://twitter.com/carlmasak/status/3756861260
13:43 literal hehe
13:44 colomon I have to admit dashes in identifiers strikes me as a bit weird (in though I'm sure I did it in Lisp back in the day), but I've an operator spacer ever since my days programming in Forth, so I've glad that's looking to be the Perl6 standard.
13:46 masak not so much a standard as a simple rule-of-thumb to keep out of trouble. :)
13:46 masak rakudo: say 42*42
13:46 p6eval rakudo b51d94: OUTPUT«1764␤»
13:46 colomon Yeah, I meant standard in the SOP sense, not the spec sense.
13:46 masak rakudo: my $foo = 42; say 42*$foo*42
13:46 p6eval rakudo b51d94:  ( no output )
13:46 literal the only thing that worries me is that I hope the builtins settle on a good convention, so people won't mix up the dashes and underscores when trying to remember method/parameter names
13:46 masak aye.
13:46 Matt-W yes
13:46 Matt-W needs to stick to one or the other
13:47 Matt-W makes the language look nicer too
13:47 Matt-W and then we can pattern our third-party libraries after it as well
13:47 Matt-W Form is currently a mixture
13:47 Matt-W I need to switch to one or 'tother
13:48 * [particle] prefers using shift only for operators and metachars
13:48 snarkyboojum joined #perl6
13:48 [particle] words should be lowercase, and shift-free
13:48 [particle] s/words/terms/
13:48 Matt-W at least on an english keyboard...
13:48 * Matt-W wonders which layouts need shift or some other modifier to get -
13:51 moritz_ masak: how would you like your SVG.pm patch? bug tracker? nopaste? mail?
13:52 moritz_ please don't say "pull request"
13:52 masak bug tracker, please.
13:52 masak the other two are fine as well, but the bug tracker has the extra advantage of being tied to the project page itself.
13:56 moritz_ http://github.com/masak/svg/issues/#issue/1
13:56 snarkyboojum left #perl6
13:56 Matt-W github has an issue tracker??
13:56 masak :)
13:57 masak since a few months back, yes.
13:57 literal since a few months ago, yeah
13:57 literal damn
13:58 Matt-W cool
13:58 Matt-W has anybody tested what I did to Form on my holidays yet?
13:58 masak I've read the diff...
13:58 masak haven't tried the actual phenotype yet.
14:01 masak moritz_: applied, pushed, closed. thanks!
14:01 moritz_ masak: I think attributes should be escaped too
14:01 moritz_ masak: (just occured to me)
14:02 colomon Github lets you make comments on patches, as well, as I discovered last night.
14:02 masak moritz_: waitwait, what was it you just espaced? text? :)
14:03 moritz_ masak: yes
14:03 * masak should look more closely before writing commit comments
14:04 masak I'll see if I can fix the attr values myself.
14:04 moritz_ shouldn't be all that hard ;-)
14:06 drbean joined #perl6
14:09 masak it wasn't. :) done.
14:11 pmurias joined #perl6
14:11 pmurias ruoso: hi
14:12 ruoso hi pmurias
14:14 Psyche^ joined #perl6
14:14 pmurias ruoso: one problem with setting a custom opcode is that the runloop uses the result of the previous opcode as the current one
14:14 ruoso but you can manipulate it
14:15 ruoso which is what you're going to do inside $interpreter.goto
14:15 pmurias how?
14:17 pmurias ruoso: it's done after the opcode does it's stuff
14:17 ruoso pmurias, the code that calls $interpreter.goto is never a regular opcode
14:17 ruoso that always happen in SMOP land
14:18 ruoso so you're free to replace the current interpreter state entirely
14:18 ruoso (as Coro::State does)
14:20 nihiliad joined #perl6
14:20 pmurias Coro does C stack hackery
14:22 drbean joined #perl6
14:22 ruoso we might need to preserve that hackery
14:28 drbean_ joined #perl6
14:30 zamolxes joined #perl6
14:33 KyleHa joined #perl6
14:34 araujo hello there guys
14:34 araujo morning
14:34 moritz_ good localtime()
14:34 pmurias hi
14:34 araujo :)
14:39 jrtaylor joined #perl6
14:42 pmurias ruoso: i don't think i understand the way the runloops should interact sufficiently to implement the interaction myself, i could help with the tedious bits if you were willing to attempt it
14:44 jrtayloriv joined #perl6
14:47 drbean_ joined #perl6
14:51 frew_ joined #perl6
14:52 ruoso pmurias, hmm... Ok... I think we still can work on making the p5sv before integrating the runloops
14:56 pmurias we could use the old runloop intergration as a start
15:00 justatheory joined #perl6
15:04 ruoso pmurias, yeah... I think so
15:05 drbean__ joined #perl6
15:06 pmichaud good morning, #perl6
15:07 ruoso good morning pmichaud
15:08 masak pmichaud: god morgon.
15:08 moritz_ http://moritz.faui2k3.org/tmp/pie-fail.svg I think proper pie chart plotting is harder than it looks at first sight ;-)
15:08 masak good start, though.
15:09 masak I see about three possible improvement to make right away. :)
15:09 IRSeekBot joined #perl6
15:09 masak is the code public somewhere?
15:09 moritz_ masak: in a minute it is ;-)
15:10 masak pmichaud: when you're available, I have a few small questions about PGE.
15:10 moritz_ masak: it's in SVG::Plot now, the example was generated by plot.pl
15:10 moritz_ hugme: add masak to svg-plot
15:10 hugme moritz_: successfully added masak to svg-plot
15:10 moritz_ masak: and you're a commiter. Welcome ;-)
15:10 masak \o/
15:10 masak hugme++
15:11 [particle] who runs hugme?
15:11 masak moritz_++ does.
15:11 [particle] hugme should hug people after adding them to projects
15:11 [particle] there's no reason to decouple those functions :)
15:11 moritz_ [particle]: nice idea ;-)
15:12 moritz_ @karma hugme
15:12 lambdabot hugme has a karma of 1
15:12 moritz_ masak: I'm going to work on the text align thing first
15:12 masak moritz_: in fact, the 'successfully added' message could be replaced by a hug and a 'welcome!'
15:12 [particle] hugme++
15:12 [particle] masak: just what i was thinking
15:12 moritz_ masak: aye
15:13 moritz_ '* hugme hugs masak and welcomes him or her to svg-plot'
15:13 masak eww, 'him or her'...
15:13 moritz_ "it"? ;-)
15:13 * masak prefers '...and says welcome...'
15:13 moritz_ ok
15:13 pmichaud masak: I'm available for PGE questions
15:13 moritz_ anyway, text aligning first, then hugme patches.
15:14 masak pmichaud: is 'ternary:' a fossil?
15:14 leedo joined #perl6
15:14 pmichaud no.
15:14 jrockway joined #perl6
15:14 larsen joined #perl6
15:14 masak what does it do?
15:15 pmichaud it allows parsing of ternary operators :)
15:15 pmichaud it's left there for non-Perl6 languages to use
15:15 dukeleto joined #perl6
15:15 lisppaste3 joined #perl6
15:15 jjore joined #perl6
15:15 pmichaud because otherwise parsing a ternary can be kind of... tricky.
15:15 masak but no language actually uses it?
15:15 pmichaud NQP does.
15:15 masak ah.
15:16 pmichaud certainly any language that has the traditional   ? :   syntax is likely to use it.  So I suspect pynie uses it also.
15:16 masak that explains it. I was only looking at examples withing the compilers/PGE directory.
15:16 pmichaud and perhaps cardinal as well.
15:17 masak next question: PGE::Exp and all its subtypes all inherit from PGE::Match, yes? and PGE::Match inherits from Capture?
15:18 pmichaud currently,  yes.  That whole hierarchy will likely change soon.
15:18 drbean joined #perl6
15:18 masak ok.
15:18 pmichaud ultimately PGE::Exp will be a descendent class of Capture
15:18 pmichaud (with potentially some intermediates in-between)
15:18 masak but it's the properties of Capture that allows different values to be set in the PGE::Exp objects, right?
15:18 jan__ joined #perl6
15:18 pmichaud sure, a Capture is an array+hash
15:18 masak exactly.
15:19 masak and, in PIR, a writeable one, it seems.
15:19 masak I've found no way to modify a Capture from Perl 6.
15:19 pmichaud well, internally we have to have some way to build a capture :)
15:19 masak sure, sure.
15:19 masak in Perl 6 you have to build it all at once, I guess.
15:19 pmichaud there's a good chance that PGE::Exp and friends will become subclasses of PAST::Node somehow
15:19 moritz_ so basically a PGE capture is a Perl 6 cursor
15:20 masak pmichaud: that sounds intriguing.
15:20 pmichaud (and PAST::Node is already a subclass of Capture)
15:20 pmichaud well, PGE::Exp are basically ast nodes for regular expressions
15:20 masak so this 'subclass Capture' is kind of a pattern in Parrot compilers?
15:20 moritz_ (even I understodd that ;-)
15:21 pmichaud Captures are incredibly useful...   it's a pattern in the compiler toolkit
15:21 masak ok.
15:21 pmichaud it's especially useful anytime you need attribute trees
15:21 pmichaud (trees where the nodes have children and a set of attributes)
15:21 masak next question: I don't understand the corou bits yet, but they seem to be used for backtracking.
15:21 pmichaud they are.
15:21 pmichaud here's an example:
15:22 pmichaud rakudo:   my $a = '0abc0def0ghi';  $a ~~ /0./;  say $/;  $/.next;   say $/
15:22 p6eval rakudo b51d94: OUTPUT«0a␤0d␤»
15:22 pmichaud (yes, .next is not Perl 6 standard)
15:23 masak ooh, interesting. :)
15:23 pmichaud the match object keeps track of the state of the match.  the coroutine allows us to exit with a successful match, but then we can jump back into the coroutine in order to pick up matching from where we left off
15:23 pmichaud we have to have this for subrules
15:23 pmichaud regex { abc <subrule> def }
15:24 masak could Perl 6 be made to emulate the coroutine behaviour... besides using gather/take?
15:24 pmichaud if 'def' doesn't match, we have to backtrack into <subrule> at the point where it left off in order to try the other alternatives
15:24 drbean joined #perl6
15:25 moritz_ masak: actually that's what TimToady used in his early attempts to make STD.pm run on pugs
15:25 masak ah, so the coroutines allow you to "pause" the subrule matching, and continue it later?
15:25 masak that sounds very much like continuations to me.
15:25 pmichaud masak: yes
15:25 [particle] '* hugme hugs masak. Welcome to svg-plot!'
15:25 pmichaud it is built on continuations, yes
15:25 masak [particle]: nod.
15:26 masak I still would very much like something like that in Perl 6.
15:26 pmichaud (emulating in Perl 6)  the answer there would probably be to examine what Cursor is doing in STD.pm
15:26 pmichaud I'll be able to answer a bit more directly after I've moved PGE to be more Cursor-like (should be this month)
15:26 masak I think it's a bit limiting to only have that wonderful behaviour through gather/take. it's much more useful than that.
15:26 masak pmichaud: I'll be following along closely.
15:30 drbean joined #perl6
15:35 drbean joined #perl6
15:37 moritz_ bah. It seems that firefox-3.0 doesn't properly implement the dominant-baseline attribute in SVG.
15:38 sri_kraih joined #perl6
15:39 masak throw them a TODO ticket! :)
15:39 molaf joined #perl6
15:39 drbean joined #perl6
15:40 moritz_ when last I found a NYI feature in the SVG renderer I discovered that 3.5 already had it
15:40 masak moritz_: what does 'WIP' stand for in one of your svg-plot commit comments?
15:40 moritz_ masak: "work in progress"
15:41 masak ah. :)
15:41 fraterm_work joined #perl6
15:41 masak as opposed to finished and immaculate? :)
15:41 moritz_ as opposed to "enough implemented that the next comit might wait another couple of days"
15:42 masak ah, a partial commit.
15:43 moritz_ http://moritz.faui2k3.org/tmp/pie-better.svg # text-anchor at work - much better
15:44 moritz_ afk
15:44 masak aye, definitely better.
15:44 masak I'm going to try and do something about the colours.
15:44 moritz_ that would be awesome
15:44 pmichaud bikeshedding already?
15:45 masak pmichaud: bikeshedding would be _talking_ about changing the colours. :)
15:45 moritz_ afk
15:46 drbean joined #perl6
15:46 pmichaud masak: isn't that what you just did above?  ;-)
15:46 masak (dang!)
15:49 pmichaud is it possible for anything to appear outside of the 'CORE' namespace?
15:50 pmichaud or is CORE the ultimate root of all... names?
15:52 pmichaud never mind, I found the relevant text in S02
15:57 TimToady there's a sense in which the current lexical scope is the root of all names, but eventually it gets to CORE, and that leads to GLOBAL and PROCESS
15:57 pmichaud right
15:57 TimToady except
15:57 pmichaud essentially I'm trying to figure out what the package structures are
15:57 TimToady I'm thinking that GLOBAL and PROCESS should really be hanging off of UNIT
15:58 TimToady thing is, every compilation unit has its own idea of what GLOBAL means
15:58 pmichaud the key thing I was looking for was that CORE isn't a package
15:58 TimToady so those have to be meshed as a form of linkage
15:59 TimToady except insofar as you might get to it via GLOBAL::<$?PARENT> or some such
15:59 TimToady but yes, packages and lexnamepads are a bit different
16:00 pmichaud GLOBAL::<$?PARENT> would be able to get to a lexical scope?   hmmmm
16:00 TimToady packages contain variables directly, while lexnamepads contain locations in the real lexpad
16:00 pmichaud oh, lexnamepad is a new term for me
16:01 TimToady well, we need to distinguish the lexpad that is the symbol table from the cloned lexpad for a closure
16:01 pmichaud god it
16:01 pmichaud got it
16:01 TimToady we've been calling both of those lexpads, to great confusion
16:01 TimToady Perl 5 count them as two different things
16:01 pmichaud so lexnamepad is sort of the schema or template for the lexical symbols declared within a closure
16:02 TimToady in P5, the scratch pads are all indexed by offset
16:02 pmichaud and the lexpad is the actual name bindings at runtime
16:02 TimToady and the 0th scratch pad happens to contain names instead of containers
16:02 TimToady it's and array of arrays of entries
16:02 TimToady *an
16:03 pmichaud sure, I see how p5 does it
16:03 TimToady so the names just happen to have the same offset in the 0th pad as the actual variable in the nth pad
16:03 pmichaud makes sense to me
16:03 TimToady and cloning involves adding another n+1th pad
16:03 TimToady but it's partly because of that structure that the concepts were muddled in my head
16:04 TimToady so I ended up calling them both lexpads
16:04 pmichaud in Parrot our "lexnamepad" is called a LexInfo
16:04 TimToady that works
16:04 lollan joined #perl6
16:04 TimToady lexsymtab is a bit unweildy
16:04 pmichaud so one can talk about the LexInfo of a sub or block without having to have an instantiated LexPad
16:05 pmichaud chip++ came up with LexInfo, I believe
16:05 pmichaud (as a name, as well as the implementation design for Parrot)
16:05 TimToady anyhoo, I've been trying to keep packages and lexinfos as similar as possible
16:05 TimToady except for the extra indirection, which STD doesn't worry abou tyet
16:05 pmichaud okay, that helps
16:06 pmichaud I can at least build an approximation of much of this now; it will likely take us a few iterations in Rakudo to get it to match the spec
16:06 pmichaud I left a question for you in backscroll, also -- will repeat it here
16:06 lollan Hi guys, I've just read the presentation about SMOP it's kind of WoW.
16:07 TimToady so probably the difference is just between carrying a pointer to the container vs an index to the container in the lexpad
16:07 xomas_ joined #perl6
16:07 TimToady World of Warcraft?
16:07 pmichaud 05:17 <pmichaud> TimToady: for contextual variables, after we scan outward and reach the GLOBAL package, do the symbols in GLOBAL retain the twigil or do we strip it at  that point?
16:07 pmichaud 05:18 <pmichaud> i.e., would $*FOO look for GLOBAL::<$FOO>  or GLOBAL::<$*FOO>  ?
16:07 pmichaud I'm guessing the latter, based on other things I've read
16:08 pmichaud namely,  PROCESS::<%*ENV>
16:08 alester joined #perl6
16:08 pmurias lollan: which one?
16:10 TimToady thinking how they'll be used in the main program (which starts in GLOBAL package), we may need a way for the starless form to work
16:10 pmichaud ....we want all variables declared in the main program to be contextual?
16:10 lollan pmurias: it's called Perl6 is just a SMOP.
16:10 pmichaud (that's fine.... just verifying)
16:11 TimToady if they say 'my $*FOO' then we know they mean the UNIT scope, but if they say 'our $*FOO', they mean GLOBAL:<$*foo>, but it installs a lexical alias
16:11 TimToady which could conceivably cause trouble
16:11 lollan it gets you exited about joining but my level is way too low lol
16:12 pmichaud I'm thinking about the case of    'our $FOO'
16:12 TimToady but if they say our $FOO in the GLOBAL package, they probably would like to access it
16:12 TimToady there's always $GLOBAL::FOO, but
16:12 TimToady maybe 'our $*FOO' shouldn't alias into MY
16:12 TimToady seems strange
16:13 pmichaud agreed; I was wondering about our $*FOO last night
16:13 TimToady now thinking about always losing the * in the package
16:14 TimToady doesn't help if they declare 'our $*FOO' in GLOBAL, but it helps if they say our $FOO
16:14 TimToady and we lose the star for the %ENV fallback
16:14 pmichaud so, PROCESS::<%ENV>  ?
16:14 TimToady so maybe it makes sense to lose the star at the lexical->package transition instead
16:15 pmichaud that's where I was initially headed when it occurred to me the star would be in the packages
16:15 TimToady that's what I'm thinking is maybe the best way
16:15 pmichaud previously Rakudo has not had the star in its package symbols (but that heralds from when the * twigil meant 'global' and not 'contextual')
16:16 TimToady well maybe it should stay that way
16:16 pmichaud I can try it sans-star and report if I run into any problems
16:16 pmichaud it won't be hard to switch
16:16 TimToady sounds good
16:19 masak phenny: tell moritz_ that I refined the colors of SVG::Plot a bit.
16:19 phenny masak: I'll pass that on when moritz_ is around.
16:19 rfordinal joined #perl6
16:22 M_o_C joined #perl6
16:26 pmichaud how tied is %*ENV to the underlying environment?  (more)
16:26 pmichaud for example, if I do
16:26 pmichaud %*ENV<xyz> = 1.5;   say %*ENV<xyz>.WHAT
16:27 pmichaud do I get "Num()" or "Str()" ?
16:29 pmichaud (or "Rat()")
16:29 cotto joined #perl6
16:30 masak I could argue either for "what you put in" or "Str".
16:31 pmichaud so can I, thus the question.  :)
16:32 moritz_ masak: thanks
16:32 phenny moritz_: 16:19Z <masak> tell moritz_ that I refined the colors of SVG::Plot a bit.
16:33 masak pmichaud: the former solution feels both more permissive and simpler.
16:33 pmichaud sooooo
16:34 pmichaud if I did:   %*ENV<xyz> = $regex.match($foo);
16:34 pmichaud then %*ENV<xyz> would give me back the match object, but subprocesses would see the stringification of the match object in their environment
16:35 masak 对. yes.
16:35 pmichaud do we have to deal with the possibility of binding ?
16:36 pmichaud %*ENV<xyz> := $a;   $a++;   # ???
16:37 stephenlb joined #perl6
16:37 pmichaud oh, wait, that probably answers it altogether
16:37 * pmichaud looks
16:37 masak it feels to me that is a question pertaining to all special kinds of Associative things, not just the %*ENV hash.
16:38 pmichaud in the case of %*ENV, we have the possibility of
16:38 pmichaud my %*ENV = ('xyz' => foo);   run("bar");
16:39 pmichaud which to me says that the sub program should see an environment consisting _only_ of 'xyz' => 'foo'   (modulo my syntax error above)
16:40 [particle]1 joined #perl6
16:40 pmichaud which means we probably need to set the environment at the point of the run call
16:40 pmichaud as opposed to trying to do it at the point of the declaration/assignment
16:40 masak as long as &run is the only point where that is needed...
16:40 pmichaud there are others
16:41 pmichaud basically anytime we find ourselves bouncing into external (non-Perl 6) libraries or subprocesses
16:41 masak nod.
16:45 * moritz_ finds it somewhat pleasing that one of the colors in SVG::Plot survived masak++'s revision ;-)
16:46 masak moritz_: I started from that one, and aligned the other ones to that color. :)
16:46 synth joined #perl6
16:47 moritz_ masak: it would have been fine by me if you had altered them all, added more or whatever
16:47 pmichaud ...can I see pretty pictures?
16:47 pmichaud or do I have to clone+install+run to do that?
16:47 moritz_ pmichaud: just a second
16:48 * pmichaud wants to bikeshed too!!  :)
16:48 moritz_ http://moritz.faui2k3.org/tmp/pie-even-better.svg
16:48 moritz_ pmichaud: bikeshed patches are very welcome ;-)
16:49 pmichaud interesting
16:50 masak moritz_: wow, how do you calculate the line lengths?
16:50 synth joined #perl6
16:50 moritz_ masak: simply alternating
16:50 masak oh :)
16:50 pmichaud heh!
16:51 pmichaud interesting heuristic
16:51 moritz_ the next revision makes the dashes grey
16:51 masak I think in the general case, one must MCMCMC a little to make the things not collide.
16:52 moritz_ MCMCMC?
16:52 masak http://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo
16:52 fraterm__ joined #perl6
16:52 masak don't recall just now what the last 'MC' stood for.
16:53 masak the term I was after is really 'hill climbing'.
16:53 moritz_ Mäsak, Carl
16:53 masak :P
16:53 moritz_ ;-)
16:53 masak is this an elaborate ruse to make me make more commits? :P
16:53 ooo joined #perl6
16:53 moritz_ could be, but I'd never admit it.
16:53 masak also wise.
16:56 arnsholt What are the semantics of | in |%_?
16:56 moritz_ foo(%a) passes one positional parameter
16:56 moritz_ foo(|%a) passes all pairs in %a as named arguments
16:56 moritz_ s/parameter/argument/
16:57 arnsholt Yeah, that's what I thought
16:57 arnsholt Then I'm doing something else wrong =)
16:57 pmichaud rakudo's support for | is still a bit shaky sometimes
16:57 masak any particular reason we don't use * on the calling side for flattening? :)
16:58 pmichaud hmmm?
16:58 moritz_ masak: yes, ETOOMANYUSESOF*
16:58 pmichaud oh, yes.
16:58 pmichaud originally it was *
16:58 pmichaud it got changed
16:58 masak it didn't work?
16:58 pmichaud if we use * on the calling side, we lose Whatever
16:58 masak oh.
16:58 moritz_ do we?
16:58 TimToady certainly
16:58 synth but but thats operator overloading
16:58 masak I don't immediately see why.
16:58 moritz_ does term:<*> conflict with prefix:<*>?
16:58 pmichaud can't have * in both prefix and term position
16:58 TimToady can't have term/infix ambig
16:59 masak oh, right.
16:59 masak now I see it. :)
16:59 * moritz_ too
16:59 TimToady at best, Whatever could respond to .()
16:59 TimToady same as types
17:00 [particle]1 just overload x to multiply numbers
17:00 TimToady and other values
17:00 moritz_ *($a) is currently specced as identity
17:00 moritz_ don't know if I like it
17:00 TimToady that's kind of a fossil, currently
17:00 moritz_ *($a) could also mean $_.($a)
17:01 pmichaud I'm not sure that I like *($a)  at all..   not sure why it's there
17:01 arnsholt At any rate, I'm overriding .parse($str) in my Grammar, and dispatch with nextwith($str, |%_)
17:01 ooo left #perl6
17:01 pmichaud arnsholt: it's very unlikely that nextwith will work with parse
17:01 moritz_ pmichaud: @array_of_closures.sort: *.(5) is just too tempting ;-)
17:01 arnsholt When I try to run it, I get "invalid arg type in named portion of args\nin method SQL::Grammar::parse (./lib/SQL/Grammar.pm:120)"
17:01 pmichaud because the built-in .parse isn't a rakudo multimethod
17:02 pmichaud (it will eventually work, yes; it just doesn't work today)
17:02 arnsholt Right. That's what I feared
17:02 pmichaud perhaps moving the parse method from builtins into the setting would work
17:04 pmichaud anyway, feel free to file a rt ticket that 'nextwith doesn't work with .parse'
17:05 arnsholt Yeah, I'll do that
17:06 arnsholt In the meantime, any suggestions for calling Grammar's parse from my subclass?
17:06 moritz_ maybe you can try to get it by introspection?
17:07 moritz_ see the t/spec/S12-introspection/*.t test for what is implemented
17:08 pmichaud I don't have an immediate suggestion, no.  Sorry bout that
17:08 pmichaud perhaps you could call your method something other than 'parse' for the time being?
17:08 pmichaud (I don't like that answer either)
17:09 arnsholt Well, it's a better idea than doing nothing =)
17:09 frew__ joined #perl6
17:09 pmichaud let me see how hard it'll be to move parse
17:10 arnsholt Huh. A more barebones thing gets me a Null PMC access
17:10 pmichaud oh!
17:10 pmichaud Grammar.parse is visible
17:10 pmichaud so you might be able to do
17:11 pmichaud Grammar::parse(self, $str, |%))
17:12 pmichaud s/)//
17:12 pmichaud that might fail when Parrot fixes its method definitions to not automatically stick them in the namespace, but it'll work for now
17:14 abra_ joined #perl6
17:14 pmichaud (and hopefully by the time Parrot does its fix we'll have already fixed Grammar::parse)
17:15 arnsholt Hmm. But now $/ isn't set correctly. Any way to do that?
17:16 pmichaud not easily
17:16 pmichaud we don't have OUTER:: implemented yet to be able to do that rebinding
17:16 pmichaud er, CALLER::
17:17 arnsholt 'k. That's pretty easy to work around though. I'll just return $/ from the overriding .parse
17:17 pmichaud although there's a _chance_ that we can start to get CALLER:: to work now that Parrot has its contexts as PMCs
17:21 pmichaud afk, lunch
17:26 pmichaud just a note here that having contextuals automatically look up values in %*ENV makes me a tiny bit uncomfortable (more)
17:27 pmichaud it reminds me a bit of PHP's 'register_globals' and/or its superglobals, which of course have been huge sources of security problems
17:28 pmichaud afk, lunch
17:34 abra joined #perl6
17:41 moritz_ pmichaud: same here (uncomfortable)
17:51 payload joined #perl6
17:56 s1n rakudo: class A { has $.foo = 'bar'; multi method foo(Str $test) { say $test }}; my $a = A.new; $a.foo("oh hai")
17:56 p6eval rakudo b51d94: OUTPUT«push_pmc() not implemented in class 'Sub'␤»
17:56 s1n rakudobug?
17:58 moritz_ known bug
17:58 moritz_ Ovid++ reported it a few months back
17:58 moritz_ hm
17:58 moritz_ oh wait
17:59 moritz_ I think in Ovid's case it was not a mulit method, just a single one (iirc)
17:59 moritz_ s1n: I'm not sure. So in case of doubt, please report
18:00 moritz_ has $.foo installs a method foo
18:00 moritz_ but IMHO it should be a multi
18:00 * s1n submits
18:11 japhb git question: How do you map from a path name to a file in a working copy back to the associated SHA-1 (without recomputing the hash, I mean)?
18:11 lambdabot japhb: You have 1 new message. '/msg lambdabot @messages' to read it.
18:11 japhb diakopter, pong (sorry, didn't see your message earlier)
18:14 colomon joined #perl6
18:26 Confield joined #perl6
18:29 __ash__ joined #perl6
18:29 __ash__ is there a way in perl6 rakudo to drop down to PIR
18:31 Psyche^ joined #perl6
18:33 alester Today's sad sad sad commentary: http://www.reddit.com/r/programming/comments/9f7yt/new_main_perl_6_website_perl6org/c0cs1y8?context=3
18:35 molaf joined #perl6
18:36 s1n alester: why do you engage with these people? it's like they're getting some sort of validation by spewing that garbage
18:36 alester The people that say it's bad if it's feminine?
18:37 s1n alester: yes, it's one thing to not like a butterfly, but to make slurs and say that we need Satan for a mascot because it's masculine?? that seems like a waste of time to even talk to them
18:39 s1n alester: that's some of the most immature conjecture i've read about perl6, i don't think there's anything you can say to convince them to remove their head from their bum
18:39 alester I didn't reply to the 2nd guy.
18:42 pioto what's the 'auth' about in: grammar STD:ver<6.0.0.alpha>:auth<http://perl.org>;
18:42 pioto author?
18:42 s1n i wouldn't even converse with them, besides, it's not like larry is going to change it so what do they expect to happen?
18:43 alester s1n: I'm not optimizing for my own time.
18:43 s1n -Ofun?
18:43 alester I don't expect that the initial guy is going to change his mind.  However, I do expect that others will read it.
18:45 huf there, i added more gasoline to that reddit thread :)
18:47 s1n huf: i concur
18:50 huf i still think the string "Perl6" in fixed font is the best logo you could hope for ;) i'd be fine with any mascot
18:52 moritz_ more bikeshedding. Just what we need.
18:53 alester It's outside bikeshedding.
18:54 cognominal The Rorschach test is of no use of anymore because of the wikipedia, hopefully we have TimToady and the camelia
18:54 japhb pioto, "author(ity)" -- whoever "owns" that release, in some sense
18:55 literal joined #perl6
18:55 pioto japhb: that seems like a very vague concept. what's the utility?
18:55 moritz_ cognominal: the Rorschach test can still be used to identify exterme personalities. And that's what it's always been good for
18:56 japhb pioto, I don't know all the reasons off the top of my head, but the simplest one that comes to mind is knowing which side of a fork you're following.  It's like namespacing the version numbers.
18:56 pnu joined #perl6
18:56 pioto right. "fork isn't a dirty word anymore"
18:56 literal joined #perl6
18:57 pioto so, autodie would check that it has the right autodie by checking the auth?
18:57 pioto err, the right Fatal
18:57 pioto (i dunno if they actually forked it, or what, but that's the only example that popped to mind)
18:57 literal joined #perl6
18:58 japhb pioto, when you 'use', it grabs the right one, according to your spec.
18:59 japhb You can have both installed on the system.
18:59 japhb In fact, you can even use both of them in the same process!
18:59 pioto oww.
18:59 pioto but, not in the same scope, presumably.
18:59 japhb (For example, if two different modules used by your main program wanted different forks of some module they both depend on.)
18:59 pioto rather, that wouldn't likely do what you want.
19:00 pioto yeah, ok. makes sense.
19:06 cognominal moritz, my point is that comments about the camelia tells a lot about the people who make them
19:06 alester Any comment that starts "I'm no homophobe..."
19:07 moritz_ cognominal: that's a valid point
19:08 M_o_C joined #perl6
19:11 pmichaud back from lunch
19:14 pmichaud I think one can use two same-named modules in the same scope even... but everything ends up having to be longnamed in order to do that
19:14 pmichaud (i.e., it wouldn't be all that pretty :-)
19:16 s1n ahahaha, i made a quickie logo with my horrid gimp skills: http://s1n.dyndns.org/perl6.jpg
19:17 pmichaud I like it
19:18 pmichaud I'm not so sure about the UPC code, though :)
19:18 s1n it was true with perl5 and it'll be true with perl6 :)
19:18 s1n yeah that was just me learning how to take something off and add my own text
19:18 s1n i'm sure there are others with better artistic skills than i that could re-image that
19:18 pnu joined #perl6
19:22 icwiener joined #perl6
19:32 jferrero joined #perl6
19:40 drbean joined #perl6
19:41 __ash__ joined #perl6
19:50 pnu joined #perl6
19:52 cognominal sln, "made in indonesia", is that some Java in disguise?
19:53 cdarroch joined #perl6
19:58 iblechbot joined #perl6
20:02 Tene pmichaud: re twitter: eh?
20:03 TimToady subliminal advertising, I guess
20:03 Tene the 'rakudo' account on twitter seems to be nonsense.
20:03 pmichaud ohhhh
20:04 pmichaud I'm playing with twirssi -- sent the tweet to the wrong place
20:04 pmichaud fixing
20:04 TimToady twirssi?!?!
20:04 TimToady but will it do the cute face pictures?
20:05 pmichaud twirssi is an extension to irssi that allows tweets and updates in irssi
20:05 pmichaud I already have an alias to send twitter messages to @rakudoperl from my irssi window, I accidentally triggered it
20:05 pmichaud (removing that alias now :-)
20:06 TimToady you should tweet an unsubscribe now to undo whatever you did
20:07 Tene obviously
20:07 pmichaud heh
20:07 pmichaud I removed the tweet; we'll just let everyone else guess
20:08 donaldh joined #perl6
20:09 pmichaud afk, fetching ice cream
20:11 [particle] ^ git fetch icecream
20:13 synth joined #perl6
20:16 rfordinal joined #perl6
20:18 sharada joined #perl6
20:24 dalek rakudo: 3db3e37 | moritz++ | build/gen_setting_pm.pl:
20:24 dalek rakudo: [build] be a bit more idiomatic in gen_setting_pm.pl
20:24 dalek rakudo: Use three-arg open(), and speed don't read line by line if we don't need that.
20:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3db3e37a20b08d252feeab3e4671a2d13d9eaeba
20:58 frederico joined #perl6
21:00 jlmoko joined #perl6
21:02 timbunce joined #perl6
21:03 zamolxes joined #perl6
21:03 ruoso joined #perl6
21:05 timbunce The graph of Rakudo Spectest Progress on http://rakudo.org/status seems oddly compressed in the horizontal axis. The image is much wider than the graph. Any reason for that? Is it possible to get a wider version?
21:05 moritz_ timbunce: the reason is that GD::Graph does no sub pixel rendering
21:06 moritz_ timbunce: http://rakudo.de/ has a non-stacked version plotted with gunplot
21:06 moritz_ timbunce: I can also try to use SVG::Plot to generate one that's a bit wider, if that's of any help
21:07 timbunce moritz_: the rakudo.de version will do me nicely - thanks!
21:13 moritz_ I pushed a new branch to github, split-gen-setting
21:14 moritz_ it's a step towards compiling each setting file separately
21:14 PacoLinux joined #perl6
21:16 pmichaud moritz_: (haven't looked at the branch)  fwiw, I think I'd like the src/gen_* files to go into their own subdirectory
21:16 pmichaud I was going to do it that way to begin with, but I let other folks talk me out of it at the time.
21:17 moritz_ pmichaud: my branch uses src/gen_setting/*.pm for now
21:17 pmichaud *.pir, you mean?
21:17 moritz_ *.pm
21:17 pmichaud what's the purpose of the *.pm files?
21:17 moritz_ adding a 'no Main;' to each
21:17 pmichaud oh
21:18 pmichaud that's going to change anyway
21:18 moritz_ so I don't need the step I've beeon working on. Great.
21:18 pmichaud perhaps better would be to just add "no Main;" to each of the src/setting/*.pm files directly
21:18 moritz_ aye
21:18 moritz_ anyway, off to bed now
21:19 pmichaud ultimately they'll need to say 'CORE' instead
21:19 moritz_ will work a bit on it tomorrow
21:20 Whiteknight joined #perl6
21:35 masak joined #perl6
21:37 masak in response to a tweet of mine saying that people are shocked by Perl 6's image because they are used to programming languages which take themselves too seriously, I got this back from a good friend of mine, who happens to be female: http://twitter.com/giiku/status/3762841239
21:37 masak someone willing to make a picture for such a t-shirt? :)
21:38 sharada This person has protected their tweets. ???
21:38 pmichaud I can't see the response
21:38 masak oh, dang.
21:38 Tene I don't know what it says, but I'll take any photos you want.
21:39 masak the tweet was "@carlmasak Hell, if anything, it's not enough. I know I'd get a Perl 6 t-shirt if it sported a cute manga-style girl with butterfly wings."
21:39 Tene ah, "make", not "take"
21:39 * Tene reading fail.
21:39 masak :)
21:39 _timbunce joined #perl6
21:39 Tene I'll pass it on to one of my gfs.  She likes manga-style drawing.
21:40 masak excellent.
21:41 pmichaud if given an image, I can put it on the t-shirt shop, too :)
21:41 masak pmichaud: in t/compilers/pge/perl6regex/rx_quantifiers, lines 208-210, should '**?' in the test description perhaps be '**' instead? (copy/paste error?)
21:41 PerlJam (masak's friend)++
21:41 tak11 joined #perl6
21:42 masak should I tell her that we're working on a t-shirt for her?
21:42 pmichaud masak: Yes.
21:42 pmichaud yes to test description, that is
21:42 masak gotcha.
21:43 pmichaud as far as "working on t-shirt".... I can't do anything until there's an image :)
21:43 PerlJam I wonder if I could get my brother to draw such a thing.
21:43 masak draw several! it'll probably need to go through some iterations anyway, just like everything else.
21:43 fraterm__ left #perl6
21:46 masak pmichaud: I can try and patch it if you like. I haven't had Parrot commit access for quite some time.
21:47 pmichaud masak: I can take care of it, no problem (and thanks -- masak++)
21:47 pmichaud I have the file open already :)
21:47 masak goodie.
21:50 M_o_C joined #perl6
21:52 PerlJam I just talked to my brother on the phone and he's going to try to draw a manga-style girl with butterfly wings that look just like Camelia's.
21:52 pmichaud cool
21:52 PerlJam (He's kinda shy about his drawing though he does it quite prolificly)
21:52 pmichaud we don't have to give him credit if he doesn't want it :)
21:52 PerlJam heh
21:53 PerlJam Well, I figure since he's always drawing *something*, why not try to direct him towards drawing something *useful* to us.  :)
21:54 pmichaud PerlJam: agreed!
21:54 pmichaud I can certainly forward royalties, if any show up :)
21:55 mberends does the latest Rakudo commit pass all spectests? 36 scripts fail here after realclean etc.
21:55 colomon Last I checked, arith.t was failing a bunch of tests.
21:55 PerlJam btw, I don't know how many of you have played with Padre, but I'm liking it more and more.  It's got some quirks, but it's also got some really neat features.  (and it is only at 0.45)
21:55 colomon Think that was yesterday?
21:56 pmichaud mberends: it sometimes requires doing a complete rebuild of parrot
21:56 pmichaud i.e., remove any parrot and parrot_install subdir and try again
21:56 pmichaud Parrot's "make realclean" isn't always as really clean as we'd like it to be
21:56 PerlJam make super-duper-clean
21:57 masak make splode
21:57 mberends pmichaud: thanks, will do. super-duper-extra-ultra-clean
21:57 colomon rakudo: say sin(pi/2.0 + 0i);
21:57 p6eval rakudo 3db3e3: OUTPUT«1␤»
21:57 pmichaud anyway, I've been doing builds and spectests against parrot trunk (+ my modifications) all morning w/o significant failure
21:57 colomon rakudo: say sin(pi/2.0 + 1i)
21:57 pmichaud (right now I'm working on contextuals.  it's taking longer than I had planned)
21:57 p6eval rakudo 3db3e3: OUTPUT«0.957871453708344␤»
21:58 PerlJam gah, now my facial hair smells like BBQ and I'll be salivating for the rest of the day unless I get it to not smell that way
21:58 pmichaud PerlJam: try tomato paste
21:58 colomon Oooo, do we still have the bug where Complexes mysteriously turn to Nums?
21:58 pmichaud I hear that takes the... oh, wait, that's for eliminating skunk smell
21:58 pmichaud colomon: Parrot likes to do that, unfortunately :-(
21:59 PerlJam pmichaud: I could pour Dr Pepper on my face .... it's acidic just like tomato paste  :)
21:59 colomon pmichaud: It's great when the complex has a 0 imaginary part, but sucks the rest of the time.
21:59 pmichaud Parrot's "get_number" function for Complex PMCs likes to return the magnitude of the imaginary vector
21:59 colomon I wanted to check because I was getting mysterious successes for sin(Complex).
21:59 pmichaud so yes, works great when $foo.im == 0, bites us when it's not.
22:00 angoladon joined #perl6
22:01 colomon Okay, just wanted to check on that quickly.  Still working on getting an improved suite of sin tests when I get the chance.  Should have a pretty full set soon, then I'll take a look at actually making them work.  :)
22:01 colomon afk
22:04 PerlJam "sin tests"?  Is that like when the snake tempts you to eat the fruit of knowledge?
22:06 angoladon left #perl6
22:13 pmichaud afk, travel
22:14 masak PerlJam: it must be, if you ask me. they're like ordinary TAP tests, but instead of 'ok' and 'not ok', you have 'well, one bite cannot hurt' and 'get behind me, serpent', respectively. and there's no plan.
22:34 colomon rakudo: say sin(-3.0 + 0i); say sin(-3.0);
22:34 p6eval rakudo 3db3e3: OUTPUT«0.141120008059867␤-0.141120008059867␤»
22:35 colomon rakudo: say sin(-3.92699 + 0i); say sin(-3.92699);
22:35 p6eval rakudo 3db3e3: OUTPUT«-0.707106203489093␤0.707106203489093␤»
22:38 masak mmm... in any project, as soon as you start passing tests, it feels like you're _doing_ something.
22:38 masak I think that's what I like about TDD the most, that right from the start, you're doing something.
22:41 colomon TDD is definitely keen for this sort of math library work.  It's just the right  level of testing for it.
22:53 rbaumer joined #perl6
22:53 TimToady it also tends to flush out spec issues right at the beginning
22:56 masak speaking of which...
22:58 masak what's the behaviour of calling &break outside of a block of some kind?
22:58 * Juerd usually writes code without any specification or even a clue as to where the project's going
22:59 Juerd TDD doesn't really work when there's no clarity over how things should behave :)
23:01 masak even without a spec, there can still be clarity as to specific use cases :)
23:02 masak why, this Monday, I threw together http://github.com/masak/perl6-literate -- and I wrote/implemented three tests for it. that's all it needed, but I'm really glad I did it that way.
23:03 masak the third test contained a surprise which I probably would have found 'the hard way' had I not used TDD.
23:03 dukeleto joined #perl6
23:11 masak time for some beauty sleep. &
23:50 tomd joined #perl6

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

Perl 6 | Reference Documentation | Rakudo