Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-24

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:08 logie joined #perl6
01:03 Akagi20__ joined #perl6
01:07 logie joined #perl6
01:09 Alina-malina joined #perl6
01:15 atroxaper joined #perl6
01:16 klapperl_ joined #perl6
01:17 Su-Shee joined #perl6
01:19 hoverboard joined #perl6
01:22 TimToady yeah, at this time of night, just the odd google or craigslist employee...
01:28 FROGGS joined #perl6
01:51 chenryn joined #perl6
01:53 fhelmberger joined #perl6
01:54 japhb *snrk*
02:08 xiaomiao joined #perl6
02:23 ren1us joined #perl6
02:24 ren1us is /g implemented for perl6 regexes?  Parrot, specifically
02:24 ren1us rakudo's telling me to use :g as a modifier instead, but then tells me :g doesn't exist
02:24 gr33n7007h joined #perl6
02:24 ren1us which is really quite saddening
02:24 BenGoldberg p56: my @list = "abcdef" =~ m/[aeiou]/g;
02:24 camelia p5-to-p6 : OUTPUT«my @list = 'abcdef' ~~ m:P5:g![aeiou]!␤»
02:26 BenGoldberg m: my @list 'abcdef' ~~ m:P5:g![aeiou]!
02:26 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/H8NTEbFhmlâ�¤Two terms in a rowâ�¤at /tmp/H8NTEbFhml:1â�¤------> [32mmy @list [33mâ��[31m'abcdef' ~~ m:P5:g![aeiou]![0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraint…»
02:26 BenGoldberg m: my @list = 'abcdef' ~~ m:P5:g![aeiou]!
02:26 camelia rakudo-moar a7b4cb: ( no output )
02:26 BenGoldberg m: .say for 'abcdef' ~~ m:P5:g![aeiou]!
02:26 camelia rakudo-moar a7b4cb: OUTPUT«False␤»
02:26 BenGoldberg m: .say for 'abcdefa' ~~ m:P5:g!a!
02:26 camelia rakudo-moar a7b4cb: OUTPUT«False␤»
02:26 BenGoldberg m: .say for 'abcdefa' ~~ m:P5:g!'a'!
02:26 camelia rakudo-moar a7b4cb: OUTPUT«False␤»
02:27 * BenGoldberg shrugs.
02:27 ren1us that's unfortunate
02:28 BenGoldberg I know I'm doing it wrong...
02:28 colomon m: say "This is a test
02:28 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3o3NXZWpXBâ�¤Unable to parse expression in double quotes; couldn't find final '"' â�¤at /tmp/3o3NXZWpXB:1â�¤------> [32msay "This is a test[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        a…»
02:28 BenGoldberg But you'll notice, it's not telling me anything about :g not existing.
02:28 colomon m: say "This is a test" ~~ m:g/i/;
02:28 camelia rakudo-moar a7b4cb: OUTPUT«False␤»
02:28 colomon m: say "This is a test" ~~ m/:gi/;
02:28 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/c7XMN1fIuz�Unrecognized regex modifier :gi�at /tmp/c7XMN1fIuz:1�------> [32msay "This is a test" ~~ m/:gi[33m�[31m/;[0m�»
02:29 colomon m: say "This is a test" ~~ m/:g i/;
02:29 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dNSEaMZURD�Unrecognized regex modifier :g�at /tmp/dNSEaMZURD:1�------> [32msay "This is a test" ~~ m/:g[33m�[31m i/;[0m�»
02:29 colomon n: say "This is a test" ~~ m:g/i/;
02:29 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Regex modifier g not yet implemented at /tmp/_feD0iN09Q line 1:â�¤------> [32msay "This is a test" ~~ m:g[33mâ��[31m/i/;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.sett…»
02:29 BenGoldberg m: say "This is a test" ~~ m:asdfasdf/i/;
02:29 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XgqeAkHy3K�Adverb asdfasdf not allowed on m�at /tmp/XgqeAkHy3K:1�------> [32msay "This is a test" ~~ m:asdfasdf/i/[33m�[31m;[0m�»
02:29 BenGoldberg rn: say "This is a test" ~~ m:g/i/;
02:29 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«False␤»
02:29 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Regex modifier g not yet implemented at /tmp/tmpfile line 1:â�¤------> [32msay "This is a test" ~~ m:g[33mâ��[31m/i/;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting…»
02:30 ren1us It fusses at me whether I try to use it as a modifier or an adverb
02:30 colomon probably m:g is in the rakudo grammar but not hooked up to anything.
02:31 ren1us eh, I guess I'll just try to do a workaround then
02:31 ren1us split and loops, here i come
02:31 colomon errr, comb maybe?
02:31 noganex joined #perl6
02:32 colomon my guess is comb is why no one has gotten around to implementing it.
02:32 ren1us that would probably be a perfect way of doing it
02:33 ren1us i need to just dedicate an afternoon to going through the docs soon
02:35 hoelzro m: class Foo { method bar(Str $name) {} } ; .say for Foo.can('bar')[0].signature.params
02:35 camelia rakudo-moar a7b4cb: OUTPUT«Foo␤Str $name␤*%_␤»
02:35 hoelzro why is it that bar gets an implicit slurpy hash parameter?
02:36 hoelzro m: sub foo(Str $name) {} ; .say for &foo.signature.params
02:36 camelia rakudo-moar a7b4cb: OUTPUT«Str $name␤»
02:36 hoelzro ...but foo doesn't?
02:36 TimToady r: say m:g/i/ given "This is a test"
02:36 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«「i」␤ 「i」␤␤»
02:36 TimToady I think it's the combination with ~~ that is a problem
02:37 TimToady so it's implemented, but doesn't return something that smartmatch can use as a result type
02:37 ren1us ah
02:37 ren1us that actually makes sense
02:38 TimToady it needs to return a Match or a Bool so that ~~ doesn't take the value and try to smartmatch with it again
02:38 TimToady so "This is a test" ~~ ('i','i') is what it's testing
02:38 lizmat joined #perl6
02:38 TimToady this is a known bug
02:38 TimToady btw, just added http://rosettacode.org/wiki/World_Cup_group_stage#Perl_6
02:39 TimToady ren1us: anyway, using given like I did is a workaround
02:39 ren1us thanks ^^
02:41 logie joined #perl6
02:42 TimToady m: say "This is a test" ~~ / [ .*? ('i') ]+ /
02:42 camelia rakudo-moar a7b4cb: OUTPUT«「This i」␤ 0 => 「i」␤ 0 => 「i」␤␤»
02:42 TimToady there's another way
02:42 TimToady well, plus a [0].list
02:42 chenryn joined #perl6
02:43 woolfy joined #perl6
02:43 TimToady or use comb :)
02:44 colomon m: say "This is a test".match(/i/)
02:44 camelia rakudo-moar a7b4cb: OUTPUT«「i」␤␤»
02:44 colomon m: say "This is a test".match(/:g i/)
02:44 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iIAiKHfn0f�Unrecognized regex modifier :g�at /tmp/iIAiKHfn0f:1�------> [32msay "This is a test".match(/:g[33m�[31m i/)[0m�»
02:44 colomon m: say "This is a test".match(rx:g/i/)
02:44 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0e8xWbIQqO�Adverb g not allowed on rx�at /tmp/0e8xWbIQqO:1�------> [32msay "This is a test".match(rx:g/i/[33m�[31m)[0m�»
02:45 colomon m: say "This is a test".match(m:g/i/)
02:45 camelia rakudo-moar a7b4cb: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D: Any $target, *%adverbs)␤  in block  at /tmp/xkvsM22AmU:1␤␤»
02:45 colomon m: say "This is a test".match(m/i/)
02:45 camelia rakudo-moar a7b4cb: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D: Any $target, *%adverbs)␤  in block  at /tmp/Lv8AW3YuyC:1␤␤»
02:45 colomon m: say "This is a test".match(/i/)
02:45 camelia rakudo-moar a7b4cb: OUTPUT«「i」␤␤»
02:45 colomon hmm
02:45 colomon m: say "This is a test".match(/i/, :g)
02:45 camelia rakudo-moar a7b4cb: OUTPUT«「i」␤ 「i」␤␤»
02:45 TimToady or that :)
02:46 colomon TimToady: how is YAPC going?
02:46 TimToady fine, now that my talk is over :)
02:47 chenryn joined #perl6
02:47 colomon TimToady++
02:47 * colomon wishes he was there
02:48 TimToady outside it's very hot and humid, inside it's very chilly, so on average we're quite comfy
02:49 TimToady they set all the thermostats to 60° here
02:49 colomon I like very chilly.  :)
02:49 colomon okay, maybe not quite that chilly.  dang.
02:50 TimToady fortunately we can change our room's thermostat, unlike that dorm at ITT one year...
02:50 TimToady er, IIT
02:51 TimToady and all they gave us for bedding was a sheet, since it was so hot...outside...
02:52 TimToady I piled all my clothes from my suitcase on me to keep from getting hypothermia overnight
02:52 TimToady them's were the days...
02:53 dalek joined #perl6
02:54 TimToady or maybe "thems" is more properer
02:54 Timbus if @arr.first-index(*.name eq $key) -> $i {
02:54 Timbus i thought that was soooo clever
02:54 TimToady caint keep those apostrophe's straight...
02:55 Timbus until i matched the first element :[
02:55 TimToady heh
02:56 TimToady well, you just have to add an else for that case :P
02:57 Timbus lol
02:57 Timbus 'defined $item' should return '$item but True'
02:58 TimToady .oO(False.defined)
02:58 Timbus ... yes even defined False
02:59 TimToady maybe we just need an ifdef ... -> $i {
02:59 TimToady would make the C programmers happy :)
02:59 Timbus its terrible, but id use it
03:00 yeltzooo joined #perl6
03:01 TimToady if (my $i =...).defined {
03:01 Timbus my pretty syntax...
03:02 TimToady if defined my $i = ... { for that matter
03:03 Timbus if defined expr() && expr() -> $i {
03:03 Timbus its perfect
03:03 Timbus wait no
03:03 Timbus its twice as bad
03:19 BenGoldberg Maybe first-index and friends should return 0 but True when the first index matches?
03:19 BenGoldberg m: say 0 but True
03:19 camelia rakudo-moar a7b4cb: OUTPUT«0␤»
03:19 BenGoldberg m: (0 but True).WHAT.say
03:19 camelia rakudo-moar a7b4cb: OUTPUT«(Int+{<anon>})␤»
03:21 oetiker joined #perl6
03:23 TimToady m: say +(0 but True)
03:23 camelia rakudo-moar a7b4cb: OUTPUT«0␤»
03:23 TimToady m: say 0+(0 but True)
03:23 camelia rakudo-moar a7b4cb: OUTPUT«0␤»
03:23 TimToady okay
03:27 atroxaper joined #perl6
03:27 BenGoldberg m: if ( 0 but True ) -> $i { say $i }
03:27 camelia rakudo-moar a7b4cb: OUTPUT«0␤»
03:28 TimToady zzz &
03:33 Timbus BenGoldberg, that was my initial thought, but i dunno
03:33 Timbus seems expensive
03:34 BenGoldberg Presumably, there could be one global 0 but True object which gets returned.  Making a new one every time would be silly.
03:47 FROGGS joined #perl6
03:48 kaleem joined #perl6
04:02 kaare_ joined #perl6
04:15 estrabd joined #perl6
04:16 estrabd joined #perl6
04:19 Khisanth joined #perl6
04:19 REPLeffect joined #perl6
04:31 chenryn joined #perl6
04:49 chenryn joined #perl6
04:56 gfldex joined #perl6
05:08 kaare_ joined #perl6
05:45 [Sno] joined #perl6
05:54 fhelmberger joined #perl6
05:54 denis_boyun joined #perl6
06:09 parsus joined #perl6
06:17 rindolf joined #perl6
06:32 fmbusii joined #perl6
06:33 mr-foobar joined #perl6
06:35 parsus joined #perl6
06:42 sergot morning o/
06:43 mr-foobar joined #perl6
06:47 kaleem joined #perl6
06:52 mr-foobar joined #perl6
06:55 mr-fooba_ joined #perl6
07:11 zakharyas joined #perl6
07:16 dmol joined #perl6
07:22 brrt joined #perl6
07:22 brrt \o #moarvm
07:22 brrt jnthn, i agree wrt to static magic bytecode
07:23 brrt there were two reasons why its copied now, and i'm not sue about how valid they are
07:23 brrt (oh, and i've also submit my evaluation :-))
07:23 brrt sure
07:24 brrt one - i wanted to insert a 16 bit 'jit code index' pointer so that the bytecode could - in principle - be safely inlined or moved about
07:26 brrt two - the expectation of the spesh candidate bytecode pointer was that it could be freed
07:26 brrt thus, that expectation had to be upheld
07:27 clkao joined #perl6
07:30 timotimo brrt: that was a mischan :)
07:30 brrt oh, yes, it was
07:30 brrt ugh
07:31 brrt highly likely jnthn will read it anyway
07:31 ren1us joined #perl6
07:31 brrt :-)
07:31 ren1us I'm sure you're all getting tired of my uselessness by now, but can anyone explain an error to me?
07:31 ren1us Type check failed in binding <anon>; expected 'SimNet::Frame' but got 'Cursor' in regex id at lib/SimNet/Frames.pm:54
07:31 timotimo i'm not getting tired yet :P
07:32 timotimo well, you had some variable defined like my SimNet::Frame $foobar; and you assigned something strange inside a regex
07:32 brrt it's what this channel is for, helping people with errors :-)
07:32 timotimo oh
07:32 ren1us I'm actually not assigning anything lol
07:33 timotimo maybe you called something that's not a regex from inside a regex directly
07:33 ren1us my $id = +(($frame ~~ m/<&id>/).Str);
07:33 timotimo ah, yes
07:33 MilkmanDan joined #perl6
07:33 timotimo &id will try to call a sub "id" and pass a Cursor as first argument
07:34 timotimo i mean <&id> will try to call a sub "id"
07:34 timotimo what did you mean to match there?
07:34 ren1us I've also got: my regex id { \d+ };
07:35 ren1us and it's clearly finding that
07:35 timotimo oh, huh, that's more interesting
07:35 ren1us it also works perfectly in the repl
07:36 timotimo can you say &id just before the match call?
07:36 timotimo m: say &say
07:36 camelia rakudo-moar a7b4cb: OUTPUT«sub say (Any |) { #`(Sub|139671821957528) ... }␤»
07:36 timotimo to make sure you're refering to the correct "id" in that lexical scope
07:36 ren1us the stack trace goes back to the line where id is declared, so i think it's looking at the right one
07:37 ren1us and say &id just prints out "id"
07:37 timotimo so could it be the error is somewhere we haven't looked yet?
07:37 timotimo how about &id.perl?
07:39 ren1us regex id(SimNet::Frame: *%_) { #`(Regex|140474202783008) ... }
07:39 ren1us and this is interesting
07:39 ren1us I tried replacing the &id with the actual check (m/\d+/)
07:39 ren1us and it works
07:39 timotimo oh, that id belongs to an actual class
07:40 timotimo that's why it says cursor; it's the invocant that's wrong
07:40 ren1us it's weird because they're about 6 lines apart from each other, in the same method
07:40 timotimo can i see a bit more context of the code? i wonder how the invocant gets constrained to that class in there
07:40 ren1us sure, sec.  pushing to github
07:41 timotimo that regex is *inside* a method declaration, yes?
07:41 timotimo if so, that shouldn't act as if it were a method of the class
07:42 timotimo can you try 'my regex ...' instead?
07:42 ren1us https://github.com/ren1us/Research/blob/master/lib/SimNet/Frames.pm
07:42 timotimo it already is a "my regex"!
07:42 ren1us the regex is declared on line 54, the line that usually pitches a fit is line 57
07:42 ren1us woops 59
07:44 timotimo m: class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }
07:44 camelia rakudo-moar a7b4cb: ( no output )
07:44 timotimo m: class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; ThisIsMyClass.explode()
07:44 camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|139848724832440) ... }␤»
07:45 timotimo m: class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; ThisIsMyClass.new.explode()
07:45 camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|139941465312496) ... }␤»
07:45 ren1us and fyi, a typical $frame value would be ":14{key1=>value1,key2=>|<8>|,key3=>another_value}:
07:45 timotimo m: module FooBar; class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; ThisIsMyClass.new.explode()
07:45 camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|140711885430672) ... }␤»
07:46 timotimo m: module FooBar; class FooBar::ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; FooBar::ThisIsMyClass.new.explode()
07:46 camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|140108480488696) ... }␤»
07:46 timotimo only thing i can think of now is: what perl6 version?
07:46 ren1us 2014.04, moarvm 2014.04
07:47 virtualsue joined #perl6
07:47 ren1us i've got a knack for breaking things that shouldn't be breaking ._.
07:47 timotimo Echt: say "test"
07:48 timotimo well, the 2014.06 releases are out, but not the Star release
07:48 timotimo star: module FooBar; class FooBar::ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; FooBar::ThisIsMyClass.new.explode()
07:48 camelia star-p 2014.04: OUTPUT«regex id(FooBar::ThisIsMyClass: *%_) { #`(Regex|-4336789486259128723) ... }␤Nominal type check failed for parameter ''; expected FooBar::ThisIsMyClass but got Cursor instead␤  in regex id at /tmp/tmpfile:1␤  in method INTERPOLATE at gen/parrot/CORE.setti…»
07:48 camelia ..star-m 2014.04: OUTPUT«regex id(FooBar::ThisIsMyClass: *%_) { #`(Regex|139885646961240) ... }␤Type check failed in binding <anon>; expected 'FooBar::ThisIsMyClass' but got 'Cursor'␤  in regex id at /tmp/tmpfile:1␤  in method INTERPOLATE at src/gen/m-CORE.setting:12826␤  in m…»
07:49 timotimo ah
07:49 timotimo seems like it has been fixed since
07:49 nnunley joined #perl6
07:50 ren1us so should i go and try to get 2014.06 on my machine?
07:50 timotimo aye, with rakudobrew it's very easy
07:50 timotimo grab it from github.com/tadzik/rakudobrew
07:52 darutoko joined #perl6
07:53 spider-mario joined #perl6
07:53 ren1us hrm, do i need to get rid of my old perl6 path stuff so this can do its thing without any old interference?
07:54 timotimo the path stuff, yes
07:55 ren1us what's the difference between Rakudo and Rakudo Star?
07:55 moritz ren1us: Star contains modules also
07:55 moritz and docs
07:55 ren1us ah
07:56 timotimo you can get all them modules with the panda rakudobrew can install for you, though
07:56 timotimo panda install Task::Star should work
07:57 ren1us well, let's see if this works
07:59 ren1us ...as soon as i make my code behave with 2014.06
07:59 ren1us oh never mind it's ufo being stupid.  yay.
07:59 parsus joined #perl6
08:07 ren1us aight, apparently ufo doesn't work
08:11 FROGGS joined #perl6
08:13 timotimo worst case you can "panda install ."
08:13 timotimo or perl -Ilib t/...
08:17 ren1us well, if nothing else, that part's working
08:17 ren1us so that's awesome
08:17 ren1us timotimo++
08:17 timotimo :)
08:18 timotimo fixing that bug was easy!
08:18 ren1us on another note
08:19 ren1us m: my %hash; !%hash{"test"}:exists;
08:19 camelia rakudo-moar a7b4cb: OUTPUT«Unexpected named parameter 'exists' passed␤  in sub prefix:<!> at src/gen/m-CORE.setting:3947␤  in block  at /tmp/FtFkBGQnNc:1␤␤»
08:19 ren1us m: my %hash; !(%hash{"test"}:exists;)
08:19 camelia rakudo-moar a7b4cb: ( no output )
08:19 timotimo ah, that's a fun one
08:19 ren1us easy to fix but i feel like that shouldn't be happening in the first place
08:19 timotimo the precedence of : adverbs is "slightly looser than assignment" or something similar
08:20 timotimo no, the adverbs are allowed to be applied to any operator ever
08:21 ren1us should it really be interpreting it as a named parameter, though?
08:21 timotimo yes
08:21 ren1us Huh.
08:21 timotimo m: sub infix:<+>($a, $b, *%params) { say %params.perl; $a * $b }; 1 + 7 :slowly;
08:21 camelia rakudo-moar a7b4cb: OUTPUT«("slowly" => Bool::True).hash␤»
08:21 timotimo that's an ... interesting feature, i must admit
08:22 timotimo if you get introduced to it as "this is how you make [] and {} do special stuff", you're bound to be confused as soon as you see it also applies to other stuff
08:22 ren1us that part makes sense
08:23 ren1us what's throwing me off is the exception message, which feels like passing :$name to method test(:$notName)
08:23 FROGGS ren1us: in Perl 6 we do not want to specialize on tiny things, we like to generalize
08:23 ren1us well actually that sorta makes sense too
08:23 kurahaupo joined #perl6
08:24 FROGGS that is why in-/circum-/.../postfixes eat adverbs
08:27 ren1us i must say, since i started coming in here, i've gotten much better at just accepting craziness
08:28 timotimo :D
08:28 timotimo craziness :D
08:28 timotimo the good kind, i hope! :)
08:28 FROGGS *g*
08:29 ren1us implying craziness is ever not good
08:29 ren1us certainly keeps things interesting
08:31 dakkar joined #perl6
08:35 ren1us hooray, more weirdness.  () represents an empty list, correct?
08:35 kivutar joined #perl6
08:35 timotimo m: say ()
08:35 camelia rakudo-moar a7b4cb: OUTPUT«␤»
08:35 timotimo m: say ().perl
08:35 camelia rakudo-moar a7b4cb: OUTPUT«()␤»
08:35 timotimo m: say ().WHAT
08:35 camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
08:35 timotimo well, an empty parcel
08:35 timotimo but assign that to an @variable and you get an empty list
08:35 ren1us so I can't just do uh
08:36 ren1us m: my %hash; %hash{0} = (); push %hash{0}, 1;
08:36 camelia rakudo-moar a7b4cb: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in sub push at src/gen/m-CORE.setting:8616␤  in block  at /tmp/kq1Yx2DPnX:1␤␤»
08:36 jnthn m: my %hash; push %hash{0}, 1;
08:36 camelia rakudo-moar a7b4cb: ( no output )
08:36 timotimo m: my $test = (); push $test, 1;
08:36 camelia rakudo-moar a7b4cb: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in sub push at src/gen/m-CORE.setting:8616␤  in block  at /tmp/NeyEloMn19:1␤␤»
08:36 jnthn m: my %hash; push %hash{0}, 1; say %hash.perl
08:36 camelia rakudo-moar a7b4cb: OUTPUT«("0" => [1]).hash␤»
08:36 timotimo m: my $test = []; push $test, 1;
08:36 camelia rakudo-moar a7b4cb: ( no output )
08:36 jnthn It auto-vivs to an array for you if you leave it alone :
08:37 timotimo aye, an array, not a parcel
08:37 timotimo m: my $test = (); say $test.WHAT
08:37 camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
08:37 timotimo parcels are immutable, aren't they?
08:37 jnthn Right.
08:37 jnthn Thus why you can't push to one.
08:37 jnthn m: my %hash; %hash{0} = []; push %hash{0}, 1; say %hash.perl
08:37 camelia rakudo-moar a7b4cb: OUTPUT«("0" => [1]).hash␤»
08:38 jnthn Can do that if you really don't want to rely on auto-viv.
08:39 ren1us i take it perl6 doesn't really go along with the tradition of fixed-size arrays?
08:39 timotimo jnthn: you'll be on the road 'til thursday, will you be having some time to hack on moar or p6?
08:39 timotimo ren1us: you can declare sized arrays, but they are NYI
08:39 FROGGS ren1us: fixed sized arrays are on the agenda, but NYI
08:39 timotimo because as soon as you want single-dimension fixed sized arrays, you also want multidim, and you also want arrays that have keys like 'a'..'z'
08:40 FROGGS there is a branch that tries to achieve that, but it has a wrongish approach AFAIK
08:40 jnthn timotimo: Well, I'm traveling back from the north on Thursday morning; I'll be back mid-afternoon and will have the rest of the day free for Perl 6 things.
08:41 timotimo sounds good
08:41 jnthn I may get some stuff done on evenings, but I'm teaching (which is already tiring enough) and fairly ill. :/
08:41 ren1us imo non-integer array indices are a dirty concept.  that's what hashes are for.
08:41 timotimo i missed yesterday's p6weekly "appointment"
08:41 jnthn aww
08:41 jnthn Wasn't it already lagged a day anyway? ;)
08:42 timotimo this is tuesday, no?
08:42 timotimo i always do the weekly on monday, the last weekly was on monday as well
08:42 jnthn ah, ok. I thought it slipped to Wed once, then the next one came on a Tue...guess you got back to Monday :)
08:43 timotimo yes, i did that :)
08:43 timotimo i don't seem to recall terribly many changes i could mention this time around
08:44 FROGGS timotimo: if you wanna know what I am up to... my local panda can query and fetch dists from CPAN, but cannot unpack the tar.gz atm
08:44 FROGGS timotimo: that's why I am porting Archive::Tar from P5 to P6
08:44 timotimo of course :)
08:44 timotimo how about gz? :)
08:45 FROGGS we have that already :o)
08:45 timotimo oh, neato
08:45 FROGGS (perhaps not very portable though)
08:45 nnunley joined #perl6
08:45 timotimo as long as we don't have a pure-perl6 implementation of gzip, we can't sleep easy.
08:45 FROGGS true
08:45 jnthn back to teaching &
08:45 timotimo :P
08:46 FROGGS timotimo: that gives you also some hints: https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog
08:47 FROGGS mentioning the YAPC and posting the link to the videos would also be an option :o)
08:47 FROGGS and perhaps the state of the gsoc projects
08:48 FROGGS (like that HTTP::UserAgent provides bin/http-download, and that it handles chunked transfer-encoding and encoding in general correctly)
08:49 FROGGS perhaps ask brrt what exactly can be JITed right now... I remember a script that was like 2.5 times faster using the JIT
08:50 timotimo an actual script?
08:50 timotimo but not more than adding numbers, eh?
08:50 FROGGS and as a LHF: conditionally enable CGOTO in MoarVM where possible == speed boost
08:50 timotimo ah, yes
08:50 ren1us so, () makes a parcel, and [] makes an array which really shouldn't be letting me do what i'm trying to do.  is there a way to make an empty list without having 'my @list = ();'?
08:50 timotimo do you have a number for the speed move?
08:51 timotimo boost*
08:51 FROGGS timotimo: https://github.com/MoarVM/MoarVM/commit/216724387c
08:51 FROGGS it also subtracts numbers :P
08:52 timotimo okay! :P
08:52 timotimo when i said our jit can already compile fibonacci, the audience laughed :(
08:52 FROGGS :/
08:54 ren1us i dunno why, but i feel slightly dirty typing ().list
08:55 dayangkun joined #perl6
08:56 FROGGS the line noise version would be @(()), but what are you doing actually?
08:56 ren1us just putting a placeholder empty list in as a hash value, which i'm later pushing to
08:57 ren1us and @(()) made me giggle
08:57 FROGGS you can also put an [] or Array in there, no?
08:57 FROGGS or List
08:58 ren1us yeah, but in my dream world i wouldn't be able to stretch arrays so i'd rather avoid that
08:58 ren1us List probably works.  dunno why i didn't think of that
08:58 FROGGS List.new perhaps...
08:58 FROGGS I dunno :o)
08:58 ren1us probably because it's 5 am and i really should've gone to bed quite a while ago
08:59 brrt joined #perl6
09:00 brrt left #perl6
09:00 brrt joined #perl6
09:00 ren1us summer is about using an unfinished language to do things that are complicated anyway, and making it harder by doing it when you're barely conscious since you really don't have to wake up
09:01 FROGGS ahh, I should try that too :P
09:02 igorsutton joined #perl6
09:02 FROGGS I employed myself here to polish rakudo's edges... which is challenging enough
09:03 brrt joined #perl6
09:05 igorsutton joined #perl6
09:07 Tene FROGGS: It occurs to me that polished edges would be sharper and more dangerous...
09:08 Tene ;)
09:08 timotimo well, what good is a dull tool?
09:09 Tene timotimo: I get a lot of use out of my dull hammer. ;)
09:11 timotimo :D
09:11 timotimo for banging data into shape
09:15 kivutar joined #perl6
09:33 erkan joined #perl6
09:33 erkan joined #perl6
09:36 denis_boyun_ joined #perl6
09:47 Psyche^ joined #perl6
09:50 fhelmberger joined #perl6
10:03 ren1us well, just typed tried typing my $@list = %value;  clearly my brain is demanding sleep
10:03 ren1us thanks for being far more patient that i ever could be <3
10:30 dayangkun joined #perl6
10:31 atroxaper If class does some role and implement a method which exists in role. Can I cal role's implementation of method from class method for example?
10:32 rom1504 left #perl6
10:35 FROGGS yes, I just forgot how
10:38 atroxaper I didn't find about it in Using Perl 6 book and in Perl 6 Advent...
10:38 tadzik hold on, I know how...
10:39 tadzik self.Rolename::methodname()
10:40 atroxaper tadzik: oh! I remember that... But I don't know from where... Thank you )
10:40 FROGGS yeah, found it also
10:40 FROGGS rakudo/t/spec/S12-methods/delegation.t:31:    class C does R {
10:40 tadzik I found it here: https://github.com/tadzik/ClassX-StrictConstructor/blob/master/t/t-basic.t#L24 :P
10:41 FROGGS in your own code... that's cheating :P
10:41 atroxaper Yes. Tests is very useful while find of example.
10:41 tadzik I'm pretty sure that when I was looking for a way to write it I just asked on this channel :D
10:42 atroxaper History loop.
10:44 anaeem1_ joined #perl6
11:09 chenryn joined #perl6
11:12 lizmat joined #perl6
11:13 woolfy joined #perl6
11:15 uniejo joined #perl6
11:21 atroxaper joined #perl6
11:25 uniejo joined #perl6
11:26 Akagi201_ joined #perl6
11:28 uniejo joined #perl6
11:29 dayangkun joined #perl6
11:30 lucas__ joined #perl6
11:30 Ven joined #perl6
11:38 psch joined #perl6
11:38 psch hi #perl6
11:41 lucas__ hello, psch
11:41 lucas__ hello channel
11:42 lucas__ help me here:
11:42 lucas__ rakudo: my $a = "a b c"; say <<foo $a bar>>
11:42 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«fooa b cbar␤»
11:42 lucas__ rakudo: my $a = "a b c"; say <<foo '$a' bar>>
11:42 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«foo$abar␤»
11:44 lucas__ <<...>> in Perl 6 has much more magic than qw(...) in Perl 5
11:45 psch the only thing i find surprising here is that <<foo $a bar>> doesn't have spaces between foo and 'a' and 'c' and bar
11:45 Alula_ joined #perl6
11:46 hoelzro morning #perl6
11:46 psch hi hoelzro
11:46 lucas__ psch: yes, I was expecting spaces between too
11:47 psch oh
11:47 psch it's the quoting apparently
11:47 Ven m: my $a = "a b c"; say <<foo $a bar>>.perl
11:47 camelia rakudo-moar a7b4cb: OUTPUT«("foo", ("a", "b", "c").list, "bar")␤»
11:47 psch m: my $s = 'a b c'; my $f = <<foo $s baz>>; $f.say # compare $s to $a; single quotes here
11:47 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤»
11:47 zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.join(", ")
11:47 camelia rakudo-moar a7b4cb: OUTPUT«foo, a, b, c, bar␤»
11:47 Ven ;)
11:47 Ven sanity++
11:48 * Ven just read about p5 nested arrays and is quite happy it's not the same in p6 ...
11:48 zengargoyle 'tis confusing.
11:49 lucas__ The thing is that I read in the specs <<...>> splits kind like shell words, and I was surprised by this fact. But it's ok.
11:50 psch i'm not seeing how the kind of quoting changes the amount of spaces though
11:50 psch or rather why it does that :)
11:50 zengargoyle seems like a bug to me.
11:50 psch zengargoyle: so neither should have the spaces?
11:50 mtj_ joined #perl6
11:51 zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.perl
11:51 camelia rakudo-moar a7b4cb: OUTPUT«("foo", ("a", "b", "c").list, "bar")␤»
11:51 zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.gist
11:51 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
11:52 zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.Str
11:52 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
11:52 zengargoyle m: my $a = "a b c"; say <<foo $a bar>>
11:52 camelia rakudo-moar a7b4cb: OUTPUT«fooa b cbar␤»
11:52 psch oh
11:52 psch it's actually method say vs sub say
11:52 psch m: my $s = "a b c"; my $f = <<foo $s baz>>; $f.say
11:52 zengargoyle not sure if that's what it's supposed to do or not :P
11:52 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤»
11:52 psch m: my $s = "a b c"; my $f = <<foo $s baz>>; $f.say; say $f
11:52 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤foo a b c baz␤»
11:52 psch no, it's not?
11:53 psch i'm confused :)
11:53 zengargoyle m: my $a = "a b c"; <<foo $a bar>>.say
11:53 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
11:53 FROGGS m: my $a = "a b c"; say <<foo $a bar>>.gist; say <<foo $a bar>>.Str say <<foo $a bar>>.perl
11:53 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uOedCPvW7gâ�¤Two terms in a rowâ�¤at /tmp/uOedCPvW7g:1â�¤------> [32mo $a bar>>.gist; say <<foo $a bar>>.Str [33mâ��[31msay <<foo $a bar>>.perl[0mâ�¤    expecting any of:â�¤        method argume…»
11:54 FROGGS m: my $a = "a b c"; say <<foo $a bar>>.gist; say <<foo $a bar>>.Str; say <<foo $a bar>>.perl
11:54 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤foo a b c bar␤("foo", ("a", "b", "c").list, "bar")␤»
11:54 FROGGS m: my $a = "a b c"; say <<foo $a bar>>
11:54 camelia rakudo-moar a7b4cb: OUTPUT«fooa b cbar␤»
11:54 FROGGS m: my $a = "a b c"; say (<<foo $a bar>>)
11:54 camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
11:54 FROGGS m: my $a = "a b c"; say <<foo $a bar>>.WHAT
11:54 camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
11:55 FROGGS m: say 1, 2
11:55 camelia rakudo-moar a7b4cb: OUTPUT«12␤»
11:55 FROGGS m: say (1, 2)
11:55 camelia rakudo-moar a7b4cb: OUTPUT«1 2␤»
11:55 FROGGS it is about flattening
11:56 FROGGS say <<foo $a bar>>  is like  say( 'foo', $a, 'bar' )
11:56 FROGGS but when you pass it as a single parcel, it does not flatten and so stringifies with a space in between
11:58 lucas__ m: my @a = <<a b c>>; say @a.elems
11:58 camelia rakudo-moar a7b4cb: OUTPUT«3␤»
11:58 lucas__ m: my @a = <<a "a b c" c>>; say @a.elems
11:58 zengargoyle makes some sense... i haven't wrapped my head around flattening and parcels and captures and item/list stuff quite yet.
11:58 camelia rakudo-moar a7b4cb: OUTPUT«3␤»
11:58 lucas__ m: my @a = <<a 'a b c' c>>; say @a.elems
11:58 camelia rakudo-moar a7b4cb: OUTPUT«3␤»
11:59 psch parens rewrite comes into play here as well, doesn't it? i.e. say <<a b c>> is the same as say(<'a' 'b' 'c'>)?
12:00 FROGGS zengargoyle: yes, that is hard to understand sometimes :/
12:02 zengargoyle i think parcels were another place where i tried things from the Synopses and they didn't work.
12:02 * Ven watches people get bit like he did
12:02 zengargoyle and wasn't sure if minds had changed or just NYI that far.
12:04 * psch .oO( no, it's not the same, there's no ' in the output of the former... )
12:06 xfix joined #perl6
12:06 noganex joined #perl6
12:06 lizmat fwiw, 'my $a = "a b c"; say <<a $a b>>" giving aa b cb' feels wrong to me
12:07 FROGGS m: say <a b c>
12:07 camelia rakudo-moar a7b4cb: OUTPUT«a b c␤»
12:07 FROGGS m: say <<a b c>>
12:07 camelia rakudo-moar a7b4cb: OUTPUT«a b c␤»
12:07 FROGGS huh
12:08 FROGGS so it only happens when something is interpolated...
12:08 TimToady m: my %hash; not %hash{"test"}:exists; %hash{"test"}:!exists;
12:08 camelia rakudo-moar a7b4cb: OUTPUT«WARNINGS:␤Useless use of "not " in expression "not %hash{\"test\"}:exists" in sink context (line 1)␤»
12:08 TimToady tow workarounds
12:09 TimToady *two even
12:09 TimToady seems to me we've seen that parcel bug before
12:10 rindolf joined #perl6
12:10 TimToady or the <<>> interpolation bug, or whatever bug it really is
12:10 TimToady like maybe three months ago, plus or minus a year
12:12 FROGGS so we will perhaps already see it in nine months?
12:14 Ven mmh, was there talks about p6 outside of lizmat++'s and TimToady++'ss ?
12:14 mtj joined #perl6
12:16 atroxaper joined #perl6
12:16 woolfy left #perl6
12:17 mtj joined #perl6
12:17 lizmat alas, no, afaik
12:18 Ven .oO( Too bad I couldn't be there, I'd have talked about node.js )
12:18 mtj joined #perl6
12:20 mtj joined #perl6
12:22 jnap joined #perl6
12:24 mtj joined #perl6
12:25 thou joined #perl6
12:25 mtj joined #perl6
12:27 mtj joined #perl6
12:32 lizmat joined #perl6
12:36 nebuchadnezzar joined #perl6
12:37 chenryn joined #perl6
12:37 mtj joined #perl6
12:42 virtualsue joined #perl6
12:44 kivutar joined #perl6
12:44 uniejo joined #perl6
12:45 chenryn joined #perl6
12:46 dayangkun joined #perl6
12:47 kaleem joined #perl6
12:48 mtj joined #perl6
12:49 mtj joined #perl6
12:50 logie_ joined #perl6
12:50 lizmat .tell ren1us: pushing to a hash key autovivifies
12:50 yoleaux lizmat: What kind of a name is "ren1us:"?!
12:50 lizmat .tell ren1us pushing to a hash key autovivifies
12:50 yoleaux lizmat: I'll pass your message to ren1us.
12:51 lizmat m: my %h; %h<a>.push: 1; say %h.perl
12:51 camelia rakudo-moar a7b4cb: OUTPUT«("a" => [1]).hash␤»
12:51 lizmat .tell reni1us m: my %h; %h<a>.push: 1; say %h.perl
12:51 yoleaux lizmat: I'll pass your message to reni1us.
12:51 lizmat .tell ren1us m: my %h; %h<a>.push: 1; say %h.perl
12:51 yoleaux lizmat: I'll pass your message to ren1us.
12:55 * Ven is considering PR's to .subst(/:/, '')
12:55 Ven PR'ing yoleaux *
12:56 TimToady .tell ren1us m: my %hash; not %hash{"test"}:exists; %hash{"test"}:!exists;  # two other ways
12:56 yoleaux TimToady: I'll pass your message to ren1us.
12:56 lucas__ So, I would like to thank you people who helped me in this last days. You are all a nice community.
12:56 lucas__ I was wondering, if the following code are two or more terms in a row? Where is my :b and :c?
12:56 lucas__ m: my $a = :a<a> :b<b> :c<c>; say $a
12:57 camelia rakudo-moar a7b4cb: OUTPUT«"a" => "a"␤»
12:57 TimToady that syntax is NYI in rakudo
12:57 Ven oh, that's supposed to be legal ?
12:57 lucas__ TimToady: oh, thanks
12:57 dmol joined #perl6
12:57 TimToady the idea was that, since you can apply multiple adverbs to operators without commas, that oughta work anywhere for a list of args
12:58 atroxaper joined #perl6
12:58 ggoebel111116 joined #perl6
12:58 TimToady so STD accepts it, but nobody implements it
12:59 TimToady so jus tuse commas
12:59 TimToady that looks like a foreign language...
12:59 lucas__ (lisp) :D
12:59 lizmat joined #perl6
13:02 nebuchadnezzar joined #perl6
13:03 lucas__ oh, now i get it; this explains why "sub foo is export(:a :b :c)" isn't a syntax error...
13:04 atroxaper joined #perl6
13:07 brrt joined #perl6
13:12 guru joined #perl6
13:13 chenryn joined #perl6
13:15 atroxaper If @a contains a list of Pairs. @a has an order of elements. Does for %(@a) -> $k, $v {} has the same order?
13:16 lizmat no, because that will create a hash
13:16 lizmat and the order in the hash is indeterninate
13:16 brrt m: my @a = "foo" => "bar", "quix" => "quam"; say %(@a);
13:16 camelia rakudo-moar a7b4cb: OUTPUT«("foo" => "bar", "quix" => "quam").hash␤»
13:16 atroxaper lizmat: yes, know about hash. But maybe ;)
13:17 brrt hmm... that would imply keeping the order over the hashification
13:17 brrt that is a php thing to do :-)
13:17 atroxaper Is there some one line alternative for making for loop and get key and value in right order?
13:18 lizmat the thing is, that .gist will sort the keys for you, to create a more human acceptable representation
13:19 Timbus m: my @a = "foo" => "bar", "quix" => "quam"; for @a>>.kv -> $k, $v { say $v }
13:19 camelia rakudo-moar a7b4cb: OUTPUT«bar␤quam␤»
13:19 lizmat atroxaper: define the right order?
13:19 atroxaper Timbus: But >> multithread, isn't it?
13:20 brrt the order it was in the array i suppose
13:20 Timbus he wants to unbox the pairs
13:20 ennio joined #perl6
13:20 lizmat calling .sort on a Hash, will create a sorted list of pairs, sorted by key
13:20 Timbus m: my @a = "foo" => "bar", "quix" => "quam"; for @a.map(*.kv) -> $k, $v { say $v }
13:20 camelia rakudo-moar a7b4cb: OUTPUT«bar␤quam␤»
13:20 lizmat is that what you want ?
13:20 atroxaper lizmat: @ already has right order. I just want to get $k and $v
13:21 psch m: my @a = "foo" => "bar", "quix" => "quam"; for @a { say .key ~ ": " ~ .value } # ?
13:21 atroxaper Timbus: exact! .map :) Thank you.
13:21 camelia rakudo-moar a7b4cb: OUTPUT«foo: bar␤quix: quam␤»
13:21 atroxaper lizmat: Thank you too )
13:21 Timbus i like psch's better
13:21 lizmat ah, okidoki
13:21 uniejo joined #perl6
13:22 atroxaper psch: nice)
13:24 lucas__ Is it possible to automatically unpack the pair in some way, using some method? Example: for @listofpairs -> $k, $v {...}
13:25 lucas__ oh yeah, only map will do...
13:26 lizmat m: my @a = :a<1>, :b<2>; for @a>>.kv -> $k, $v { say "$k: $v" }
13:26 camelia rakudo-moar a7b4cb: OUTPUT«a: 1␤b: 2␤»
13:26 lizmat map not needed, >>.kv also works  :-)
13:27 lucas__ if I say "for @a -> $a, $b, $c {}"; will perl splice from the front 3 items at a time for me?
13:27 Timbus yeah, >> is potentially threaded but the order stays the same doesnt it
13:27 jnthn Timbus: result order stays the same
13:27 jnthn But operation can be threaded
13:27 Timbus phew. and, of course
13:27 jnthn So >>.say is a rather bad idea. :)
13:28 jnthn Unless, of course, you don't care what order the things are said in. :)
13:28 jnthn Which is kinda the point of hyperops. You're saying "I don't care what order you compute the things in, so long as the results are ordered"
13:29 jnthn m: my @a = :a<1>, :b<2>; for @a -> (:$key, :$value) { say "$key = $value" }
13:29 camelia rakudo-moar a7b4cb: OUTPUT«a = 1␤b = 2␤»
13:29 jnthn There's also this way (unpacking syntax
13:29 jnthn )
13:29 Timbus wooah
13:29 Timbus cool
13:30 atroxaper jnthn: really cool!)
13:30 mtj joined #perl6
13:31 atroxaper m: my @a = :a<1>, :b<2>; for @a -> (:$k, :$v) { say "$k = $v" }
13:31 camelia rakudo-moar a7b4cb: OUTPUT«␤  in block  at /tmp/_7GZL5wFVN:1␤␤»
13:31 atroxaper I can't change variables names...
13:34 jnthn No.
13:34 jnthn Because they match accessor names on the object.
13:35 atroxaper I see.
13:35 jnthn m: class Cat { has $.name; has $.lives; }; sub foo((:$name, :$lives)) { say "$name has $lives lives" }; foo(Cat.new(name => 'Borris', lives => 9)
13:35 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/InXPLCBRfkâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/InXPLCBRfk:1â�¤------> [32moo(Cat.new(name => 'Borris', lives => 9)[33mâ��[31m<EOL>[0mâ�¤    expectin…»
13:35 psch m: class A { has $.foo = 1; has $.bar = 2 }; my @a = A.new, A.new; for @a -> (:$foo, :$bar) { say "foo: $foo, bar: $bar" } #
13:35 camelia rakudo-moar a7b4cb: OUTPUT«foo: 1, bar: 2␤foo: 1, bar: 2␤»
13:35 jnthn yeah, that :)
13:35 lucas__ Can I make this work with positional parameters? Example: my @a = 1..6; for @a -> ($a,$b,$c) { say "$a,$b,$c" }; ?
13:35 jnthn m: class Cat { has $.name; has $.lives; }; sub foo((:$name, :$lives)) { say "$name has $lives lives" }; foo(Cat.new(name => 'Borris', lives => 9)))
13:35 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OjIr7nfzo_�Unexpected closing bracket�at /tmp/OjIr7nfzo_:1�------> [32mo(Cat.new(name => 'Borris', lives => 9))[33m�[31m)[0m�»
13:35 jnthn m: class Cat { has $.name; has $.lives; }; sub foo((:$name, :$lives)) { say "$name has $lives lives" }; foo(Cat.new(name => 'Borris', lives => 9))
13:35 camelia rakudo-moar a7b4cb: OUTPUT«Borris has 9 lives␤»
13:35 jnthn *sigh* :)
13:35 jnthn lucas__: You don't need to unpack there.
13:36 jnthn m: for 1..6 -> $a, $b, $c { say "$a $b $c" }
13:36 camelia rakudo-moar a7b4cb: OUTPUT«1 2 3␤4 5 6␤»
13:36 lucas__ jnthn: a lot more easier! thanks.
13:36 jnthn np :)
13:39 Timbus is it 'correct' to throw unit tests into a 'sub MAIN' in a module or is there another way
13:41 PerlJam Timbus: correct is what works :)  But typically, a directory named "t" is made with all of the tests in files under that dir.
13:42 Timbus its unbelievable how lazy i am
13:43 mtj_ joined #perl6
13:43 Alina-malina joined #perl6
13:45 Ven joined #perl6
13:48 btyler joined #perl6
13:48 jnthn Timbus: I guess it's ok for development, then just break them out to a .t file (or a few) before publishing...
13:49 colomon I'd go with the t directory for testing a module which exports stuff, but if you're testing bits of a script multi sub MAIN("test") is a lovely way to go.
13:52 chenryn joined #perl6
13:54 uniejo joined #perl6
13:57 lizmat joined #perl6
13:57 uniejo joined #perl6
13:58 virtualsue joined #perl6
14:04 bluescreen10 joined #perl6
14:05 gabriel joined #perl6
14:06 bluescreen100 joined #perl6
14:08 lizmat joined #perl6
14:09 thou joined #perl6
14:09 kaare_ joined #perl6
14:12 chenryn joined #perl6
14:20 darutoko joined #perl6
14:21 uniejo joined #perl6
14:33 uniejo joined #perl6
14:36 ajr joined #perl6
14:39 anaeem1_ joined #perl6
14:40 anaeem1__ joined #perl6
14:40 brrt joined #perl6
14:42 logie_ joined #perl6
14:43 kurahaupo joined #perl6
14:45 TimToady I think we could use to recognize => in a signature to do Pair unpacking
14:46 * TimToady keeps wanting it
14:47 rurban joined #perl6
14:48 hoelzro https://gist.github.com/hoelzro/fb11cf2962b010080533
14:48 hoelzro why does Foo.bar get an implicit slurpy named argument parameter? is this a bug, or a feature?
14:48 atroxaper joined #perl6
14:49 lizmat hoelzro: you mean %*_ ?
14:50 hoelzro lizmat: yes!
14:50 lizmat like @*_ for positionals ?
14:50 lizmat *sigh*, I'm not awake yet
14:51 lizmat isn't the default sig please (*$_, *%_) ?
14:51 lizmat s/please//
14:51 hoelzro lizmat: I'm just wondering why the method has *%_ and the sub doesn't
14:51 uniejo joined #perl6
14:52 lizmat to be able to transparently pass unknown named params to parent class methods ?
14:52 hoelzro oh, is that why?
14:52 hoverboard joined #perl6
14:53 hoelzro that acutally makes a lot of sense
14:53 hoelzro hmm, I hadn't considered that
14:53 hoelzro thanks lizmat
14:53 timotimo that's what the synopses say
14:54 timotimo interface ... compatibility ... something
15:00 chenryn joined #perl6
15:02 raiph joined #perl6
15:04 Ven Yeah, me not liking it is probably just me getting used to be spoiled by p6 with all its cool stuff :(
15:04 raiph Someone asked "Can you return multiple values from a Perl 6 sub? Can you assign those multiple values to one variable? How does one specify which value to get from that variable?"
15:05 timotimo that sounds like returning a parcel and unpacking that
15:05 raiph I'm planning to spend a while, spread over a few days/week, to develop an answer
15:05 uniejo joined #perl6
15:05 Ven m: my ($a, $b, $c) = foo(); say $b; sub foo { (1, 2, 3) }
15:05 camelia rakudo-moar a7b4cb: OUTPUT«2␤»
15:05 Ven raiph: ^
15:05 logie_ joined #perl6
15:05 raiph Yeah, there's loads of ways
15:05 timotimo should also be able to give nameds with a capture, no?
15:05 Ven .oO( There's more than one way to have multiple ways )
15:06 Timbus m: my ($a, $b, $c); ($a, $b, $c) = foo(); say $b; sub foo { (1, 2, 3) }
15:06 camelia rakudo-moar a7b4cb: OUTPUT«2␤»
15:06 Timbus oh yey
15:07 raiph what about iterators?
15:07 timotimo m: my ($a, $b, $c, $hello, $goodbye); ($a, $b, $c, :$hello, :$goodbye) = foo(); say hello; sub foo { (1, 2, 3, hello => "world", goodbye => "cruel") }
15:07 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/HBoQ5xE80Hâ�¤Undeclared routine:â�¤    hello used at line 1. Did you mean 'shell'?â�¤â�¤Â»
15:07 raiph and concurrency constructs, eg channel or supply?
15:07 timotimo m: my ($a, $b, $c, $hello, $goodbye); ($a, $b, $c, :$hello, :$goodbye) = foo(); say $hello; sub foo { (1, 2, 3, hello => "world", goodbye => "cruel") }
15:07 camelia rakudo-moar a7b4cb: OUTPUT«Cannot modify an immutable Pair␤  in method STORE at src/gen/m-CORE.setting:7251␤  in block  at /tmp/89CQfYrQCZ:1␤␤»
15:07 timotimo oops :)
15:08 Ven m:
15:08 Ven damn that keyboard.
15:08 Ven m: my ($, $, $a) = 1..*; say $a;
15:08 camelia rakudo-moar a7b4cb: OUTPUT«3␤»
15:08 Ven perl6++
15:08 psch "multiple values" makes me thing of arrays, especially with "assign to one variable"
15:10 uniejo joined #perl6
15:13 ajr_ joined #perl6
15:14 raiph m: my $foo = { [ 10, 11, 12 ] }(); $foo[1] = 13; say $foo # using an array
15:14 camelia rakudo-moar a7b4cb: OUTPUT«10 13 12␤»
15:15 raiph m: my $foo = { 10, 11, 12 }(); $foo[1] = 13; say $foo # a parcel is immutable
15:15 camelia rakudo-moar a7b4cb: OUTPUT«Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/NnhlYcRs49:1␤␤»
15:16 raiph m: my $foo = { 10, 11.1, 12 }(); $foo[1] = 13; say $foo # curious --> immutable Rat?
15:16 camelia rakudo-moar a7b4cb: OUTPUT«Cannot modify an immutable Rat␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/WdkafPDFtZ:1␤␤»
15:16 timotimo why would our rats be mutable?
15:16 raiph so they can digest the cheese?
15:16 timotimo :)
15:17 raiph cuz the noise they make at night is distracting?
15:17 psch m: my $f = \(my ($a, $b, $c, $hello, $goodbye)); sub foo { (1, 2, 3, hello => "world", goodbye => "cruel") }; $f = foo; say $f[4]<goodbye> # something like this timotimo?
15:17 camelia rakudo-moar a7b4cb: OUTPUT«cruel␤»
15:18 thou hoelzro, lizmat: I found methods' *%_ a surprising gotcha, and think that it should be mentioned prominently somewhere in tutorials. In particular, that misspelled :fou(1) #`(should be foo) will be silently ignored. Not sure where is best to put that, though.
15:18 psch although that still falls down to [array]<key> i guess
15:18 hoelzro thou: I agree, it's surprising
15:18 psch or rather [position]<key>...
15:19 hoelzro I feel like there's got to be a better solution
15:19 lizmat fwiw, I've been bitten by it as well  :-(
15:19 timotimo psch: ah, that's what i meant to do :)
15:20 thou It combines with something else I found non-obvious, that .method: foo => 1, #`(:foo named param, silently ignored), 'foo' => 1 #`(positional Pair argument)
15:21 raiph m: my (:$namedvar1, :$namedvar2) = foo(); sub foo { [namedvar2 => 12, namedvar1 => 11] }; say $namedvar2
15:21 camelia rakudo-moar a7b4cb: OUTPUT«(Any)␤»
15:21 thou So I learned that, if I want to pass a pair literal, always use the quoted version.
15:22 hoelzro interesting
15:24 timotimo aye, there's a justification for that; if you use quotes, you can put in things that wouldn't be allowed in a variable name
15:24 timotimo and thus couldn't be a valid named parameter name
15:24 hoelzro another thing that surprises me (not so much a gotcha) is how coercion via 'as' works
15:24 hoelzro if I do sub(Str $foo as X) { ... }
15:24 hoelzro it calls $foo.X()
15:25 hoelzro it seems...
15:25 hoelzro too unpredictable
15:25 raiph .X is how you coerce to X
15:25 hoelzro so let's say I have a type called gist
15:25 raiph right?
15:25 hoelzro my class gist {}
15:26 hoelzro if I do sub foo(Str $s as gist) { ... }
15:26 hoelzro it'll just call gist
15:26 hoelzro I don't have a solution, it just strikes me as odd
15:26 hoelzro and if you want to create your own coercions, you have to monkey patch Str, right?
15:27 thou because .gist is defined in Str, you mean?
15:27 hoelzro right
15:27 hoelzro you can give it anything
15:28 hoelzro m: my class say {} sub test(Str $s as say) {} test('why am I printed?!')
15:28 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zEsOq73hz3â�¤Two terms in a rowâ�¤at /tmp/zEsOq73hz3:1â�¤------> [32mmy class say {} [33mâ��[31msub test(Str $s as say) {} test('why am [0mâ�¤    expecting any of:â�¤        statement listâ�¤   …»
15:28 hoelzro =/
15:28 hoelzro m: my class say {} ; sub test(Str $s as say) {} ; test('why am I printed?!')
15:28 camelia rakudo-moar a7b4cb: OUTPUT«why am I printed?!␤»
15:29 PerlJam hoelzro: last expression evaluated.
15:29 hoelzro m: my class say {} ; sub test(Str $s as say) {} ; test('why am I printed?!') ; 1
15:29 camelia rakudo-moar a7b4cb: OUTPUT«why am I printed?!␤»
15:29 raiph i recall timtoady discussing this this year, looking
15:29 PerlJam ?
15:29 hoelzro it's because Str $s as say calls $s.say
15:29 hoelzro wacky, I know =)
15:29 PerlJam ah, that is surprising.
15:30 timotimo i didn't even know we had coercing types already
15:30 hoelzro timotimo: I feel like I tried them a few weeks ago and they didn't work
15:30 * hoelzro git blames
15:31 hoelzro nope, since January we've had them
15:31 timotimo huh, interesting
15:31 hoelzro maybe jnthn can weight in
15:32 hoelzro *weigh
15:35 raiph http://irclog.perlgeek.de/perl6/search/?nick=timtoady&amp;q=coercion # search for timtoady+coercions
15:35 hoelzro thanks raiph
15:35 raiph http://irclog.perlgeek.de/perl6/2013-10-18#i_7731923 # on where to put coercion logic
15:35 hoelzro hang on
15:35 hoelzro are sub foo(Str(X) $param) and sub foo(Str $param as X) equivalent?
15:36 hoelzro I tought that the former was a deprecated form
15:36 hoelzro *thought
15:36 hoelzro ugh
15:37 thou raiph++ # good memory
15:38 atroxaper joined #perl6
15:40 TimToady yes, but the specced way to do that is NYI
15:42 chenryn joined #perl6
15:44 TimToady lunch &
15:48 atroxaper joined #perl6
15:50 cognominal joined #perl6
16:01 masak evening, #perl6
16:01 raiph hi masak
16:01 psch hi masak
16:02 hoelzro ahoy masak
16:02 timotimo g'day
16:02 telex joined #perl6
16:05 atroxaper joined #perl6
16:07 raiph masak: I've got a woolly idea which you may already have had: combining nomic with control of software features. A social rule management layer driving ACLs, etc., or, say, how a wiki functions. Does that make any sense to you?
16:08 masak raiph: almost, but not quite.
16:09 raiph masak: basically, a formal way to manage anarchy
16:10 raiph or rather emergent community
16:14 raiph .oO ( almost, but not quite, interprets "almost, but not quite", as response to "makes any sense?" as makes no sense; if you made sense of that, well, you have a mind like mine :) )
16:15 atroxaper joined #perl6
16:18 mr-foobar joined #perl6
16:21 timotimo where do i find the yapcna videos?
16:23 raiph https://www.youtube.com/user/yapcna/videos
16:23 raiph https://www.youtube.com/playlist?list=PLRuESFRW2Fa77XObvk7-BYVFwobZHdXdK # P6 only
16:23 Alina-malina joined #perl6
16:24 lucas__ Hi. I think <<...>> packages a lot of functionality. It is not just a interpolating quoted words lists. Do you think would make sense having a builtin string method named "shellwords" or something (like .lines, .words) and leaving <<...>> for just that simple concept? That's my idea. Has this already been discussed?
16:24 atroxaper joined #perl6
16:25 timotimo found
16:25 timotimo thanks
16:26 ClarusCogitatio joined #perl6
16:26 atroxaper I found 'error' in Rakudo Moar and JVM. Or maybe it is Rakudo Parrot error :)
16:27 timotimo that could be anything!
16:27 atroxaper One file contains 'module MOD { role Role1 is export { has $.foo is rw = 42; }}'
16:28 atroxaper Second file contains 'use v6; use MOD; class TestRole1 does Role1 {}; my TestRole1 $class .= new;'
16:28 atroxaper If I run perl6 with second file i get 'Type check failed in binding <anon>; expected 'Role1' but got 'TestRole1''
16:29 atroxaper With MoarVM and JVM. But with Parrot all is fine.
16:40 dragonlance joined #perl6
16:41 dragonlance left #perl6
16:47 chenryn joined #perl6
16:49 atroxaper It happens only if role in another module in another file.
16:50 timotimo raiph: can you tell me a bit more about the recent progress of your parrot GSoC student?
16:50 atroxaper joined #perl6
16:51 Rotwang joined #perl6
16:52 raiph timotimo: she or he hasn't auto-vivified yet and I don't expect them to (methinks you meant rurban)
16:52 timotimo er, yes, i did
16:53 timotimo OOC, what project did you offer to mentor?
16:53 timotimo also, "auto-vivifying" seems like a thing that'd happen in an "Emergency Room" like show based on perl or programming in general ...
16:53 raiph atroxaper: searching clogs
16:57 xinming_ joined #perl6
16:57 segomos_ where did atroxaper go?  use MOD::Role1
16:58 segomos_ for the 'does'   .. 'class TR1 does MOD::Role1'
16:59 raiph timotimo: haven't offered to mentor any project; if i did it would be improving my attempts at humor; any takers?
16:59 timotimo :D
17:00 timotimo http://p6weekly.wordpress.com/?p=184&amp;shareadraft=53a9ae9d84c76 - first draft, would welcome feedback
17:00 timotimo and will now be AFK for a bit
17:03 chenryn joined #perl6
17:04 uniejo joined #perl6
17:12 tadzik timotimo: "Filip Sergot" is a real name, should probably be titlecased :)
17:13 denis_boyun_ joined #perl6
17:14 guru joined #perl6
17:16 jnthn timotimo: glanced over it, seems fine
17:19 chenryn joined #perl6
17:20 [Sno] joined #perl6
17:24 lucas__ NQP doesn't has a changelog?
17:27 jnthn No.
17:28 jnthn Well, there's git log... :
17:28 jnthn :)
17:29 jnthn dinner &
17:30 lucas__ timotimo: Just a little thing: if you're mentioning rakudo and moarvm changelog, you could also mention parrot 6.5.0 changelog.
17:35 molaf joined #perl6
17:37 chenryn joined #perl6
17:40 brrt joined #perl6
17:43 lizmat joined #perl6
17:47 segomos_ finally back to debugging http async server
17:51 atroxaper joined #perl6
17:55 lizmat .tell timotimo YAPC::NA is now at day 2 of 3. so it's not over yet
17:55 yoleaux lizmat: I'll pass your message to timotimo.
17:55 timotimo lizmat: oh, okay! thanks
17:55 yoleaux 17:55Z <lizmat> timotimo: YAPC::NA is now at day 2 of 3. so it's not over yet
17:55 lizmat .tell timotimo so s/happened/is happening/
17:55 yoleaux lizmat: I'll pass your message to timotimo.
17:55 raiph timotimo: reviewing now and have a bunch of feedback in maybe 15 mins
17:57 Akagi201_ joined #perl6
17:58 chenryn joined #perl6
17:59 timotimo i've put the changes in
17:59 yoleaux 17:55Z <lizmat> timotimo: so s/happened/is happening/
17:59 timotimo raiph: http://p6weekly.wordpress.com/?p=184&amp;shareadraft=53a9bc84e6c85
17:59 timotimo ^ others, too
17:59 lizmat timotimo++ for the weekly blog
18:00 btyler joined #perl6
18:02 brrt left #perl6
18:02 timotimo oh, i should also mention mouq's doc work and japhb's benchmark work!
18:02 timotimo was raydiak the one who came up with the design?
18:03 rurban joined #perl6
18:04 FROGGS joined #perl6
18:05 lucas__ timotimo: For the changelogs, you could use the following links with you want to. :)
18:05 lucas__ https://github.com/parrot/parrot/blob/master/ChangeLog
18:05 lucas__ https://github.com/perl6/nqp/commits/master
18:06 lucas__ *if you want
18:11 segomos_ btyler: check out the http-server-async, it still craps out with moar but with jvm it's handling multiple concurrenct threads from wrk for me
18:12 btyler segomos_: cool!
18:12 segomos_ note, there is still a bunch of 'say's in there i was using to debug
18:14 segomos_ this is on a warmed up jvm: https://gist.github.com/tony-o/9853fea778e06885108a
18:16 raiph timotimo: just sent feedback, sorry if i duped anything you already added
18:17 timotimo wow, you're doing half of my work for me!
18:17 timotimo thanks, alot!
18:17 psch i'm not sure how i should interpret S05#Transliteration in combination with the existing tests in roast
18:18 psch S05 says 'The .. range sequence is the only metasyntax' but roast tests for backslash escapes
18:18 psch am i making up a conflict there because implementing backslash escapes in the left side of tr/// is hard or is there actually a conflict? :P
18:19 psch i mean, S05 *also* says "you may of course use backslash interpolations in double quotes", but that'd make tr/// interpolate as double quotes, which have more metasyntax than just ..
18:20 chenryn joined #perl6
18:21 FROGGS I think we make a distinction between backslash sequences and metasyntax
18:21 FROGGS at least from looking at Perl 6's grammar
18:22 FROGGS metasyntax is stuff like sub calls or variable interpolation or code in { } blocks
18:24 virtualsue joined #perl6
18:24 timotimo published
18:25 psch FROGGS: alright, thanks. that means i've been on the right track all along :)
18:28 FROGGS timotimo++ # reads nicely :o)
18:28 FROGGS psch: that is a good sign :D
18:28 psch timotimo++ # good blag
18:29 psch although reading that doc.perl6.org is prettier reminds me of an issue i encountered there
18:29 psch http://doc.perl6.org/routine/// # this wonderful link
18:29 psch that is supposed to be &infix:<//>
18:33 FROGGS ohh
18:33 FROGGS also that: http://doc.perl6.org/routine/?
18:33 psch the pitfalls of semantic urls :)
18:33 FROGGS infix ?! as well, of course
18:36 raiph m: my (:$named1, :$named2) := foo; sub foo { :named2<Boo>, :named1<Aoo> }; say $named2 # seems to work
18:36 camelia rakudo-moar a7b4cb: OUTPUT«Boo␤»
18:36 raiph m: my (:$named1, :$named2) := foo; sub foo { :named2<Boo> }; say $named2 # but with odd number of pairs in sub foo...
18:36 camelia rakudo-moar a7b4cb: OUTPUT«␤  in block  at /tmp/1jNRGGZOhC:1␤␤»
18:37 raiph m: my (:$named1, :$named2) := foo; sub foo { :named2<Boo>, :named1<Aoo>, :named3<Coo> }; say $named2 # but with odd number of pairs in sub foo...
18:37 camelia rakudo-moar a7b4cb: OUTPUT«␤  in block  at /tmp/blY8inaPIT:1␤␤»
18:40 uniejo joined #perl6
18:41 hoelzro m:  my class Test { method my-method {} } ; .say for Test.can('my-method')[0].signature.params.map(*.name)
18:41 camelia rakudo-moar a7b4cb: OUTPUT«Failed to write to filehandle: NULL string given␤  in method print at src/gen/m-CORE.setting:14028␤  in sub say at src/gen/m-CORE.setting:13764␤  in method say at src/gen/m-CORE.setting:1032␤  in method reify at src/gen/m-CORE.setting:7748␤  in m…»
18:41 hoelzro =(
18:43 psch m: sub foo(:$) { }; say &foo.signature.params[0].name # similarly
18:43 camelia rakudo-moar a7b4cb: OUTPUT«Failed to write to filehandle: NULL string given␤  in method print at src/gen/m-CORE.setting:14028␤  in sub say at src/gen/m-CORE.setting:13764␤  in block  at /tmp/kajnLEED58:1␤␤»
18:43 psch i.e. some params don't get a .name
18:43 psch it's definitely a bug in my case though
18:44 hoelzro it should probably be '' in that case, though?
18:44 psch m: sub foo(:$bar) { }; say &foo.signature.params[0].name # compare
18:44 camelia rakudo-moar a7b4cb: OUTPUT«$bar␤»
18:44 psch should be just the sigil
18:45 psch i had had a look at that a few days back, and it seems hard
18:45 psch Parameter.name relies on Parameter!variable_name for its return, but putting the sigil in there messes up lookup of anonymous variables
18:46 psch or something like that, i'm not sure i fully understood... :)
18:46 hoelzro bummer
18:46 chenryn joined #perl6
18:47 hoelzro well, that's the first rakudo bug I've seen since I started my most recent project, and it's not a showstopper
18:47 hoelzro so I'd call that a win =)
18:47 erkan joined #perl6
18:47 erkan joined #perl6
18:49 raiph hoelzro++ # winning attitude
18:53 lizmat joined #perl6
18:54 virtualsue joined #perl6
18:58 Akagi201_ joined #perl6
18:58 anaeem1_ joined #perl6
19:04 uniejo joined #perl6
19:04 lizmat joined #perl6
19:05 logie_ joined #perl6
19:09 uniejo_ joined #perl6
19:15 lizmat joined #perl6
19:15 Sqirrel joined #perl6
19:16 btyler segemos_: hm, I keep seeing a deadlock running ab.pl6 under r-j
19:20 atroxaper joined #perl6
19:21 segomos_ btyler: does it do any processing?
19:24 vendethiel joined #perl6
19:25 btyler segomos_: yeah, it typically reaches 'end X' where X is 15-40
19:25 smls joined #perl6
19:25 beastd joined #perl6
19:25 btyler after which all subsequent requests (either from wrk or curl) hang indefinitely
19:25 xragnar_ joined #perl6
19:26 segomos_ what wrk settings?
19:26 btyler defaults
19:27 btyler so -t 2 and -c 10 I think
19:27 segomos_ i'll check it out
19:38 psch https://gist.github.com/peschwa/661c66d89243b343ce20 # finally!
19:38 uniejo joined #perl6
19:38 psch still todo: compute distance instead of giving True or False depending on "did anything change" :P
19:39 psch i'm not sure how i should do that; building an AST inside the actions that does that seems kind of... extreme?
19:39 smls re backlog: I too find the forced *%_ in method sigs somewhat irritating. I feel like Perl 6 encourages me to use safe & explicit subroutine signatures, but then actively subverts this endeavor when it comes to methods with named arguments. That's... weird.
19:40 smls I mean sure, some methods will want to pass unknown named params to the corresponding method of the parent class, but can't they do so explicitly?
19:40 psch oh, also at least \c[..] is still missing... i should probably write tests instead of testing manually
19:42 * psch .oO( i actually just broke normal letters for x )
19:42 psch no wonder tr/// has been lying on the rt for 3 years :)
19:44 timotimo aye, it's no simple operator :(
19:45 psch good news, it's not only \x that works, at least \o works too
19:46 psch \c actually does work as well i found out - i tested it with plaintext in $left, which is why it didnt replace anything
19:46 virtualsue joined #perl6
19:46 timotimo oh?
19:46 timotimo i don't recall what \c does %)
19:46 psch so apparently only plaintext is broken in my implementation at the moment
19:46 FROGGS m: my $s = "aßc"; $s ~~ tr/\c[LATIN SMALL LETTER SHARP S]/b/; say $s
19:46 camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!===␤Cannot find method 'Str'␤»
19:47 psch what FROGGS wrote
19:47 psch is a good example i guess
19:47 FROGGS m: my $s = "aßc"; say "\c[LATIN SMALL LETTER SHARP S]"
19:47 camelia rakudo-moar a7b4cb: OUTPUT«ß␤»
19:47 timotimo oh, that. of course.
19:47 raiph what's a simple demo of concurrency using camelia?
19:47 FROGGS m: my $s = "aßc"; $s ~~ tr/"\c[LATIN SMALL LETTER SHARP S]"/b/; say $s
19:47 camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!===␤Cannot find method 'Str'␤»
19:47 FROGGS what the
19:48 timotimo m: (^20).pick(*).map: start { sleep $_ / 20; say $_; }; sleep 2;
19:48 camelia rakudo-moar a7b4cb: OUTPUT«(signal )No such method 'count' for invocant of type 'Promise'␤  in method reify at src/gen/m-CORE.setting:7672␤  in method reify at src/gen/m-CORE.setting:7584␤  in method gimme at src/gen/m-CORE.setting:8096␤  in method sink at src/gen/m-CORE.set…»
19:48 FROGGS m: await do for ^10 { start say $_ } #  that?
19:48 camelia rakudo-moar a7b4cb: OUTPUT«0␤Type check failed in binding &code; expected 'Callable' but got 'Bool'␤  in sub start at src/gen/m-CORE.setting:18389␤  in block  at /tmp/GWo3vfMu1L:1␤␤»
19:48 lizmat joined #perl6
19:48 timotimo m: (^20).pick(*).map: { start { sleep $_ / 20; say $_; } }; sleep 2;
19:48 camelia rakudo-moar a7b4cb: OUTPUT«(signal )»
19:48 timotimo :(
19:48 FROGGS m: await do for ^10 { start { say $_ } } #  that?
19:48 camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
19:48 timotimo m: lines().map: { start { say $_; } }; sleep 2;
19:49 FROGGS m: await do for ^10 { start { sleep rand; say $_ } } #  that?
19:49 FROGGS O.o
19:49 camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
19:49 camelia rakudo-moar a7b4cb: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth Dobhair, is beag nár bhris mo chroí.␤␤Ag taisteal dom amach trí…»
19:49 raiph thx timotimo++, FROGGS++
19:49 timotimo i don't think mine is actually working
19:49 psch FROGGS: https://github.com/peschwa/rakudo/compare/implement_tr if you want only-backslash-escape tr///
19:49 FROGGS I don't believe in multi core anyway :P
19:50 FROGGS note, that was the first time I did something with concurrency in P6, so it might be just my fault
19:50 rurban joined #perl6
19:51 FROGGS psch: I have to look at that more carefully when I am not that hungry
19:51 lizmat joined #perl6
19:52 psch FROGGS: no rush; i think i have an idea how to get it working properly. i'll first write a few tests though i think
19:54 zengargoyle m: my $t = now; await do for ^10 { start { sleep rand; say "$_ {now - $t}" } }
19:54 camelia rakudo-moar a7b4cb: OUTPUT«0 0.41405649␤1 1.15200857␤2 1.27688527␤3 2.287882␤4 2.9044593␤5 3.56980895␤6 4.3499472␤7 4.8085685␤8 5.4697930␤9 6.40184031␤»
19:55 zengargoyle that came out more interesting in the REPL
19:55 woolfy1 joined #perl6
19:56 raiph zengargoyle: as in numbers not in order?
19:58 Akagi201_ joined #perl6
19:58 zengargoyle raiph: yes
19:59 lizmat m: await do for ^10 { start { rand.sleep; say $_ } } #  this perhaps ?
19:59 camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
19:59 lizmat m: await do for ^10 { start { rand.sleep; .print } } #  this perhaps ?
19:59 camelia rakudo-moar a7b4cb: OUTPUT«0123456789»
20:01 lizmat $ 6 'await do for ^10 { start { rand.sleep; .print } }'
20:01 lizmat 3610495872
20:01 lizmat this is some strange Camelia artefact
20:01 thou m: my $t0 = now; await do for 7...1 { start { sleep $_; say $_ } }; say "Elapsed {(now - $t0)} seconds";
20:01 camelia rakudo-moar a7b4cb: OUTPUT«(timeout)7␤»
20:03 lizmat m: $*SCHEDULER = ThreadPoolScheduler.new; await do for ^10 { start { rand.sleep; .print } } #  this perhaps ?
20:03 camelia rakudo-moar a7b4cb: OUTPUT«0123456789»
20:03 lizmat weird
20:03 lizmat lightning talks&
20:06 * vendethiel watches the lightning talks
20:09 guru joined #perl6
20:17 anaeem1__ joined #perl6
20:18 anaeem1 joined #perl6
20:21 timotimo "perl6 has legs" %)
20:24 erdic joined #perl6
20:29 fhelmberger joined #perl6
20:30 c1sung joined #perl6
20:32 masak is perl6 like a centipede, with lots of legs?
20:33 thou I imagined it with 6 legs
20:33 thou s/it/her/
20:33 anaeem___ joined #perl6
20:35 logie_ joined #perl6
20:39 vendethiel thou: don't s// perl6's legs !
20:40 moritz rather legitimize its subs
20:40 vendethiel that british accent :P
20:48 segomos_ btyler: still more problems with promises, but i'm getting closer
20:51 segomos_ they seem to exit properly as long as i don't fill up the $*SCHEDULER's queue
20:56 atrodo joined #perl6
20:57 segomos_ btyler: can you do 'export RAKUDO_MAX_THREADS=255' and then start the server (in that same session), then run wrk against that?  that runs for me
20:58 treehug88 joined #perl6
20:59 Akagi201_ joined #perl6
20:59 btyler segomos_: happily
20:59 segomos_ i think it will still hang afterwards^^ just want to know if it processes up until that point
21:00 uniejo joined #perl6
21:02 btyler segomos_: seems to be running ok with 255 max threads. got a few java.nio.channels.ClosedChannelException-s
21:02 segomos_ yea i'm going to tackle that next, going to push up some fixes, i think i may have nailed down the hanging
21:03 btyler segomos_: awesome! sorry to keep bringing you bad news, I'm really excited about a nice async http server to play around with
21:03 segomos_ pushed
21:03 markov joined #perl6
21:03 segomos_ btyler: no worries, happy to get the bugs squished
21:04 segomos_ it works as long as it doesn't exceed the $*SCHEDULER's queue which is handled by RAKUDO_MAX_THREADS
21:16 hoelzro joined #perl6
21:21 atroxaper joined #perl6
21:24 uniejo joined #perl6
21:26 denis_boyun_ joined #perl6
21:31 segomos_ any ideas on how to handle that jnthn ?
21:31 segomos_ do i need to handle my own pool for the scheduler?
21:34 oetiker joined #perl6
21:35 timotimo you can make your own $*SCHEDULER and have Inf as the number of max threads :P
21:36 segomos_ if i pass in :max_threads(600) to ThreadPoolScheduler.new it isn't effective
21:36 masak 'night, #perl6
21:36 segomos_ https://github.com/rakudo/rakudo/blob/nom/src/core/ThreadPoolScheduler.pm#L58
21:36 TimToady o/
21:36 psch g'night masak
21:36 segomos_ i think because of that line
21:37 segomos_ \o
21:40 pecastro joined #perl6
21:46 segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(Inf)); start { $*SCHEDULER.loads.say; };
21:47 camelia rakudo-jvm a7b4cb: OUTPUT«(timeout)»
21:47 camelia ..rakudo-parrot a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    ThreadPoolScheduler used at line 1â�¤Undeclared routine:â�¤    start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?â�¤â�¤Â»
21:47 camelia ..rakudo-moar a7b4cb: OUTPUT«Failed to unbox object to integer␤  in method new at src/gen/m-CORE.setting:17977␤  in method initialize at src/gen/m-CORE.setting:18161␤  in method cue at src/gen/m-CORE.setting:18114␤  in method start at src/gen/m-CORE.setting:18341␤  in sub st…»
21:52 segomos_ word
21:56 sivoais joined #perl6
22:00 Akagi201_ joined #perl6
22:05 rurban joined #perl6
22:12 uniejo joined #perl6
22:21 * psch takes the increasing number of build failures due to missing or superfluous characters to heart.
22:21 psch g'night #perl6
22:24 Timbus joined #perl6
22:27 hoelzro night Psyche^
22:27 hoelzro I noticed that #| doesn't occur anywhere in roast; is it NYI?
22:27 hoelzro it's synonymous with #=, right?
22:35 segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(5)); start { $*SCHEDULER.loads.say; };
22:35 camelia rakudo-{jvm,moar} a7b4cb: ( no output )
22:35 camelia ..rakudo-parrot a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    ThreadPoolScheduler used at line 1â�¤Undeclared routine:â�¤    start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?â�¤â�¤Â»
22:35 segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(5)); await start { $*SCHEDULER.loads.say; };
22:35 camelia rakudo-{jvm,moar} a7b4cb: OUTPUT«1␤»
22:35 camelia ..rakudo-parrot a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    ThreadPoolScheduler used at line 1â�¤Undeclared routines:â�¤    await used at line 1â�¤    start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?â�¤â�¤Â»
22:35 segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(Inf)); await start { $*SCHEDULER.loads.say; };
22:35 camelia rakudo-jvm a7b4cb: OUTPUT«Cannot unbox argument to '$permits' as a native int␤  in method new at gen/jvm/CORE.setting:17918␤  in method initialize at gen/jvm/CORE.setting:18102␤  in method cue at gen/jvm/CORE.setting:18055␤  in method start at gen/jvm/CORE.setting:18282␤  …»
22:35 camelia ..rakudo-parrot a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    ThreadPoolScheduler used at line 1â�¤Undeclared routines:â�¤    await used at line 1â�¤    start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?â�¤â�¤Â»
22:35 camelia ..rakudo-moar a7b4cb: OUTPUT«Failed to unbox object to integer␤  in method new at src/gen/m-CORE.setting:17977␤  in method initialize at src/gen/m-CORE.setting:18161␤  in method cue at src/gen/m-CORE.setting:18114␤  in method start at src/gen/m-CORE.setting:18341␤  in sub st…»
22:38 rurban joined #perl6
22:39 dmol joined #perl6
22:47 raiph joined #perl6
22:48 pecastro joined #perl6
23:01 Akagi201_ joined #perl6
23:10 gr33n7007h joined #perl6
23:11 vike joined #perl6
23:12 lucas joined #perl6
23:15 SevenWolf joined #perl6
23:19 lucas Hi. I know Perl 6 already has enums for this purpose, but I wish to know if is there any data type like ruby symbols or lisp keywords in Perl 6?
23:21 segomos_ r: my $d = qw<unquoted string>;
23:21 camelia rakudo-{parrot,jvm,moar} a7b4cb: ( no output )
23:21 segomos_ r: my $d = qw<unquoted string>; $d.say;
23:21 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«unquoted string␤»
23:22 segomos_ r: say qw<big long unquoted string>
23:22 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«big long unquoted string␤»
23:23 segomos_ lucas:
23:27 vendethiel- joined #perl6
23:27 segomos_ r: qw<lucas>.uc
23:27 camelia rakudo-{parrot,jvm,moar} a7b4cb: ( no output )
23:27 segomos_ r: qw<lucas>.uc.say
23:27 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«LUCAS␤»
23:38 thou .tell masak: Thanks for the nudge, I just blogged about Template::Mustache: http://ode-to-camelia.tumblr.com/
23:38 yoleaux thou: What kind of a name is "masak:"?!
23:38 thou .tell masak Thanks for the nudge, I just blogged about Template::Mustache: http://ode-to-camelia.tumblr.com/
23:38 yoleaux thou: I'll pass your message to masak.
23:44 segomos_ thou: nice
23:44 lue perl6: say "ä" ~~ m:m/a/
23:44 camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Adverb m not allowed on m�at /tmp/tmpfile:1�------> [32msay "ä" ~~ m:m/a/[33m�[31m<EOL>[0m�»
23:44 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Unrecognized adverb :m(1) at /tmp/tmpfile line 1:�------> [32msay "ä" ~~ m[33m�[31m:m/a/[0m��Regex modifier m not valid on match at /tmp/tmpfile line 1:�------> [32msay "ä" ~~ m:m[33m�[31m/a/[0…»
23:50 lue I was confused for a second, but  $str ~~ m:m/regex/  is kinda like doing  $str.NFD.split(/:nfd <:Mark>+/).join ~~ m/regex/  , except you get to keep the marks around, right? :)

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

Perl 6 | Reference Documentation | Rakudo