Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-08-22

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:03 aindilis joined #perl6
00:20 Holy_Cow joined #perl6
00:21 Holy_Cow left #perl6
00:24 wolfman2000 joined #perl6
00:47 jaldhar joined #perl6
00:54 envi joined #perl6
01:13 aber joined #perl6
01:26 Tedd1 joined #perl6
01:32 Trashlord joined #perl6
01:40 woosley joined #perl6
01:46 benabik Okay, I'm lost.  I can't figure out why special_variable:sym['$<'] is getting generated as special_variable:sym<Capture[0x…]>
01:54 jaldhar joined #perl6
01:54 jaldhar joined #perl6
02:06 REPLeffect joined #perl6
02:41 odoacre joined #perl6
02:52 rml joined #perl6
02:59 jaldhar joined #perl6
03:06 [Coke] something getting stringified that shouldn't?
03:13 benabik [Coke]: Yeah.  I'm thinking it's some subclass of PCT::Node (they still stringify as Captures)
03:13 benabik [Coke]: But I'm not sure where it's coming from.  It looked to me that it should be a string.
03:23 Su-Shee_ joined #perl6
03:43 soh_cah_toa is there anyway to interpolate arrays into character classes? the subscript brackets keep screwing up the character class's brackets and i get "regex assertion not terminated by angle bracket"
03:48 abercrombie joined #perl6
04:08 birdwindupbird joined #perl6
04:12 daniel-s joined #perl6
04:12 satyavvd joined #perl6
04:39 satyavvd joined #perl6
04:43 [Coke] nom:1.say
04:43 [Coke] evalbot?
04:43 moritz nom: 1.say
04:43 p6eval nom: OUTPUT«1␤»
04:43 moritz good morning
04:44 moritz [Coke]: p6eval is picky about spaces
04:44 [Coke] danke.
04:47 moritz it's picky because otherwise nqp::unbox_s(...) at the start of the line would trigger the 'nqp:' target :-)
05:00 envi joined #perl6
05:55 masak joined #perl6
05:55 masak morning, #perl6
05:56 tadzik morning masak
05:57 moritz good morning tadzik, masak, #perl6
05:57 masak another beautiful day in the future.
05:57 tadzik speaking of time-travel, I feel like getting back to sleep :)
05:59 * moritz too
06:00 masak it's too late, it's already morning. :P
06:00 masak you'll have to go to bed earlier tonight.
06:01 masak moritz is expempted from mockery because of understandable circumstances.
06:01 moritz :-)
06:01 tadzik :)
06:02 tadzik I could maybe blog about the presentation software, this could motivate me to actually write it
06:02 wtw joined #perl6
06:04 moritz that typically doesn't help
06:05 moritz having announced to do something reduces the chances of actually doing it
06:06 moritz my GSOC dashboard says "You can now apply to Google Summer of Code.". Why, thank you!
06:07 tadzik quick, you still would be able to finish it! :)
06:07 tadzik there's like 13 hours remaining, or so :)
06:26 drbean joined #perl6
06:27 jevin joined #perl6
06:35 REPLeffect joined #perl6
06:39 Tedd1 joined #perl6
06:41 koban joined #perl6
06:41 koban left #perl6
06:50 * moritz formally hands the Double Bacon Badge of Successful GSoC to tadzik++
07:01 Caldrin left #perl6
07:03 daniel-s joined #perl6
07:04 pnu joined #perl6
07:13 wamba joined #perl6
07:15 masak tadzik++
07:23 dalek roast: 398993f | moritz++ | S32-num/cool-num.t:
07:23 dalek roast: start to fudge cool-num.t for rakudo
07:23 dalek roast: review: https://github.com/perl6/roast/commit/398993f0d9
07:24 dalek roast: f4ad278 | moritz++ | S32-num/cool-num.t:
07:24 dalek roast: fix some test descriptions
07:24 dalek roast: review: https://github.com/perl6/roast/commit/f4ad27826a
07:37 koban joined #perl6
07:37 koban left #perl6
07:42 jnthn morning o/
07:48 mj41 joined #perl6
07:49 im2ee joined #perl6
07:58 moritz \o
08:02 orafu joined #perl6
08:19 masak jnthn: mroing
08:19 masak in ar.
08:20 JimmyZ joined #perl6
08:21 JimmyZ moning jnthn
08:22 JimmyZ morning
08:22 jnthn .oO( moaning jnthn )
08:22 dalek rakudo/nom: 3b66c0f | moritz++ | / (5 files):
08:22 dalek rakudo/nom: lots of Cool methods, run cool-num.t
08:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b66c0fb0c
08:22 jnthn masak: Argentina? :)
08:23 * JimmyZ has been waiting for jnthn++'s slides many days
08:24 SHODAN joined #perl6
08:24 jnthn JimmyZ: sorry 'bout that. I'll try and get that fixed up tonight.
08:25 jnthn (and thanks for the reminder :))
08:25 daxim joined #perl6
08:25 JimmyZ jnthn: thanks
08:35 masak jnthn: http://howisbabbyformed.com/
08:42 jnthn masak: :P
08:42 jnthn I tried to forget it but the memory frigth back
08:44 OuLouFu joined #perl6
08:44 dakkar joined #perl6
09:01 moritz nom: enum Order (Decrease => -1, Same => 0, Increase => 1); say Order::Increase
09:01 masak jnthn: my pary are with the memory.
09:01 p6eval nom: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Orde"␤»
09:01 moritz nom: enum Order Decrease => -1, Same => 0, Increase => 1; say Order::Increase
09:01 p6eval nom: OUTPUT«Could not find sub &Order␤  in mu <anon> at /tmp/dcZjcw36zA:1␤  in mu <anon> at /tmp/dcZjcw36zA:1␤␤»
09:01 moritz any way to work around that?
09:05 jnthn nom: enum Order (:Increase(-1), :Same(0), :Increase(1)); say Order
09:06 p6eval nom: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Orde"␤»
09:06 jnthn hmm
09:06 jnthn nom: enum Order (:Same(0), :Increase(1)); say Order
09:06 p6eval nom: OUTPUT«Order()␤»
09:06 jnthn oh :/
09:06 jnthn -1 is not parsed as a literal.
09:07 moritz so it'd need constant folding to work out :(
09:07 jnthn Yeah, that's...unfortunate.
09:07 rhr joined #perl6
09:08 moritz evil idea: could I generate it with a wrong first value, and then monkey-patch it out with nqp:: calls later on?
09:08 jnthn O.O
09:08 jnthn It's just $!value
09:08 jnthn iirc
09:09 jnthn See src/core/Enumeration.pm
09:09 jnthn We need a "real fix" there of course.
09:10 jnthn moritz++ # evil :)
09:11 cognominal jnthn, what version of nom is needed to use your grammar debuger tool?
09:11 cognominal jnthn++ btw
09:11 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_deco​ntainerize(Order::Decrease), Enumeration, '$!value).say
09:11 p6eval nom: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
09:11 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_deco​ntainerize(Order::Decrease), Enumeration, '$!value').say
09:11 p6eval nom: OUTPUT«===SORRY!===␤error:imcc:The opcode 'perl6_decontainerize_p' (perl6_decontainerize<1>) was not found. Check the type and number of the arguments␤    in file '(file unknown)' line 367␤»
09:12 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decont​ainerize__PP(Order::Decrease), Enumeration, '$!value').say
09:12 p6eval nom: OUTPUT«Can not get non-existant attribute '$!value' on class 'Enumeration'␤  in mu <anon> at /tmp/2thwWzIpLV:1␤  in mu <anon> at /tmp/2thwWzIpLV:1␤␤»
09:12 jnthn cognominal: Should run on latest
09:13 jnthn moritz: Enumeration is a role
09:13 jnthn moritz: Try Order instead.
09:13 moritz ok
09:13 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decont​ainerize__PP(Order::Decrease), Order, '$!value').say
09:13 p6eval nom: OUTPUT«2␤»
09:13 jnthn mwaha.
09:14 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::bindattr(pir::perl6_decont​ainerize__PP(Order::Decrease), Order, '$!value', -1); say Order::Decrease
09:14 p6eval nom: OUTPUT«Order::Decrease␤»
09:14 moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::bindattr(pir::perl6_decont​ainerize__PP(Order::Decrease), Order, '$!value', -1); say +Order::Decrease
09:14 p6eval nom: OUTPUT«-1␤»
09:14 * moritz grins his most evil grin
09:14 wamba joined #perl6
09:17 cognominal is there a way to have both nom and master installed on a system. My concernt is stuff in ~/.perl6
09:17 moritz that's no problem as long as you don't install any modules :-)
09:20 _twitch joined #perl6
09:37 [particle] joined #perl6
09:38 moritz jnthn: meh, when I try to do that in the setting, the setting compilation hangs
09:40 jnthn just the enum, or the change of value too?
09:41 jnthn How late in the setting did you add the enum?
09:41 moritz both
09:41 moritz and very late (terms.pm)
09:41 cognominal --target=parse is broken in rakudo.  Got  Could not locate compile-time value for symbol StaticLexPad
09:42 cognominal s/rakudo/rakudo nom/
09:45 jnthn nom: enum Foo <>;
09:45 p6eval nom: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list at line 1, near "<>;"␤»
09:45 jnthn nom: enum Foo < >;
09:45 p6eval nom:  ( no output )
09:45 jnthn moritz: Does an empty enum work, ooc?
09:45 jnthn May help narrow things down.
09:45 jnthn We don't have any enums in the setting yet, so could just be a circularity thing.
09:46 moritz jnthn: I'll try
09:46 jnthn cognominal: --target=parse may take some fixing...
09:47 moritz hm, maybe my judgement was premature, because it seems that memory usage is growing slower than I remebered
09:48 wamba joined #perl6
09:56 agentzh joined #perl6
09:58 Trashlord joined #perl6
10:00 drbean joined #perl6
10:02 moritz jnthn: empty enum in the setting works, retrying my previous attempt now
10:09 tadzik ooh!
10:09 tadzik moritz++; masak++ # excellent mentors
10:10 moritz tadzik: thanks; there wasn't too much to mentor, since you got along just fine on your own most of the time :-)
10:11 JimmyZ tadzik++, awesome work
10:12 tadzik jnthn++ # excellent non-mentor help too :)
10:12 moritz and I think pmichaud++ fixed the double bacon bug :-)
10:13 masak double chunky bacon! \o/
10:14 tadzik and yet I still like bacok :)
10:16 tadzik even bacon
10:21 MayDaniel joined #perl6
10:35 jnthn moritz: OK...hm.
10:35 jnthn moritz: I suspect there's something nasty going on then but at least that narrows it down a little.
10:37 Trashlord joined #perl6
10:41 jnthn Well, quite a bit actually...especially if "say Order" works afterwards.
11:03 pernatiy joined #perl6
11:05 moritz say Order.WHAT worked
11:09 jnthn And say Order did not?
11:09 jnthn That'd be...weird.
11:09 jnthn Given that really Order === Order.WHAT
11:09 jnthn Or even =:=
11:10 moritz jnthn: I haven't tried it
11:11 moritz jnthn, pmichaud: how would I best hide routines from backtraces?
11:11 moritz I could make a Perl 6 level trait and check for that, but it feels kinda expensive, given that we have parrot level annotations
11:12 moritz can I add something to those annotations from within Perl 6 code?
11:12 jnthn moritz: What sort of routine do you want to hide?
11:12 moritz jnthn: die() for example, and maybe helper routines like at_pos, reify etc.
11:13 jnthn Well, producing a backtrace isn't really performance-sensitive per se.
11:13 moritz jnthn: right, that's not what I'm worried about
11:14 apejens unless you're java, and do a lot of it
11:14 apejens :p
11:14 moritz jnthn: I don't want bloat setting functions
11:14 jnthn moritz: OK, but I assume we're talking about a handful of them?
11:14 moritz jnthn: not sure yet, but I don't think there are too many of them
11:14 jnthn moritz: Plus all it needs is a $r does role { method backtrace_hidden() { True } }
11:15 jnthn Which isn't really so costly.
11:15 moritz then I'll try that
11:15 jnthn It doesn't need any extra storage allocated, for example
11:15 jnthn It's just a mixin.
11:15 jnthn e.g. a type change to a subtype with an extra method.
11:16 * JimmyZ hates  java
11:23 moritz Could not find sub &infix:<does>
11:23 moritz called from Sub 'trait_mod:<is>' pc 50 ((file unknown):28258001) (src/stage2/gen/NQPHLL.pm:1050)
11:23 moritz urks
11:23 moritz so, die() needs to come after operator.pm
11:24 moritz that is... late
11:25 jnthn Welcome to bootstrapping.
11:25 moritz jnthn: any objections to moving infix:<does> (and maybe infix:<but> for consistentcy) to some earlier place?
11:25 jnthn Well, you could always move infix:<does> and infix:<but>
11:25 moritz :-)
11:25 moritz src/core/early-operators.pm or something?
11:26 jnthn Well, we have some operators in Any.pm or Mu.pm already I think
11:26 jnthn So maybe there.
11:26 moritz ok
11:27 MayDaniel joined #perl6
11:36 moritz $ ./perl6 -e 'sub f() is hidden_from_backtrace { }; say &f.is_hidden_from_backtrace'
11:36 moritz Bool::True
11:37 moritz now to get that beast working inside the setting...
11:37 jnthn Traits really should work inside the setting...
11:56 moritz control.pm comes before Mu.pm, that seems to be the problem
11:56 * moritz switches
11:57 wamba left #perl6
11:59 wamba joined #perl6
12:08 moritz bah, even putting Mu before control.pm still causes the same error
12:11 koban joined #perl6
12:11 koban left #perl6
12:13 * moritz hates circularity
12:18 flussence I let this run for 3 minutes then did Ctrl+C, can anyone make sense of it? https://gist.github.com/1162247
12:19 moritz nom: say now
12:19 p6eval nom: OUTPUT«Instant:1314015591.08327␤»
12:20 moritz flussence: maybe the REPL tries some parrot-level stringification?
12:20 moritz flussence: try
12:20 moritz nqp::unbox_s(now.Str)
12:20 moritz on the REPL
12:21 moritz (my rakudo currently recompiles, so I can't test it :)
12:21 flussence nope, same thing there.
12:21 moritz huh.
12:21 flussence this works fine on everything but my netbook...
12:22 moritz jnthn: it seems I can't mix into Sub objects before class Sub was properly declared...
12:23 * moritz tries to declare Sub earlier
12:26 takadonet morning all
12:30 flussence takadonet: would you be ok with me pointing the ecosystem url for text-tabs-wrap to my own repo?
12:31 takadonet flussence: np
12:31 flussence k :D
12:33 tzhs joined #perl6
12:42 * moritz accidentally composed the trait into the type object, not into the routine
12:42 moritz and then I wondered why all unrelated subs had that new method
12:50 ab5tract joined #perl6
12:52 moritz $ ./perl6 -e ' say &die.is_hidden_from_backtrace'           Bool::True
12:52 moritz $ ./perl6 -e ' say &uc.?is_hidden_from_backtrace'
12:52 moritz Nil
13:12 tadzik oh, submitting code samples to google begins on 30th
13:13 jnthn moritz: yay :)
13:13 jnthn moritz: (sorry I wasn't more responsive - had $meeting)
13:14 pernatiy joined #perl6
13:14 moritz jnthn: no problem
13:15 moritz jnthn: my current approach is to use $r.HOW.mixin in the trait directly, since all my attempts to have it redispatch to 'does' have failed
13:16 jnthn moritz: that's fine also
13:16 jnthn Direct MOP usage to break circularity is fine.
13:16 tadzik are we going to get rid of circularity one fine day?
13:17 jnthn er
13:17 jnthn what?
13:17 jnthn :)
13:17 moritz that question is a bit like "are we going to stop breathing at some day? it occasionally hurts my lungs"
13:17 moritz :-)
13:18 tadzik oh, I caused p6c confusion
13:18 tadzik nono, I mean, hmm
13:18 tadzik I don't know, don't mind me :)
13:18 tadzik I'm thinking bit slowly today
13:19 tadzik bah, nevermind :)
13:19 moritz well, the question isn't quite so absurd, because there might be less circularity problems if you build on top of a complete Perl 6 compiler
13:19 tadzik that was my train of thought
13:20 TimToady I said that last week :)
13:20 moritz where you can reuse parts of the host compiler until you added them to the compiler that's being compiled
13:20 moritz TimToady: that's cheating, you time-traveled last week :-)
13:20 Holy_Cow joined #perl6
13:21 TimToady though I didn't say it online, so it doesn't count; I only said it in jnthn++'s class to cotto++
13:22 moritz but I guess even then you'll need a circularity chain saw, it might just be less visible
13:22 jnthn (reuse parts of the host compiler) that needs real care; I had some nasty bugs in NQP while refactoring it to do compile time meta-objects that boiled down to things in one compiler generation referencing things in the previous one.
13:25 * flussence has a vague and insane idea about using std and Graph::Directed to figure out which bits are actually circular...
13:25 moritz flussence: much of the circularity is really at (compilation) run time
13:25 moritz flussence: for example you need a name of a method to be installed, and that name is a Str
13:26 moritz it doesn't show up in the parse tree at all that that's a Str
13:26 flussence oh, that is a bit more difficult than I imagined :)
13:26 TimToady and std was really just a proof-of-concept, and cheats all over the place for anything not grammar related
13:27 moritz flussence: that's always the case with circularity problems
13:27 TimToady niecza would be more like what you're looking for, since it's a bit less vague and insane
13:27 moritz flussence: the ones you know of are perhaps 10%, and the rest 90% crop up as nasty surprises :-)
13:31 TimToady and of those, 90% are surprisingly nasty :)
13:31 jnthn Tell me about it...
13:32 * jnthn still didn't find the weird role composition + Str + infix related one... :/
13:37 TimToady one gets more of an idea why the Lisps and Smalltalks of the world moved over to a model where you just snapshot it and rerun the snapshot: "Ooh, it works now for some reason, don't touch anything!"
13:38 jnthn Well, Lisp at least, afaik, doesn't really have a BEGIN time / run time distinction
13:38 jnthn Beyond "the last bit of runtime is the next bits BEGIN time" :)
13:39 bbkr_ rakudo: ()>>.^methods.WHAT.say; # looks like a bug to me, if parcel is empty nothing should be printed.
13:39 p6eval rakudo a55346: OUTPUT«Parcel()␤»
13:39 TimToady yes, well, that's one of the ways in which we would like Paul Graham to think that Perl 6 is a lot like Lisp
13:39 bbkr_ nom: ()>>.^methods.WHAT.say;
13:39 p6eval nom: OUTPUT«Parcel()␤»
13:39 jnthn bbkr_: Looks correct to me.
13:40 moritz what should it return instead? Nil?
13:40 jnthn I don't think that >>-ing over an empty thing should return Nil.
13:40 TimToady it just returns another (), I expect
13:40 * moritz neither
13:40 jnthn Right.
13:41 moritz was more of a question to bbkr_
13:41 bbkr_ IMO it should behave like ()>>.WHAT.say - the part after ">>" should not be executed.
13:41 _twitch joined #perl6
13:41 jnthn nom: ()>>.WHAT.say
13:41 p6eval nom: OUTPUT«Parcel()␤»
13:41 TimToady nom: ().WHAT.say
13:41 p6eval nom: OUTPUT«Parcel()␤»
13:41 jnthn >> only affects the . immediately after it.
13:42 TimToady nom: ().perl.say
13:42 p6eval nom: OUTPUT«()␤»
13:42 jnthn nom: ()>>.say
13:42 p6eval nom:  ( no output )
13:42 TimToady nom: ()».perl.say
13:42 p6eval nom: OUTPUT«␤»
13:42 jnthn nom: ()>>.WHAT>>.say
13:42 p6eval nom: OUTPUT«Cannot access attributes in a type object␤  in method flat at src/gen/CORE.setting:3205␤  in sub hyper at src/gen/CORE.setting:7140␤  in method dispatch:<hyper> at src/gen/CORE.setting:650␤  in mu <anon> at /tmp/d4LNXgTJwx:1␤  in mu <anon> at /tmp/d4LNXgTJwx:1␤␤»…
13:42 jnthn er :)
13:42 TimToady nom: ()».foo.perl.say
13:42 p6eval nom: OUTPUT«()␤»
13:43 jnthn Missing :D somewhere, me thinks.
13:43 TimToady \o/
13:43 bbkr_ i expect it to behave like "for () { .^methods.WHAT.say }"
13:43 jnthn bbkr_: It doesn't.
13:43 jnthn (As in, isn't spec'd to.)
13:43 moritz that's what the hypothetical 'each' junction from S09 would do, no?
13:43 jnthn imo it's useful that it doesn't also
13:43 tadzik nom: () ==> .^methods.WHAT.say
13:43 p6eval nom: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 1, near " .^methods"␤»
13:45 bbkr_ ok, not a bug then
13:45 bbkr_ thanks
13:45 jnthn np :)
13:46 * JimmyZ wonders where is substr() is rw defined in rakudo master or nom
13:47 moritz it isn't
13:47 jnthn meeting &
13:48 JimmyZ yesterday sub foo($a) is rw and sub foo($a is rw) confused me, and I tried to look at the source
13:49 moritz sub foo($a) is rw   makes the return value of sub foo writable
13:49 moritz sub foo($a is rw) makes $a writable
13:51 nebuchadnezzar joined #perl6
13:51 mtk joined #perl6
13:54 JimmyZ nom: sub foo($a) is rw { $a; };  my $b;  foo($b) = 100;
13:54 p6eval nom: OUTPUT«Cannot assign to a readonly variable or a value␤  in mu <anon> at /tmp/cIAQRtmuzk:1␤  in mu <anon> at /tmp/cIAQRtmuzk:1␤␤»
13:56 mkramer left #perl6
14:02 am0c joined #perl6
14:07 bbkr_ looks like anon rw subs cannot be returned from another sub
14:07 bbkr_ rakudo: my $s = sub foo { return sub is rw { 1; } }; $s.().();
14:07 p6eval rakudo a55346: OUTPUT«Null PMC access in getprop()␤  in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in main program body at line 22:/tmp/19MCJcsTFE␤»
14:07 bbkr_ however, when sub name is given everything works fine:
14:07 bbkr_ rakudo: my $s = sub foo { return sub bar is rw { 1; } }; $s.().();
14:07 p6eval rakudo a55346:  ( no output )
14:10 * bbkr_ wonders why anon rw sub is legal in rakudo return but is illegal in assignment
14:10 bbkr_ rakudo: my $s = sub is rw { 1 };
14:10 p6eval rakudo a55346: OUTPUT«Could not find sub &rw␤  in main program body at line 22:/tmp/SO2ScCQUOm␤»
14:10 bbkr_ std: my $s = sub is rw { 1 };
14:10 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed block at /tmp/Yy_WaiJqsJ line 1:â�¤------> [32mmy $s = sub is [33mâ��[31mrw { 1 };[0mâ�¤    expecting any of:â�¤       routine_defâ�¤    traitâ�¤Parse failedâ�¤FAILED 00:01 121mâ�¤Â»
14:11 bbkr_ std: sub foo { return sub is rw { 1; } };
14:11 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed block at /tmp/HOlwPG8lqb line 1:â�¤------> [32msub foo { return sub is [33mâ��[31mrw { 1; } };[0mâ�¤    expecting any of:â�¤   routine_defâ�¤    traitâ�¤Parse failedâ�¤FAILED 00:01 119mâ�¤Â»
14:11 flussence std: sub() is rw { }
14:11 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/AViv12dzmk line 1:â�¤------> [32msub() [33mâ��[31mis rw { }[0mâ�¤    expecting any of:â�¤     bracketed infixâ�¤        infix or meta-infixâ�¤    statement modifier loopâ�¤Undeclared routine:â�¤    'sub' used at line 1â�¤Parse
14:11 p6eval ..failed␤FAILED…
14:11 flussence std: sub () is rw { }
14:11 p6eval std 516268a: OUTPUT«ok 00:01 119m␤»
14:12 flussence rakudo: my $s = sub () is rw { 1 };
14:12 p6eval rakudo a55346:  ( no output )
14:12 flussence there you go
14:13 bbkr_ flussence: IMO this is bug, check this:
14:13 bbkr_ rakudo: sub foo { return sub is rw { } }; # expect to NOT parse
14:13 p6eval rakudo a55346:  ( no output )
14:13 cotto_work joined #perl6
14:13 flussence weird...
14:14 bbkr_ sometrhing is returned that cause later Null PMC access if called
14:14 flussence it doesn't work with the "1" inside?
14:15 bbkr_ rakudo: my $s = sub foo { return sub is rw { 1; } }; $s.().WHAT.say
14:15 p6eval rakudo a55346: OUTPUT«Null PMC access in getprop()␤  in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in main program body at line 22:/tmp/oD_Bf6ik2y␤»
14:16 * bbkr_ reports
14:20 bbkr_ nom: my $s = sub foo { return sub is rw { 1; } }; $s.().WHAT.say
14:20 p6eval nom: OUTPUT«===SORRY!===␤Malformed block at line 1, near "rw { 1; } "␤»
14:21 dalek rakudo/nom: 19cfd13 | moritz++ | / (3 files):
14:21 dalek rakudo/nom: add hidden_from_backtrace trait
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/19cfd13d25
14:21 dalek rakudo/nom: b1882a1 | moritz++ | src/core/BackTrace.pm:
14:21 dalek rakudo/nom: hide hidden routines from backtraces
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1882a1f9c
14:21 daxim joined #perl6
14:22 abercrombie joined #perl6
14:28 fhelmberger joined #perl6
14:29 Trashlord joined #perl6
14:36 jevin joined #perl6
14:39 xinming joined #perl6
14:42 alester joined #perl6
14:52 fhelmberger joined #perl6
15:01 donri joined #perl6
15:01 coregateFX joined #perl6
15:02 yves joined #perl6
15:06 im2ee joined #perl6
15:19 * moritz thinks he has eliminated most LHFs from t/spectest.data
15:19 * JimmyZ agrees
15:20 mtk joined #perl6
15:21 moritz S16-io/say.t needs some re-working
15:29 daniel-s joined #perl6
15:33 flussence did 2011.08 happen yet? or is it still waiting on stuff?
15:34 tadzik still waiting
15:34 moritz we have some massive problems with memory leaks, pmichaud++ diagnosed that they come from inferior runloops
15:35 flussence how long ago did those start? maybe they have something to do with my now() problem...
15:38 moritz I've recently bisected the commit; it's all in the logs :-)
15:39 moritz iirc it was 09c8fab0947aba1e3bb7bb97ab79c65b8e9827f7 (from 2011-07-28) that exposed the problem at that massive scale
15:58 molaf joined #perl6
16:12 im2ee joined #perl6
16:15 Psyche^ joined #perl6
16:16 cognominal rakudo: $_='"'; s/"//
16:16 p6eval rakudo a55346: OUTPUT«===SORRY!===␤Confused at line 22, near "s/\"//"␤»
16:16 cognominal rakudo: $_='"'; s/a//
16:16 p6eval rakudo a55346:  ( no output )
16:16 cognominal nom: $_='"'; s/a//
16:16 p6eval nom:  ( no output )
16:16 cognominal ok
16:18 cognominal \x22 ftw
16:25 snarkyboojum joined #perl6
16:27 TimToady nom: $_ = '"'; s/'"'//; .say
16:27 p6eval nom: OUTPUT«␤»
16:27 TimToady cognominal: ^^
16:28 TimToady std: s/"//
16:28 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse double quotes at /tmp/leMalqOZkG line 1:�------> [32ms/[33m�[31m"//[0m�Couldn't find final '"'; gave up at /tmp/leMalqOZkG line 1 (EOF):�------> [32ms/"//[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 119m�»…
16:39 mkramer joined #perl6
16:39 wamba joined #perl6
16:44 dalek ecosystem: 6e0bd2a | flussence++ | META.list:
16:44 dalek ecosystem: Update meta url of Text-Tabs-Wrap
16:44 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/6e0bd2ae48
16:46 mkramer left #perl6
16:50 cognominal I keep thinking perl5 regular expressions and forget that non alphanumerics are meta  :(
16:50 cognominal need some thougough muscle untraining.
16:51 mj41 joined #perl6
16:51 cognominal Whitehead said we progress by doing things by habits but sometimes habits are hard to unlearn :(
16:52 TimToady well, it'd be helpful if rakudo gave a better message for that...
16:55 daniel-s joined #perl6
16:59 kboga joined #perl6
17:01 uvtc joined #perl6
17:01 uvtc Are there plans for a built-in help system, as in, at the Perl 6 repl: `> help(substr)` or similar?
17:02 tadzik yes
17:03 uvtc tadzik: is there a syntax for something like Python's docstrings?
17:04 tadzik Util: yes, one minute
17:04 Trashlord joined #perl6
17:05 uvtc It's interesting ... Python has the built-in help (ex. `>>> help(str)`), but come to think of it, I wonder if it's there primarily because Python doesn't have man pages like Perl 5.
17:05 tadzik erm, uvtc
17:05 tadzik see http://ttjjss.wordpress.com/2011/07/31/gsoc​-%E2%80%93-the-podparser-branch-has-landed/
17:10 uvtc tadzik: Thanks.
17:10 zby_home_ joined #perl6
17:12 tadzik you're welcome
17:13 uvtc tadzik: regarding your blog's colorscheme, it reminds me of the black spaceship in HHGttG. ;)
17:13 tadzik what's HHGttG?
17:14 uvtc Hitchhikers Guide ...
17:14 tadzik oh :)
17:15 uvtc tadzik: the black ship had a black console with black buttons which had black letters on them, and when you pressed them they lit up black.
17:15 tadzik hah, I don't remember that one :)
17:16 uvtc make the ship quite difficult to drive. :) (I think I read in the logs here that you were going to change the colorscheme)
17:16 tadzik but that reminds me of a Hasselblad advertisment. A black woman, in black skirt, sitting on a black chair in a black room with a black cat on her knees
17:17 tadzik yeah, I'm not entirely happy with the theme, but I'm too lazy to look for a new one on wordpress.com
17:20 uvtc tadzik: So now that rakudo (nom) is aware of Pod-documented classes and methods, does that mean more core classes will begin to be documented?
17:21 uvtc tadzik: I'm referring to the files in rakudo/src/core ... I think.
17:21 sorear there will be resistance because of how slow the parser is
17:21 tadzik uvtc: I think an trying to document core classes is bound to stumble on circularity issues. OTOH, I think no one has tried yet
17:21 sorear in Perl 5 you can put documentation after __END__ and it doesn't affect load speed at all
17:22 sorear there's no equivalent in Perl 6 - documentation must be mixed with code
17:22 uvtc I recall that PBP recommended putting docs at the end.
17:23 moritz sorear: though precompilation can make the speed difference insignificant
17:24 moritz http://zag.ru/en/2011/234/a1/Creat​e-presentations-in-Perl-6-Pod.html
17:24 pedram joined #perl6
17:25 pedram Do you know any grat resource on perl6 ?
17:25 sorear pedram: What's grat?
17:25 tadzik oh, I do want that in Perl 6
17:27 moritz pedram: perl6.org
17:27 moritz pedram: it links to most great Perl 6 resources, and to some not-quite-so-great resources too :-)
17:28 moritz so it's a meta-great meta resource :-)
17:29 tadzik zag++'s website made me think my display is dirty
17:30 pedram I mean greate resource
17:37 pyrimidine joined #perl6
17:40 wolfman2000 joined #perl6
17:46 xinming joined #perl6
17:56 wolfman2_ joined #perl6
18:03 donri any love for reST in perlland?
18:06 uvtc donri: Although I think Perl 6 Pod is the markup-of-choice here, personally I prefer Markdown (specifically Pandoc's enhanced Markdown) to reST.
18:07 donri i think markdown is overused on the web, it's really crappy for editing in simple textareas
18:07 donri (but rest isn't better in that regard)
18:09 jevin joined #perl6
18:11 donri i don't know how pandoc extends markdown but i find markdown proper suffers from a number of issues (no tables, weird autonumbering for ordered lists, link syntax i never remember, difficult syntax for blockquotes)
18:11 donri + lack of standard for extensibility
18:12 uvtc donri: Pandoc adds tables (nice simple syntax)
18:12 uvtc donri: blockquotes are just `> hi, I'm a blockquote`
18:13 uvtc donri: links are [like this](http://foo.bar.baz)
18:13 donri yes, that's difficult if you want to transform multiple lines
18:13 uvtc donri: the blockquote? Emacs wraps it for me while correctly moving the '>'s around.
18:14 donri sure it's not too difficult with a proper editor, just noting it
18:15 uvtc donri: I've found that Pandoc fixes any complaints I had about Markdown. And after using reST, I think MD is prettier. A number of Perl 6 modules use MD for their READMEs.
18:15 donri i often use markdown for readmes because github renders it better
18:15 abercrombie joined #perl6
18:22 donri pod6 looks interestingly simple and compact compared to rst, while still similarly powerful/extensible
18:23 donri (it does get tiring in python to type :class:`~omg.namespace.galore.HorayLinkedClass`)
18:24 donri (would that be C<OMG::Namespace::Galore::HorayLinkedClass> or somesuch in pod6/perl?)
18:25 tadzik what does that represent?
18:25 tadzik C<> stands for Code, rather than for Class, I think it's more generic
18:27 donri the result is a link to the class docs with the class name without the module as the link text
18:28 tadzik C<> doesn't link
18:28 tadzik when you say link, do you mean that's html-specific?
18:28 benabik L<> links, I think, but I don't know the link syntax.
18:29 tadzik it'd be L<HorrayClass|#HorrayClass>
18:29 tadzik I think
18:29 donri well :class: is sphinx-specific, not part of rst as such; html is one output format that supports links
18:29 tadzik mhm
18:30 donri i suppose my actual pet peeve with it is that you have to explicitly write the type of the linked object (class in this case) plus either the full module path or only relative to "currently documented module"
18:31 donri plus a ~ to hide the module from the link text, which you almost always want to do
18:33 uvtc donri: http://perlcabal.org/syn/S26.html#Links
18:33 donri pod++ for supporting nesting
18:33 donri rst is fail in that regard
18:34 donri i suppose it discourages html 3 style "hacks" and encourages creating semantic roles but it can be annoying :)
18:41 abercrombie joined #perl6
18:45 MayDaniel joined #perl6
18:46 uvtc nom: 'x'.HOW.methods('x')
18:46 p6eval nom:  ( no output )
18:46 uvtc rakudo: 'x'.HOW.methods('x')
18:46 p6eval rakudo a55346:  ( no output )
18:46 TimToady say it
18:47 uvtc nom: say 'x'.HOW.methods('x')
18:47 p6eval nom: OUTPUT«Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words capitalize Bool Str ACCEPTS Numeric gist perl comb match subst split abs conjugate sqrt sign rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan aco…
18:47 uvtc And bingo was his name-o.
18:47 TimToady you might want a :local
18:47 TimToady though the default is supposed to chop out anything Cool or looser
18:47 uvtc I'm sorry, I don't know what that means. A :local?
18:47 TimToady nom: say 'x'.HOW.methods('x', :local)
18:47 p6eval nom: OUTPUT«Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words capitalize Bool Str ACCEPTS Numeric gist perl comb match subst split␤»
18:48 TimToady a named arg
18:48 TimToady "adverb"
18:48 uvtc Ah. named arg. Thank you.
18:48 TimToady :local == "locally"
18:48 sjohnson TimToady: hi, how's life
18:48 * uvtc needs to read up on grade-school grammer at some point
18:49 TimToady home again from Latvia, and hopefully going to stay that way for a while
18:49 * TimToady is exhausted from his spring and summer
18:50 sjohnson home sweet home
18:50 birdwindupbird joined #perl6
18:53 uvtc TimToady: with R* 2011.07, I get fewer methods listed:
18:53 uvtc > 'x'.HOW.methods('x', :local)
18:53 uvtc ACCEPTS perl pred succ WHICH Bool Str encode indent
18:54 benabik rakudo: 'x'.HOW.methods('x', :local)
18:54 p6eval rakudo a55346:  ( no output )
18:54 benabik rakudo: 'x'.HOW.methods('x', :local).say
18:54 p6eval rakudo a55346: OUTPUT«ACCEPTSperlpredsucc​WHICHBoolStrencodeindent␤»
18:54 benabik uvtc: That's a difference between master and nom.  nom is starting to get more features than master.
18:55 uvtc benabik, nice.
18:55 uvtc TimToady: Oh, I see. The adverb :local is modifying the verb ".methods()".
18:56 uvtc Curious: when the big nom-->master switch happens, is nom being merged into master? Or are branches being renamed?
18:57 tadzik I think they're going to be renamed or so
18:57 tadzik and when, when the Big Guys solve the Big Issues :)
18:59 uvtc tadzik: Ah, thanks.
19:01 uvtc nom: say Array.HOW.methods(Array)[3].HOW
19:01 p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in sub say at src/gen/CORE.setting:4613␤  in mu <anon> at /tmp/Ts32xch68U:1␤  in mu <anon> at /tmp/Ts32xch68U:1␤␤»
19:01 uvtc nom: say Array.HOW.methods(Array)[3]
19:01 p6eval nom: OUTPUT«REIFY␤»
19:03 TimToady nom: say Array.^methods[3]
19:03 p6eval nom: OUTPUT«REIFY␤»
19:04 uvtc nom: say Array.methods
19:04 p6eval nom: OUTPUT«Method 'methods' not found for invocant of class 'Array'␤  in mu <anon> at /tmp/no19uYFM2i:1␤  in mu <anon> at /tmp/no19uYFM2i:1␤␤»
19:04 uvtc nom: say Array.^methods
19:04 p6eval nom: OUTPUT«new at_pos flattens REIFY STORE_AT_POS STORE perl new Bool Int end fmt flat list flattens Capture Parcel at_pos eager elems exists gimme infinite iterator munch pick pop push roll reverse rotate shift unshift sort classify REIFY STORE_AT_POS ARGLIST_FLATTENABLE keys values p…
19:05 TimToady sugar for the .HOW form
19:05 uvtc Was just about to ask ... didn't know you could have a '^' in a method name.
19:05 uvtc Thanks.
19:06 uvtc Or is '.^' an operator?
19:06 TimToady the ^ goes more with the .
19:07 kaare__ joined #perl6
19:07 TimToady but the whole .^foo is somewhat indivisible
19:07 TimToady since it's short for a macro
19:10 uvtc So, `Array.^methods()` is short for `Array.HOW.methods(Array)`. The ".^" means, "call this on the-object.HOW, not on the-object"?
19:10 moritz uvtc: right
19:10 uvtc "and pass the-object into the method call while you're at it"
19:11 uvtc (forgot that last part)
19:11 benabik nom: Array.^methods.say; Array.HOW.methods.say
19:11 p6eval nom: OUTPUT«new at_pos flattens REIFY STORE_AT_POS STORE perl new Bool Int end fmt flat list flattens Capture Parcel at_pos eager elems exists gimme infinite iterator munch pick pop push roll reverse rotate shift unshift sort classify REIFY STORE_AT_POS ARGLIST_FLATTENABLE keys values p…
19:11 moritz right, it's because the metaclass manages many objects and classes
19:11 benabik nom: Array.^methods(Array)
19:11 p6eval nom: OUTPUT«Cannot access attributes in a type object␤  in method infinite at src/gen/CORE.setting:3849␤  in method infinite at src/gen/CORE.setting:3558␤  in method gimme at src/gen/CORE.setting:3838␤  in method ARGLIST_FLATTENABLE at src/gen/CORE.setting:4021␤  in method dispatch:<.^>…
19:12 benabik nom: Array.^methods(Array).say
19:12 p6eval nom: OUTPUT«Cannot access attributes in a type object␤  in method infinite at src/gen/CORE.setting:3849␤  in method infinite at src/gen/CORE.setting:3558␤  in method gimme at src/gen/CORE.setting:3838␤  in method ARGLIST_FLATTENABLE at src/gen/CORE.setting:4021␤  in method dispatch:<.^>…
19:12 * moritz submitted his gsoc evalution
19:12 benabik Bah.
19:12 uvtc benabik, so the sugar causes the Array to be passed to the `methods` method.
19:12 [Coke] moritz: you are not the moritz student, right?
19:12 * tadzik fights with HLL::CommandLine
19:12 dakkar joined #perl6
19:13 benabik uvtc: I think I don't think so?  I think Array.^methods is just Array.HOW.methods
19:13 benabik uvtc: I was trying to figure it out and failing.
19:13 TimToady benabik: no, it also passes Array as the 1st arg
19:14 benabik TimToady: Does that happen for all .^ calls?
19:14 TimToady yes
19:15 TimToady foo.^bar(baz) always means foo.HOW.bar(foo,baz)
19:17 moritz [Coke]: no, that's Moritz Onken, usually with nickname 'mo'
19:18 uvtc nom: say Hash.^methods
19:18 p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl elems exists iterator list keys kv values pairs invert at_key STORE_AT_KEY Capture ARGLIST_FLATTENABLE Bool ACCEPTS elems infinite item Int Num Numeric Str abs conjugate sqrt sign rand sin asin cos acos tan atan …
19:18 benabik nom: Hash.HOW.methods(Hash).say
19:18 p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl elems exists iterator list keys kv values pairs invert at_key STORE_AT_KEY Capture ARGLIST_FLATTENABLE Bool ACCEPTS elems infinite item Int Num Numeric Str abs conjugate sqrt sign rand sin asin cos acos tan atan …
19:18 benabik nom: Hash.HOW.methods(Hash, :local).say
19:18 p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl␤»
19:19 uvtc rakudo: say Hash.^methods
19:19 p6eval rakudo a55346: OUTPUT«at_key!STOREBooldeletepush!p​ush_constructlisthashsortpickroll␤»
19:19 benabik nom: Hash.HOW.methods(Array, :local).say
19:19 p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl␤»
19:21 [Coke] moritz: does that make you Curly?
19:22 uvtc Is something like `+("4hello")` called "casting" in Perl 6? Or type coercion. Or are they the same thing?
19:22 [Coke] nom: say +"4hello"
19:22 p6eval nom: OUTPUT«trailing characters after number in conversion␤  in method Numeric at src/gen/CORE.setting:2675␤  in sub prefix:<+> at src/gen/CORE.setting:1685␤  in mu <anon> at /tmp/KbC9pXATKK:1␤  in mu <anon> at /tmp/KbC9pXATKK:1␤␤»
19:23 uvtc nom: say +("4hello")
19:23 p6eval nom: OUTPUT«trailing characters after number in conversion␤  in method Numeric at src/gen/CORE.setting:2675␤  in sub prefix:<+> at src/gen/CORE.setting:1685␤  in mu <anon> at /tmp/pSfXc_ashH:1␤  in mu <anon> at /tmp/pSfXc_ashH:1␤␤»
19:24 tadzik std: say +"4hello"
19:24 p6eval std 516268a: OUTPUT«ok 00:01 119m␤»
19:24 tadzik oh, that's nom-new I think
19:24 tadzik rakudo: say +"4hello"
19:24 p6eval rakudo a55346: OUTPUT«4␤»
19:24 tadzik rakudo: say +"4e4"
19:24 p6eval rakudo a55346: OUTPUT«40000␤»
19:25 benabik nom: say +"4e4"
19:25 p6eval nom: OUTPUT«40000␤»
19:26 pernatiy joined #perl6
19:28 benabik nom: say :16<deadbeef>
19:28 p6eval nom: OUTPUT«3735928559␤»
19:28 benabik nom: say +":16<deadbeef>"
19:28 p6eval nom: OUTPUT«3735928559␤»
19:28 benabik Very complete.
19:29 uvtc Shouldn't :16<deadbeef> be a Pair, as in, `"16" => "deadbeef"`?
19:29 flussence no, it's parsed specially
19:30 abercrombie joined #perl6
19:30 uvtc (whoops, sorry, didn't look at the coercion)
19:30 benabik nom: say :16<dead_beef.face>  # From S02
19:30 p6eval nom: OUTPUT«3735928559.97971␤»
19:31 benabik nom: (16 => "dead_beef.face").perl.say
19:32 p6eval nom: OUTPUT«16 => "dead_beef.face"␤»
19:32 tadzik nom: my $a = 'foo'; my $b = 'bar'; say (:$a($b)).perl
19:32 p6eval nom: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Pair'␤  in mu <anon> at src/gen/Metamodel.pm:2708␤  in mu <anon> at /tmp/JxgbtYf67q:1␤  in mu <anon> at /tmp/JxgbtYf67q:1␤  in mu <anon> at /tmp/JxgbtYf67q:1␤␤»
19:32 tadzik right
19:33 tadzik nom: my $a = 'foo'; my $b = 'bar'; say ($a => $b).perl
19:33 p6eval nom: OUTPUT«"foo" => "bar"␤»
19:34 benabik nom: my $a = 'foo'; (:$a).perl.say
19:34 p6eval nom: OUTPUT«"a" => "foo"␤»
19:34 benabik That's what I thought.
19:35 TimToady uvtc: I tend to prefer the term 'coercion', since casting oftem just means tell the compiler that a given value is a different type without changing its representation, at least in C culture
19:35 dual joined #perl6
19:35 TimToady *often
19:36 uvtc TimToady: excellent, thanks
19:36 MayDaniel joined #perl6
19:36 uvtc nom: say :a
19:36 p6eval nom: OUTPUT«␤»
19:36 uvtc rakudo: say :a
19:36 p6eval rakudo a55346: OUTPUT«Unexpected named parameter 'a' passed␤  in 'say' at line 5897:src/gen/core.pm␤  in main program body at line 22:/tmp/lTc_aQ6wwG␤»
19:36 TimToady rakudo is perhaps correcter there
19:37 TimToady nom: say (:a)
19:37 p6eval nom: OUTPUT«"a" => True␤»
19:37 uvtc Ah, there we go.
19:37 TimToady note the space is required
19:38 TimToady or the parens are function call parens
19:38 TimToady which would turn :a back into a named arg
19:44 uvtc When declaring a variable to be Numeric, that implies that it may be taking on Int *or* Rat values, correct?
19:45 jnthn evening, #perl6
19:46 TimToady or Num, or Complex
19:46 TimToady use Real to exclude Complex
19:47 tadzik evening jnthn
19:47 dalek nqp/commandline-optional-arguments: 3e5dcec | tadzik++ | src/HLL/CommandLine.pm:
19:47 dalek nqp/commandline-optional-arguments: Allow optional named parameters in CommandLine.pm
19:47 dalek nqp/commandline-optional-arguments:
19:47 dalek nqp/commandline-optional-arguments: Specified with foo=s? get the passed value if any, empty string
19:47 dalek nqp/commandline-optional-arguments: otherwise. So --foo will set %options<foo> to '', --foo=bar will result
19:47 dalek nqp/commandline-optional-arguments: in %options<foo> := 'bar'. In the first case, %options<foo> will still
19:47 dalek nqp/commandline-optional-arguments: be false, but the existance of the argument can be checked with
19:47 dalek nqp/commandline-optional-arguments: pir::exists()
19:47 dalek nqp/commandline-optional-arguments: review: https://github.com/perl6/nqp/commit/3e5dcec73f
19:47 uvtc rakudo: my Num $n = 4;
19:47 tadzik commit message longer than the patch :P
19:47 p6eval rakudo a55346: OUTPUT«Type check failed for assignment␤    Container type: Num␤               Got: Int␤  in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in main program body at line 22:/tmp/GjZU9PgFXC␤»
19:47 tadzik anyway, this will allow me to accept --doc as well as --doc=html and such. Please review
19:48 tadzik oh, docs are still to be fixed
19:49 abercrombie TimToady: What's the heredity here? I mean the relationship between Num, Complex, Rat, Int
19:49 flussence tadzik++
19:50 dalek nqp/commandline-optional-arguments: 8d12a5c | tadzik++ | src/HLL/CommandLine.pm:
19:50 dalek nqp/commandline-optional-arguments: Update HLL::CommandLine documentation mentioning optional values
19:50 dalek nqp/commandline-optional-arguments: review: https://github.com/perl6/nqp/commit/8d12a5cb50
19:52 jnthn o/, tadzik++
19:53 uvtc nom: my Num $n = 4;
19:53 p6eval nom: OUTPUT«Type check failed in assignment to '$n'; expected 'Num' but got 'Int'␤  in mu <anon> at /tmp/wfp47e65SS:1␤  in mu <anon> at /tmp/wfp47e65SS:1␤␤»
19:53 benabik abercrombie: I _think_ there's no inheritance, although they all do Numeric (a role).  Mind you, I haven't checked.
19:54 abercrombie Oh, I see.
19:55 jnthn No, Int !~~ Num.
19:55 jnthn nom: my Numeric $n = 4;
19:55 p6eval nom:  ( no output )
19:57 abercrombie I thought Num is short for Numeric
19:58 benabik Num is the floating point type.  Not sure why it's Num instead of Float or Real or something.  (Although Real is a role, like Numeric)
19:59 tadzik jnthn: could you review that for me?
19:59 tadzik once merged I could start bringing stuff like --doc=html or so to life
20:02 abercrombie benabik: Yep, I see that Int, Rat and Num all conform to Numeric
20:03 jnthn tadzik: review...the branch in nqp?
20:03 tadzik jnthn: yep
20:04 TiMBuS|Away joined #perl6
20:05 bbkr joined #perl6
20:06 masak joined #perl6
20:06 masak lol yay hai #perl6
20:06 tadzik lol! a masak!
20:07 jnthn tadzik: looks good to me
20:08 tadzik ok, proceeding
20:08 donri joined #perl6
20:08 jnthn tadzik: I think moritz++ wrote that in the first place, fwiw.
20:08 jnthn o/ masak
20:08 dalek nqp: 3e5dcec | tadzik++ | src/HLL/CommandLine.pm:
20:08 dalek nqp: Allow optional named parameters in CommandLine.pm
20:08 dalek nqp:
20:08 dalek nqp: Specified with foo=s? get the passed value if any, empty string
20:08 dalek nqp: otherwise. So --foo will set %options<foo> to '', --foo=bar will result
20:08 dalek nqp: in %options<foo> := 'bar'. In the first case, %options<foo> will still
20:08 dalek nqp: be false, but the existance of the argument can be checked with
20:08 dalek nqp: pir::exists()
20:08 dalek nqp: review: https://github.com/perl6/nqp/commit/3e5dcec73f
20:08 dalek nqp: 8d12a5c | tadzik++ | src/HLL/CommandLine.pm:
20:08 dalek nqp: Update HLL::CommandLine documentation mentioning optional values
20:08 dalek nqp: review: https://github.com/perl6/nqp/commit/8d12a5cb50
20:08 dalek nqp: 4d93b19 | tadzik++ | tools/build/Makefile.in:
20:08 dalek nqp: Merge branch 'master' of github.com:perl6/nqp
20:08 dalek nqp: review: https://github.com/perl6/nqp/commit/4d93b19da2
20:08 * masak backlogs
20:08 tadzik meh, should've rebased
20:09 bbkr what is the replacement for caller() from p5?
20:10 benabik If people are poking at NQP, I'd like to take the opportunity to point out the issue with `sub a:b['c']`… I tried to find the cause but couldn't find it. https://github.com/perl6/nqp/issues/22
20:10 tadzik I think it's callframe.something
20:10 tadzik nom: sub foo { say callframe[0] }; foo()
20:10 p6eval nom: OUTPUT«CallFrame<56335216>␤»
20:10 tadzik meh
20:11 bbkr thanks
20:12 Trashlord joined #perl6
20:17 jnthn benabik: Does sub a:b<c> work out?
20:17 benabik jnthn: Yes, it does...
20:18 masak tadzik: I merge so seldom these days that I generally notice them already at pull-time.
20:18 masak (and then I back up and rebase instead)
20:18 benabik jnthn: But I encountered it because I was looking at src/gen/perl6-gramar.pir…  Perl6::Grammar uses "token special_symbol:sym['$<']"
20:18 jnthn ah.
20:19 benabik It actually tries to match against Capture[…] instead of $< AFAICT.
20:20 jnthn yeah, look so. Thanks for filing the issue.
20:21 benabik I tried to fix the issue, but I got as far as "I think it's a PCT::Node of some kind instead of a string" and couldn't figure out where it was actually doing something wrong.
20:24 wamba joined #perl6
20:25 abercrombie jnthn: my Numeric $n=4; But isn't Numberic supposed to be a role so cannot be instantiated?
20:25 jnthn abercrombie: You're not instantiating it at any point in that statement.
20:25 jnthn abercrombie: You're using it as a type constraint.
20:25 jnthn Which means "anything that does Numeric can be stored in $x"
20:26 abercrombie So the actual object "4" is not Numeric but Int?
20:26 jnthn Correct
20:26 jnthn It's how my Any $x = ... works.
20:26 benabik nom: my Numeric $n = 4; say $n.WHAT
20:26 p6eval nom: OUTPUT«Int()␤»
20:26 jnthn Well, Any is a class. But $x can hold anything that ~~ Any
20:26 benabik nom: my Numeric $n; say $n.WHAT
20:26 p6eval nom: OUTPUT«Numeric()␤»
20:27 jnthn Right, slots get initialized to the type object of the specified type.
20:27 jnthn nom: my Str $s; say $s.WHAT
20:27 p6eval nom: OUTPUT«Str()␤»
20:27 jnthn etc.
20:27 benabik nom: my Numeric $n .= new; # This should fail...
20:27 p6eval nom:  ( no output )
20:28 jnthn It won't. It'll pun the role.
20:28 jnthn nom: role Foo { }; Foo.new
20:28 p6eval nom:  ( no output )
20:28 benabik Realized that _right_ after I hit enter.
20:28 jnthn However, important to note that...
20:29 jnthn nom: role Foo { }; say Foo.HOW.HOW.name(Foo.HOW)
20:29 p6eval nom: OUTPUT«Perl6::Metamodel::ParametricRoleHOW␤»
20:29 jnthn nom: role Foo { }; my $x = Foo.new; say $x.HOW.HOW.name($x.HOW)
20:29 p6eval nom: OUTPUT«Perl6::Metamodel::ClassHOW␤»
20:30 fbass joined #perl6
20:32 abercrombie jnthn: Then how can I specify the type of the object? Something like my Numeric $n = Num(4)
20:33 jnthn abercrombie: 4 is an Int literal. If you want a numeric literal, write one
20:33 jnthn e.g. 4e1
20:33 jnthn er, a Num literal I meant :)
20:34 benabik Or 4.0 or 4.Num (although I think the last isn't a literal)
20:34 jnthn 4.0 is Rat
20:34 jnthn Not Num
20:34 benabik Or is 4.0 a Rat literal?  40/10
20:34 benabik More precise, but somewhat surprising to this ol' C programmer.  :-D
20:36 abercrombie Why do we need the Rat type? Isn't Num sufficient?
20:36 benabik abercrombie: Num can lose precision.
20:37 abercrombie So Rat is kind of lazy evaluation?
20:37 abercrombie I mean, what the acutal data stored in memory for Rat?
20:37 jnthn Most developers I see using floating point semantics neither needed them, tend to have got lurking bugs because of them and aren't really aware of what floating point means.
20:38 benabik Rat I think is Rational[Int,Int]
20:38 jnthn Yeah, it's a pair of Ints to a first approximation.
20:38 benabik It has an Int numerator and Int denominator.
20:38 benabik 1.23456 = 123456/100000
20:39 abercrombie So it seems sizeof(Rat) > sizeof(Num)
20:40 jnthn Very likely, yeah.
20:41 [Coke] (back up and then rebase) am I the only one who just always rebases first?
20:41 * jnthn is rather tired of going to places doing stuff in the *finance industry* and seeing them using floating point, and is rather glad Perl 6 makes you work harder to get it.
20:42 abercrombie Then what if I write my Numeric $n;  What's the actual object type?
20:43 jnthn abercrombie: $n can contain anything that ~~ Numeric
20:43 benabik [Coke]: git pull --rebase is your friend.  Or for more adventurous people git config branch.master.rebase true
20:43 jnthn abercrombie: It's initialized to the Numeric type object, and typed objects in Perl 6 represent undefined values.
20:43 jnthn If you're familiar with Perl 5 undef, just think of it like that, apart from it knows a bit more about its type.
20:44 abercrombie Oh, that makes me a little confused. I am trying to relate roles with C++'s virtual base classes..
20:45 wolfman2000 joined #perl6
20:46 benabik C++ doesn't have type objects, which makes it a little difficult to compare.
20:48 abercrombie If roles cannot be instantiated, I really don't know why I can still call my Numeric $n an object
20:50 benabik The role itself is an object.
20:50 jnthn You're conflating "object" and "instance"
20:51 abercrombie oh yeah, I thought there were the same thing
20:51 jnthn Type objects aren't really "instances" by they are objects.
20:51 jnthn s/by/but/
20:51 jnthn That is, they have exactly the same type as an instance; they're just undefined and lack any storage.
20:52 abercrombie Oh, then I got it. I thought the instances of classes were just objects
20:54 jnthn :)
20:54 abercrombie Thanks :)
20:57 TimToady the metaclasses are just objects
20:58 TimToady but they're of a completely different type than the object they represent, normally
20:58 TimToady type objects are just stand-ins for normal objects, like stunt doubles
20:58 jnthn Aye, until you reach the bottom and it loops back on itself :)
20:58 TimToady or more like crash dummies
20:59 jnthn :D
21:00 TimToady yes, that's why I said "normally"; what you do isn't normal :)
21:00 jnthn Touché :P
21:02 TimToady time for a nap, or whatever it is when you're jetlagged and sleep during the middle of the day...
21:02 TimToady zzz &
21:09 masak blog post without adjectives and adverbs! http://strangelyconsistent.org/blog/yap​c-eu-without-the-adjectives-and-adverbs
21:10 tadzik the post is to my liking
21:10 jnthn That's a blog post.
21:10 tadzik Carl Plus PLus
21:11 jnthn I read it. I felt enjoyment.
21:11 masak this pleases me.
21:11 tadzik LIEK
21:12 masak writing sentences without adjectives and adverbs is... a challenge.
21:13 masak you might recall I did a blog post without the verbs two years ago: http://strangelyconsistent.org/​blog/npw-2009-without-the-verbs
21:13 tadzik I'm waiting for a one without alphanumeric characters
21:14 masak :P
21:14 masak well, there's always ASCII diagrams.
21:15 * tadzik is wondering about the best way to make use of Pod::To
21:15 tadzik and --doc=foo
21:15 * masak .oO( Pod::To::Mars )
21:16 tadzik I imagine Pod::To as something that, given $=POD and --doc value dispatches the hard work to the most suitable output formatter. Still, I can't think of anything better than hardcoding every possible pod producer into Pod::To, which is LTA
21:16 tadzik I want it to be some sort of a bridge between the compiler and the ecosystem
21:17 y3llow_ joined #perl6
21:17 pothos_ joined #perl6
21:17 flussence you'd have to define a name map somewhere, or use case-insensitive matching, because of things like Pod::To::HTML
21:18 flussence (and should --pod eventually work like perldoc when it's run on a TTY?)
21:20 bbkr rakudo: class A { method ^foo { 1 } }; A.foo; # this should work according to the spec http://perlcabal.org/syn/S12.html#Class_methods section. but it doesn't because A() is always an argument. so it is rakudo bug or S12 should explicitly mention that "method ^foo( ::T ) { 1 } " is the correct way of define singleton subs. am I right?
21:20 p6eval rakudo a55346: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'A::foo' at line 22:/tmp/SObyNtncAi␤  in main program body at line 22:/tmp/SObyNtncAi␤»
21:21 jnthn bbkr: Hmm. I didn't re-visit that bit of S12 in nom yet...
21:21 jnthn bbkr: I agree master's interpretation is kinda dubious in that sense.
21:23 tadzik flussence: yeah, a name map, that's still hardcoding the solution somewhere in the compiler ecosystem
21:23 masak 'night, #perl6
21:23 tadzik 'night masak
21:23 bbkr jnthn: should I report it? currently s12 gives not working example here.
21:24 jnthn bbkr: Feel free to file a ticket on that.
21:36 bbkr reported
21:38 jnthn Thanks.
21:51 drbean joined #perl6
21:53 pernatiy joined #perl6
22:03 sorear good * #perl6
22:03 im2ee joined #perl6
22:04 im2ee joined #perl6
22:20 wamba joined #perl6
22:23 bbkr joined #perl6
22:28 wk joined #perl6
22:34 rnddim joined #perl6
22:48 cotto joined #perl6
22:52 thou joined #perl6
22:53 wamba joined #perl6
23:00 wamba left #perl6
23:07 [Coke] joined #perl6
23:10 molaf_ joined #perl6
23:15 [Coke] joined #perl6
23:18 wamba joined #perl6
23:25 fbass joined #perl6
23:34 Psyche^ joined #perl6
23:35 Trashlord joined #perl6
23:44 tokuhirom joined #perl6
23:45 envi joined #perl6
23:46 whiteknight joined #perl6
23:53 diakopter sorear: good
23:54 TimToady we don't do currying by leaving out terms here
23:56 diakopter #perl6. where even talking about cargo-culting is cargo-culted.
23:59 TimToady is that why it doesn't work?
23:59 diakopter wfm ;)

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

Perl 6 | Reference Documentation | Rakudo