»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:02 aindilis left 00:03 aindilis joined 00:17 drbean left 00:20 am0c left, Holy_Cow joined 00:21 Holy_Cow left 00:24 wolfman2000 joined 00:46 jaldhar left 00:47 jaldhar joined 00:54 envi joined 01:04 cooper left 01:13 aber joined, abercrombie left 01:26 Tedd1 left, Tedd1 joined 01:27 donri left 01:31 jaldhar left 01:32 Trashlord joined 01:40 woosley joined
benabik Okay, I'm lost. I can't figure out why special_variable:sym['$<'] is getting generated as special_variable:sym<Capture[0x…]> 01:46
01:48 whiteknight left 01:54 REPLeffect left, jaldhar joined, jaldhar left, jaldhar joined 02:06 REPLeffect joined 02:41 odoacre joined 02:52 rml joined 02:59 jaldhar left, jaldhar joined 03:05 lue left
[Coke] something getting stringified that shouldn't? 03:06
benabik [Coke]: Yeah. I'm thinking it's some subclass of PCT::Node (they still stringify as Captures) 03:13
[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 03:27 Su-Shee left 03:38 daniel-s left
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:43
03:48 abercrombie joined 03:52 aber left 04:01 bluescreen10 left 04:08 birdwindupbird joined 04:12 daniel-s joined, satyavvd joined 04:30 abercrombie left 04:36 soh_cah_toa left 04:39 satyavvd left, satyavvd joined
[Coke] nom:1.say 04:43
evalbot?
moritz nom: 1.say
p6eval nom: OUTPUT«1␤»
moritz good morning
[Coke]: p6eval is picky about spaces 04:44
[Coke] danke.
04:47 wolfman2000 left
moritz it's picky because otherwise nqp::unbox_s(...) at the start of the line would trigger the 'nqp:' target :-) 04:47
04:54 envi left 05:00 envi joined 05:55 masak joined
masak morning, #perl6 05:55
tadzik morning masak 05:56
moritz good morning tadzik, masak, #perl6 05:57
masak another beautiful day in the future.
tadzik speaking of time-travel, I feel like getting back to sleep :)
moritz too 05:59
masak it's too late, it's already morning. :P 06:00
you'll have to go to bed earlier tonight.
moritz is expempted from mockery because of understandable circumstances. 06:01
moritz :-)
tadzik :)
I could maybe blog about the presentation software, this could motivate me to actually write it 06:02
06:03 wtw joined
moritz that typically doesn't help 06:04
having announced to do something reduces the chances of actually doing it 06:05
my GSOC dashboard says "You can now apply to Google Summer of Code.". Why, thank you! 06:06
tadzik quick, you still would be able to finish it! :) 06:07
there's like 13 hours remaining, or so :)
06:17 Su-Shee_ is now known as Su-Shee 06:21 REPLeffect left 06:25 jevin left 06:26 drbean joined 06:27 jevin joined 06:35 REPLeffect joined 06:38 Tedd1 left 06:39 Tedd1 joined 06:41 koban joined, koban left 06:42 xinming left
moritz formally hands the Double Bacon Badge of Successful GSoC to tadzik++ 06:50
06:52 drbean left 07:01 daniel-s left, Caldrin left, pnu left 07:03 daniel-s joined 07:04 pnu joined 07:13 wamba joined
masak tadzik++ 07:15
dalek ast: 398993f | moritz++ | S32-num/cool-num.t:
start to fudge cool-num.t for rakudo
07:23
ast: f4ad278 | moritz++ | S32-num/cool-num.t:
fix some test descriptions
07:24
07:37 koban joined, koban left
jnthn morning o/ 07:42
07:48 mj41 joined 07:49 im2ee joined
moritz \o 07:58
08:01 orafu left 08:02 orafu joined 08:10 Trashlord left
masak jnthn: mroing 08:19
in ar.
08:20 JimmyZ joined
JimmyZ moning jnthn 08:22
morning
jnthn
.oO( moaning jnthn )
dalek kudo/nom: 3b66c0f | moritz++ | / (5 files):
lots of Cool methods, run cool-num.t
jnthn masak: Argentina? :)
JimmyZ has been waiting for jnthn++'s slides many days 08:23
08:24 SHODAN joined
jnthn JimmyZ: sorry 'bout that. I'll try and get that fixed up tonight. 08:24
(and thanks for the reminder :)) 08:25
08:25 daxim joined
JimmyZ jnthn: thanks 08:25
masak jnthn: howisbabbyformed.com/ 08:35
jnthn masak: :P 08:42
I tried to forget it but the memory frigth back
08:44 orafu left, OuLouFu joined, dakkar joined, OuLouFu is now known as orafu
moritz nom: enum Order (Decrease => -1, Same => 0, Increase => 1); say Order::Increase 09:01
masak jnthn: my pary are with the memory.
p6eval nom: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Orde"␤»
moritz nom: enum Order Decrease => -1, Same => 0, Increase => 1; say Order::Increase
p6eval nom: OUTPUT«Could not find sub &Order␤ in mu <anon> at /tmp/dcZjcw36zA:1␤ in mu <anon> at /tmp/dcZjcw36zA:1␤␤»
moritz any way to work around that?
09:05 rhr left
jnthn nom: enum Order (:Increase(-1), :Same(0), :Increase(1)); say Order 09:05
p6eval nom: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Orde"␤» 09:06
jnthn hmm
nom: enum Order (:Same(0), :Increase(1)); say Order
p6eval nom: OUTPUT«Order()␤»
jnthn oh :/
-1 is not parsed as a literal.
moritz so it'd need constant folding to work out :( 09:07
jnthn Yeah, that's...unfortunate.
09:07 rhr joined
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
It's just $!value
iirc
See src/core/Enumeration.pm 09:09
We need a "real fix" there of course.
moritz++ # evil :) 09:10
cognominal jnthn, what version of nom is needed to use your grammar debuger tool? 09:11
jnthn++ btw
moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decontainerize(Order::Decrease), Enumeration, '$!value).say
p6eval nom: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decontainerize(Order::Decrease), Enumeration, '$!value').say
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␤»
moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decontainerize__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␤␤»
jnthn cognominal: Should run on latest
moritz: Enumeration is a role 09:13
moritz: Try Order instead.
moritz ok
nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::getattr(pir::perl6_decontainerize__PP(Order::Decrease), Order, '$!value').say
09:13 wamba left
p6eval nom: OUTPUT«2␤» 09:13
jnthn mwaha.
moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::bindattr(pir::perl6_decontainerize__PP(Order::Decrease), Order, '$!value', -1); say Order::Decrease 09:14
p6eval nom: OUTPUT«Order::Decrease␤»
moritz nom: enum Order (Decrease => 2, Same => 0, Increase => 1); nqp::bindattr(pir::perl6_decontainerize__PP(Order::Decrease), Order, '$!value', -1); say +Order::Decrease
p6eval nom: OUTPUT«-1␤»
moritz grins his most evil grin
09:14 wamba joined
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 09:30 renormalist left 09:36 [particle] left 09:37 _twitch left, wamba left, [particle] joined
moritz jnthn: meh, when I try to do that in the setting, the setting compilation hangs 09:38
09:39 coregateFX left
jnthn just the enum, or the change of value too? 09:40
How late in the setting did you add the enum? 09:41
moritz both
and very late (terms.pm)
cognominal --target=parse is broken in rakudo. Got Could not locate compile-time value for symbol StaticLexPad
s/rakudo/rakudo nom/ 09:42
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 "<>;"␤»
jnthn nom: enum Foo < >;
p6eval nom: ( no output )
jnthn moritz: Does an empty enum work, ooc?
May help narrow things down.
We don't have any enums in the setting yet, so could just be a circularity thing.
moritz jnthn: I'll try 09:46
09:46 woosley left
jnthn cognominal: --target=parse may take some fixing... 09:46
moritz hm, maybe my judgement was premature, because it seems that memory usage is growing slower than I remebered 09:47
09:48 wamba joined 09:56 agentzh joined 09:58 Trashlord joined 10:00 drbean joined
moritz jnthn: empty enum in the setting works, retrying my previous attempt now 10:02
tadzik ooh! 10:09
moritz++; masak++ # excellent mentors
moritz tadzik: thanks; there wasn't too much to mentor, since you got along just fine on your own most of the time :-) 10:10
10:11 pernatiy left
JimmyZ tadzik++, awesome work 10:11
tadzik jnthn++ # excellent non-mentor help too :) 10:12
moritz and I think pmichaud++ fixed the double bacon bug :-)
masak double chunky bacon! \o/ 10:13
tadzik and yet I still like bacok :) 10:14
even bacon 10:16
10:21 MayDaniel joined 10:34 Trashlord left
jnthn moritz: OK...hm. 10:35
moritz: I suspect there's something nasty going on then but at least that narrows it down a little.
10:37 Trashlord joined
jnthn Well, quite a bit actually...especially if "say Order" works afterwards. 10:41
10:42 MayDaniel left 10:59 im2ee left 11:00 f00li5h left 11:03 pernatiy joined
moritz say Order.WHAT worked 11:05
jnthn And say Order did not? 11:09
That'd be...weird.
Given that really Order === Order.WHAT
Or even =:=
moritz jnthn: I haven't tried it 11:10
jnthn, pmichaud: how would I best hide routines from backtraces? 11:11
I could make a Perl 6 level trait and check for that, but it feels kinda expensive, given that we have parrot level annotations
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?
moritz jnthn: die() for example, and maybe helper routines like at_pos, reify etc.
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
apejens unless you're java, and do a lot of it 11:14
:p
moritz jnthn: I don't want bloat setting functions
jnthn moritz: OK, but I assume we're talking about a handful of them?
moritz jnthn: not sure yet, but I don't think there are too many of them
jnthn moritz: Plus all it needs is a $r does role { method backtrace_hidden() { True } }
Which isn't really so costly. 11:15
moritz then I'll try that
jnthn It doesn't need any extra storage allocated, for example
It's just a mixin.
e.g. a type change to a subtype with an extra method.
JimmyZ hates java 11:16
moritz Could not find sub &infix:<does> 11:23
called from Sub 'trait_mod:<is>' pc 50 ((file unknown):28258001) (src/stage2/gen/NQPHLL.pm:1050)
urks
so, die() needs to come after operator.pm
that is... late 11:24
jnthn Welcome to bootstrapping. 11:25
moritz jnthn: any objections to moving infix:<does> (and maybe infix:<but> for consistentcy) to some earlier place?
jnthn Well, you could always move infix:<does> and infix:<but>
moritz :-)
src/core/early-operators.pm or something?
jnthn Well, we have some operators in Any.pm or Mu.pm already I think 11:26
So maybe there.
moritz ok
11:27 MayDaniel joined 11:28 odoacre left
moritz $ ./perl6 -e 'sub f() is hidden_from_backtrace { }; say &f.is_hidden_from_backtrace' 11:36
Bool::True
now to get that beast working inside the setting... 11:37
jnthn Traits really should work inside the setting...
11:39 MayDaniel left 11:46 Trashlord left
moritz control.pm comes before Mu.pm, that seems to be the problem 11:56
moritz switches
11:57 wamba left 11:59 wamba joined, satyavvd left
moritz bah, even putting Mu before control.pm still causes the same error 12:08
12:11 koban joined, koban left
moritz hates circularity 12:13
flussence I let this run for 3 minutes then did Ctrl+C, can anyone make sense of it? gist.github.com/1162247 12:18
moritz nom: say now 12:19
p6eval nom: OUTPUT«Instant:1314015591.08327␤»
moritz flussence: maybe the REPL tries some parrot-level stringification? 12:20
flussence: try
nqp::unbox_s(now.Str)
on the REPL
(my rakudo currently recompiles, so I can't test it :) 12:21
flussence nope, same thing there.
moritz huh.
flussence this works fine on everything but my netbook...
moritz jnthn: it seems I can't mix into Sub objects before class Sub was properly declared... 12:22
moritz tries to declare Sub earlier 12:23
takadonet morning all 12:26
flussence takadonet: would you be ok with me pointing the ecosystem url for text-tabs-wrap to my own repo? 12:30
12:31 pernatiy left
takadonet flussence: np 12:31
flussence k :D
12:33 tzhs joined
moritz accidentally composed the trait into the type object, not into the routine 12:42
and then I wondered why all unrelated subs had that new method
12:50 ab5tract joined
moritz $ ./perl6 -e ' say &die.is_hidden_from_backtrace' Bool::True 12:52
$ ./perl6 -e ' say &uc.?is_hidden_from_backtrace'
Nil
13:06 drbean left
tadzik oh, submitting code samples to google begins on 30th 13:12
jnthn moritz: yay :) 13:13
moritz: (sorry I wasn't more responsive - had $meeting)
13:14 pernatiy joined
moritz jnthn: no problem 13:14
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:15
jnthn moritz: that's fine also 13:16
Direct MOP usage to break circularity is fine.
tadzik are we going to get rid of circularity one fine day?
jnthn er 13:17
what?
:)
moritz that question is a bit like "are we going to stop breathing at some day? it occasionally hurts my lungs"
:-)
tadzik oh, I caused p6c confusion 13:18
nono, I mean, hmm
I don't know, don't mind me :)
I'm thinking bit slowly today
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
tadzik that was my train of thought
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
TimToady: that's cheating, you time-traveled last week :-)
13:20 Holy_Cow joined
TimToady though I didn't say it online, so it doesn't count; I only said it in jnthn++'s class to cotto++ 13:21
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.
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
flussence: for example you need a name of a method to be installed, and that name is a Str
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 :)
TimToady and std was really just a proof-of-concept, and cheats all over the place for anything not grammar related
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
moritz flussence: the ones you know of are perhaps 10%, and the rest 90% crop up as nasty surprises :-) 13:28
13:30 tzhs left
TimToady and of those, 90% are surprisingly nasty :) 13:31
jnthn Tell me about it...
jnthn still didn't find the weird role composition + Str + infix related one... :/ 13:32
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:37
jnthn Well, Lisp at least, afaik, doesn't really have a BEGIN time / run time distinction 13:38
Beyond "the last bit of runtime is the next bits BEGIN time" :)
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()␤»
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
bbkr_ nom: ()>>.^methods.WHAT.say;
p6eval nom: OUTPUT«Parcel()␤»
jnthn bbkr_: Looks correct to me.
moritz what should it return instead? Nil? 13:40
jnthn I don't think that >>-ing over an empty thing should return Nil.
TimToady it just returns another (), I expect
moritz neither
jnthn Right.
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
jnthn nom: ()>>.WHAT.say 13:41
p6eval nom: OUTPUT«Parcel()␤»
TimToady nom: ().WHAT.say
p6eval nom: OUTPUT«Parcel()␤»
jnthn >> only affects the . immediately after it.
TimToady nom: ().perl.say 13:42
p6eval nom: OUTPUT«()␤»
jnthn nom: ()>>.say
p6eval nom: ( no output )
TimToady nom: ()».perl.say
p6eval nom: OUTPUT«␤»
jnthn nom: ()>>.WHAT>>.say
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 meteorjay left
jnthn er :) 13:42
TimToady nom: ()».foo.perl.say
p6eval nom: OUTPUT«()␤»
jnthn Missing :D somewhere, me thinks. 13:43
TimToady \o/
bbkr_ i expect it to behave like "for () { .^methods.WHAT.say }"
jnthn bbkr_: It doesn't.
(As in, isn't spec'd to.)
moritz that's what the hypothetical 'each' junction from S09 would do, no?
jnthn imo it's useful that it doesn't also
tadzik nom: () ==> .^methods.WHAT.say
p6eval nom: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 1, near " .^methods"␤»
13:44 cotto left
bbkr_ ok, not a bug then 13:45
thanks
jnthn np :)
JimmyZ wonders where is substr() is rw defined in rakudo master or nom 13:46
moritz it isn't 13:47
13:47 masak left
jnthn meeting & 13:47
JimmyZ yesterday sub foo($a) is rw and sub foo($a is rw) confused me, and I tried to look at the source 13:48
moritz sub foo($a) is rw makes the return value of sub foo writable 13:49
sub foo($a is rw) makes $a writable
13:51 nebuchadnezzar left, nebuchadnezzar joined, mtk joined
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 14:02 am0c joined
bbkr_ looks like anon rw subs cannot be returned from another sub 14:07
rakudo: my $s = sub foo { return sub is rw { 1; } }; $s.().();
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␤»
bbkr_ however, when sub name is given everything works fine:
rakudo: my $s = sub foo { return sub bar is rw { 1; } }; $s.().();
p6eval rakudo a55346: ( no output )
14:09 wtw left 14:10 daxim left
bbkr_ wonders why anon rw sub is legal in rakudo return but is illegal in assignment 14:10
rakudo: my $s = sub is rw { 1 };
p6eval rakudo a55346: OUTPUT«Could not find sub &rw␤ in main program body at line 22:/tmp/SO2ScCQUOm␤»
bbkr_ std: my $s = sub is rw { 1 };
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed block at /tmp/Yy_WaiJqsJ line 1:␤------> my $s = sub is ⏏rw { 1 };␤ expecting any of:␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 121m␤»
bbkr_ std: sub foo { return sub is rw { 1; } }; 14:11
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed block at /tmp/HOlwPG8lqb line 1:␤------> sub foo { return sub is ⏏rw { 1; } };␤ expecting any of:␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 119m␤»
flussence std: sub() is rw { }
p6eval std 516268a: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/AViv12dzmk line 1:␤------> sub() ⏏is rw { }␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Undeclared routine:␤ 'sub' used at line 1␤Parse
..failed␤FAILED…
flussence std: sub () is rw { }
p6eval std 516268a: OUTPUT«ok 00:01 119m␤»
flussence rakudo: my $s = sub () is rw { 1 }; 14:12
p6eval rakudo a55346: ( no output )
flussence there you go
bbkr_ flussence: IMO this is bug, check this: 14:13
rakudo: sub foo { return sub is rw { } }; # expect to NOT parse
p6eval rakudo a55346: ( no output )
14:13 cotto_work joined
flussence weird... 14:13
bbkr_ sometrhing is returned that cause later Null PMC access if called 14:14
flussence it doesn't work with the "1" inside?
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␤»
bbkr_ reports 14:16
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; } "␤»
dalek kudo/nom: 19cfd13 | moritz++ | / (3 files):
add hidden_from_backtrace trait
14:21
kudo/nom: b1882a1 | moritz++ | src/core/BackTrace.pm:
hide hidden routines from backtraces
14:21 daxim joined 14:22 abercrombie joined 14:28 fhelmberger left, fhelmberger joined 14:29 Trashlord joined, fhelmberger left 14:31 jevin left 14:36 jaldhar left, jevin joined 14:39 xinming joined 14:42 alester joined 14:50 birdwindupbird left 14:52 fhelmberger joined 15:01 donri joined, coregateFX joined 15:02 yves joined 15:06 im2ee joined 15:15 mtk left
moritz thinks he has eliminated most LHFs from t/spectest.data 15:19
JimmyZ agrees
15:20 mtk joined
moritz S16-io/say.t needs some re-working 15:21
15:27 daniel-s left 15:29 thowe left, daniel-s joined 15:32 Patterner left
flussence did 2011.08 happen yet? or is it still waiting on stuff? 15:33
tadzik still waiting 15:34
moritz we have some massive problems with memory leaks, pmichaud++ diagnosed that they come from inferior runloops
flussence how long ago did those start? maybe they have something to do with my now() problem... 15:35
15:35 agentzh left
moritz I've recently bisected the commit; it's all in the logs :-) 15:38
iirc it was 09c8fab0947aba1e3bb7bb97ab79c65b8e9827f7 (from 2011-07-28) that exposed the problem at that massive scale 15:39
15:45 SHODAN left 15:54 alester left 15:58 molaf joined 16:02 im2ee left, _twitch left 16:10 JimmyZ left 16:11 daniel-s left 16:12 im2ee joined 16:15 Psyche^ joined, Psyche^ is now known as Patterner
cognominal rakudo: $_='"'; s/"// 16:16
p6eval rakudo a55346: OUTPUT«===SORRY!===␤Confused at line 22, near "s/\"//"␤»
cognominal rakudo: $_='"'; s/a//
p6eval rakudo a55346: ( no output )
16:16 mj41 left
cognominal nom: $_='"'; s/a// 16:16
p6eval nom: ( no output )
cognominal ok
\x22 ftw 16:18
16:23 ab5tract left 16:25 snarkyboojum left, snarkyboojum joined
TimToady nom: $_ = '"'; s/'"'//; .say 16:27
p6eval nom: OUTPUT«␤»
TimToady cognominal: ^^
std: s/"// 16:28
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse double quotes at /tmp/leMalqOZkG line 1:␤------> s/⏏"//␤Couldn't find final '"'; gave up at /tmp/leMalqOZkG line 1 (EOF):␤------> s/"//⏏<EOL>␤Parse failed␤FAILED 00:01 119m␤»…
16:36 tty234 left 16:38 wamba left 16:39 mkramer joined, wamba joined 16:41 abercrombie left
dalek osystem: 6e0bd2a | flussence++ | META.list:
Update meta url of Text-Tabs-Wrap
16:44
16:46 mkramer left
cognominal I keep thinking perl5 regular expressions and forget that non alphanumerics are meta :( 16:50
need some thougough muscle untraining.
16:51 mj41 joined
cognominal Whitehead said we progress by doing things by habits but sometimes habits are hard to unlearn :( 16:51
TimToady well, it'd be helpful if rakudo gave a better message for that... 16:52
16:54 xinming left 16:55 daniel-s joined 16:59 kboga joined 17:01 uvtc joined
uvtc Are there plans for a built-in help system, as in, at the Perl 6 repl: `> help(substr)` or similar? 17:01
tadzik yes 17:02
uvtc tadzik: is there a syntax for something like Python's docstrings? 17:03
tadzik Util: yes, one minute 17:04
17:04 Trashlord left, Trashlord joined
tadzik erm, uvtc 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.
tadzik see ttjjss.wordpress.com/2011/07/31/gso...as-landed/
uvtc tadzik: Thanks. 17:10
17:10 zby_home_ joined
tadzik you're welcome 17:12
uvtc tadzik: regarding your blog's colorscheme, it reminds me of the black spaceship in HHGttG. ;) 17:13
tadzik what's HHGttG?
uvtc Hitchhikers Guide ... 17:14
tadzik oh :)
17:14 dakkar left
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)
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
yeah, I'm not entirely happy with the theme, but I'm too lazy to look for a new one on wordpress.com 17:17
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:20
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
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
sorear in Perl 5 you can put documentation after __END__ and it doesn't affect load speed at all
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.
moritz sorear: though precompilation can make the speed difference insignificant 17:23
zag.ru/en/2011/234/a1/Create-presen...6-Pod.html 17:24
17:24 pedram joined
pedram Do you know any grat resource on perl6 ? 17:25
sorear pedram: What's grat?
tadzik oh, I do want that in Perl 6
17:27 daniel-s left
moritz pedram: perl6.org 17:27
pedram: it links to most great Perl 6 resources, and to some not-quite-so-great resources too :-) 17:28
so it's a meta-great meta resource :-)
tadzik zag++'s website made me think my display is dirty 17:29
pedram I mean greate resource 17:31
17:35 pedram left 17:37 pyrimidine joined 17:40 wolfman2000 joined 17:41 pernatiy left 17:46 xinming joined 17:56 wolfman2_ joined 17:57 wolfman2000 left
donri any love for reST in perlland? 18:03
18:05 jevin left
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:06
donri i think markdown is overused on the web, it's really crappy for editing in simple textareas 18:07
(but rest isn't better in that regard)
18:07 daxim left 18:09 jevin joined
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
+ lack of standard for extensibility
uvtc donri: Pandoc adds tables (nice simple syntax) 18:12
donri: blockquotes are just `> hi, I'm a blockquote`
donri: links are [like this](foo.bar.baz) 18:13
donri yes, that's difficult if you want to transform multiple lines
18:13 Trashlord left
uvtc donri: the blockquote? Emacs wraps it for me while correctly moving the '>'s around. 18:13
donri sure it's not too difficult with a proper editor, just noting it 18:14
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:16 abercrombie joined
donri pod6 looks interestingly simple and compact compared to rst, while still similarly powerful/extensible 18:23
(it does get tiring in python to type :class:`~omg.namespace.galore.HorayLinkedClass`)
(would that be C<OMG::Namespace::Galore::HorayLinkedClass> or somesuch in pod6/perl?) 18:24
tadzik what does that represent? 18:25
C<> stands for Code, rather than for Class, I think it's more generic
donri the result is a link to the class docs with the class name without the module as the link text 18:27
tadzik C<> doesn't link 18:28
when you say link, do you mean that's html-specific?
benabik L<> links, I think, but I don't know the link syntax.
tadzik it'd be L<HorrayClass|#HorrayClass> 18:29
I think
donri well :class: is sphinx-specific, not part of rst as such; html is one output format that supports links
tadzik mhm
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:30
plus a ~ to hide the module from the link text, which you almost always want to do 18:31
uvtc donri: perlcabal.org/syn/S26.html#Links 18:33
donri pod++ for supporting nesting
rst is fail in that regard
i suppose it discourages html 3 style "hacks" and encourages creating semantic roles but it can be annoying :) 18:35
18:38 abercrombie left 18:41 abercrombie joined 18:43 wamba left 18:45 MayDaniel joined
uvtc nom: 'x'.HOW.methods('x') 18:46
p6eval nom: ( no output )
uvtc rakudo: 'x'.HOW.methods('x')
p6eval rakudo a55346: ( no output )
TimToady say it
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…
uvtc And bingo was his name-o.
TimToady you might want a :local
though the default is supposed to chop out anything Cool or looser
uvtc I'm sorry, I don't know what that means. A :local?
TimToady nom: say 'x'.HOW.methods('x', :local)
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␤»
TimToady a named arg 18:48
"adverb"
uvtc Ah. named arg. Thank you.
TimToady :local == "locally"
sjohnson TimToady: hi, how's life
uvtc needs to read up on grade-school grammer at some point
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 abercrombie left
sjohnson home sweet home 18:50
18:50 birdwindupbird joined 18:51 donri left 18:53 kboga left
uvtc TimToady: with R* 2011.07, I get fewer methods listed: 18:53
> 'x'.HOW.methods('x', :local)
ACCEPTS perl pred succ WHICH Bool Str encode indent
benabik rakudo: 'x'.HOW.methods('x', :local) 18:54
p6eval rakudo a55346: ( no output )
benabik rakudo: 'x'.HOW.methods('x', :local).say
p6eval rakudo a55346: OUTPUT«ACCEPTSperlpredsuccWHICHBoolStrencodeindent␤»
benabik uvtc: That's a difference between master and nom. nom is starting to get more features than master.
uvtc benabik, nice. 18:55
TimToady: Oh, I see. The adverb :local is modifying the verb ".methods()".
18:56 MayDaniel left
uvtc Curious: when the big nom-->master switch happens, is nom being merged into master? Or are branches being renamed? 18:56
tadzik I think they're going to be renamed or so 18:57
and when, when the Big Guys solve the Big Issues :)
uvtc tadzik: Ah, thanks. 18:59
19:00 wolfman2_ left
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␤␤»
uvtc nom: say Array.HOW.methods(Array)[3]
p6eval nom: OUTPUT«REIFY␤»
TimToady nom: say Array.^methods[3] 19:03
p6eval nom: OUTPUT«REIFY␤»
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␤␤»
uvtc nom: say Array.^methods
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…
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.
Thanks.
Or is '.^' an operator? 19:06
TimToady the ^ goes more with the .
19:07 kaare__ joined
TimToady but the whole .^foo is somewhat indivisible 19:07
since it's short for a macro
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
uvtc "and pass the-object into the method call while you're at it"
(forgot that last part) 19:11
benabik nom: Array.^methods.say; Array.HOW.methods.say
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…
moritz right, it's because the metaclass manages many objects and classes
benabik nom: Array.^methods(Array)
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:<.^>…
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:<.^>…
moritz submitted his gsoc evalution
benabik Bah.
uvtc benabik, so the sugar causes the Array to be passed to the `methods` method.
[Coke] moritz: you are not the moritz student, right?
tadzik fights with HLL::CommandLine
19:12 dakkar joined
benabik uvtc: I think I don't think so? I think Array.^methods is just Array.HOW.methods 19:13
uvtc: I was trying to figure it out and failing.
TimToady benabik: no, it also passes Array as the 1st arg
benabik TimToady: Does that happen for all .^ calls? 19:14
TimToady yes
foo.^bar(baz) always means foo.HOW.bar(foo,baz) 19:15
moritz [Coke]: no, that's Moritz Onken, usually with nickname 'mo' 19:17
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 …
benabik nom: Hash.HOW.methods(Hash).say
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 …
benabik nom: Hash.HOW.methods(Hash, :local).say
p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl␤»
19:19 wooden left
uvtc rakudo: say Hash.^methods 19:19
p6eval rakudo a55346: OUTPUT«at_key!STOREBooldeletepush!push_constructlisthashsortpickroll␤»
benabik nom: Hash.HOW.methods(Array, :local).say
p6eval nom: OUTPUT«new at_key STORE_AT_KEY STORE delete push _push_construct perl␤»
[Coke] moritz: does that make you Curly? 19:21
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"
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␤␤»
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␤␤»
tadzik std: say +"4hello" 19:24
p6eval std 516268a: OUTPUT«ok 00:01 119m␤»
tadzik oh, that's nom-new I think
rakudo: say +"4hello"
p6eval rakudo a55346: OUTPUT«4␤»
tadzik rakudo: say +"4e4"
p6eval rakudo a55346: OUTPUT«40000␤»
benabik nom: say +"4e4" 19:25
p6eval nom: OUTPUT«40000␤»
19:26 pernatiy joined
benabik nom: say :16<deadbeef> 19:28
p6eval nom: OUTPUT«3735928559␤»
benabik nom: say +":16<deadbeef>"
p6eval nom: OUTPUT«3735928559␤»
benabik Very complete.
uvtc Shouldn't :16<deadbeef> be a Pair, as in, `"16" => "deadbeef"`? 19:29
flussence no, it's parsed specially
19:30 abercrombie joined
uvtc (whoops, sorry, didn't look at the coercion) 19:30
benabik nom: say :16<dead_beef.face> # From S02
p6eval nom: OUTPUT«3735928559.97971␤»
benabik nom: (16 => "dead_beef.face").perl.say 19:31
p6eval nom: OUTPUT«16 => "dead_beef.face"␤» 19:32
tadzik nom: my $a = 'foo'; my $b = 'bar'; say (:$a($b)).perl
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␤␤»
tadzik right
nom: my $a = 'foo'; my $b = 'bar'; say ($a => $b).perl 19:33
p6eval nom: OUTPUT«"foo" => "bar"␤»
benabik nom: my $a = 'foo'; (:$a).perl.say 19:34
p6eval nom: OUTPUT«"a" => "foo"␤»
benabik That's what I thought.
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
19:35 dual joined
TimToady *often 19:35
uvtc TimToady: excellent, thanks 19:36
19:36 MayDaniel joined
uvtc nom: say :a 19:36
p6eval nom: OUTPUT«␤»
uvtc rakudo: say :a
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␤»
TimToady rakudo is perhaps correcter there
nom: say (:a) 19:37
p6eval nom: OUTPUT«"a" => True␤»
uvtc Ah, there we go.
TimToady note the space is required
or the parens are function call parens 19:38
which would turn :a back into a named arg
uvtc When declaring a variable to be Numeric, that implies that it may be taking on Int *or* Rat values, correct? 19:44
jnthn evening, #perl6 19:45
TimToady or Num, or Complex 19:46
use Real to exclude Complex
tadzik evening jnthn 19:47
dalek p/commandline-optional-arguments: 3e5dcec | tadzik++ | src/HLL/CommandLine.pm:
Allow optional named parameters in CommandLine.pm

Specified with foo=s? get the passed value if any, empty string otherwise. So --foo will set %options<foo> to '', --foo=bar will result in %options<foo> := 'bar'. In the first case, %options<foo> will still be false, but the existance of the argument can be checked with pir::exists()
uvtc rakudo: my Num $n = 4;
tadzik commit message longer than the patch :P
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 MayDaniel left
tadzik anyway, this will allow me to accept --doc as well as --doc=html and such. Please review 19:47
oh, docs are still to be fixed 19:48
abercrombie TimToady: What's the heredity here? I mean the relationship between Num, Complex, Rat, Int 19:49
flussence tadzik++
dalek p/commandline-optional-arguments: 8d12a5c | tadzik++ | src/HLL/CommandLine.pm:
Update HLL::CommandLine documentation mentioning optional values
19:50
jnthn o/, tadzik++ 19:52
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␤␤»
benabik abercrombie: I _think_ there's no inheritance, although they all do Numeric (a role). Mind you, I haven't checked.
abercrombie Oh, I see. 19:54
jnthn No, Int !~~ Num. 19:55
nom: my Numeric $n = 4;
p6eval nom: ( no output )
abercrombie I thought Num is short for Numeric 19:57
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:58
tadzik jnthn: could you review that for me? 19:59
once merged I could start bringing stuff like --doc=html or so to life
20:01 birdwindupbird left
abercrombie benabik: Yep, I see that Int, Rat and Num all conform to Numeric 20:02
jnthn tadzik: review...the branch in nqp? 20:03
tadzik jnthn: yep
20:04 TiMBuS|Away joined, TiMBuS left, TiMBuS|Away is now known as TiMBuS 20:05 bbkr joined 20:06 masak joined
masak lol yay hai #perl6 20:06
tadzik lol! a masak!
jnthn tadzik: looks good to me 20:07
tadzik ok, proceeding 20:08
20:08 donri joined
jnthn tadzik: I think moritz++ wrote that in the first place, fwiw. 20:08
o/ masak
dalek p: 3e5dcec | tadzik++ | src/HLL/CommandLine.pm:
Allow optional named parameters in CommandLine.pm

Specified with foo=s? get the passed value if any, empty string otherwise. So --foo will set %options<foo> to '', --foo=bar will result in %options<foo> := 'bar'. In the first case, %options<foo> will still be false, but the existance of the argument can be checked with pir::exists()
p: 8d12a5c | tadzik++ | src/HLL/CommandLine.pm:
Update HLL::CommandLine documentation mentioning optional values
p: 4d93b19 | tadzik++ | tools/build/Makefile.in:
Merge branch 'master' of github.com:perl6/nqp
masak backlogs
tadzik meh, should've rebased
bbkr what is the replacement for caller() from p5? 20:09
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. github.com/perl6/nqp/issues/22 20:10
tadzik I think it's callframe.something
nom: sub foo { say callframe[0] }; foo()
p6eval nom: OUTPUT«CallFrame<56335216>␤»
tadzik meh
bbkr thanks 20:11
20:12 Trashlord joined
jnthn benabik: Does sub a:b<c> work out? 20:17
benabik jnthn: Yes, it does...
masak tadzik: I merge so seldom these days that I generally notice them already at pull-time. 20:18
(and then I back up and rebase instead)
benabik jnthn: But I encountered it because I was looking at src/gen/perl6-gramar.pir… Perl6::Grammar uses "token special_symbol:sym['$<']"
jnthn ah.
benabik It actually tries to match against Capture[…] instead of $< AFAICT. 20:19
jnthn yeah, look so. Thanks for filing the issue. 20:20
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:21
20:22 envi left 20:24 wamba joined
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.
abercrombie: You're using it as a type constraint.
20:25 REPLeffect left
jnthn Which means "anything that does Numeric can be stored in $x" 20:25
abercrombie So the actual object "4" is not Numeric but Int? 20:26
jnthn Correct
It's how my Any $x = ... works.
benabik nom: my Numeric $n = 4; say $n.WHAT
p6eval nom: OUTPUT«Int()␤»
jnthn Well, Any is a class. But $x can hold anything that ~~ Any
benabik nom: my Numeric $n; say $n.WHAT
p6eval nom: OUTPUT«Numeric()␤»
jnthn Right, slots get initialized to the type object of the specified type. 20:27
nom: my Str $s; say $s.WHAT
p6eval nom: OUTPUT«Str()␤»
jnthn etc.
benabik nom: my Numeric $n .= new; # This should fail...
p6eval nom: ( no output )
jnthn It won't. It'll pun the role. 20:28
nom: role Foo { }; Foo.new
p6eval nom: ( no output )
benabik Realized that _right_ after I hit enter.
jnthn However, important to note that...
nom: role Foo { }; say Foo.HOW.HOW.name(Foo.HOW) 20:29
p6eval nom: OUTPUT«Perl6::Metamodel::ParametricRoleHOW␤»
jnthn nom: role Foo { }; my $x = Foo.new; say $x.HOW.HOW.name($x.HOW)
p6eval nom: OUTPUT«Perl6::Metamodel::ClassHOW␤»
20:30 fbass joined, fbass left
abercrombie jnthn: Then how can I specify the type of the object? Something like my Numeric $n = Num(4) 20:32
jnthn abercrombie: 4 is an Int literal. If you want a numeric literal, write one 20:33
e.g. 4e1
er, a Num literal I meant :)
benabik Or 4.0 or 4.Num (although I think the last isn't a literal) 20:34
jnthn 4.0 is Rat
Not Num
benabik Or is 4.0 a Rat literal? 40/10
More precise, but somewhat surprising to this ol' C programmer. :-D
abercrombie Why do we need the Rat type? Isn't Num sufficient? 20:36
benabik abercrombie: Num can lose precision.
abercrombie So Rat is kind of lazy evaluation? 20:37
I mean, what the acutal data stored in memory for Rat?
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.
benabik Rat I think is Rational[Int,Int] 20:38
jnthn Yeah, it's a pair of Ints to a first approximation.
benabik It has an Int numerator and Int denominator.
1.23456 = 123456/100000
20:39 uvtc left
abercrombie So it seems sizeof(Rat) > sizeof(Num) 20:39
jnthn Very likely, yeah. 20:40
[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.
abercrombie Then what if I write my Numeric $n; What's the actual object type? 20:42
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
jnthn abercrombie: It's initialized to the Numeric type object, and typed objects in Perl 6 represent undefined values.
If you're familiar with Perl 5 undef, just think of it like that, apart from it knows a bit more about its type.
abercrombie Oh, that makes me a little confused. I am trying to relate roles with C++'s virtual base classes.. 20:44
20:45 wolfman2000 joined
benabik C++ doesn't have type objects, which makes it a little difficult to compare. 20:46
20:46 mj41 left, dakkar left
abercrombie If roles cannot be instantiated, I really don't know why I can still call my Numeric $n an object 20:48
benabik The role itself is an object. 20:50
jnthn You're conflating "object" and "instance"
abercrombie oh yeah, I thought there were the same thing 20:51
jnthn Type objects aren't really "instances" by they are objects.
s/by/but/
That is, they have exactly the same type as an instance; they're just undefined and lack any storage.
abercrombie Oh, then I got it. I thought the instances of classes were just objects 20:52
jnthn :) 20:54
abercrombie Thanks :)
TimToady the metaclasses are just objects 20:57
but they're of a completely different type than the object they represent, normally 20:58
type objects are just stand-ins for normal objects, like stunt doubles
jnthn Aye, until you reach the bottom and it loops back on itself :)
TimToady or more like crash dummies
jnthn :D 20:59
TimToady yes, that's why I said "normally"; what you do isn't normal :) 21:00
jnthn Touché :P
21:02 kaare__ left
TimToady time for a nap, or whatever it is when you're jetlagged and sleep during the middle of the day... 21:02
zzz &
masak blog post without adjectives and adverbs! strangelyconsistent.org/blog/yapc-e...nd-adverbs 21:09
tadzik the post is to my liking 21:10
jnthn That's a blog post.
tadzik Carl Plus PLus
jnthn I read it. I felt enjoyment. 21:11
masak this pleases me.
tadzik LIEK
masak writing sentences without adjectives and adverbs is... a challenge. 21:12
you might recall I did a blog post without the verbs two years ago: strangelyconsistent.org/blog/npw-20...-the-verbs 21:13
21:13 zby_home_ left
tadzik I'm waiting for a one without alphanumeric characters 21:13
masak :P 21:14
well, there's always ASCII diagrams.
tadzik is wondering about the best way to make use of Pod::To 21:15
and --doc=foo
masak .oO( Pod::To::Mars )
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
I want it to be some sort of a bridge between the compiler and the ecosystem
21:17 y3llow_ joined, pothos_ joined, y3llow left, pothos left
flussence you'd have to define a name map somewhere, or use case-insensitive matching, because of things like Pod::To::HTML 21:17
21:18 y3llow_ is now known as y3llow
flussence (and should --pod eventually work like perldoc when it's run on a TTY?) 21:18
21:19 pothos_ is now known as pothos
bbkr rakudo: class A { method ^foo { 1 } }; A.foo; # this should work according to the spec 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 wamba left
jnthn bbkr: Hmm. I didn't re-visit that bit of S12 in nom yet... 21:21
bbkr: I agree master's interpretation is kinda dubious in that sense.
tadzik flussence: yeah, a name map, that's still hardcoding the solution somewhere in the compiler ecosystem 21:23
masak 'night, #perl6
tadzik 'night masak
21:23 masak left
bbkr jnthn: should I report it? currently s12 gives not working example here. 21:23
jnthn bbkr: Feel free to file a ticket on that. 21:24
bbkr reported 21:36
jnthn Thanks. 21:38
21:39 Trashlord left 21:43 pernatiy left 21:48 im2ee left 21:51 drbean joined 21:53 pernatiy joined
sorear good * #perl6 22:03
22:03 im2ee joined, im2ee left 22:04 im2ee joined 22:07 Holy_Cow left 22:14 am0c left 22:20 wamba joined 22:22 im2ee left, bbkr left 22:23 bbkr joined 22:28 wk joined 22:34 rnddim joined 22:41 wamba left 22:44 [Coke] left 22:47 mberends left 22:48 cotto joined 22:52 thou joined 22:53 wamba joined 22:58 wk left 23:00 wamba left 23:07 [Coke] joined 23:10 molaf_ joined, [Coke] left 23:13 molaf left 23:15 [Coke] joined 23:18 wamba joined 23:25 fbass joined 23:29 fbass left 23:34 Psyche^ joined 23:35 Trashlord joined 23:38 Patterner left, Psyche^ is now known as Patterner 23:44 tokuhirom joined 23:45 envi joined, wamba left 23:47 whiteknight joined
diakopter sorear: good 23:53
TimToady we don't do currying by leaving out terms here 23:54
diakopter #perl6. where even talking about cargo-culting is cargo-culted. 23:56
TimToady is that why it doesn't work? 23:59
diakopter wfm ;)