Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-02-06

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 clsn__ Why were we even expecting 「」 to work without Q or q or something?
00:06 raiph joined #perl6
00:10 jac50 joined #perl6
00:22 lue clsn__: 「」 is the quoting form of Q(), like '' is for q() and "" is for qq()
00:23 clsn__ Oh... I didn't see that when I tried it.  What is Q()'s nature, as opposed to q()?  That is, what does it quote or not quote?  I understand q and qq are just Q with adverbs.
00:23 lue Q is the base quoting language, without any special interpretations, such as backslashes.
00:25 clsn__ Does q() do any specials?
00:26 clsn__ Ah, I see q[\] doesn't work but has to be q[\\] whereas Q[\] works.
00:26 lue r: say Q[Hello!\n\]; say q[Hello!\n\]];
00:26 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«Hello!\n\␤Hello!\n]␤»
00:26 clsn__ So in q[], the only(?) special interpretation is that \ can quote the close-quote character(s), or another \?
00:27 lue :q          :single         Interpolate \\, \q and \' (or whatever)
00:28 lue http://perlcabal.org/syn/S02.html#Q_forms  has more information on the matter :)
00:28 clsn__ Heh... Kind of funny interactions... q<<\>>>> works, q<<>>> doesn't (and shouldn't), but <<\>>> also throws an error.  Probably rightly, but it just seems odd.
00:30 lue clsn__: yeah, that's one of those areas where I wish << >> wasn't interpreted as «». It reads better as q«\»», q«»>, and q«\»>
00:30 lue (which is my guess on how P6 reads those)
00:30 clsn__ What good does quoting \q[] inside another \q[] accomplish?
00:31 lue I don't know what that \q part is about.
00:31 raydiak dunno, but \qq inside q is quite useful
00:31 clsn__ I don't know that it's a <</« thing.  I think it's more that multiple openers are allowed.  The same would probably happen with q<<<\>>>>>> and q<<<\>>>>>
00:32 lue r: say q<<<alive?>>>
00:32 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«alive?␤»
00:32 clsn__ raydiak: I see!  So used to thinking "q doesn't interpolate!" that I didn't consider that you could locally override it.
00:32 lue r: say q<<<\>>>>>>; say q<<<\>>>>>
00:32 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Couldn't find terminator >>>â�¤at /tmp/tmpfile:1â�¤------> [32msay q<<<\>>>>>>; say q<<<\>>>>>[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤   …»
00:34 clsn__ 「」 doesn't work for me as a quoting form of Q[]; is that NYI?
00:35 BenGoldberg r: say q<<<\>>>>>>; say q<<<\>>>>>>
00:35 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«>>>␤>>>␤»
00:36 lue clsn__: NYI
00:36 clsn__ 'k,
00:36 * lue is seeing if he can fix that right now, actually
00:37 clsn__ yay.
00:38 lue Won't actually be able to push such a change until I get a commit bit or set up a fork though.
00:38 clsn__ Mm.  And I see that <1/2> for Rat literals is also NYI.  Parses as Str.  Which is why Rat.perl doesn't round-trip in Rakudo.
00:39 clsn__ Wait, maybe not... It's supposed to make a something that is both a Rat and a Str, so maybe it's right that WHAT shows it as a str.
00:40 clsn__ Nah.  <1/2>.^methods only shows Str stuff.
00:43 lue clsn__: <1/2> → Rat, < 1/2 > → RatStr, «1/2» → RatStr, « 1/2 » → RatStr  , IIRC
00:43 clsn__ S02: Literals specified in angle brackets are always subject to val() processing, so <1/2> produces a value that is both a Rat and a Str.
00:44 grondilu r: say .WHAT for <1/2>, < 1/2 >, «1/2», « 1/2 »
00:44 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«(Str)␤(Str)␤(Str)␤(Str)␤»
00:44 lue n: say .WHAT for <1/2>, < 1/2 >, «1/2», « 1/2 »
00:44 camelia niecza v24-109-g48a8de3: OUTPUT«(Rat)␤(RatStr)␤(RatStr)␤(RatStr)␤»
00:44 lue niecza++
00:44 * lue & for a minute
00:44 grondilu IIRC, this used to work on rakudo
00:44 grondilu :/
00:49 * lue does not remember that, but could be wrong
00:50 BenGoldberg r: say <1/2>.RatStr
00:50 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«No such method 'RatStr' for invocant of type 'Str'␤  in block  at /tmp/tmpfile:1␤␤»
00:50 BenGoldberg r: say RatStr.new(<1/2>)
00:50 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    RatStr used at line 1â�¤â�¤Â»
00:51 lue clsn__: here's a counter to the part of S02 you cited :)  http://perlcabal.org/syn/S​02.html#Rational_literals
00:52 lue Also, under Allomorphic Value Semantics: "Any such literal, when written without spaces, produces a pure numeric value without a stringy allomorphism."
00:52 clsn__ I know; in fact, the part I quoted is the last paragraph of that section.
00:53 clsn__ At any rate, <1/2>.WHAT === Str is Not Right.
00:53 lue agreed. As you can guess though, implementing allomorphic types will take a bit of work :)
00:54 clsn__ You bet.
00:55 araujo joined #perl6
00:59 jnap joined #perl6
01:00 regreg joined #perl6
01:12 telex joined #perl6
01:23 jnap joined #perl6
01:41 thou joined #perl6
01:47 araujo joined #perl6
01:49 [Coke] moritz: https://github.com/blog/1772-d​iffable-more-customizable-maps
02:00 LingeringSouls joined #perl6
02:01 LingeringSouls wow anagrams solution at rosetta code. Perl 5 implementation runs very quick less than 10 secs. Perl 6 implementation on rakudo took 4 hours.
02:02 [Coke] LingeringSouls: which rakudo?
02:02 LingeringSouls 2013.12
02:03 LingeringSouls maybe i didn't compile it correctly?
02:03 [Coke] http://rosettacode.org/wiki/Anagrams#Perl_6 ?
02:03 LingeringSouls yeah
02:03 [Coke] LingeringSouls: also, which backend?
02:03 LingeringSouls parrot
02:03 [Coke] parrot/jvm/moar?
02:03 [Coke] k.
02:06 clsn__ Interesting...
02:06 clsn__ r: subset Prime of Int where *.is-prime; sub pid(Int $p-->Prime) { $p; }; {CATCH {default {say $_.perl}}; say pid(18) }
02:06 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6, rakudo-moar 90b3d6: OUTPUT«X::TypeCheck::Return.new(operation => "returning", got => 18, expected => Prime)␤»
02:06 clsn__ That worked; the exception was caught.
02:06 clsn__ r: subset Prime of Int where *.is-prime; sub pid(Int $p-->Prime) {CATCH {default {say $_.perl}}; $p}; say pid(18)
02:06 camelia rakudo-parrot 90b3d6, rakudo-jvm 90b3d6: OUTPUT«Type check failed for return value; expected 'Prime' but got 'Int'␤  in sub pid at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
02:06 camelia ..rakudo-moar 90b3d6: OUTPUT«Type check failed for return value; expected 'Prime' but got 'Int'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:596␤  in sub pid at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
02:07 clsn__ This time it wasn't.  So the exception is thrown *after* the return, not while it's still inside the routine.
02:07 clsn__ So your routine can't trap itself about to return something illegal.
02:09 [Coke] you're trying to use the last value of the catch as a return?
02:10 [Coke] that seems dubious.
02:10 kbaker joined #perl6
02:13 clsn__ No, I was trying to catch the return of an illegal return value.
02:14 clsn__ I guess it makes sense.  After all, even after catching it, I never did return something legal.  What are you going to do then?  Go into an infinite loop of catching?
02:14 clsn__ Just interesting is all.
02:22 clsn__ I suppose you can check it inside the sub by smartmatching against &?ROUTINE.returns (though it seems a little dumb since you presumably know the return type if you wrote it.)
02:27 clsn__ In much the same way you can do ub nextprime(Prime $p is copy) { $p.=succ; $p.=succ until $p ~~ &?ROUTINE.signature.params[0].constraints; $p }
02:28 clsn__ Which is sort of what I was playing with the other day.  Again, sort of long-winded, since you know the constraints yourself since you put them there.
02:28 clsn__ (note, though, that the constrained parameter comes through as a normal type with constraints, not as the subset.)
02:31 [Coke] going through the anagram example, it's the first .join where things seem to start slowing down
02:34 [Coke] "he said, eyeballing it."
02:40 lucs left #perl6
02:45 [Coke] (hurm. I take that back, and head to bed.)
02:55 [particle]1 joined #perl6
02:57 xenoterracide_ joined #perl6
02:58 molaf joined #perl6
02:59 flussence joined #perl6
03:23 xenoterracide_ joined #perl6
03:28 kaleem joined #perl6
03:31 flussence joined #perl6
03:37 skids joined #perl6
03:37 skids joined #perl6
03:38 skids r: my %f; %f{1} = { a => 1 }; %f{2} =%f{1}; %f{1}{"a"} = 2; %f.say
03:38 camelia rakudo-parrot 90b3d6, rakudo-moar 90b3d6: OUTPUT«("1" => {"a" => 2}, "2" => {"a" => 2}).hash␤»
03:38 camelia ..rakudo-jvm 90b3d6: OUTPUT«("2" => {"a" => 2}, "1" => {"a" => 2}).hash␤»
03:55 rurban joined #perl6
03:59 grondilu r: my %f; %f{1} = { a => 1 }; %f{2} := %f{1}; %f{1}{"a"} = 2; %f.say
03:59 camelia rakudo-parrot 90b3d6, rakudo-moar 90b3d6: OUTPUT«("1" => {"a" => 2}, "2" => {"a" => 2}).hash␤»
03:59 camelia ..rakudo-jvm 90b3d6: OUTPUT«("2" => {"a" => 2}, "1" => {"a" => 2}).hash␤»
04:01 grondilu r: my %f; %f{1} = { a => 1 }; %f{2} = Hash.new: %f{1}; %f{1}{"a"} = 2; %f.say
04:01 camelia rakudo-jvm 90b3d6: OUTPUT«("2" => {"a" => 1}, "1" => {"a" => 2}).hash␤»
04:01 camelia ..rakudo-parrot 90b3d6, rakudo-moar 90b3d6: OUTPUT«("1" => {"a" => 2}, "2" => {"a" => 1}).hash␤»
04:40 cognominal joined #perl6
04:50 lue joined #perl6
04:51 kaleem joined #perl6
05:20 BenGoldberg m: say (1e-14).fmt('%.19f')
05:20 camelia rakudo-moar 90b3d6: OUTPUT«0..92233720368548e+19␤»
05:20 colomon joined #perl6
05:40 Alina-malina joined #perl6
05:48 sftp joined #perl6
06:13 kaleem joined #perl6
06:25 SamuraiJack__ joined #perl6
06:27 [Sno] joined #perl6
06:38 moritz good morning.
06:38 cxreg joined #perl6
06:49 xenoterracide_ joined #perl6
06:59 xinming joined #perl6
07:00 FROGGS joined #perl6
07:00 yves_ joined #perl6
07:02 go|dfish joined #perl6
07:04 dagurval joined #perl6
07:06 hugme joined #perl6
07:19 rurban joined #perl6
08:04 darutoko joined #perl6
08:05 raydiak is it appropriate to open a rakudo pull request for a trivial typo fix in docs/?
08:11 grondilu sure, why not?
08:15 raydiak forcing someone whose time is valuable to mark an e-mail as read and go accept the request just to change 1 character in a doc seemed inconsiderate, somehow
08:15 zakharyas joined #perl6
08:16 grondilu I've done it once, jnthn merged it and did not complain.
08:16 grondilu I think it's just a matter of one click to the "merge button", isn't it?
08:19 raydiak more or less...idk, people act in funny ways that I don't understand sometimes...like you'd think tipping someone with coins instead of no tip at all would be a good thing, but people don't react to that well either, I've discovered
08:19 raydiak anyway, I'm sure you're right
08:20 grondilu just make it clear the pull request is just a typo fix
08:21 raydiak will do; thanks grondilu++
08:24 Rotwang joined #perl6
08:24 moritz raydiak: merging trivial pull requests is nearly no effort
08:24 moritz raydiak: so, go ahead
08:24 moritz merging non-trivial pull requests that require review is much more effort
08:26 raydiak funny...if it was non-trivial (a substantial contribution), I wouldn't hesitate :)
08:30 raydiak moritz: this is all your fault anyway...came across the typo while I was trying to figure out how to try to figure out why .Array::[] works, as you suggested
08:31 raydiak or .[], for that matter
08:33 zakharyas joined #perl6
08:38 * moritz feels almost guilty
08:38 dalek rakudo/nom: 2ce599a | raydiak++ | docs/architecture.html:
08:38 dalek rakudo/nom: Fix typo
08:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2ce599a7a0
08:38 dalek rakudo/nom: e4e8625 | moritz++ | docs/architecture.html:
08:38 dalek rakudo/nom: Merge pull request #251 from raydiak/nom
08:38 dalek rakudo/nom:
08:38 dalek rakudo/nom: Just a trivial typo fix
08:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4e8625db5
08:38 moritz raydiak: thanks
08:41 raydiak moritz: you're welcome; thanks for keeping me on my toes, I genuinely appreciate it
08:43 moritz somehow the layout of https://github.com/rakudo/rakudo/pull/251 is rather broken in my firefox
08:46 moritz ... and looks fin in firefox on my other machine. Weird.
08:46 moritz *fine
08:46 raydiak heh
08:46 raydiak zoom not at 100%, perhaps?
08:50 moritz http://moritz.faui2k3.org/tmp/ff-pull-request.png
08:50 moritz zoom doesn't seem to make a difference
08:51 gfldex moritz: did you force a reload with ctrl-LMB on the reload button?
08:51 rurban joined #perl6
08:51 raydiak huh...you have textual names instead of the gravatars
08:51 dmol joined #perl6
08:52 moritz gfldex: I did a ctrl+shift+r which seems to do the same thing
08:55 raydiak does this load?: https://2.gravatar.com/avatar/a​38ecf4c33b995863568a3dac33a2a4b
08:56 berekuk joined #perl6
08:58 lizmat does for me
08:58 raydiak I mean in moritz's apparently broken corner of the internet :)
08:59 moritz it does
08:59 raydiak odd
09:03 raydiak short of busting out dev tools to inspect the http headers or checking the browser console for errors, nothing jumps to mind
09:06 moritz firebug doesn't show any errors in the network tab
09:06 moritz though the console says "Content Security Policy: The page's settings blocked the loading of a resource: An attempt to execute inline scripts has been blocked"
09:07 raydiak ah...haven't heard that one before...inline js is a security threat too, now?
09:09 moritz well, there's a Content-Security-Policy header that can forbid such things
09:09 moritz which can be a nice protection against XSS
09:10 raydiak ah, that's what it meant by "The page's settings"
09:11 raydiak I don't see any scripts on that page related to those images, or any inline js at all
09:13 raydiak any browser extentions that might do it? an overzealous adblocker or something?
09:14 moritz maybe
09:32 daniel-s_ joined #perl6
09:32 raydiak g'night all
09:32 dakkar joined #perl6
09:34 SamuraiJack__ joined #perl6
10:17 masak antenoon, #perl6
10:19 rurban joined #perl6
10:21 moritz \o masak
10:25 FROGGS o/
10:58 dalek joined #perl6
11:30 Adriaaan joined #perl6
11:38 bjz joined #perl6
11:44 bjz joined #perl6
11:50 fhelmberger joined #perl6
12:05 sjn joined #perl6
12:25 rindolf joined #perl6
12:56 xinming joined #perl6
13:02 timotimo constant $GROWTH_RATE of Num where 0..* = 1.6;
13:02 timotimo does this make sense? o_O
13:05 masak um. no.
13:05 masak std: constant $GROWTH_RATE of Num where 0..* = 1.6;
13:05 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing initializer on constant declaration at /tmp/S9Jmb4OdrW line 1:�------> [32mconstant $GROWTH_RATE of Num [33m�[31mwhere 0..* = 1.6;[0m�Two terms in a row at /tmp/S9Jmb4OdrW line 1:�------> [32mconstant $GROWTH_…»
13:05 timotimo thank you
13:05 masak short story: 'where' does not go there.
13:05 timotimo it would have to have a subset defined for it, aye?
13:05 masak bigger problem: why do you even need to restrict a constant in the first place? :P
13:05 timotimo hah
13:05 timotimo for clarity
13:06 masak yeah, you need a level of indirection with a subset here.
13:06 masak then you can do 'constant MySubset $GROWTH_RATE = 1.6;'
13:08 dalek specs: ff5dbb6 | (Timo Paulssen)++ | S26-documentation.pod:
13:08 dalek specs: fix strange perl6 code in alias example
13:08 dalek specs: review: https://github.com/perl6/specs/commit/ff5dbb60c6
13:10 Ven joined #perl6
13:10 Sqirrel joined #perl6
13:12 mtk joined #perl6
13:21 Adriaaan joined #perl6
13:24 SamuraiJack__ joined #perl6
13:29 masak oh, that code was TheDamian++'s, applied by me. heh.
13:29 masak timotimo++
13:34 kurahaupo_mobile joined #perl6
13:40 ajr joined #perl6
13:46 varna joined #perl6
13:46 varna left #perl6
13:46 kbaker joined #perl6
13:49 ggherdov joined #perl6
14:09 bluescreen10 joined #perl6
14:19 jnap joined #perl6
14:36 yves_ joined #perl6
14:38 timotimo :P
14:43 skids joined #perl6
14:48 btyler joined #perl6
14:49 ggoebel1114 joined #perl6
14:54 kaare_ joined #perl6
14:54 treehug88 joined #perl6
14:55 Ulti just built Rakudo-moar on my macbook \o/ but the REPL doesn't let you press up to get the previous line anymore :<
14:56 masak Ulti: I think that needs to have readline installed.
14:57 masak it's something of a FAQ, but I don't know that we have the answer written down somewhere.
15:00 xenoterracide_ joined #perl6
15:00 treehug88 joined #perl6
15:03 thou joined #perl6
15:03 btyler Ulti: linenoise was acting goofy on OSX and linux (starting a repl led to an infinite sprew of '>'), so jnthn++ hacked in a simple placeholder so that the Moar release could go out
15:04 Ulti ahh ok
15:09 masak btyler++ # knows stuff
15:09 ajr joined #perl6
15:14 kivutar joined #perl6
15:16 Ulti just noticed something sort of weird
15:16 Ulti r: say [**] ^8
15:16 camelia rakudo-parrot e4e862, rakudo-jvm e4e862, rakudo-moar e4e862: OUTPUT«0␤»
15:16 Ulti r: say [**] ^10
15:17 camelia rakudo-parrot e4e862, rakudo-jvm e4e862, rakudo-moar e4e862: OUTPUT«(timeout)»
15:17 Ulti maybe thats really not doing what I though it was
15:17 moritz m: say [**] ^20
15:17 camelia rakudo-moar e4e862: OUTPUT«0␤»
15:17 Ulti but the time it takes to calculate grows in a scary way
15:18 moritz Ulti: ** is right-associative
15:18 moritz Ulti: so it calculates 0 ** (1 ** (2 ** ( 3 ** ... ) ) )
15:18 moritz Ulti: which means it has to calculate the full inner expression, before returning 0
15:18 Ulti oh
15:18 Ulti that would explain it a bit more
15:19 * masak .oO( but a *sufficiently clever* compiler... ) :P
15:19 Ulti apart from my moar build is still doing ^10 but the one here did ^20 fairly snappy
15:21 rurban joined #perl6
15:21 Ulti looks like moar is the answer though >:3
15:21 moritz Ulti: I wonder why camelia was so quick to answer
15:22 Ulti maybe it just pm's a magician behind the curtain who answers
15:22 moritz it does ^8 in < 0.3s for me
15:23 moritz and still works on ^9
15:23 moritz 1m8.395s for ^9
15:23 Ulti ^8 isnt coming back to me on my laptop
15:23 Ulti at least in a time I want to really wait for
15:24 Ulti ^6 is 0.437s
15:25 Ulti also its eating 20% of my RAM whilst it thinks about that
15:25 moritz 1m39s for ^10 here
15:26 * moritz seems to have a little bit faster cores than Ulti
15:27 Ulti its impressive how its using a gigabyte of RAM to do something relatively numerical and its fluctuating wildly too
15:28 jnthn I suspect it'll be spending all of its time in the big integer library
15:28 Ulti 1.3GB then down to 0.9 really rapidly
15:28 Ulti so I guess its building big numbers then tearing them down constantly
15:32 Ulti heh a fun blunder on my part :) big ints are big
15:38 ajr_ joined #perl6
15:43 ajr_ joined #perl6
15:52 salv0 joined #perl6
16:04 Psyche^ joined #perl6
16:10 PerlJam What's the magic incantation to get the rakudo debugger to work?
16:10 FROGGS make m-install
16:10 FROGGS that m- is for "magic" here :o)
16:10 PerlJam :-) clearly.
16:11 jnthn I normal make install, if you've got Moar, should install it for that.
16:11 PerlJam If I've done "perl Configure.pl --backends=jvm,moar" would not "make install" also install the debugger?
16:12 timotimo it should
16:12 timotimo (though it may forget to +x it)
16:12 PerlJam I guess the short of it is ... I must've done something wrong because I don't have a debugger :)
16:12 timotimo did you run configure.pl very recently?
16:13 PerlJam yesterdayish?
16:13 jnthn PerlJam: It'll install (in theory) as perl6-debug-m
16:13 pmurias joined #perl6
16:13 PerlJam maybe day before
16:13 timotimo that should be good enough
16:13 timotimo just to be safe, try again?
16:13 jnthn PerlJam: Note taht it does not install a UI of any kind
16:13 PerlJam timotimo: aye, trying now :)
16:13 jnthn That needs doing separately; at the moment, by hand since Panda doesn't work on Moar yet
16:13 pmurias perl6: my $foo = gather take 123;
16:14 camelia niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  $foo is declared but not used at /tmp/tmpfile line 1:â�¤------> [32mmy [33mâ��[31m$foo = gather take 123;[0mâ�¤â�¤Â»
16:14 camelia ..rakudo-jvm e4e862: OUTPUT«(timeout)»
16:14 camelia ..rakudo-parrot e4e862, rakudo-moar e4e862: ( no output )
16:20 colomon joined #perl6
16:22 timotimo jnthn: i liked the way you slipped a "oh by the way, i've been on this brand new backend all the time!" into your presentation
16:24 jnthn ;)
16:24 masak jnthn++
16:24 jnthn Yes, it ran all the demos.
16:24 jnthn Except the JVM one.
16:25 timotimo of course :)
16:25 timotimo did you make sure nobody noticed until you showed that slide? :)
16:26 * masak .oO( * jnthn .oO( have to make sure nobody knows about my VM! ) )
16:27 * masak wonders if that's the first time in IRC history someone has done a nested thought bubble.
16:27 jnthn timotimo: That I was using perl6-m was a giveaway for those in the know.
16:27 PerlJam masak: first I've seen
16:27 jnthn .oO( * masak .oO( I must be really special doing this! ) )
16:27 masak haha
16:27 masak what have I unleash'd
16:28 PerlJam .oO( * jnthn .oO( * mask .oO( I wonder if this is the first 3-way nested thought bubble ) ) )
16:28 PerlJam :-P
16:28 masak the horror
16:28 masak next up: aleph-null-nested thought bubbles.
16:28 pdcawley joined #perl6
16:28 PerlJam masak: with unicode! :)
16:28 masak that'd be right before we tackle the higher cardinalities.
16:29 jnthn Even nested thought bubbles are not a regular language... :P
16:33 regreg joined #perl6
16:33 * masak .oO( TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M͊​̲̖̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ )
16:33 masak ah, in-jokes.
16:37 breinbaas joined #perl6
16:51 Sqirrel_ joined #perl6
16:52 rindolf joined #perl6
16:55 skids .oO( Functional thought bubbles ).oO( * masak )
16:57 geekosaur joined #perl6
16:59 PerlJam ) thinking outside of the bubble .oO(
17:03 rurban_ joined #perl6
17:11 raydiak good morning
17:14 timotimo hello raydiak :)
17:22 berekuk joined #perl6
17:33 dalek rakudo-star-daily: 5db0fac | coke++ | log/ (5 files):
17:33 dalek rakudo-star-daily: today (automated commit)
17:33 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/5db0facad4
17:35 molaf joined #perl6
17:41 raiph joined #perl6
17:42 [Sno] joined #perl6
17:46 cognominal joined #perl6
18:09 vendethiel is there executable class bodies (like in ruby etc) ?
18:09 vendethiel or proxies (?) are the recommended wya ?
18:12 ajr joined #perl6
18:14 dalek joined #perl6
18:18 kurahaupo_mobile joined #perl6
18:21 vky joined #perl6
18:29 pecastro joined #perl6
18:31 pecastro joined #perl6
18:32 FROGGS joined #perl6
18:33 FROGGS hello from a couch
18:33 raydiak \o from a chair
18:34 nwc10 dear camelia, please rebuild Moar
18:41 raydiak r: say $*PERL<compiler><build-date>
18:41 camelia rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
18:41 camelia ..rakudo-moar e4e862: OUTPUT«2014-02-06T10:18:10Z␤»
18:41 camelia ..rakudo-parrot e4e862: OUTPUT«2014-02-06T10:24:25Z␤»
18:45 raydiak r: say $*PERL.perl
18:45 camelia rakudo-moar e4e862: OUTPUT«{"name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2014.01-65-ge4e8625", "release-number" => "", "build-date" => "2014-02-06T10:18:10Z", "codename" => ""}}␤»
18:45 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
18:45 camelia ..rakudo-parrot e4e862: OUTPUT«{"name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2014.01-65-ge4e8625", "release-number" => "", "build-date" => "2014-02-06T10:24:25Z", "codename" => ""}}␤»
18:45 raydiak r: say "foo"
18:45 camelia rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
18:45 camelia ..rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«foo␤»
18:46 raydiak o_O
18:47 raydiak did IO::Socket break under jvm or something?
19:01 raydiak r: say 1
19:01 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«1␤»
19:01 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
19:02 raydiak (or perhaps the jvm evalserver crashed?)
19:03 FROGGS evalbot control restart
19:04 camelia joined #perl6
19:04 FROGGS r: say 1 # this will take a while
19:05 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«1␤»
19:05 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
19:05 FROGGS :/
19:08 rindolf joined #perl6
19:15 nebuchadnezzar joined #perl6
19:18 zakharyas joined #perl6
19:19 denisboyun joined #perl6
19:19 itz joined #perl6
19:19 kurahaupo__ joined #perl6
19:30 vendethiel DAMMIT I forgot to report the bug
19:30 vendethiel well admittedly I only got on the comp for an hour or so during the day :/
19:32 berekuk joined #perl6
19:33 SamuraiJack__ joined #perl6
19:36 itz is "ufo" obsolete?
19:37 colomon itz: I know I haven't used it (directly, anyway) in at least a year
19:37 colomon might still work, I dunno
19:38 itz I was finding a ufo-m modified version useful
19:39 timotimo i've sometimes used ufo
19:39 timotimo it doesn't do custom Build.pm, though
19:42 FROGGS itz: there is a fork on github for ufo-m
19:43 timotimo ooooh
19:43 timotimo a fork or a branch?
19:44 FROGGS a fork
19:45 FROGGS https://github.com/iProcess/mufow64
19:45 FROGGS ohh, it is not a fork actually
19:47 timotimo i have never heard of this person or this ... thing
19:47 Rotwang joined #perl6
19:48 FROGGS timotimo: his nick is V_C_S
19:48 itz thats identical to my fork :)
19:48 FROGGS err, V_S_C probably
19:48 timotimo ah, yes!
19:49 FROGGS I'd prefer a ufo version that does the right thing depending on the currently used backed
19:49 itz I was wondering about that...
19:49 timotimo yes
19:49 FROGGS because in the end it is just about three or four different lines of code
19:50 telex joined #perl6
19:50 itz it might be useful as a stopgap before panda works
19:52 telex joined #perl6
20:00 itz perl6: say $?VM
20:01 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] i…»
20:01 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
20:01 camelia ..rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '$?VM' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32msay $?VM[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
20:05 Augustus joined #perl6
20:06 Augustus Hi guys, I have a (hopefully) quick question. Can anyone explain the conditions where a grammar *does NOT* do longest token matching, and how do you force it to do LTM?
20:08 FROGGS Augustus: /[ a || b ]/ does sequential matching, while /[ a | b ]/ does LTM
20:08 Augustus yes, but not under all conditions
20:08 moritz m: say (1, 2, 18).max
20:09 camelia rakudo-moar e4e862: OUTPUT«18␤»
20:09 moritz m: say (1, 2, 18).minmax
20:09 camelia rakudo-moar e4e862: OUTPUT«1..18␤»
20:09 Augustus I need to know how to force [a | b] to do LTM when it doesn't
20:09 FROGGS p: say "aabbabbbbbbbbbbbbb" ~~ / b+ /
20:09 camelia rakudo-parrot e4e862: OUTPUT«「bb」␤␤»
20:09 moritz you can't force LTM; you can only avoid things that are LTM stoppers
20:10 FROGGS Augustus: do you mean that?
20:10 moritz Augustus: http://perlcabal.org/syn/S05​.html#Longest-token_matching has the gory details
20:10 Augustus moritz: what are LTM stoppers?
20:10 FROGGS code blocks for example
20:10 Augustus moritz: I read through S05 and it was a little dense
20:10 Augustus as far as I can tell I'm not doing any of those things
20:11 moritz Augustus: then show your code
20:11 FROGGS what moritz said
20:11 Augustus <var> '=' [<expr> | <term>]
20:11 Augustus simple example, but it's not doing LTM
20:11 moritz well, LTM descends into subrules
20:12 moritz so it only LTMs if <expr> and <term> both do LTM
20:12 FROGGS now we'd need to know how expr and term looks like
20:12 Augustus they consist of literals and alternations only, or subrules that are literals or alternations
20:13 moritz then you have found a bug.
20:13 FROGGS can you create a self containing example? a simple script that you can put in a gist?
20:15 Augustus the grammar i have is only 30 lines long with a few rules in the first place. what do you mean by put in a gist?
20:16 skids gist.github.com
20:16 FROGGS Augustus: well, put that grammar in a gist (github's nopaste), including a test string and the invocation of the grammar
20:16 FROGGS that that we just need to download an run it, to see something
20:17 FROGGS (every nopaste service is fine)
20:18 moritz r: say (1..5).from
20:18 camelia rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
20:18 camelia ..rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«No such method 'from' for invocant of type 'Range'␤  in block  at /tmp/tmpfile:1␤␤»
20:18 moritz r: say (1..5).min
20:18 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«1␤»
20:18 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
20:19 Augustus moritz, FROGGS: Here is just the grammar, see if it's obvious. I can also upload the whole script too. https://gist.github.com/anonymous/8851771
20:19 moritz Augustus: which string exhibits non-LTM behavior?
20:20 itz r: say $*VM<name>
20:20 Augustus moritz, FROGGS: in particular, the assignment rule always matches a term instead of taking a longer expression, so "x = 2 + 3" will match "x = 2" and leave the "+ 3"
20:20 camelia rakudo-moar e4e862: OUTPUT«moar␤»
20:20 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
20:20 camelia ..rakudo-parrot e4e862: OUTPUT«parrot␤»
20:20 moritz Augustus: oh; rules imply <.ws>, and <.ws> stops LTM
20:20 moritz mystery solved.
20:20 Augustus hmm, ok, how do I stop that?
20:21 moritz don't use rule, or try writing your own ws that doesn't stop LTM
20:21 FROGGS make it a token and replace possible whitespace by \s* ?
20:21 Augustus ahh, ok
20:21 Augustus tokens will still match subrules/subtokens?
20:21 FROGGS yes
20:22 Augustus ok, i'll give that a try and let you know. thanks!
20:22 FROGGS cool :o)
20:24 Augustus awesome, thanks, that worked. Is there a good place to see a summary of the differences between rules and tokens?
20:28 moritz S05 :-)
20:29 [particle] joined #perl6
20:30 skids This section in particular: http://perlcabal.org/syn/S05.html#Reg​exes_constitute_a_first-class_languag​e%2C_rather_than_just_being_strings
20:30 Augustus moritz: ok, I'll keep going through S05 ;) One more quick question. How would you recommend doing optional parenthesis around an expression? Make another rule that says ['('<expr>')'] | <expr> or is there a way to do it with ? like so: '('? <expr> ')'? except the second one isn't optional if the first one is found?
20:31 moritz Augustus: ['('<expr>')'] | <expr>
20:32 Augustus moritz: Ok. it is possible, though, with backreferences or something, to do it the other way, right? It's just more complicated?
20:32 Augustus skids: Thanks, that is helpful
20:33 moritz well, you can do things with capturing the optional '(' and then using an assertion when matching the the closing ')'
20:34 Augustus moritz: Ok. I'm curious to try doing that just to learn how all the stuff works. I'll look at the assertions section.
20:39 cooper_ joined #perl6
20:41 cooper joined #perl6
20:43 moritz masak: https://github.com/moritz/world-map  run perl6-m map.pl > test.svg; firefox test.svg;
20:49 psch joined #perl6
20:49 psch hi #perl6
20:50 psch i'm doing things wrong again \o/
20:50 psch i've been trying to factor out the typed exception code from World and Optimizer into a role
20:50 jnthn psch: UR DOING IT RONG
20:50 FROGGS RONG /o\
20:50 psch but in the role i get a 'Cannot invoke null object' when trying to call subst()
20:50 jnthn So am I, though. Just lost 30 mins debugging 'cus I confused bits with bytes...
20:51 jnthn psch: Yeah, known NQP limitation :(
20:51 jnthn Not your fault.
20:51 psch jnthn: so nqp core functions can't be invoked from roles?
20:51 jnthn psch: Yeah. There's a bug in that area. Rakudo has a bunch of code that deals with the issue.
20:52 jnthn psch: For now I can only really suggest copying subst, and filing an NQP ticket saying "arghh fix this"
20:53 psch well, that's slightly reassuring at least, in so far as it's not actively my fault :)
20:54 psch i'll go with copying subst i guess; where should the ticket go?
20:55 masak wow, moritz++!
20:55 * masak tries it
20:55 berekuk joined #perl6
20:56 psch oh, also i've just now built my patch for parrot, and it doesn't die there, in contrast to moar..?
20:57 timotimo moritz: now make one that's able to distort the sizes of countries based on some number data :D
20:59 jnthn psch: Add it as an NQP ticket (GitHub issues, perl6/nqp)
21:00 jnthn psch: Moar has stricter closure rules.
21:00 jnthn psch: JVM will end up following the same rules as Moar, when I get time to do the rather painful refactors.
21:00 psch jnthn: alright, will do, thanks
21:01 jnthn psch: The JVM approach suffers a few threading-related bugs.
21:01 timotimo the stricter rules are wanted then?
21:01 jnthn timotimo: Yes, they make us fix bugs in code-gen, etc.
21:01 timotimo that's good
21:03 xenoterracide_ joined #perl6
21:09 psch https://gist.github.com/peschwa/8852488 # can i have a bit of advice or an explanation for this as well?
21:10 psch i'm not sure i should change the signature or the callers, seeing as it's all over World and Actions
21:11 psch updated to make it obvious that there's not a random string but the exception name in the broken case
21:11 timotimo it would seem like getting an iterator of a string, you'll get individual characters
21:11 timotimo nqp: say(nqp::islist("FooBar"));
21:12 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«0␤»
21:12 timotimo er.
21:12 timotimo actually you have a list with strings in it
21:12 psch timotimo: exactly, but i still get letters
21:12 psch or characters rather
21:12 timotimo oh
21:12 timotimo you shouldn't put a new my in an inner block
21:13 psch oh, right
21:13 timotimo also, if you are in the last line where you join(...), you may have $ex_type be just a string
21:13 timotimo you should use @ex_name instead
21:14 denis_boyun joined #perl6
21:15 psch that does explain how the error message comes i guess
21:17 timotimo yes :)
21:22 psch joined #perl6
21:23 * psch .oO( stupid crashing vm *grumble* )
21:27 kaare_ joined #perl6
21:33 skids .oO(why doesn't nqp-jvm also have the syswrite error)
21:36 itz_ joined #perl6
21:38 SamuraiJack__ joined #perl6
21:39 lizmat_ joined #perl6
21:51 itz_ joined #perl6
21:59 japhb_ What's the right syntax for destructuring a pair?  I want to do:   for @pairs -> ... syntax here for extracting $k and $v ... { # Now I can just directly talk about the k/v of each pair
22:01 japhb_ I guess I can do:  for @pairs>>.kv -> $k, $v {  # but that feels repetitive
22:03 psch m: my %a = { a => 1, b => 2 }; for %a -> $k, $v { say "$k: $v" } # this?
22:03 camelia rakudo-moar e4e862: OUTPUT«a    1: b    2␤»
22:03 psch huh
22:03 psch no, probably not
22:03 masak m: my $p = "foo" => 42; for $p xx 4 -> (:$key, :$value) { say "$key maps to $value" }
22:03 camelia rakudo-moar e4e862: OUTPUT«foo maps to 42␤foo maps to 42␤foo maps to 42␤foo maps to 42␤»
22:03 psch i don't even understand what it actually does
22:04 masak japhb_: ^^
22:04 japhb_ psch, I've specifically got an array of pairs, not a hash.
22:04 japhb_ masak++
22:04 japhb_ Thanks!
22:04 * masak bows
22:04 psch japhb_: right, i don't read thoroughly enough, you mentioned the array, sorry
22:05 japhb_ psch, No worries.  :-)
22:06 japhb_ r: my @a = foo => 1, bar => 2; @a.perl.say; for @a.list -> (:$k, :$v) { .say for $k.perl, $v.perl }
22:06 camelia rakudo-parrot e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤2 unexpected named parameters passed (key, value) in sub-signature␤  in block  at /tmp/tmpfile:1␤␤»
22:06 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:06 camelia ..rakudo-moar e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤␤  in block  at /tmp/tmpfile:1␤␤»
22:06 japhb_ r: my @a = foo => 1, bar => 2; @a.perl.say; for @a -> (:$k, :$v) { .say for $k.perl, $v.perl }
22:06 camelia rakudo-parrot e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤2 unexpected named parameters passed (key, value) in sub-signature␤  in block  at /tmp/tmpfile:1␤␤»
22:06 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:06 camelia ..rakudo-moar e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤␤  in block  at /tmp/tmpfile:1␤␤»
22:07 japhb_ OK, what's wrong there?
22:07 * skids doesn't even know how masak's example worked.
22:07 psch i think :key and :value are magic there
22:07 masak no, not really.
22:07 masak a Pair is an object.
22:07 japhb_ r: my @a = foo => 1, bar => 2; @a.perl.say; for @a -> (:$key, :$value) { .say for $key.perl, $value.perl }
22:07 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤"foo"␤1␤"bar"␤2␤»
22:07 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:07 masak m: say Pair.^attributes
22:07 camelia rakudo-moar e4e862: OUTPUT«Mu $!key Mu $!value␤»
22:08 japhb_ >.<
22:08 raydiak r: my @a = foo => 1, bar => 2; @a.perl.say; for @a -> (:key($k), :value($v)) { .say for $k.perl, $v.perl }
22:08 japhb_ OK, I understand.
22:08 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤"foo"␤1␤"bar"␤2␤»
22:08 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:08 masak rakudo-jvm seems busted.
22:08 psch huh
22:08 japhb_ Yeah, quite.
22:08 raydiak I was complaining about that hours ago
22:08 treehug88 joined #perl6
22:08 psch ooh the -> ( ) takes a Pair?
22:08 masak don't need complaining. need moritz++ or equivalent.
22:08 masak psch: no, the -> ( ) takes an object.
22:09 psch oh, now i get it
22:09 japhb_ psch, masak's point was that Pair is not special.  It's just an object.  So it can be destructured as one using standard subsignature methods.
22:09 psch the array has pairs
22:09 psch of course
22:09 psch that was the whole point amirite
22:10 masak see S06:1791
22:10 synopsebot Link: http://perlcabal.org/syn/S06.html#line_1791
22:10 japhb_ Yeah, I was stuck thinking of finding a syntax that was similarly special to destructuring of arrays.
22:10 japhb_ But I didn't need that.
22:10 masak nope.
22:10 masak there's one syntax for arrays, and one for objects.
22:10 masak confusingly, the array one is [], but the objects one is ()
22:10 masak it has to be that way because {} is taken for the block itself :)
22:11 japhb_ Mind you, 'for @a -> (:$key, :$value)' is not much better than 'for @a>>.kv -> $k, $v' for concision.
22:11 raydiak *shrug* didn't know who to talk to, so I though a general public mention might get someone's attention eventually...FROGGS++ tried restarting it with no change
22:12 jnthn masak: Note that you can use (...) for arrays too
22:12 PerlJam japhb_: the latter would have been clearer IMHO
22:13 jnthn masak: [...] forces a Positional type constraint also, iirc
22:13 japhb_ r: my @a = foo => 1, bar => 2; @a.perl.say; for @a>>.kv -> { .say for $^k.perl, $^v.perl }
22:13 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Placeholder variable '$^k' cannot override existing signatureâ�¤at /tmp/tmpfile:1â�¤------> [32m>>.kv -> { .say for $^k.perl, $^v.perl }[33mâ��[31m<EOL>[0mâ�¤    â€¦Â»
22:13 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:13 japhb_ r: my @a = foo => 1, bar => 2; @a.perl.say; for @a>>.kv { .say for $^k.perl, $^v.perl }
22:13 camelia rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«Array.new("foo" => 1, "bar" => 2)␤"foo"␤1␤"bar"␤2␤»
22:13 camelia ..rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:13 masak jnthn: oh, that makes sense.
22:14 japhb_ Hmmm, that may be even better for very simple loops.
22:17 stevan_ joined #perl6
22:20 masak r: my @a = foo => 1, bar => 2; for @a { say .key.perl; say .value.perl }
22:20 camelia rakudo-jvm e4e862: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
22:20 camelia ..rakudo-parrot e4e862, rakudo-moar e4e862: OUTPUT«"foo"␤1␤"bar"␤2␤»
22:20 masak I'd do it that way, I think.
22:21 * skids never knew attributes could explode into subsignatures.  Thought just things that looked more like named args.
22:32 skids Funny distinction of attribute vs accessor method there.
22:34 skids r-parrot: sub foo((:$a,:$b)) { $a.perl.say; $b.perl.say }; class c { has $.a; method b () { $!a }}; my c $c .= new(:a<a>); $c.b.say; foo($c) # virtual attribs need not apply
22:35 skids r-p: sub foo((:$a,:$b)) { $a.perl.say; $b.perl.say }; class c { has $.a; method b () { $!a }}; my c $c .= new(:a<a>); $c.b.say; foo($c) # virtual attribs need not apply
22:35 camelia rakudo-parrot e4e862: OUTPUT«a␤"a"␤Any␤»
22:35 timotimo it differentiates into attributes and methods? :o
22:35 skids Yeah that's what threw me.
22:36 skids It is what the spec says.
22:36 timotimo well, a method kind of smells like impure, global-state-mutating, ...
22:38 psch hrm
22:38 psch i'm really not quick today
22:38 psch subst references match
22:38 psch and declaring subst as sub or method in my role doesn't work
22:38 psch so each of the two calls to subst need to be fully unrolled calls to subst, with nested calls to match
22:39 psch that definitely makes me sad
22:39 masak :/
22:39 timotimo i have a headache and don't understand what happened
22:40 * skids commute
22:40 jnthn psch: Well, other solution is adding before your role a "my class Hacks { method subst(*@x) { subst(|@x) } }" and then Hacks.subst(...)
22:41 psch jnthn: that sounds a bit more brain-friendly right now
22:49 hugme joined #perl6
22:50 masak 'night, #perl6
22:52 jnthn 'night, masak
22:52 timotimo good night masak
22:52 BenGoldberg joined #perl6
23:08 psch jnthn++, timotimo++ # refactoring help
23:09 psch i'm down to 18 failing tests that should pass, which is something like 400% improvement \o/
23:09 timotimo that sounds great good work
23:10 psch timotimo: well, most of it was subst not getting resolved
23:10 psch the ones that fail now probably are because of things i don't quite get yet
23:10 psch but i don't think i have the brains to keep going now
23:11 psch e.g. "not ok 696 - right exception type (X::Method::NotFound)\n# Got: (X::Redeclaration)\n# Expected: (X::Method::NotFound)"
23:11 psch what's most confusing to me right now is that some cases of X::Syntax::Confused also don't pass anymore
23:11 psch but yeah, i'll look into that tomorrow or over the weekend
23:12 psch there's also still a few bits of code i still have to pull into the role i think
23:13 psch actually i think no case for X::Syntax::Confused passes anymore, with "Error while compiling type"
23:13 psch anyway, i'll be back tomorrow or over the weekend o/
23:26 telex joined #perl6
23:28 vky joined #perl6
23:33 gfldex joined #perl6
23:43 [particle] joined #perl6
23:45 gfldex joined #perl6
23:59 berekuk joined #perl6

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

Perl 6 | Reference Documentation | Rakudo