Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-01-15

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:00 colomon ash_: can you give an example I would understand of what's not working with BUILD?
00:00 ash_ t/spec/S12-construction/BUILD.t
00:00 ash_ try running that, its the issue i am talking about
00:03 ash_ its not passing paramters to BUILD, if you do Foo.new(1); BUILD should get the 1, and its currently not at the moment
00:04 ash_ the *right way* for me to fix List.new is to use BUILD so, i just found the problem
00:06 * colomon is still trying to understand the issue....
00:07 ash_ so, http://perlcabal.org/syn/S12.html​#Construction_and_Initialization says if you want to say initialize some variables right? like my class has an attribute $!values, i can use BUILD($values) { $!values = $values; } to do that
00:07 ash_ it also says if you do Foo.new(5); it should be passing the 5 along to BUILD
00:08 ash_ in ng, the paramaters passed to new aren't getting passed to BUILD like they are supposed to be
00:11 colomon The error I get is "Unexpected named parameter 'b' passed" -- is that what you're seeing?
00:12 ash_ yeah
00:13 zamolxes frettled: right :) it's 2 AM here as well, but we'll get in touch in a few hours
00:14 ash_ ng: class Foo { submethod BUILD($a) { say $a }; }; my $f = Foo.new(5);
00:14 p6eval ng b65331: Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'perl6;Foo;BUILD' pc 266 (EVAL_1:115)␤
00:14 ash_ colomon: thats a simple example of what I mean
00:14 ash_ that should say '5'
00:17 colomon ash_: oh, I wonder if :a(5) works at all....
00:17 ash_ ng: class Foo { submethod BUILD(:$a) { say $a }; }; my $f = Foo.new(:a(5));
00:17 p6eval ng b65331: sh: ./perl6: No such file or directory␤
00:17 ash_ hmm
00:17 ash_ that worked locally
00:18 colomon yeah, it looks like b => 5 gets the same result.
00:18 zamolxes frettled: dug this out of my bash history :  tail -n 10000 /var/log/apache2/access.log |  perl -nE '($url, $s, $d) = m{"[A-Z]+ (/[^/ ]*)[/ ][^"]+" \d+ (\d+) (\d+) "}; $urls{"$url"}+=$d;$dt+=$d; END {print for map {  $d =int($urls{$_}/1000000);$p =int($urls{$_}*100/$dt); "$d $p% $_\n"} sort { $urls{$a}<=>$urls{$b} }keys %urls;}'
00:19 zamolxes it aggregates resource consumption per first token from the URL
00:46 cognominal joined #perl6
01:01 payload joined #perl6
01:01 sbilik joined #perl6
01:04 s1n joined #perl6
01:04 justatheory TimToady, chromatic: What, has Twitter replaced IRC?
01:08 PerlJam justatheory: I think this thing called "life" may have replaced IRC
01:09 diakopter PerlJam: I suspect justatheory is referring to chromatic_x's and TimToady's conversation on twitter this afternoon
01:10 justatheory corect
01:11 cognominal ha, ha,  as often, @chromatic_x shoot before aiming
01:17 cotto joined #perl6
01:25 tideflat joined #perl6
01:26 tideflat perl6: say 3
01:26 p6eval elf 29531, pugs, rakudo 3867ff: 3␤
01:26 tideflat perl6: say 1 + 1
01:26 p6eval elf 29531, pugs, rakudo 3867ff: 2␤
01:26 tideflat perl6:my $a = 10;say a
01:27 tideflat perl6:my $a = 10;say $a
01:27 tideflat perl6: my $a = 10;say $a
01:27 p6eval elf 29531, pugs, rakudo 3867ff: 10␤
01:28 tideflat perl6: for $i in 1..1 say $a
01:28 p6eval pugs: *** ␤    Unexpected " in"␤    expecting "::"␤    Variable "$i" requires predeclaration or explicit package name␤    at /tmp/gBzz33TGX6 line 1, column 7␤
01:28 p6eval ..rakudo 3867ff: Confused at line 2, near "in 1..1 sa"␤in Main (file <unknown>, line <unknown>)␤
01:28 p6eval ..elf 29531: Parse error in: /tmp/gaFeglxI4x␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: for $i in 1..1 say $a␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
01:28 p6eval ..STD_red/std.rb:210:in `…
01:29 tideflat perl6: for $i in 1..1 say $i
01:29 p6eval pugs: *** ␤    Unexpected " in"␤    expecting "::"␤    Variable "$i" requires predeclaration or explicit package name␤    at /tmp/gvTTB8mbAm line 1, column 7␤
01:29 p6eval ..rakudo 3867ff: Confused at line 2, near "in 1..1 sa"␤in Main (file <unknown>, line <unknown>)␤
01:29 p6eval ..elf 29531: Parse error in: /tmp/xYm3D2KzlO␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: for $i in 1..1 say $i␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
01:29 p6eval ..STD_red/std.rb:210:in `…
01:29 ash_ rakudo: .say for 1..3;
01:30 p6eval rakudo 3867ff: 1␤2␤3␤
01:30 ash_ is that what you meant  to do tideflat?
01:30 tideflat yes
01:30 tideflat Can i just play with perl6 here?
01:31 ash_ sure, or you can message p6eval
01:31 ash_ if you don't want everyone to see it
01:31 tideflat OK
01:31 tideflat rakudo: .say for 1..3;
01:31 p6eval rakudo 3867ff: 1␤2␤3␤
01:31 tideflat rakudo: .say for 1..10 * 2;
01:31 p6eval rakudo 3867ff: 1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12​␤13␤14␤15␤16␤17␤18␤19␤20␤
01:33 tideflat rakudo: say $_ * 2 for 1..10;
01:33 p6eval rakudo 3867ff: 2␤4␤6␤8␤10␤12␤14␤16␤18␤20␤
01:33 tideflat rakudo: say $_ ** 2 for 1..10;
01:33 p6eval rakudo 3867ff: 1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤
01:33 tideflat rakudo: say $_ ** -2 for 1..10;
01:34 p6eval rakudo 3867ff: 1␤0␤0␤0␤0␤0␤0␤0␤0␤0␤
01:34 tideflat $_ * $_ for 1..10;
01:34 PerlJam rakudo: say 4 ** -2
01:34 p6eval rakudo 3867ff: 0␤
01:34 PerlJam rakudo: say 4.0 ** -2
01:34 p6eval rakudo 3867ff: 0.0625␤
01:34 PerlJam rakudo: say 4 ** -2.0
01:34 p6eval rakudo 3867ff: 0.0625␤
01:35 PerlJam That's got to be a bug
01:35 tideflat rakudo: say $_ * $_ for 1..10;
01:35 p6eval rakudo 3867ff: 1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤
01:35 tideflat rakudo: say $_ ** $_ for 1..10;
01:35 p6eval rakudo 3867ff: 1␤4␤27␤256␤3125␤46656␤823543␤1​6777216␤387420489␤10000000000␤
01:36 tideflat rakudo: say "\$_ is $_" for 1..10;
01:36 p6eval rakudo 3867ff: $_ is 1␤$_ is 2␤$_ is 3␤$_ is 4␤$_ is 5␤$_ is 6␤$_ is 7␤$_ is 8␤$_ is 9␤$_ is 10␤
01:39 tideflat rakudo: say [+] 1..10;
01:39 p6eval rakudo 3867ff: 55␤
01:40 tideflat rakudo: say [+] 1..50;
01:40 p6eval rakudo 3867ff: 1275␤
01:40 tideflat rakudo: say [>] 1..50;
01:40 p6eval rakudo 3867ff: 0␤
01:40 tideflat rakudo: say [<] 1..50;
01:41 p6eval rakudo 3867ff: 1␤
01:41 tideflat rakudo: say [=<] 1..50;
01:41 p6eval rakudo 3867ff: say requires an argument at line 2, near " [=<] 1..5"␤in Main (file src/gen_setting.pm, line 2593)␤
01:41 tideflat rakudo: say [<=] 1..50;
01:41 p6eval rakudo 3867ff: 1␤
01:41 tideflat rakudo: say [>=] 1..50;
01:41 p6eval rakudo 3867ff: 0␤
01:42 tideflat rakudo: say [*] 1..5;
01:42 p6eval rakudo 3867ff: 120␤
01:43 tideflat say 1!;
01:43 tideflat rakudo: say 1!
01:43 p6eval rakudo 3867ff: Confused at line 2, near "!"␤in Main (file <unknown>, line <unknown>)␤
01:44 tideflat rakudo: say (3,3,3) <<+>> (3,3,3)
01:44 p6eval rakudo 3867ff: 666␤
01:44 diakopter tideflat: you can msg p6eval directly
01:44 tideflat I know. do you want me to?
01:45 PerlJam tideflat: sub postfix:<!>($n) { [*] 1..$n }; say 5!;  # for your factorial
01:45 diakopter well, just remember there are a bunch of folks who read the irclogs (in their client or on the web)
01:46 tideflat oh, i will msg p6eval directly from now on
01:48 japhb joined #perl6
01:48 colomon tideflat: if you find something that puzzles you, please feel free to send it to p6eval here in #perl6.  :)
01:49 tideflat Ok
01:57 snarkyboojum joined #perl6
01:59 agentzh joined #perl6
02:11 sbilik joined #perl6
02:12 snarkyboojum left #perl6
02:19 orafu joined #perl6
02:22 drbean http://doraku.asahi.com/ "An exclusive Asahi Newspaper entertainment site for the Beatles generation"
02:23 drbean doraku = Do 楽
02:31 jaldhar joined #perl6
02:44 pugs_svn r29532 | diakopter++ | [sprixel] add action() combinator (inject arbitrary JS code into the parser function on node success).\
02:44 pugs_svn r29532 | Add notes about plans for an analysis phase for Boyer-Moore & JS literal RegExp (fastest by far on \
02:44 pugs_svn r29532 | the shootout language game) substitution.
02:54 diakopter ENOPM
02:57 Infinoid ohnoes
03:01 nihiliad joined #perl6
03:02 agentzh joined #perl6
03:04 tideflat joined #perl6
03:05 tideflat /msg p6eval perl6: for ['cats','dogs','fish'] {say "$_ are the best amimal"}
03:06 diakopter pmi<tab>: do nqp-rx's grammars run the Actions during the parse (so potentially multiple times incl backtracking), or after the parse once?
03:06 diakopter or anyone else who might know.
03:28 tideflat perl6: my $a = 'abe';for 1..10 {say $a;$a ~= 'abe'}
03:28 p6eval pugs, rakudo 3867ff: abe␤abeabe␤abeabeabe␤abeabeabeabe␤abeabeabea​beabe␤abeabeabeabeabeabe␤abeabeabeabeabeabea​be␤abeabeabeabeabeabeabeabe␤abeabeabeabeabea​beabeabeabe␤abeabeabeabeabeabeabeabeabeabe␤
03:28 p6eval ..elf 29532: Unknown rule: infix_postfix_meta_operator:=␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤
03:39 araujo joined #perl6
03:59 agentzh joined #perl6
04:06 Baggiokwok joined #perl6
04:07 Juerd joined #perl6
04:08 dalek joined #perl6
04:08 hatsefla1s joined #perl6
04:53 gfx joined #perl6
05:35 Khisanth joined #perl6
05:48 jrockway joined #perl6
06:00 cls_bsd joined #perl6
06:01 cls_bsd joined #perl6
06:25 agentzh joined #perl6
06:42 szabgab joined #perl6
07:00 cognominal joined #perl6
07:04 kaare joined #perl6
07:05 rgrau` joined #perl6
07:17 allbery_b joined #perl6
07:18 Su-Shee joined #perl6
07:19 redicaps joined #perl6
07:39 iblechbot joined #perl6
08:03 baest joined #perl6
08:12 jnthn joined #perl6
08:12 baest joined #perl6
08:12 iblechbot joined #perl6
08:12 Su-Shee joined #perl6
08:12 Guest43559 joined #perl6
08:12 cognominal joined #perl6
08:12 szabgab joined #perl6
08:12 Khisanth joined #perl6
08:12 gfx joined #perl6
08:12 hatsefla1s joined #perl6
08:12 dalek joined #perl6
08:12 Juerd joined #perl6
08:12 araujo joined #perl6
08:12 jaldhar joined #perl6
08:12 orafu joined #perl6
08:12 cotto joined #perl6
08:12 s1n joined #perl6
08:12 hicx174 joined #perl6
08:12 PerlJam joined #perl6
08:12 tylerni7 joined #perl6
08:12 pnate joined #perl6
08:12 lisppaste3 joined #perl6
08:12 cotto_working joined #perl6
08:12 simcop2387 joined #perl6
08:12 mj41 joined #perl6
08:12 colomon joined #perl6
08:12 ingy joined #perl6
08:12 xinming joined #perl6
08:12 stepnem joined #perl6
08:12 tomaw_ joined #perl6
08:12 orevdiabl joined #perl6
08:12 Lorn joined #perl6
08:12 breinbaas joined #perl6
08:12 draegtun joined #perl6
08:12 GeJ joined #perl6
08:12 krakan joined #perl6
08:12 solarion joined #perl6
08:12 xomas joined #perl6
08:12 ashizawa joined #perl6
08:12 dukeleto joined #perl6
08:12 jan_ joined #perl6
08:12 bbkr joined #perl6
08:12 pugs_svn joined #perl6
08:12 LionMade1fLions joined #perl6
08:12 meteorjay joined #perl6
08:12 drbean joined #perl6
08:12 zykes- joined #perl6
08:12 gabiruh joined #perl6
08:12 kolibrie joined #perl6
08:12 spinclad joined #perl6
08:12 astinus joined #perl6
08:12 renormalist joined #perl6
08:12 arnsholt joined #perl6
08:12 sjohnson joined #perl6
08:12 eiro joined #perl6
08:12 ssm joined #perl6
08:12 phenny joined #perl6
08:12 sbp joined #perl6
08:12 nsh joined #perl6
08:12 Woody2143 joined #perl6
08:12 pjcj joined #perl6
08:12 yahooooo joined #perl6
08:12 partisan joined #perl6
08:12 constant joined #perl6
08:12 PacoLinux joined #perl6
08:12 sjn joined #perl6
08:12 jjore joined #perl6
08:12 cj joined #perl6
08:12 RichiH joined #perl6
08:12 dukelet0 joined #perl6
08:12 mtve joined #perl6
08:12 go|dfish joined #perl6
08:12 zamolxes joined #perl6
08:12 elmex joined #perl6
08:12 gju joined #perl6
08:12 kcwu joined #perl6
08:12 mdxi joined #perl6
08:12 Infinoid joined #perl6
08:12 hugme joined #perl6
08:12 sunnavy joined #perl6
08:12 yves joined #perl6
08:12 jogla joined #perl6
08:12 REPLeffect_ joined #perl6
08:12 f00li5h[HireMe] joined #perl6
08:12 Gothmog_ joined #perl6
08:12 literal joined #perl6
08:12 avar joined #perl6
08:12 yath joined #perl6
08:12 saschi joined #perl6
08:12 felipe joined #perl6
08:12 c9s joined #perl6
08:12 gfldex joined #perl6
08:12 jql joined #perl6
08:12 Maddingue joined #perl6
08:12 lest_away joined #perl6
08:12 BinGOs joined #perl6
08:12 presh_ joined #perl6
08:12 ilogger2 joined #perl6
08:13 mikehh joined #perl6
08:15 drbean joined #perl6
08:39 dalek joined #perl6
08:40 elmex joined #perl6
08:43 drbean joined #perl6
08:48 stepnem joined #perl6
08:53 Mantis joined #perl6
08:57 Baggiokwok joined #perl6
08:59 draegtun Morning all.  Has promised I posted my perl6 followup (last night):  http://transfixedbutnotdead.com/2010/01​/14/anyone-for-perl-6-metaprogramming/
08:59 Su-Shee draegtun: I already read it before breakfast!
09:00 draegtun Su-Shee: Hope if didn't upset the breakfast :-)
09:00 Trey joined #perl6
09:02 Su-Shee no, not at all.
09:03 Su-Shee though every time I read something like this I keep thinking how much a good book about contemporary oo mixed with meta programming NOT based on Java is needed...
09:04 draegtun Su-Shee: I agree.  Perl needs a good meta programming book methinks
09:04 mathw draegtun: thanks for that, I am reading now...
09:05 draegtun mathw: Thanks for reading, hope you enjoy
09:05 Su-Shee draegtun: I went through the shelf with "OO" recently .. all java. annoying.
09:06 mathw draegtun: Mmm nice. I did find your consistent use of {} for interpolation interesting.
09:06 dakkar joined #perl6
09:08 draegtun mathw: thanks.  I think I was just keeping it consistent to original Ruby/Javascript examples
09:09 sjohnson hi matt!
09:11 mathw draegtun: It might lead a few people to think it's compulsory even for simple scalars, but maybe I'm just being twitchy and paranoid
09:11 mathw sjohnson: hi
09:11 mathw draegtun: They can always be informed otherwise
09:13 draegtun draegtun: I see... I thought {} were compulsory ;-)
09:13 draegtun mathw: I see.. I thought  {} were compulsory  (oops!)
09:15 mathw no, ordinary scalars interpolate as in Perl 5
09:17 mathw {} is for more complex things like method calls and arrays
09:17 draegtun mathw: cool.   Obviously reading an old doc again :(
09:17 mathw I don't think they were ever compulsory
09:17 mathw Unless they were for a time in the period where I wasn't paying attention
09:20 JohnDoe365 joined #perl6
09:20 JohnDoe365 left #perl6
09:30 rekhajos joined #perl6
09:31 jogla_ joined #perl6
09:37 draegtun mathw: Well everything on the web isn't always true :)
09:37 draegtun mathw: I've amended my gist accordingly:   http://gist.github.com/276591
09:37 draegtun mathw: only place I needed the {} was on   "{$.name}'s colour is $colour_name "   (same reason as in Perl5)
09:37 draegtun mathw: I'll add a comment to my blog post referring to this gist
09:45 moritz_ good morning
09:55 redicaps1 joined #perl6
09:57 mathw draegtun: Great stuff
09:57 zamolxes_ joined #perl6
09:58 moritz_ aye, draegtun++
10:02 JimmyZ joined #perl6
10:06 mberends joined #perl6
10:07 baest joined #perl6
10:08 sbp joined #perl6
10:12 meneldor joined #perl6
10:12 meneldor Hi all
10:12 Supaplex all is on vacation
10:13 pugs_svn r29533 | mberends++ | [vill] Code generator groundwork for 'my $foo="bar";'. Various parts are now awaiting a formal runtime metamodel...
10:15 ssm joined #perl6
10:16 ssm joined #perl6
10:21 cognominal joined #perl6
10:27 payload joined #perl6
10:29 drbean joined #perl6
10:30 cognominal joined #perl6
10:42 meppl joined #perl6
11:13 jaldhar joined #perl6
11:26 go|dfish joined #perl6
11:31 barney joined #perl6
12:00 SmokeMachine joined #perl6
12:04 bluescreen joined #perl6
12:22 cotto_w0rk joined #perl6
12:29 payload joined #perl6
12:32 ruoso joined #perl6
12:50 clintongormley joined #perl6
12:53 cognominal joined #perl6
13:03 ssm joined #perl6
13:23 soupdragon joined #perl6
13:32 plainhao joined #perl6
13:34 takadonet joined #perl6
13:34 takadonet morning all
13:37 colomon morning!
13:38 takadonet colomon: alive and well sir?
13:39 colomon not yet slain by this cold, anyway. :)
13:40 jnthn eww cold :-(
13:40 korpenkraxar joined #perl6
13:40 jnthn Get well soon.
13:40 * jnthn 's is better today than yesterday.
13:41 colomon It's been a whole week now, so I think it's reached the point where I have to pretend it's better and just get on with life.
13:43 colomon Is rakudo supposed to have a release next week?
13:45 jnthn I guess so.
13:46 colomon eeek!
13:50 synth joined #perl6
13:55 payload joined #perl6
14:04 lichtkind joined #perl6
14:05 bluescreen joined #perl6
14:17 y3llow joined #perl6
14:19 Slug joined #perl6
14:20 nihiliad joined #perl6
14:35 Baggiokwok joined #perl6
14:53 ash_ joined #perl6
15:01 ash_ joined #perl6
15:04 ash_ rakudo: my $a = List.new(1, 2, 3); say $a.perl; $a = list(1, 2, 3); say $a.perl;
15:05 p6eval rakudo 3867ff: []␤[1, 2, 3]␤
15:05 ash_ should those be the same?
15:10 pnate joined #perl6
15:15 cdarroch joined #perl6
15:17 s1n joined #perl6
15:21 iblechbot joined #perl6
15:27 payload joined #perl6
15:29 ash_ rakudo: my $a = Array.new(1, 2, 3); say $a.perl;
15:29 p6eval rakudo 3867ff: []␤
15:29 ash_ i am begining to wonder what the "right" functionality of .new on List/Array is...
15:30 Exodist joined #perl6
15:30 colomon ash_: I would think those should be the same.
15:30 colomon I doubt it is spec'd one way or another...
15:30 ash_ yeah, digging in S32-Containers i haven't seen any specs on .new for List/Array
15:30 colomon This is where we get to use our judgement and influence the future.  :)
15:31 am0c joined #perl6
15:32 ash_ rakudo: class Foo { submethod BUILD(*@args) { say @args.perl; } }; Foo.new(1, 2, 3);
15:32 ash_ slurpies in BUILD seem to function funny
15:32 ash_ ng: class Foo { submethod BUILD(*@args) { say @args.perl; } }; Foo.new(1, 2, 3)
15:32 p6eval rakudo 3867ff:  ( no output )
15:32 p6eval ng b65331: Method 'perl' not found for invocant of class 'Undef'␤current instr.: 'perl6;Array;_block3582' pc 240746 (src/gen/core.pir:20091)␤
15:33 ash_ i guess that's the next thing, should a slupry in a BUILD work?
15:33 ash_ i haven't seen that in the specs either
15:34 jnthn ash_: No, you probably want to do something like (if you want List.new(1,2,3) to be like list(1,2,3)
15:35 jnthn method new(*@values) { self.bless(values => @values) }; submethod BUILD(:@values) { ... }
15:35 jnthn That is, transform the positionals into a single named arg that BUILD will receive.
15:36 ash_ hm, k
15:36 PerlJam but should List.new and Array.new be that way out of the box?
15:37 jnthn PerlJam: In what sense?
15:37 jnthn YOu mean, should they be spec'd to work like that?
15:37 PerlJam aye
15:37 ash_ ng: augment class List { method new(*@args) { say 'me'; } }; List.new(1, 2, 3) # any reason that's not dispatching to new(*@args)?
15:37 p6eval ng b65331:  ( no output )
15:38 colomon ash_: should be multi method, yes?  But I remember that not working yesterday for me...
15:39 jnthn ash_: No, that's...odd.
15:39 ash_ ng: augment class List { multi method new(*@args) { say 'me'; } }; List.new(1, 2, 3)
15:39 p6eval ng b65331:  ( no output )
15:39 * ash_ shrug *out of my knowledge of rakudo now*
15:40 colomon .oO(hope jnthn has a clue, 'coz I'm stumped...)
15:41 justatheory joined #perl6
15:41 PerlJam Can you turn a multi into an only via augment?
15:41 PerlJam (sure it'll cause breakage, but can it be done?)
15:46 ash_ ng: augment class List { method new(*%kwargs, *@args) { say 'me'; } }; List.new(1, 2, 3) # adding a named slurpy doesn't help, i tried it both as  the first and second argument too
15:46 p6eval ng b65331:  ( no output )
15:47 * jnthn has to go out for meeting with freinds now...back later...
15:47 ash_ cya jnthn
15:50 ash_ commuting ^
15:50 ash_ s/\^/&/
15:54 Psyche^ joined #perl6
15:58 alester joined #perl6
16:00 Slug left #perl6
16:02 hanekomu joined #perl6
16:05 jan_ joined #perl6
16:07 Exodist joined #perl6
16:08 KyleHa joined #perl6
16:12 soupdragon joined #perl6
16:13 cotto joined #perl6
16:18 soupdragon joined #perl6
16:28 jaldhar joined #perl6
16:28 ignacio_ joined #perl6
16:38 tylerni7 joined #perl6
16:42 jackyf joined #perl6
16:44 TimToady PerlJam: functions are not search for in packages (except maybe as a last resort); you may put an only in an inner scope that hids outer multies
16:44 TimToady *searched
16:46 TimToady (and by putting CORE as an outer lexical scope, this is how we guarantee that a user's function defs are future proof against new keywords)
17:10 ive joined #perl6
17:21 synth joined #perl6
17:24 KyleHa joined #perl6
17:38 hercynium joined #perl6
17:45 TimToady *hides
17:45 diakopter eh
17:46 TimToady (correcting a typo from an hour ago)
17:47 takadonet ...
17:47 diakopter '*hides' was correcting the typo
17:48 TimToady ablutions &
17:49 pincode joined #perl6
17:57 pugs_svn r29534 | kyle++ | [t/spec] Test for RT 72084: sub name beginning with last-
17:57 pugs_svn r29535 | kyle++ | [t/spec] Test for RT 72048: !~~ of role on instance is always true
18:04 Tene what's the motivation for asking "Was I called as a sub or as a method"?  I'm missing something.
18:11 pnate joined #perl6
18:22 stephenlb joined #perl6
18:23 kaare_ joined #perl6
18:24 uniejo joined #perl6
18:24 ive joined #perl6
18:24 PerlJam Tene: me too
18:25 PerlJam (at least I don't understand it in a Perl 6 context)
18:25 jackyf joined #perl6
18:26 TimToady he's using it to solve a P5 namespace collision that P6 doesn't have
18:26 TimToady (hence my remark yesterday about "namespace superstition")
18:27 ash_ joined #perl6
18:28 ash__ joined #perl6
18:28 ash_ joined #perl6
18:29 PerlJam I guess I was puzzled by "...I worry that the method/sub invocation isomorphism will be a trap just as in Perl 5."
18:30 * ruoso .oO( IRC is always more productive than twitter )
18:30 petsepes joined #perl6
18:30 petsepes hi
18:30 ruoso If someone really needs the distinction, he can install a different routine in the sub
18:30 PerlJam petsepes: greetings
18:32 TimToady it's a trap in P5 because P5 conflates the method and subroutine namespaces
18:33 lumi joined #perl6
18:33 TimToady P6 doesn't, so it's not a trap unless you write a custom dispatcher that confuses things
18:33 diakopter or a compiler/runtime that confuses things.
18:34 diakopter note the lack of closing </snark> tag
18:34 PerlJam TimToady: right, I was confused by the worry, because it seems you have to do it to yourself
18:34 PerlJam (in perl 6)
18:36 rgrau` joined #perl6
18:37 Chillance joined #perl6
18:39 TimToady the upside of the isomorphism is that a dispatcher never has to worry about what kind of thing it's calling, because dispatchers only ever call functions, even when that function is implementing a method
18:39 TimToady which makes it easy to write dispatcher that shoots yourself in the foot if you want to :)
18:39 ruoso and methods are not our by default anymore, right?
18:39 TimToady but also allows us to export methods without writing wrappers
18:39 TimToady correct
18:40 TimToady if you *do* declare it our, you may call it as a subroutine
18:40 TimToady (or my)
18:40 ruoso I think the issue is pretty much addressed...
18:40 PerlJam It's only a real problem if you're coming from a Perl 5 background and expect that you have do Perl 5ish things  :)
18:41 TimToady the downside from the VM perspective is that if your VM compartmentalizes, you end up writing wrappers anyway
18:41 ruoso and then the question is not "was this called as a method or as a sub", but "which was the dispatcher that called this?" since we could eventually have some other type of dispatcher
18:41 TimToady or you just don't rely on the VM's dispatcher from the user level
18:42 TimToady since it probably doesn't implement nextsame anyway...
18:42 TimToady from the P6 perspective, it's a no-brainer to say that underneath, everything gets invoked as a function
18:42 ruoso but I think that someone asking "which dispatcher was used here" can deal with implementation-specific stuff
18:43 TimToady well, a VM is not guaranteed to be able to tell you which dispatcher was used either, for that matter
18:44 ruoso it needs to some extent if it supports nextsame
18:45 TimToady we want to support custom dispatchers in any case; use of a specialized VM dispatcher would be an optimization from the general case
18:46 TimToady in some cases a very good optimization
18:46 TimToady but not at the expense of broken semantics
18:46 TimToady (unless you predeclare broken semantics :)
18:48 PerlJam a custom dispatcher seems like an "all bets are off" kind of thing.  If you're worried about shooting yourself in the foot, you've only got yourself to blame because the default dispatcher(s) protect you.
18:48 PerlJam Is that an accurate statement?
18:48 PerlJam (with some wiggle room on "protect"  :)
18:50 TimToady seems about right
18:50 TimToady but people coming from the world of P5 programming have a peculiar set of phobias which will take time to cure
18:51 ash_ rakudo: my $a = List.new(1, 2, 3); say $a.perl; my $b = list(1, 2, 3); say $b.perl; say $a == $b; # should this be true?
18:51 p6eval rakudo 3867ff: []␤[1, 2, 3]␤0␤
18:56 TimToady a great many Perl 5 "Best Practices" are really workarounds to design flaws, but prescriptive grammarians will continue to try to apply those workarounds after they are no longer needed.
18:57 PerlJam That first clause seems like a really good answer to why Perl 6 is so different from Perl 5
18:57 diakopter who really needs vowel points anyway
19:03 diakopter .oO( writing emitters specialized to particular permutations of its variations should eventually be resolved back to writing one emitter with lots of checks per instruction to-be-emitted. longer compilation time, but much more composably optimizable. )Oo.
19:10 mssm joined #perl6
19:15 tolkad joined #perl6
19:16 tolkad perl6: print "test";
19:16 p6eval elf 29535, pugs, rakudo 3867ff: test
19:16 tolkad !help
19:19 tolkad tell lambdabot @echo
19:19 tolkad @echo
19:19 tolkad ooh nvm
19:19 tolkad left #perl6
19:24 ash_ so, according the dispatch mechanism, if there are 2 methods, 1 with foo(*@args); and another with foo(*@args, *%kwargs); and you call foo(1, 2, 3); that should dispatch to the one only with the arg's slurpy, not kwargs, right?
19:30 TimToady it's arguable whether a (nilable) slurpy should be considered an extra constraint, but we really need an opinion from the implementors whether it's practical to make the distinction
19:30 TimToady the fact that theres another declaration effectively turns the * into a +, by that reckoning
19:31 TimToady which seems a bit bogus
19:31 TimToady why not just write the one method to handle the Nil case
19:33 ash_ so, 1 with foo ( ) # no params? you mean?
19:36 ash_ I guess i am trying to figure out why this isn't working:
19:36 ash_ ng: augment class List { multi method new(*@args) { say @args; } }; class Foo { multi method new(*@args) {say @args;}}; List.new(1, 2, 3); Foo.new(1, 2, 3);
19:36 p6eval ng b65331: 123␤
19:37 ash_ it should of printed 123 twice, not once
19:37 ash_ hmmm
19:37 ash_ might be a bug in the dispatcher, rather than an issue with the dispatching strategy
19:39 ash_ I thought that might of been related to the fact that Mu has a new(*@args, *%kwargs) but it doesn't look like thats the problem
19:40 tylerni7 joined #perl6
19:47 cotto_working joined #perl6
20:06 RaceCondition joined #perl6
20:06 PerlJam RaceCondition: greetings
20:06 RaceCondition PerlJam: hi again
20:07 RaceCondition quiet here
20:07 PerlJam RaceCondition: it's you imagination  :)
20:07 PerlJam (lots of out-of-#perl6-band communication happens too)
20:08 PerlJam RaceCondition: What's your interest in Perl 6?  Have you tried Rakudo yet?  Or was it more just curiousity about the state of things?
20:08 RaceCondition PerlJam: curiosity, yeah... I don't have the need and time to learn perl
20:09 PerlJam What languages are you already familiar with?
20:09 RaceCondition well most of the mainstream ones, but I've peeked into many
20:10 ash_ i personally like multi-methods and roles in perl 6, not many languages have either of those, and even fewer have both
20:11 ash_ that and you can define your own operators, that ones kinda cool
20:12 ash_ rakudo: sub postfix:<!>(Int $x) { [*] 1..$x }; say 5!;
20:12 p6eval rakudo 3867ff: 120␤
20:12 ash_ moritz_++ for that one
20:14 KyleHa I like type constraints.
20:15 KyleHa rakudo: sub postfix:<!>(Int $x) { [*] 1..$x }; say "five"!
20:15 p6eval rakudo 3867ff: Nominal type check failed for parameter '$x'; expected Int but got Str instead␤in Main (file src/gen_setting.pm, line 324)␤
20:16 ash_ rakudo: multi sub postfix:<!>(Int $x) { [*] 1..$x }; mutli sub postfix:<!>(Str $x) { $x.uc }; say "five"!; say 5!;
20:16 p6eval rakudo 3867ff: Could not find non-existent sub mutli␤in Main (file src/gen_setting.pm, line 324)␤
20:16 ash_ oops
20:18 ash_ rakudo: multi sub postfix:<!>(Int $x) { [*] 1..$x }; multi sub postfix:<!>(Str $x) { $x.uc }; say "five"!; say 5!;
20:18 p6eval rakudo 3867ff: FIVE␤120␤
20:18 ash_ silly spelling
20:19 KyleHa How hard is it to get Perl 6 to recognize 'mutli' as 'multi'?
20:20 ash_ macro mutli { 'multi' } ?
20:20 KyleHa Macros make me think of TeX.
20:20 ash_ they make me think #define
20:24 lichtkind can anybody here answer to me some things about proto regexen?
20:25 ash_ sure, we can try
20:40 RaceCondition how does Perl 6 compare with Lisp? I see it has macros and multimethods
20:46 ash_ in what respects? would you like to compare them in?
20:46 ash_ i think perl 6 has less ( )
20:47 ash_ well most of the time :P
20:47 KyleHa Perl 6 has more funny characters for some definitions of 'funny'.
20:48 ash_ perl 6's syntax doesn't fit on a 2"x"4 note card
20:48 ash_ i think
20:48 ash_ well maybe if you had a really good printer
20:48 RaceCondition so why does Lisp's syntax fit?
20:48 TimToady doesn't have any :)
20:49 RaceCondition oh, in that sense
20:49 ash_ lol lisp's syntax is very simple
20:49 RaceCondition I thought you mean "lisp code doesn't fit on a ..."
20:50 TimToady to the first approximation, Perl 6 is Lisp with a decent syntax, and minus a lot of assumptions about how lists should be represented :)
20:51 TimToady but that's also a vast oversimplification...
20:52 KyleHa I thought LISP was a vast oversimplification.
20:52 TimToady nevertheless, despite all the trappings of OO, Perl 6 is fundamentally more in the FP camp
20:52 alester joined #perl6
20:54 diakopter ENOPMSTILL
20:54 clintongormley joined #perl6
20:54 diakopter does anyone know when the Actions in an nqp-rx grammar are run?
20:56 TimToady I believe they are run at reduction time, but note that Perl 6 grammar isn't supposed to backtrack much.
20:57 KyleHa Is moritz_ around today?  I'd like to reorganize (or disorganize) S03-operators/smartmatch.t, but I don't want to overcrud the spectests.
20:57 TimToady there are still only two spots that we rely heavily on backtracking, and neither of them is likely to prove a performance problem.
20:58 KyleHa @seen moritz_
20:59 TimToady rakudo: say [+42].perl
20:59 p6eval rakudo 3867ff: [42]␤
20:59 TimToady there's one of 'em
21:00 TimToady rakudo: $_ = "foo"; say "$_.notamethod"
21:00 p6eval rakudo 3867ff: foo.notamethod␤
21:00 TimToady there's the other
21:01 ash_ in the second case, is that backtracking to find the most recent defintiion of $_ ?
21:01 TimToady no
21:01 TimToady it's distinguishing from this:
21:01 TimToady rakudo: $_ = "foo"; say "$_.notamethod()"
21:01 p6eval rakudo 3867ff: foo.notamethod()␤
21:01 TimToady well, it should be :)
21:02 ash_ oh, okay, so it has to string interpolation?
21:02 TimToady finding the end of the interpolation involves looking for trailing brackets of some kind or other
21:03 TimToady and not just the first brackets, but the last brackets
21:03 TimToady "$foo.bar().baz()"
21:04 TimToady or a more likely case, "$x[$y]{$z}"
21:04 sjohnson go to baktiz!!
21:09 frettled oh!
21:13 uniejo Is the interpolation length also depending on does Callable, Positional and does Associative ?
21:16 KyleHa Is dev.pugscode.org relocated or just out of the picture?
21:21 frettled KyleHa: if you're missing Trac, see the top post at howcaniexplainthis.blogspot.com :)
21:21 KyleHa frettled: Thanks, that's just what I was missing.
21:23 frettled Someone™ just needs to get enough tuits to fix the spam problem.
21:25 rgrau` joined #perl6
21:26 RaceCondition left #perl6
21:28 Woody2143 joined #perl6
21:31 lumi joined #perl6
21:32 KyleHa The first thing that pops into my mind is to block Google via robots.txt.
21:34 KyleHa The spammers are submitting bogus tickets, which I don't think anyone legitimately uses anyway, so lets amputate that.
21:34 PerlJam Starting with a new VM is probably the most important thing IMHO
21:34 frettled mm
21:34 PerlJam I'm a fan of clean slates where I can get them.
21:35 diakopter KyleHa: do you know anyone who was using dev.pugscode.org?  (and if you were, what were you using on it?)
21:36 KyleHa diakopter: I looked at the timeline to see recent commits to the pugs repo.  From there I'd look at diffs, etc.
21:36 diakopter oh
21:36 KyleHa That's how I kept up with spectest activity, back when I was keeping up.  It's been a while since I looked.
21:36 diakopter KyleHa: may I interest you in this instead?  http://perlcabal.org/svn/pugs/log
21:37 diakopter its rss feed has been <ahem> customized for use by pugs_svn
21:38 diakopter KyleHa: that SVN::Web installation is also on feather.
21:39 diakopter also, it's the one to which the irclog web ui constructs links
21:41 KyleHa Oh, very nice.  Thank you, diakopter++
21:42 ash_ rakudo: class List is also { method new(*@args) { say 'hi'} }; List.new(1, 2, 3);
21:42 p6eval rakudo 3867ff:  ( no output )
21:42 * diakopter fights cisco anyconnect
21:44 pugs_svn r29536 | kyle++ | [t/spec] split S03-operators/smartmatch.t into S03-smartmatch/*.t
21:44 KyleHa OK, I'm going for forgiveness over permission.
21:45 ash_ i think there is something wrong with how 'new' is getting dispatched
21:45 ash_ in both rakudo and ng
21:46 PerlJam rakudo: class Foo is List { method new(*@args) { say "hi" } }; Foo.new(1,2,3);
21:47 p6eval rakudo 3867ff:  ( no output )
21:47 PerlJam blame jnthn  :)
21:47 ash_ maybe its augmenting/is also 's fault
21:48 PerlJam ash_: Well, I just tried inheritance and the result was the same.
21:50 PerlJam although that worked fine on my local perl6  (not sure if it's ng or master since I haven't compiled it in a while)
21:55 mssm joined #perl6
22:00 dalek rakudo/ng: a57ebba | (Kyle Hasselbacher)++ | t/spectest.data:
22:00 dalek rakudo/ng: [spectest.data] update according to pugs r29536
22:00 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/a​57ebba0f2b4ba6a85e14da2051de9877c1fa878
22:00 ash_ PerlJam: if you use is also its master
22:01 ash_ but also rakudo in here times out if you define a class
22:01 ash_ it seems like its okay if you don't define a new method in an augment or in an 'is also'
22:01 PerlJam ash_: I meant the inheritance example ... but that's a good litmus test to find out which version I have  :)
22:06 Exodist joined #perl6
22:07 cotto_w0rk joined #perl6
22:07 cotto joined #perl6
22:07 ash_ i wonder why rakudo: still time's out on class definitinos
22:10 meppl joined #perl6
22:16 meppel joined #perl6
22:16 colomon___ joined #perl6
22:29 snearch joined #perl6
22:41 szabgab joined #perl6
22:41 soupdragon joined #perl6
22:42 simcop2387_ joined #perl6
22:42 Trey joined #perl6
22:42 krakan joined #perl6
22:45 jaldhar joined #perl6
22:50 akl joined #perl6
22:50 silug joined #perl6
22:50 breinbaa1 joined #perl6
22:51 lumi joined #perl6
22:51 sjn joined #perl6
22:52 dukelet0 joined #perl6
22:54 Juerd joined #perl6
22:55 Infinoid joined #perl6
22:57 PerlJam joined #perl6
23:00 ash_ Mu == undef? right?
23:01 silug joined #perl6
23:01 mdxi joined #perl6
23:02 frettled not quite
23:02 frettled But it's one of the undef-like values, depending on type.
23:08 bbkr joined #perl6
23:11 dukeleto joined #perl6
23:11 xenoterracide joined #perl6
23:12 pugs_svn joined #perl6
23:12 phenny joined #perl6
23:15 sjohnson joined #perl6
23:15 pjcj_ joined #perl6
23:15 mdxi joined #perl6
23:15 silug joined #perl6
23:15 PerlJam joined #perl6
23:15 Infinoid joined #perl6
23:15 Juerd joined #perl6
23:15 sjn joined #perl6
23:15 lumi joined #perl6
23:15 akl joined #perl6
23:15 krakan joined #perl6
23:15 soupdragon joined #perl6
23:15 szabgab joined #perl6
23:15 meppel joined #perl6
23:15 cotto_w0rk joined #perl6
23:15 mssm joined #perl6
23:15 Woody2143 joined #perl6
23:15 rgrau` joined #perl6
23:15 alester joined #perl6
23:15 Chillance joined #perl6
23:15 jackyf joined #perl6
23:15 kaare_ joined #perl6
23:15 pnate joined #perl6
23:15 jan_ joined #perl6
23:15 hanekomu joined #perl6
23:15 Patterner joined #perl6
23:15 justatheory joined #perl6
23:15 iblechbot joined #perl6
23:15 lichtkind joined #perl6
23:15 ssm joined #perl6
23:15 go|dfish joined #perl6
23:15 drbean joined #perl6
23:15 baest joined #perl6
23:15 zamolxes_ joined #perl6
23:15 stepnem joined #perl6
23:15 elmex joined #perl6
23:15 dalek joined #perl6
23:15 mikehh joined #perl6
23:15 ilogger2 joined #perl6
23:15 presh_ joined #perl6
23:15 BinGOs joined #perl6
23:15 lestrrat joined #perl6
23:15 Maddingue joined #perl6
23:15 jql joined #perl6
23:15 gfldex joined #perl6
23:15 c9s joined #perl6
23:15 felipe joined #perl6
23:15 saschi joined #perl6
23:15 yath joined #perl6
23:15 Gothmog_ joined #perl6
23:15 RichiH joined #perl6
23:15 PacoLinux joined #perl6
23:15 constant joined #perl6
23:15 yahooooo joined #perl6
23:15 pjcj joined #perl6
23:15 nsh joined #perl6
23:15 eiro joined #perl6
23:15 arnsholt joined #perl6
23:15 renormalist joined #perl6
23:15 astinus joined #perl6
23:15 spinclad joined #perl6
23:15 kolibrie joined #perl6
23:15 gabiruh joined #perl6
23:15 zykes- joined #perl6
23:15 meteorjay joined #perl6
23:15 LionMade1fLions joined #perl6
23:15 dukeleto joined #perl6
23:15 tomaw_ joined #perl6
23:15 xinming joined #perl6
23:15 ingy joined #perl6
23:15 mj41 joined #perl6
23:15 hicx174 joined #perl6
23:15 orafu joined #perl6
23:15 hatsefla1s joined #perl6
23:15 jnthn joined #perl6
23:15 allbery_b joined #perl6
23:15 cls_bsd joined #perl6
23:15 perigrin_ joined #perl6
23:15 buubot joined #perl6
23:15 pnu joined #perl6
23:15 skeptical_p joined #perl6
23:15 cxreg joined #perl6
23:15 rgrau joined #perl6
23:15 kst joined #perl6
23:15 xenoterracide joined #perl6
23:15 ascent_ joined #perl6
23:15 tkr joined #perl6
23:15 Helios-- joined #perl6
23:15 betterworld joined #perl6
23:15 omega__ joined #perl6
23:15 idemal joined #perl6
23:15 c1sung joined #perl6
23:15 p6eval joined #perl6
23:15 charsbar_ joined #perl6
23:15 TimToady joined #perl6
23:15 awwaiid joined #perl6
23:15 IRSeekBot joined #perl6
23:15 Grrrr joined #perl6
23:15 cosimo joined #perl6
23:15 Caelum joined #perl6
23:15 moritz_ joined #perl6
23:15 wolverian joined #perl6
23:15 tarbo2_ joined #perl6
23:15 mathw joined #perl6
23:15 sbp joined #perl6
23:15 GeJ joined #perl6
23:15 GeJ left #perl6
23:15 avar joined #perl6
23:15 literal joined #perl6
23:16 soupdragon left #perl6
23:17 kst` joined #perl6
23:17 nsh_ joined #perl6
23:17 rgrau joined #perl6
23:20 Helios-- joined #perl6
23:21 constant_ joined #perl6
23:21 cognominal joined #perl6
23:21 hicx174_ joined #perl6
23:21 LionMadeOfLions joined #perl6
23:21 OuLouFu joined #perl6
23:21 yahooooo joined #perl6
23:21 xenoterracide_ joined #perl6
23:21 synth joined #perl6
23:21 sunnavy joined #perl6
23:21 cj joined #perl6
23:21 s1n joined #perl6
23:21 Khisanth joined #perl6
23:21 jjore joined #perl6
23:21 kcwu joined #perl6
23:21 hugme joined #perl6
23:22 zamolxes joined #perl6
23:24 eiro joined #perl6
23:24 araujo joined #perl6
23:24 lisppaste3 joined #perl6
23:24 REPLeffect_ joined #perl6
23:24 yves joined #perl6
23:24 mtve joined #perl6
23:24 meteorjay joined #perl6
23:24 PacoLinux_ joined #perl6
23:25 sjohnson TimToady: those two lines u wrote might end up as messages in an irc bottle
23:29 ash_ colomon___: ping?
23:29 silug joined #perl6
23:30 dukeleto joined #perl6
23:33 OuLouFu joined #perl6
23:34 GeJ joined #perl6
23:36 rgrau joined #perl6
23:37 colomon___ ash_: pong?
23:37 ash_ I fixed List.new, i have  patch for it
23:37 colomon___ \o/
23:38 ash_ i figured i could bug you instead of jnthn, also he's not here :P
23:38 colomon___ sure
23:38 ash_ http://gist.github.com/278521 is a copy of it, or i can email it to someone
23:39 colomon___ I will be slightly erratic for a few (reading to son)...
23:39 ash_ no worries
23:39 zamolxes_ joined #perl6
23:40 astinus joined #perl6
23:40 orafu joined #perl6
23:40 stepnem joined #perl6
23:42 cj joined #perl6
23:45 colomon___ Are there tests?
23:45 colomon___ :)
23:45 ash_ not yet, i'll do those next
23:46 ash_ List.new(1, 2, 3) should ~~ list(1, 2, 3)
23:46 ash_ I'll work on some though
23:48 colomon___ m u
23:50 ingy joined #perl6
23:54 meteorjay joined #perl6
23:54 elmex joined #perl6
23:57 colomon___ yay, works for Array too!
23:59 ash_ should work for anything that inherits from List
23:59 tylerni7 joined #perl6
23:59 cj joined #perl6
23:59 PacoLinux_ joined #perl6
23:59 synth joined #perl6
23:59 sunnavy joined #perl6
23:59 s1n joined #perl6
23:59 Khisanth joined #perl6
23:59 jjore joined #perl6
23:59 kcwu joined #perl6
23:59 hugme joined #perl6
23:59 ash_ so apparently augment and 'is also' can't add 'new' to a class
23:59 ash_ ng: class Foo { }; augment class Foo { method new(*@args) { say 'hi'} }; Foo.new(1, 2);
23:59 p6eval ng a57ebb:  ( no output )

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

Perl 6 | Reference Documentation | Rakudo