»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:03 mr-foobar left 00:08 logie joined 00:16 ajr_ left 00:24 btyler left 01:03 Akagi20__ joined 01:07 logie left, logie joined 01:08 Akagi201_ left, Alina-malina left 01:09 Alina-malina joined 01:10 hoverboard left 01:15 atroxaper joined 01:16 Su-Shee left, klapperl_ joined 01:17 Su-Shee joined 01:19 atroxaper left, hoverboard joined, klapperl left
TimToady yeah, at this time of night, just the odd google or craigslist employee... 01:23
01:28 FROGGS joined 01:51 chenryn joined 01:53 fhelmberger joined
japhb *snrk* 01:53
01:54 hoverboard is now known as moistcherry 01:58 fhelmberger left 02:06 xiaomiao left 02:08 xiaomiao joined 02:23 ren1us joined
ren1us is /g implemented for perl6 regexes? Parrot, specifically 02:24
rakudo's telling me to use :g as a modifier instead, but then tells me :g doesn't exist
02:24 gr33n7007h joined
ren1us which is really quite saddening 02:24
BenGoldberg p56: my @list = "abcdef" =~ m/[aeiou]/g;
camelia p5-to-p6 : OUTPUT«my @list = 'abcdef' ~~ m:P5:g![aeiou]!␤»
BenGoldberg m: my @list 'abcdef' ~~ m:P5:g![aeiou]! 02:26
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/H8NTEbFhml␤Two terms in a row␤at /tmp/H8NTEbFhml:1␤------> my @list ⏏'abcdef' ~~ m:P5:g![aeiou]!␤ expecting any of:␤ scoped declarator␤ constraint…»
BenGoldberg m: my @list = 'abcdef' ~~ m:P5:g![aeiou]!
camelia ( no output )
BenGoldberg m: .say for 'abcdef' ~~ m:P5:g![aeiou]!
camelia rakudo-moar a7b4cb: OUTPUT«False␤»
BenGoldberg m: .say for 'abcdefa' ~~ m:P5:g!a!
camelia rakudo-moar a7b4cb: OUTPUT«False␤»
BenGoldberg m: .say for 'abcdefa' ~~ m:P5:g!'a'!
camelia rakudo-moar a7b4cb: OUTPUT«False␤»
BenGoldberg shrugs. 02:27
ren1us that's unfortunate
BenGoldberg I know I'm doing it wrong... 02:28
colomon m: say "This is a test
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/3o3NXZWpXB␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/3o3NXZWpXB:1␤------> say "This is a test⏏<EOL>␤ expecting any of:␤ a…»
BenGoldberg But you'll notice, it's not telling me anything about :g not existing.
colomon m: say "This is a test" ~~ m:g/i/;
camelia rakudo-moar a7b4cb: OUTPUT«False␤»
colomon m: say "This is a test" ~~ m/:gi/;
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/c7XMN1fIuz␤Unrecognized regex modifier :gi␤at /tmp/c7XMN1fIuz:1␤------> say "This is a test" ~~ m/:gi⏏/;␤»
colomon m: say "This is a test" ~~ m/:g i/; 02:29
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/dNSEaMZURD␤Unrecognized regex modifier :g␤at /tmp/dNSEaMZURD:1␤------> say "This is a test" ~~ m/:g⏏ i/;␤»
colomon n: say "This is a test" ~~ m:g/i/;
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/_feD0iN09Q line 1:␤------> say "This is a test" ~~ m:g⏏/i/;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.sett…»
BenGoldberg m: say "This is a test" ~~ m:asdfasdf/i/;
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/XgqeAkHy3K␤Adverb asdfasdf not allowed on m␤at /tmp/XgqeAkHy3K:1␤------> say "This is a test" ~~ m:asdfasdf/i/⏏;␤»
BenGoldberg rn: say "This is a test" ~~ m:g/i/;
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«False␤»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/tmpfile line 1:␤------> say "This is a test" ~~ m:g⏏/i/;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting…»
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.
ren1us eh, I guess I'll just try to do a workaround then 02:31
split and loops, here i come
colomon errr, comb maybe?
02:31 noganex joined
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
i need to just dedicate an afternoon to going through the docs soon 02:33
02:34 noganex_ left
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␤*%_␤»
hoelzro why is it that bar gets an implicit slurpy hash parameter?
m: sub foo(Str $name) {} ; .say for &foo.signature.params 02:36
camelia rakudo-moar a7b4cb: OUTPUT«Str $name␤»
hoelzro ...but foo doesn't?
TimToady r: say m:g/i/ given "This is a test"
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«「i」␤ 「i」␤␤»
02:36 chenryn left
TimToady I think it's the combination with ~~ that is a problem 02:36
so it's implemented, but doesn't return something that smartmatch can use as a result type 02:37
ren1us ah
that actually makes sense
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
so "This is a test" ~~ ('i','i') is what it's testing
02:38 lizmat joined
TimToady this is a known bug 02:38
btw, just added rosettacode.org/wiki/World_Cup_grou...age#Perl_6
ren1us: anyway, using given like I did is a workaround 02:39
ren1us thanks ^^
02:40 logie left 02:41 logie joined
TimToady m: say "This is a test" ~~ / [ .*? ('i') ]+ / 02:42
camelia rakudo-moar a7b4cb: OUTPUT«「This i」␤ 0 => 「i」␤ 0 => 「i」␤␤»
TimToady there's another way
well, plus a [0].list
02:42 chenryn joined 02:43 woolfy joined
TimToady or use comb :) 02:43
colomon m: say "This is a test".match(/i/) 02:44
camelia rakudo-moar a7b4cb: OUTPUT«「i」␤␤»
colomon m: say "This is a test".match(/:g i/)
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/iIAiKHfn0f␤Unrecognized regex modifier :g␤at /tmp/iIAiKHfn0f:1␤------> say "This is a test".match(/:g⏏ i/)␤»
colomon m: say "This is a test".match(rx:g/i/)
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/0e8xWbIQqO␤Adverb g not allowed on rx␤at /tmp/0e8xWbIQqO:1␤------> say "This is a test".match(rx:g/i/⏏)␤»
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␤␤»
colomon m: say "This is a test".match(m/i/)
camelia rakudo-moar a7b4cb: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D: Any $target, *%adverbs)␤ in block at /tmp/Lv8AW3YuyC:1␤␤»
colomon m: say "This is a test".match(/i/)
camelia rakudo-moar a7b4cb: OUTPUT«「i」␤␤»
colomon hmm
m: say "This is a test".match(/i/, :g)
camelia rakudo-moar a7b4cb: OUTPUT«「i」␤ 「i」␤␤»
TimToady or that :)
colomon TimToady: how is YAPC going? 02:46
TimToady fine, now that my talk is over :)
02:46 chenryn left 02:47 chenryn joined
colomon TimToady++ 02:47
colomon wishes he was there
TimToady outside it's very hot and humid, inside it's very chilly, so on average we're quite comfy 02:48
they set all the thermostats to 60° here 02:49
colomon I like very chilly. :)
okay, maybe not quite that chilly. dang.
TimToady fortunately we can change our room's thermostat, unlike that dorm at ITT one year... 02:50
er, IIT
and all they gave us for bedding was a sheet, since it was so hot...outside... 02:51
I piled all my clothes from my suitcase on me to keep from getting hypothermia overnight 02:52
02:52 dalek left
TimToady them's were the days... 02:52
02:53 dalek joined, ChanServ sets mode: +v dalek
TimToady or maybe "thems" is more properer 02:54
Timbus if @arr.first-index(*.name eq $key) -> $i {
i thought that was soooo clever
TimToady caint keep those apostrophe's straight...
Timbus until i matched the first element :[ 02:55
TimToady heh
well, you just have to add an else for that case :P 02:56
Timbus lol 02:57
02:57 oetiker left
Timbus 'defined $item' should return '$item but True' 02:57
TimToady
.oO(False.defined)
02:58
Timbus ... yes even defined False
TimToady maybe we just need an ifdef ... -> $i { 02:59
would make the C programmers happy :)
02:59 yeltzooo left
Timbus its terrible, but id use it 02:59
03:00 yeltzooo joined
TimToady if (my $i =...).defined { 03:01
Timbus my pretty syntax...
TimToady if defined my $i = ... { for that matter 03:02
Timbus if defined expr() && expr() -> $i { 03:03
its perfect
wait no
its twice as bad
BenGoldberg Maybe first-index and friends should return 0 but True when the first index matches? 03:19
m: say 0 but True
camelia rakudo-moar a7b4cb: OUTPUT«0␤»
BenGoldberg m: (0 but True).WHAT.say
camelia rakudo-moar a7b4cb: OUTPUT«(Int+{<anon>})␤»
03:21 oetiker joined
TimToady m: say +(0 but True) 03:23
camelia rakudo-moar a7b4cb: OUTPUT«0␤»
TimToady m: say 0+(0 but True)
camelia rakudo-moar a7b4cb: OUTPUT«0␤»
TimToady okay
03:27 atroxaper joined
BenGoldberg m: if ( 0 but True ) -> $i { say $i } 03:27
camelia rakudo-moar a7b4cb: OUTPUT«0␤»
TimToady zzz & 03:28
Timbus BenGoldberg, that was my initial thought, but i dunno 03:33
seems expensive
BenGoldberg Presumably, there could be one global 0 but True object which gets returned. Making a new one every time would be silly. 03:34
03:35 FROGGS left 03:47 moistcherry is now known as hoverboard, FROGGS joined 03:48 kaleem joined 03:50 logie left 04:02 kaare_ joined 04:05 REPLeffect left 04:13 Khisanth left 04:15 estrabd joined, estrabd left 04:16 [Sno] left, estrabd joined 04:19 chenryn left, Khisanth joined, REPLeffect joined 04:31 chenryn joined 04:33 kaleem left, woolfy left 04:34 lizmat left 04:45 chenryn left 04:46 kaare_ left 04:49 chenryn joined 04:56 gfldex joined 05:08 kaare_ joined 05:19 Rotwang left 05:30 BenGoldberg left 05:45 [Sno] joined 05:54 fhelmberger joined, denis_boyun joined 05:58 fhelmberger left 06:01 ren1us left 06:09 parsus joined 06:10 parsus left 06:17 rindolf joined 06:27 dayangkun left 06:32 fmbusii joined, fmbusii left 06:33 mr-foobar joined 06:35 parsus joined 06:40 mr-foobar left
sergot morning o/ 06:42
06:43 mr-foobar joined 06:47 kaleem joined, mr-foobar left 06:52 mr-foobar joined 06:55 mr-fooba_ joined 06:56 mr-foobar left 06:57 parsus left 06:59 mr-fooba_ left 07:11 zakharyas joined 07:14 nnunley left 07:16 dmol joined 07:22 brrt joined
brrt \o #moarvm 07:22
jnthn, i agree wrt to static magic bytecode
there were two reasons why its copied now, and i'm not sue about how valid they are 07:23
(oh, and i've also submit my evaluation :-))
sure
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:24
two - the expectation of the spesh candidate bytecode pointer was that it could be freed 07:26
thus, that expectation had to be upheld
07:27 clkao joined 07:29 MilkmanDan left
timotimo brrt: that was a mischan :) 07:30
brrt oh, yes, it was
ugh
highly likely jnthn will read it anyway 07:31
07:31 ren1us joined
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?
Type check failed in binding <anon>; expected 'SimNet::Frame' but got 'Cursor' in regex id at lib/SimNet/Frames.pm:54
timotimo i'm not getting tired yet :P
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 :-)
timotimo oh
ren1us I'm actually not assigning anything lol
timotimo maybe you called something that's not a regex from inside a regex directly 07:33
ren1us my $id = +(($frame ~~ m/<&id>/).Str);
timotimo ah, yes
07:33 MilkmanDan joined
timotimo &id will try to call a sub "id" and pass a Cursor as first argument 07:33
i mean <&id> will try to call a sub "id" 07:34
what did you mean to match there?
ren1us I've also got: my regex id { \d+ };
and it's clearly finding that 07:35
timotimo oh, huh, that's more interesting
ren1us it also works perfectly in the repl
timotimo can you say &id just before the match call? 07:36
m: say &say
camelia rakudo-moar a7b4cb: OUTPUT«sub say (Any |) { #`(Sub|139671821957528) ... }␤»
timotimo to make sure you're refering to the correct "id" in that lexical scope
ren1us the stack trace goes back to the line where id is declared, so i think it's looking at the right one
and say &id just prints out "id" 07:37
timotimo so could it be the error is somewhere we haven't looked yet?
how about &id.perl?
ren1us regex id(SimNet::Frame: *%_) { #`(Regex|140474202783008) ... } 07:39
and this is interesting
I tried replacing the &id with the actual check (m/\d+/)
and it works
timotimo oh, that id belongs to an actual class
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
timotimo can i see a bit more context of the code? i wonder how the invocant gets constrained to that class in there
ren1us sure, sec. pushing to github
timotimo that regex is *inside* a method declaration, yes? 07:41
if so, that shouldn't act as if it were a method of the class
can you try 'my regex ...' instead? 07:42
ren1us github.com/ren1us/Research/blob/ma.../Frames.pm
timotimo it already is a "my regex"!
ren1us the regex is declared on line 54, the line that usually pitches a fit is line 57
woops 59
timotimo m: class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } } 07:44
camelia ( no output )
timotimo m: class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; ThisIsMyClass.explode()
camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|139848724832440) ... }␤»
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) ... }␤»
ren1us and fyi, a typical $frame value would be ":14{key1=>value1,key2=>|<8>|,key3=>another_value}:
timotimo m: module FooBar; class ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; ThisIsMyClass.new.explode()
camelia rakudo-moar a7b4cb: OUTPUT«regex id (Mu: *%_) { #`(Regex|140711885430672) ... }␤»
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) ... }␤»
timotimo only thing i can think of now is: what perl6 version?
ren1us 2014.04, moarvm 2014.04
07:47 virtualsue joined
ren1us i've got a knack for breaking things that shouldn't be breaking ._. 07:47
timotimo Echt: say "test"
07:47 thou left
timotimo well, the 2014.06 releases are out, but not the Star release 07:48
star: module FooBar; class FooBar::ThisIsMyClass { method explode { my regex id { \d+ }; say &id.perl; "1234" ~~ m/<&id>/; } }; FooBar::ThisIsMyClass.new.explode()
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…»
..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…»
timotimo ah 07:49
seems like it has been fixed since
07:49 nnunley joined
ren1us so should i go and try to get 2014.06 on my machine? 07:50
timotimo aye, with rakudobrew it's very easy
grab it from github.com/tadzik/rakudobrew
07:52 darutoko joined 07:53 spider-mario joined
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:53
07:53 nnunley left
timotimo the path stuff, yes 07:54
ren1us what's the difference between Rakudo and Rakudo Star? 07:55
moritz ren1us: Star contains modules also
and docs
ren1us ah
timotimo you can get all them modules with the panda rakudobrew can install for you, though 07:56
panda install Task::Star should work
ren1us well, let's see if this works 07:57
...as soon as i make my code behave with 2014.06 07:59
oh never mind it's ufo being stupid. yay.
07:59 parsus joined 08:03 FROGGS left
ren1us aight, apparently ufo doesn't work 08:07
08:11 FROGGS joined 08:12 rindolf left
timotimo worst case you can "panda install ." 08:13
or perl -Ilib t/...
08:15 brrt left
ren1us well, if nothing else, that part's working 08:17
so that's awesome
timotimo++
timotimo :)
fixing that bug was easy! 08:18
ren1us on another note
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␤␤»
ren1us m: my %hash; !(%hash{"test"}:exists;)
camelia ( no output )
timotimo ah, that's a fun one
ren1us easy to fix but i feel like that shouldn't be happening in the first place
timotimo the precedence of : adverbs is "slightly looser than assignment" or something similar
no, the adverbs are allowed to be applied to any operator ever 08:20
ren1us should it really be interpreting it as a named parameter, though? 08:21
timotimo yes
ren1us Huh.
timotimo m: sub infix:<+>($a, $b, *%params) { say %params.perl; $a * $b }; 1 + 7 :slowly;
camelia rakudo-moar a7b4cb: OUTPUT«("slowly" => Bool::True).hash␤»
timotimo that's an ... interesting feature, i must admit
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
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
ren1us well actually that sorta makes sense too
08:23 kurahaupo joined
FROGGS that is why in-/circum-/.../postfixes eat adverbs 08:24
ren1us i must say, since i started coming in here, i've gotten much better at just accepting craziness 08:27
timotimo :D 08:28
craziness :D
the good kind, i hope! :)
FROGGS *g*
ren1us implying craziness is ever not good 08:29
certainly keeps things interesting
08:31 dakkar joined
ren1us hooray, more weirdness. () represents an empty list, correct? 08:35
08:35 kivutar joined
timotimo m: say () 08:35
camelia rakudo-moar a7b4cb: OUTPUT«␤»
timotimo m: say ().perl
camelia rakudo-moar a7b4cb: OUTPUT«()␤»
timotimo m: say ().WHAT
camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
timotimo well, an empty parcel
but assign that to an @variable and you get an empty list
ren1us so I can't just do uh
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␤␤»
jnthn m: my %hash; push %hash{0}, 1;
camelia ( no output )
timotimo m: my $test = (); push $test, 1;
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␤␤»
jnthn m: my %hash; push %hash{0}, 1; say %hash.perl
camelia rakudo-moar a7b4cb: OUTPUT«("0" => [1]).hash␤»
timotimo m: my $test = []; push $test, 1;
camelia ( no output )
jnthn It auto-vivs to an array for you if you leave it alone :
timotimo aye, an array, not a parcel 08:37
m: my $test = (); say $test.WHAT
camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
timotimo parcels are immutable, aren't they?
jnthn Right.
Thus why you can't push to one.
m: my %hash; %hash{0} = []; push %hash{0}, 1; say %hash.perl
camelia rakudo-moar a7b4cb: OUTPUT«("0" => [1]).hash␤»
jnthn Can do that if you really don't want to rely on auto-viv. 08:38
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?
ren1us: you can declare sized arrays, but they are NYI
FROGGS ren1us: fixed sized arrays are on the agenda, but NYI
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'
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.
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. :/
ren1us imo non-integer array indices are a dirty concept. that's what hashes are for.
timotimo i missed yesterday's p6weekly "appointment"
jnthn aww
Wasn't it already lagged a day anyway? ;)
timotimo this is tuesday, no? 08:42
i always do the weekly on monday, the last weekly was on monday as well
jnthn ah, ok. I thought it slipped to Wed once, then the next one came on a Tue...guess you got back to Monday :)
timotimo yes, i did that :) 08:43
i don't seem to recall terribly many changes i could mention this time around
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
timotimo: that's why I am porting Archive::Tar from P5 to P6
timotimo of course :)
how about gz? :)
FROGGS we have that already :o) 08:45
timotimo oh, neato
FROGGS (perhaps not very portable though)
08:45 nnunley joined
timotimo as long as we don't have a pure-perl6 implementation of gzip, we can't sleep easy. 08:45
FROGGS true
jnthn back to teaching &
timotimo :P 08:46
FROGGS timotimo: that gives you also some hints: github.com/rakudo/rakudo/blob/nom/.../ChangeLog
mentioning the YAPC and posting the link to the videos would also be an option :o) 08:47
and perhaps the state of the gsoc projects
08:48 denis_boyun left
FROGGS (like that HTTP::UserAgent provides bin/http-download, and that it handles chunked transfer-encoding and encoding in general correctly) 08:48
08:49 kivutar left
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:49
timotimo an actual script? 08:50
but not more than adding numbers, eh?
FROGGS and as a LHF: conditionally enable CGOTO in MoarVM where possible == speed boost
timotimo ah, yes
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 = ();'?
timotimo do you have a number for the speed move?
boost* 08:51
FROGGS timotimo: github.com/MoarVM/MoarVM/commit/216724387c
it also subtracts numbers :P
timotimo okay! :P 08:52
when i said our jit can already compile fibonacci, the audience laughed :(
FROGGS :/
ren1us i dunno why, but i feel slightly dirty typing ().list 08:54
08:55 dayangkun joined
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
and @(()) made me giggle 08:57
FROGGS you can also put an [] or Array in there, no?
or List
ren1us yeah, but in my dream world i wouldn't be able to stretch arrays so i'd rather avoid that 08:58
List probably works. dunno why i didn't think of that
FROGGS List.new perhaps...
I dunno :o)
ren1us probably because it's 5 am and i really should've gone to bed quite a while ago
08:59 brrt joined 09:00 brrt left, brrt joined, brrt left
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:00
09:00 hoverboard left
FROGGS ahh, I should try that too :P 09:01
09:02 igorsutton joined
FROGGS I employed myself here to polish rakudo's edges... which is challenging enough 09:02
09:03 brrt joined 09:04 igorsutton left 09:05 igorsutton joined
Tene FROGGS: It occurs to me that polished edges would be sharper and more dangerous... 09:07
;) 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. ;)
timotimo :D 09:11
for banging data into shape
09:15 kivutar joined 09:33 erkan joined 09:36 denis_boyun_ joined, dayangkun left 09:47 Psyche^ joined 09:50 fhelmberger joined 09:51 Psyche^_ left 09:54 dmol left
ren1us well, just typed tried typing my $@list = %value; clearly my brain is demanding sleep 10:03
thanks for being far more patient that i ever could be <3
10:03 ren1us left 10:07 parsus left 10:10 kurahaupo left 10:30 dayangkun joined
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:31
10:32 rom1504 left
FROGGS yes, I just forgot how 10:35
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:38 chenryn left
tadzik self.Rolename::methodname() 10:39
atroxaper tadzik: oh! I remember that... But I don't know from where... Thank you ) 10:40
FROGGS yeah, found it also
rakudo/t/spec/S12-methods/delegation.t:31: class C does R {
tadzik I found it here: github.com/tadzik/ClassX-StrictCon...asic.t#L24 :P
FROGGS in your own code... that's cheating :P 10:41
atroxaper Yes. Tests is very useful while find of example.
tadzik I'm pretty sure that when I was looking for a way to write it I just asked on this channel :D
atroxaper History loop. 10:42
10:44 anaeem1_ joined 11:03 dwarring left 11:09 chenryn joined 11:12 lizmat joined 11:13 woolfy joined 11:15 uniejo joined 11:21 atroxaper left, atroxaper joined 11:23 uniejo left 11:25 uniejo joined, brrt left 11:26 Akagi20__ left, Akagi201_ joined, atroxaper left 11:28 uniejo left, uniejo joined 11:29 dayangkun left, dayangkun joined 11:30 lucas__ joined, Ven joined 11:38 psch joined
psch hi #perl6 11:38
lucas__ hello, psch 11:41
hello channel
help me here: 11:42
rakudo: my $a = "a b c"; say <<foo $a bar>>
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«fooa b cbar␤»
lucas__ rakudo: my $a = "a b c"; say <<foo '$a' bar>>
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«foo$abar␤»
lucas__ <<...>> in Perl 6 has much more magic than qw(...) in Perl 5 11:44
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
11:45 Alula_ left, Alula_ joined
hoelzro morning #perl6 11:46
psch hi hoelzro
lucas__ psch: yes, I was expecting spaces between too
psch oh 11:47
it's the quoting apparently
Ven m: my $a = "a b c"; say <<foo $a bar>>.perl
camelia rakudo-moar a7b4cb: OUTPUT«("foo", ("a", "b", "c").list, "bar")␤»
psch m: my $s = 'a b c'; my $f = <<foo $s baz>>; $f.say # compare $s to $a; single quotes here
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤»
zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.join(", ")
camelia rakudo-moar a7b4cb: OUTPUT«foo, a, b, c, bar␤»
Ven ;)
sanity++
Ven just read about p5 nested arrays and is quite happy it's not the same in p6 ... 11:48
zengargoyle 'tis confusing.
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:49
11:49 darutoko left
psch i'm not seeing how the kind of quoting changes the amount of spaces though 11:50
or rather why it does that :)
zengargoyle seems like a bug to me.
psch zengargoyle: so neither should have the spaces?
11:50 mtj_ joined
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")␤»
zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.gist
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
zengargoyle m: my $a = "a b c"; say <<foo $a bar>>.Str 11:52
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
zengargoyle m: my $a = "a b c"; say <<foo $a bar>>
camelia rakudo-moar a7b4cb: OUTPUT«fooa b cbar␤»
psch oh
it's actually method say vs sub say
m: my $s = "a b c"; my $f = <<foo $s baz>>; $f.say
zengargoyle not sure if that's what it's supposed to do or not :P
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤»
psch m: my $s = "a b c"; my $f = <<foo $s baz>>; $f.say; say $f
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c baz␤foo a b c baz␤»
psch no, it's not?
i'm confused :) 11:53
zengargoyle m: my $a = "a b c"; <<foo $a bar>>.say
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
FROGGS m: my $a = "a b c"; say <<foo $a bar>>.gist; say <<foo $a bar>>.Str say <<foo $a bar>>.perl
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/uOedCPvW7g␤Two terms in a row␤at /tmp/uOedCPvW7g:1␤------> o $a bar>>.gist; say <<foo $a bar>>.Str ⏏say <<foo $a bar>>.perl␤ expecting any of:␤ method argume…»
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")␤»
FROGGS m: my $a = "a b c"; say <<foo $a bar>>
camelia rakudo-moar a7b4cb: OUTPUT«fooa b cbar␤»
FROGGS m: my $a = "a b c"; say (<<foo $a bar>>)
camelia rakudo-moar a7b4cb: OUTPUT«foo a b c bar␤»
FROGGS m: my $a = "a b c"; say <<foo $a bar>>.WHAT
camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
FROGGS m: say 1, 2 11:55
camelia rakudo-moar a7b4cb: OUTPUT«12␤»
FROGGS m: say (1, 2)
camelia rakudo-moar a7b4cb: OUTPUT«1 2␤»
FROGGS it is about flattening
say <<foo $a bar>> is like say( 'foo', $a, 'bar' ) 11:56
but when you pass it as a single parcel, it does not flatten and so stringifies with a space in between
lucas__ m: my @a = <<a b c>>; say @a.elems 11:58
camelia rakudo-moar a7b4cb: OUTPUT«3␤»
lucas__ m: my @a = <<a "a b c" c>>; say @a.elems
zengargoyle makes some sense... i haven't wrapped my head around flattening and parcels and captures and item/list stuff quite yet.
camelia rakudo-moar a7b4cb: OUTPUT«3␤»
lucas__ m: my @a = <<a 'a b c' c>>; say @a.elems
camelia rakudo-moar a7b4cb: OUTPUT«3␤»
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'>)? 11:59
FROGGS zengargoyle: yes, that is hard to understand sometimes :/ 12:00
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
zengargoyle and wasn't sure if minds had changed or just NYI that far.
psch .oO( no, it's not the same, there's no ' in the output of the former... ) 12:04
12:06 noganex left, xfix left, xfix joined, noganex joined
lizmat fwiw, 'my $a = "a b c"; say <<a $a b>>" giving aa b cb' feels wrong to me 12:06
FROGGS m: say <a b c> 12:07
camelia rakudo-moar a7b4cb: OUTPUT«a b c␤»
FROGGS m: say <<a b c>>
camelia rakudo-moar a7b4cb: OUTPUT«a b c␤»
FROGGS huh
so it only happens when something is interpolated... 12:08
TimToady m: my %hash; not %hash{"test"}:exists; %hash{"test"}:!exists;
camelia rakudo-moar a7b4cb: OUTPUT«WARNINGS:␤Useless use of "not " in expression "not %hash{\"test\"}:exists" in sink context (line 1)␤»
TimToady tow workarounds
*two even 12:09
seems to me we've seen that parcel bug before
12:10 rindolf joined
TimToady or the <<>> interpolation bug, or whatever bug it really is 12:10
like maybe three months ago, plus or minus a year
FROGGS so we will perhaps already see it in nine months? 12:12
12:14 mtj left, ggoebel111116 left
Ven mmh, was there talks about p6 outside of lizmat++'s and TimToady++'ss ? 12:14
12:14 mtj joined 12:16 atroxaper joined, woolfy left 12:17 mtj left, mtj joined
lizmat alas, no, afaik 12:17
Ven
.oO( Too bad I couldn't be there, I'd have talked about node.js )
12:18
12:18 mtj left, mtj joined 12:20 mtj left, mtj joined 12:21 chenryn left 12:22 jnap joined 12:23 lizmat left 12:24 mtj left, mtj joined 12:25 thou joined, mtj left, mtj joined 12:27 mtj left, mtj joined 12:29 thou left 12:30 nebuchadnezzar left 12:32 lizmat joined, kivutar left 12:36 uniejo left, mtj left, nebuchadnezzar joined 12:37 virtualsue left, chenryn joined, mtj joined 12:40 kaleem left 12:42 virtualsue joined 12:43 chenryn left 12:44 dayangkun left, kivutar joined, uniejo joined 12:45 chenryn joined 12:46 dayangkun joined 12:47 kaleem joined 12:48 mtj left, mtj joined, mtj_ left 12:49 mtj left, mtj joined 12:50 logie_ joined
lizmat .tell ren1us: pushing to a hash key autovivifies 12:50
yoleaux lizmat: What kind of a name is "ren1us:"?!
lizmat .tell ren1us pushing to a hash key autovivifies
yoleaux lizmat: I'll pass your message to ren1us.
lizmat m: my %h; %h<a>.push: 1; say %h.perl 12:51
camelia rakudo-moar a7b4cb: OUTPUT«("a" => [1]).hash␤»
lizmat .tell reni1us m: my %h; %h<a>.push: 1; say %h.perl
yoleaux lizmat: I'll pass your message to reni1us.
lizmat .tell ren1us m: my %h; %h<a>.push: 1; say %h.perl
yoleaux lizmat: I'll pass your message to ren1us.
Ven is considering PR's to .subst(/:/, '') 12:55
PR'ing yoleaux *
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.
lucas__ So, I would like to thank you people who helped me in this last days. You are all a nice community.
I was wondering, if the following code are two or more terms in a row? Where is my :b and :c?
m: my $a = :a<a> :b<b> :c<c>; say $a
12:56 lizmat left
camelia rakudo-moar a7b4cb: OUTPUT«"a" => "a"␤» 12:57
TimToady that syntax is NYI in rakudo
12:57 kivutar left
Ven oh, that's supposed to be legal ? 12:57
lucas__ TimToady: oh, thanks
12:57 dmol joined
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:57
12:58 atroxaper left, atroxaper joined, ggoebel111116 joined
TimToady so STD accepts it, but nobody implements it 12:58
so jus tuse commas 12:59
that looks like a foreign language...
lucas__ (lisp) :D
12:59 lizmat joined 13:00 nebuchadnezzar left 13:02 nebuchadnezzar joined
lucas__ oh, now i get it; this explains why "sub foo is export(:a :b :c)" isn't a syntax error... 13:03
13:03 atroxaper left 13:04 atroxaper joined, chenryn left 13:07 brrt joined 13:08 kaare_ left 13:12 uniejo left, guru joined, rindolf left 13:13 guru is now known as Guest53010, chenryn joined, Guest53010 is now known as ajr_
atroxaper If @a contains a list of Pairs. @a has an order of elements. Does for %(@a) -> $k, $v {} has the same order? 13:15
lizmat no, because that will create a hash 13:16
and the order in the hash is indeterninate
brrt m: my @a = "foo" => "bar", "quix" => "quam"; say %(@a);
camelia rakudo-moar a7b4cb: OUTPUT«("foo" => "bar", "quix" => "quam").hash␤»
atroxaper lizmat: yes, know about hash. But maybe ;)
brrt hmm... that would imply keeping the order over the hashification 13:17
that is a php thing to do :-)
atroxaper Is there some one line alternative for making for loop and get key and value in right order?
lizmat the thing is, that .gist will sort the keys for you, to create a more human acceptable representation 13:18
Timbus m: my @a = "foo" => "bar", "quix" => "quam"; for @a>>.kv -> $k, $v { say $v } 13:19
camelia rakudo-moar a7b4cb: OUTPUT«bar␤quam␤»
lizmat atroxaper: define the right order?
atroxaper Timbus: But >> multithread, isn't it?
brrt the order it was in the array i suppose 13:20
Timbus he wants to unbox the pairs
13:20 ennio joined
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 }
camelia rakudo-moar a7b4cb: OUTPUT«bar␤quam␤»
lizmat is that what you want ?
atroxaper lizmat: @ already has right order. I just want to get $k and $v
psch m: my @a = "foo" => "bar", "quix" => "quam"; for @a { say .key ~ ": " ~ .value } # ? 13:21
atroxaper Timbus: exact! .map :) Thank you.
camelia rakudo-moar a7b4cb: OUTPUT«foo: bar␤quix: quam␤»
atroxaper lizmat: Thank you too )
Timbus i like psch's better
lizmat ah, okidoki
13:21 uniejo joined
atroxaper psch: nice) 13:22
13:23 ennio left 13:24 anaeem1_ left
lucas__ Is it possible to automatically unpack the pair in some way, using some method? Example: for @listofpairs -> $k, $v {...} 13:24
oh yeah, only map will do... 13:25
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␤»
lizmat map not needed, >>.kv also works :-)
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
jnthn Timbus: result order stays the same
But operation can be threaded
Timbus phew. and, of course
jnthn So >>.say is a rather bad idea. :)
Unless, of course, you don't care what order the things are said in. :) 13:28
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"
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␤»
jnthn There's also this way (unpacking syntax
)
Timbus wooah
cool
atroxaper jnthn: really cool!) 13:30
13:30 mtj left, mtj joined
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␤␤»
atroxaper I can't change variables names...
jnthn No. 13:34
Because they match accessor names on the object.
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)
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/InXPLCBRfk␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/InXPLCBRfk:1␤------> oo(Cat.new(name => 'Borris', lives => 9)⏏<EOL>␤ expectin…»
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" } #
camelia rakudo-moar a7b4cb: OUTPUT«foo: 1, bar: 2␤foo: 1, bar: 2␤»
jnthn yeah, that :)
lucas__ Can I make this work with positional parameters? Example: my @a = 1..6; for @a -> ($a,$b,$c) { say "$a,$b,$c" }; ?
jnthn m: class Cat { has $.name; has $.lives; }; sub foo((:$name, :$lives)) { say "$name has $lives lives" }; foo(Cat.new(name => 'Borris', lives => 9)))
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/OjIr7nfzo_␤Unexpected closing bracket␤at /tmp/OjIr7nfzo_:1␤------> o(Cat.new(name => 'Borris', lives => 9))⏏)␤»
jnthn m: class Cat { has $.name; has $.lives; }; sub foo((:$name, :$lives)) { say "$name has $lives lives" }; foo(Cat.new(name => 'Borris', lives => 9))
camelia rakudo-moar a7b4cb: OUTPUT«Borris has 9 lives␤»
jnthn *sigh* :)
lucas__: You don't need to unpack there. 13:36
m: for 1..6 -> $a, $b, $c { say "$a $b $c" }
camelia rakudo-moar a7b4cb: OUTPUT«1 2 3␤4 5 6␤»
lucas__ jnthn: a lot more easier! thanks.
jnthn np :)
13:37 Ven left, uniejo left 13:38 brrt left
Timbus is it 'correct' to throw unit tests into a 'sub MAIN' in a module or is there another way 13:39
13:39 lizmat left
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:41
13:41 chenryn left 13:42 Alina-malina left
Timbus its unbelievable how lazy i am 13:42
13:43 mtj_ joined, Alina-malina joined 13:45 Ven joined 13:48 btyler joined
jnthn Timbus: I guess it's ok for development, then just break them out to a .t file (or a few) before publishing... 13:48
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:49
13:52 chenryn joined 13:54 uniejo joined, uniejo left 13:57 virtualsue left, lizmat joined, uniejo joined 13:58 virtualsue joined, lizmat left 14:04 chenryn left, bluescreen10 joined 14:05 gabriel joined 14:06 bluescreen100 joined 14:08 lizmat joined, uniejo left 14:09 thou joined, kaare_ joined 14:10 bluescreen10 left 14:12 chenryn joined 14:20 darutoko joined 14:21 uniejo joined 14:24 gabriel left 14:26 chenryn left 14:31 uniejo left 14:33 uniejo joined 14:34 ajr_ left 14:36 ajr joined, ajr is now known as Guest50055 14:39 anaeem1_ joined 14:40 anaeem1__ joined, brrt joined 14:42 logie_ left, logie_ joined 14:43 kurahaupo joined, anaeem1_ left
TimToady I think we could use to recognize => in a signature to do Pair unpacking 14:45
TimToady keeps wanting it 14:46
14:47 rurban joined
hoelzro gist.github.com/hoelzro/fb11cf2962b010080533 14:48
14:48 atroxaper left
hoelzro why does Foo.bar get an implicit slurpy named argument parameter? is this a bug, or a feature? 14:48
14:48 FROGGS left, atroxaper joined
lizmat hoelzro: you mean %*_ ? 14:49
hoelzro lizmat: yes! 14:50
lizmat like @*_ for positionals ?
14:50 uniejo left
lizmat *sigh*, I'm not awake yet 14:50
isn't the default sig please (*$_, *%_) ? 14:51
s/please//
hoelzro lizmat: I'm just wondering why the method has *%_ and the sub doesn't
14:51 uniejo joined 14:52 uniejo left
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
hoelzro that acutally makes a lot of sense 14:53
hmm, I hadn't considered that
14:53 logie_ left
hoelzro thanks lizmat 14:53
timotimo that's what the synopses say
14:53 atroxaper left
timotimo interface ... compatibility ... something 14:54
14:57 rurban left 15:00 chenryn joined 15:02 raiph joined
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?"
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
Ven m: my ($a, $b, $c) = foo(); say $b; sub foo { (1, 2, 3) } 15:05
camelia rakudo-moar a7b4cb: OUTPUT«2␤»
Ven raiph: ^
15:05 uniejo left, logie_ joined
raiph Yeah, there's loads of ways 15:05
15:05 hoverboard is now known as moistcherry
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 )
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␤»
Timbus oh yey
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") }
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/HBoQ5xE80H␤Undeclared routine:␤ hello used at line 1. Did you mean 'shell'?␤␤»
raiph and concurrency constructs, eg channel or supply?
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") }
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␤␤»
timotimo oops :)
Ven m: 15:08
damn that keyboard.
m: my ($, $, $a) = 1..*; say $a;
camelia rakudo-moar a7b4cb: OUTPUT«3␤»
Ven perl6++
psch "multiple values" makes me thing of arrays, especially with "assign to one variable"
15:10 chenryn left, uniejo joined 15:11 denis_boyun_ left, [Sno] left 15:13 ajr_ joined, Guest50055 left
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␤»
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␤␤»
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␤␤»
timotimo why would our rats be mutable?
raiph so they can digest the cheese?
timotimo :)
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?
camelia rakudo-moar a7b4cb: OUTPUT«cruel␤»
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
hoelzro thou: I agree, it's surprising
psch or rather [position]<key>... 15:19
hoelzro I feel like there's got to be a better solution
lizmat fwiw, I've been bitten by it as well :-(
timotimo psch: ah, that's what i meant to do :)
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:20
15:21 logie_ left
raiph m: my (:$namedvar1, :$namedvar2) = foo(); sub foo { [namedvar2 => 12, namedvar1 => 11] }; say $namedvar2 15:21
camelia rakudo-moar a7b4cb: OUTPUT«(Any)␤»
thou So I learned that, if I want to pass a pair literal, always use the quoted version.
hoelzro interesting 15:22
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
and thus couldn't be a valid named parameter name
hoelzro another thing that surprises me (not so much a gotcha) is how coercion via 'as' works
if I do sub(Str $foo as X) { ... }
it calls $foo.X()
it seems... 15:25
too unpredictable
raiph .X is how you coerce to X
hoelzro so let's say I have a type called gist
raiph right?
hoelzro my class gist {} 15:26
if I do sub foo(Str $s as gist) { ... }
it'll just call gist
I don't have a solution, it just strikes me as odd
and if you want to create your own coercions, you have to monkey patch Str, right?
thou because .gist is defined in Str, you mean? 15:27
hoelzro right
you can give it anything
m: my class say {} sub test(Str $s as say) {} test('why am I printed?!') 15:28
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/zEsOq73hz3␤Two terms in a row␤at /tmp/zEsOq73hz3:1␤------> my class say {} ⏏sub test(Str $s as say) {} test('why am ␤ expecting any of:␤ statement list␤ …»
hoelzro =/
m: my class say {} ; sub test(Str $s as say) {} ; test('why am I printed?!')
camelia rakudo-moar a7b4cb: OUTPUT«why am I printed?!␤»
15:28 zakharyas left
PerlJam hoelzro: last expression evaluated. 15:29
hoelzro m: my class say {} ; sub test(Str $s as say) {} ; test('why am I printed?!') ; 1
camelia rakudo-moar a7b4cb: OUTPUT«why am I printed?!␤»
raiph i recall timtoady discussing this this year, looking
PerlJam ?
hoelzro it's because Str $s as say calls $s.say
wacky, I know =)
PerlJam ah, that is surprising. 15:30
timotimo i didn't even know we had coercing types already
hoelzro timotimo: I feel like I tried them a few weeks ago and they didn't work
hoelzro git blames
nope, since January we've had them 15:31
timotimo huh, interesting
hoelzro maybe jnthn can weight in 15:32
*weigh
raiph irclog.perlgeek.de/perl6/search/?ni...q=coercion # search for timtoady+coercions 15:35
hoelzro thanks raiph
raiph irclog.perlgeek.de/perl6/2013-10-18#i_7731923 # on where to put coercion logic
hoelzro hang on
are sub foo(Str(X) $param) and sub foo(Str $param as X) equivalent? 15:36
I tought that the former was a deprecated form
*thought
ugh
thou raiph++ # good memory 15:37
15:38 atroxaper joined 15:39 uniejo left
TimToady yes, but the specced way to do that is NYI 15:40
15:42 cognominal__ left, chenryn joined
TimToady lunch & 15:44
15:46 igorsutton left 15:48 atroxaper left, Ven left, atroxaper joined 15:50 cognominal joined 15:53 moistcherry is now known as hoverboard, atroxaper left 15:56 chenryn left 15:58 lizmat left 16:00 telex left
masak evening, #perl6 16:01
raiph hi masak
psch hi masak
hoelzro ahoy masak 16:02
timotimo g'day
16:02 telex joined 16:05 kaleem left, atroxaper joined
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:07
masak raiph: almost, but not quite. 16:08
raiph masak: basically, a formal way to manage anarchy 16:09
or rather emergent community 16:10
16:14 atroxaper left
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:14
16:15 atroxaper joined 16:18 mr-foobar joined 16:19 atroxaper left
timotimo where do i find the yapcna videos? 16:21
16:22 Alina-malina left
raiph www.youtube.com/user/yapcna/videos 16:23
www.youtube.com/playlist?list=PLRu...FwobZHdXdK # P6 only
16:23 Alina-malina joined
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
16:24 atroxaper joined
timotimo found 16:25
thanks
16:26 ClarusCogitatio joined
atroxaper I found 'error' in Rakudo Moar and JVM. Or maybe it is Rakudo Parrot error :) 16:26
timotimo that could be anything! 16:27
atroxaper One file contains 'module MOD { role Role1 is export { has $.foo is rw = 42; }}'
Second file contains 'use v6; use MOD; class TestRole1 does Role1 {}; my TestRole1 $class .= new;' 16:28
If I run perl6 with second file i get 'Type check failed in binding <anon>; expected 'Role1' but got 'TestRole1''
16:29 fhelmberger left
atroxaper With MoarVM and JVM. But with Parrot all is fine. 16:29
16:30 dayangkun left 16:40 dragonlance joined 16:41 dragonlance left 16:47 chenryn joined
atroxaper It happens only if role in another module in another file. 16:49
timotimo raiph: can you tell me a bit more about the recent progress of your parrot GSoC student? 16:50
16:50 atroxaper left, atroxaper joined 16:51 dakkar left, Rotwang joined
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
OOC, what project did you offer to mentor? 16:53
also, "auto-vivifying" seems like a thing that'd happen in an "Emergency Room" like show based on perl or programming in general ...
raiph atroxaper: searching clogs
16:53 brrt left 16:55 atroxaper left, chenryn left 16:56 Akagi201_ left 16:57 xinming_ joined
segomos_ where did atroxaper go? use MOD::Role1 16:57
for the 'does' .. 'class TR1 does MOD::Role1' 16:58
raiph timotimo: haven't offered to mentor any project; if i did it would be improving my attempts at humor; any takers? 16:59
16:59 xinming left
timotimo :D 16:59
p6weekly.wordpress.com/?p=184&s...9ae9d84c76 - first draft, would welcome feedback 17:00
and will now be AFK for a bit
17:03 chenryn joined 17:04 uniejo joined 17:10 virtualsue left, chenryn left
tadzik timotimo: "Filip Sergot" is a real name, should probably be titlecased :) 17:12
17:13 denis_boyun_ joined, ajr_ left 17:14 btyler left, guru joined, guru is now known as Guest66169
jnthn timotimo: glanced over it, seems fine 17:16
17:16 Guest66169 is now known as ajr_ 17:19 chenryn joined 17:20 [Sno] joined
lucas__ NQP doesn't has a changelog? 17:24
17:26 uniejo left
jnthn No. 17:27
Well, there's git log... : 17:28
:)
17:29 ajr_ left
jnthn dinner & 17:29
lucas__ timotimo: Just a little thing: if you're mentioning rakudo and moarvm changelog, you could also mention parrot 6.5.0 changelog. 17:30
17:31 denis_boyun_ left 17:34 chenryn left 17:35 molaf joined 17:37 chenryn joined 17:40 brrt joined 17:43 lizmat joined 17:45 chenryn left
segomos_ finally back to debugging http async server 17:47
17:51 atroxaper joined
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.
timotimo lizmat: oh, okay! thanks
yoleaux 17:55Z <lizmat> timotimo: YAPC::NA is now at day 2 of 3. so it's not over yet
lizmat .tell timotimo so s/happened/is happening/
yoleaux lizmat: I'll pass your message to timotimo.
raiph timotimo: reviewing now and have a bunch of feedback in maybe 15 mins
17:56 atroxaper left 17:57 Akagi201_ joined 17:58 chenryn joined
timotimo i've put the changes in 17:59
yoleaux 17:55Z <lizmat> timotimo: so s/happened/is happening/
timotimo raiph: p6weekly.wordpress.com/?p=184&s...9bc84e6c85
^ others, too
lizmat timotimo++ for the weekly blog
18:00 btyler joined 18:01 Akagi201_ left 18:02 brrt left
timotimo oh, i should also mention mouq's doc work and japhb's benchmark work! 18:02
was raydiak the one who came up with the design?
18:03 rurban joined 18:04 FROGGS joined
lucas__ timotimo: For the changelogs, you could use the following links with you want to. :) 18:05
github.com/parrot/parrot/blob/master/ChangeLog
github.com/perl6/nqp/commits/master
*if you want 18:06
18:11 chenryn left
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:11
btyler segomos_: cool! 18:12
segomos_ note, there is still a bunch of 'say's in there i was using to debug
this is on a warmed up jvm: gist.github.com/tony-o/9853fea778e06885108a 18:14
18:16 rurban left
raiph timotimo: just sent feedback, sorry if i duped anything you already added 18:16
timotimo wow, you're doing half of my work for me! 18:17
thanks, alot!
psch i'm not sure how i should interpret S05#Transliteration in combination with the existing tests in roast
S05 says 'The .. range sequence is the only metasyntax' but roast tests for backslash escapes 18:18
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
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
18:20 chenryn joined
FROGGS I think we make a distinction between backslash sequences and metasyntax 18:21
at least from looking at Perl 6's grammar
metasyntax is stuff like sub calls or variable interpolation or code in { } blocks 18:22
18:24 virtualsue joined
timotimo published 18:24
psch FROGGS: alright, thanks. that means i've been on the right track all along :) 18:25
FROGGS timotimo++ # reads nicely :o) 18:28
psch: that is a good sign :D
psch timotimo++ # good blag
although reading that doc.perl6.org is prettier reminds me of an issue i encountered there 18:29
doc.perl6.org/routine/// # this wonderful link
that is supposed to be &infix:<//>
FROGGS ohh 18:30
also that: doc.perl6.org/routine/? 18:31
psch the pitfalls of semantic urls :)
FROGGS infix ?! as well, of course
18:33 chenryn left, erkan left
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␤»
raiph m: my (:$named1, :$named2) := foo; sub foo { :named2<Boo> }; say $named2 # but with odd number of pairs in sub foo...
camelia rakudo-moar a7b4cb: OUTPUT«␤ in block at /tmp/1jNRGGZOhC:1␤␤»
18:37 Timbus left
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
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…»
hoelzro =(
18:43 lucas__ left
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␤␤»
psch i.e. some params don't get a .name
it's definitely a bug in my case though
hoelzro it should probably be '' in that case, though? 18:44
psch m: sub foo(:$bar) { }; say &foo.signature.params[0].name # compare
camelia rakudo-moar a7b4cb: OUTPUT«$bar␤»
psch should be just the sigil
18:44 lizmat left
psch i had had a look at that a few days back, and it seems hard 18:45
Parameter.name relies on Parameter!variable_name for its return, but putting the sigil in there messes up lookup of anonymous variables
or something like that, i'm not sure i fully understood... :) 18:46
hoelzro bummer
18:46 chenryn joined
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
so I'd call that a win =)
18:47 erkan joined, erkan left, erkan joined
raiph hoelzro++ # winning attitude 18:49
18:52 virtualsue left 18:53 lizmat joined 18:54 virtualsue joined 18:56 uniejo left 18:58 Akagi201_ joined, anaeem1__ left, anaeem1_ joined 19:00 lizmat left 19:01 darutoko left 19:02 Akagi201_ left 19:04 uniejo joined, lizmat joined 19:05 logie_ joined 19:09 uniejo_ joined 19:11 lizmat left, logie_ left, uniejo left 19:15 lizmat joined, Sqirrel joined 19:16 uniejo_ left
btyler segemos_: hm, I keep seeing a deadlock running ab.pl6 under r-j 19:16
19:17 chenryn left 19:20 atroxaper joined
segomos_ btyler: does it do any processing? 19:21
19:24 vendethiel joined, atroxaper left
btyler segomos_: yeah, it typically reaches 'end X' where X is 15-40 19:25
19:25 smls joined, beastd joined
btyler after which all subsequent requests (either from wrk or curl) hang indefinitely 19:25
19:25 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar
segomos_ what wrk settings? 19:26
btyler defaults
so -t 2 and -c 10 I think 19:27
segomos_ i'll check it out
19:30 virtualsue left
psch gist.github.com/peschwa/661c66d89243b343ce20 # finally! 19:38
19:38 uniejo joined
psch still todo: compute distance instead of giving True or False depending on "did anything change" :P 19:38
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.
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:41
19:41 profan left
psch .oO( i actually just broke normal letters for x ) 19:42
no wonder tr/// has been lying on the rt for 3 years :)
timotimo aye, it's no simple operator :( 19:44
psch good news, it's not only \x that works, at least \o works too 19:45
\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
19:46 virtualsue joined, erdic left
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
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!===␤Cannot find method 'Str'␤»
timotimo oh?
i don't recall what \c does %) 19:47
psch what FROGGS wrote
is a good example i guess
FROGGS m: my $s = "aßc"; say "\c[LATIN SMALL LETTER SHARP S]"
camelia rakudo-moar a7b4cb: OUTPUT«ß␤»
FROGGS m: my $s = "aßc"; $s ~~ tr/"\c[LATIN SMALL LETTER SHARP S]"/b/; say $s
camelia rakudo-moar a7b4cb: OUTPUT«===SORRY!===␤Cannot find method 'Str'␤»
FROGGS what the
timotimo oh, that. of course.
raiph what's a simple demo of concurrency using camelia?
19:48 lizmat left
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…»
FROGGS m: await do for ^10 { start say $_ } # that?
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
timotimo m: (^20).pick(*).map: { start { sleep $_ / 20; say $_; } }; sleep 2; 19:48
camelia rakudo-moar a7b4cb: OUTPUT«(signal )»
FROGGS m: await do for ^10 { start { say $_ } } # that?
camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
timotimo :(
FROGGS m: await do for ^10 { start { sleep rand; say $_ } } # that? 19:49
timotimo m: lines().map: { start { say $_; } }; sleep 2;
FROGGS O.o
camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
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í…»
raiph thx timotimo++, FROGGS++
psch FROGGS: github.com/peschwa/rakudo/compare/implement_tr if you want only-backslash-escape tr///
FROGGS I don't believe in multi core anyway :P
timotimo i don't think mine is actually working
FROGGS note, that was the first time I did something with concurrency in P6, so it might be just my fault 19:50
19:50 rurban joined 19:51 lizmat left
FROGGS psch: I have to look at that more carefully when I am not that hungry 19:51
19:51 lizmat joined
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:52
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␤»
zengargoyle that came out more interesting in the REPL 19:55
19:55 woolfy1 joined
raiph zengargoyle: as in numbers not in order? 19:56
19:58 Akagi201_ joined
zengargoyle raiph: yes 19:58
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␤»
lizmat m: await do for ^10 { start { rand.sleep; .print } } # this perhaps ?
camelia rakudo-moar a7b4cb: OUTPUT«0123456789»
lizmat $ 6 'await do for ^10 { start { rand.sleep; .print } }' 20:01
3610495872
this is some strange Camelia artefact
thou m: my $t0 = now; await do for 7...1 { start { sleep $_; say $_ } }; say "Elapsed {(now - $t0)} seconds";
camelia rakudo-moar a7b4cb: OUTPUT«(timeout)7␤»
lizmat m: $*SCHEDULER = ThreadPoolScheduler.new; await do for ^10 { start { rand.sleep; .print } } # this perhaps ? 20:03
20:03 Akagi201_ left
camelia rakudo-moar a7b4cb: OUTPUT«0123456789» 20:03
lizmat weird
lightning talks&
20:04 sivoais left 20:05 virtualsue left
vendethiel watches the lightning talks 20:06
20:09 guru joined, guru is now known as Guest69442 20:10 Guest69442 is now known as ajr_ 20:17 anaeem1__ joined, anaeem1_ left 20:18 anaeem1 joined, anaeem1__ left
timotimo "perl6 has legs" %) 20:21
20:24 erdic joined 20:29 fhelmberger joined 20:30 c1sung left, c1sung joined
masak is perl6 like a centipede, with lots of legs? 20:32
thou I imagined it with 6 legs 20:33
s/it/her/
20:33 anaeem___ joined 20:34 uniejo left, fhelmberger left 20:35 logie_ joined 20:36 anaeem1 left
vendethiel thou: don't s// perl6's legs ! 20:39
moritz rather legitimize its subs 20:40
vendethiel that british accent :P
segomos_ btyler: still more problems with promises, but i'm getting closer 20:48
they seem to exit properly as long as i don't fill up the $*SCHEDULER's queue 20:51
20:55 hoelzro left, atrodo left 20:56 atrodo joined
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:57
20:58 treehug88 joined 20:59 Akagi201_ joined
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
21:00 uniejo joined, uniejo left 21:01 Rotwang left
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
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
segomos_ btyler: no worries, happy to get the bugs squished 21:03
21:04 Akagi201_ left
segomos_ it works as long as it doesn't exceed the $*SCHEDULER's queue which is handled by RAKUDO_MAX_THREADS 21:04
21:05 bluescreen100 left 21:07 kaare_ left 21:11 gfldex left, logie_ left 21:16 hoelzro joined 21:17 rurban left 21:21 atroxaper joined, gr33n7007h left 21:22 smls left 21:24 uniejo joined 21:26 atroxaper left, denis_boyun_ joined
segomos_ any ideas on how to handle that jnthn ? 21:31
21:31 oetiker left
segomos_ do i need to handle my own pool for the scheduler? 21:31
21:34 oetiker joined 21:35 uniejo left
timotimo you can make your own $*SCHEDULER and have Inf as the number of max threads :P 21:35
segomos_ if i pass in :max_threads(600) to ThreadPoolScheduler.new it isn't effective 21:36
masak 'night, #perl6
segomos_ github.com/rakudo/rakudo/blob/nom/...ler.pm#L58
psch g'night masak
segomos_ i think because of that line
TimToady o/
segomos_ \o 21:37
21:38 pecastro left 21:40 pecastro joined
segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(Inf)); start { $*SCHEDULER.loads.say; }; 21:46
camelia rakudo-jvm a7b4cb: OUTPUT«(timeout)» 21:47
..rakudo-parrot a7b4cb: OUTPUT«===SORRY!=== 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'?␤␤»
..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:49 denis_boyun_ left 21:51 dmol left
segomos_ word 21:52
21:56 sivoais joined 21:57 spider-mario left 22:00 Akagi201_ joined 22:05 Akagi201_ left, rurban joined 22:08 raiph left 22:12 uniejo joined 22:15 rurban left
psch takes the increasing number of build failures due to missing or superfluous characters to heart. 22:21
g'night #perl6
22:22 psch left 22:23 anaeem___ left 22:24 Timbus joined
hoelzro night Psyche^ 22:27
I noticed that #| doesn't occur anywhere in roast; is it NYI?
it's synonymous with #=, right?
segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(5)); start { $*SCHEDULER.loads.say; }; 22:35
camelia ( no output )
..rakudo-parrot a7b4cb: OUTPUT«===SORRY!=== 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'?␤␤»
segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(5)); await start { $*SCHEDULER.loads.say; };
camelia rakudo-{jvm,moar} a7b4cb: OUTPUT«1␤»
..rakudo-parrot a7b4cb: OUTPUT«===SORRY!=== 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'?␤␤»
segomos_ r: $*SCHEDULER = ThreadPoolScheduler.new(:max_threads(Inf)); await start { $*SCHEDULER.loads.say; };
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␤ …»
..rakudo-parrot a7b4cb: OUTPUT«===SORRY!=== 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'?␤␤»
..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 22:39 dmol joined 22:44 kurahaupo left 22:46 pecastro left 22:47 raiph joined 22:48 pecastro joined 22:53 atta left 22:57 uniejo left 23:01 Akagi201_ joined 23:04 treehug88 left 23:05 Akagi201_ left 23:10 gr33n7007h joined 23:11 vike joined 23:12 lucas joined 23:13 btyler left 23:15 SevenWolf joined
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:19
segomos_ r: my $d = qw<unquoted string>; 23:21
camelia ( no output )
segomos_ r: my $d = qw<unquoted string>; $d.say;
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«unquoted string␤»
segomos_ r: say qw<big long unquoted string> 23:22
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«big long unquoted string␤»
23:22 jnap left
segomos_ lucas: 23:23
23:27 vendethiel- joined
segomos_ r: qw<lucas>.uc 23:27
camelia ( no output )
segomos_ r: qw<lucas>.uc.say
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«LUCAS␤»
23:28 vendethiel left 23:33 pecastro left
thou .tell masak: Thanks for the nudge, I just blogged about Template::Mustache: ode-to-camelia.tumblr.com/ 23:38
yoleaux thou: What kind of a name is "masak:"?!
thou .tell masak Thanks for the nudge, I just blogged about Template::Mustache: ode-to-camelia.tumblr.com/
yoleaux thou: I'll pass your message to masak.
segomos_ thou: nice 23:44
lue perl6: say "ä" ~~ m:m/a/
camelia rakudo-{parrot,jvm,moar} a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Adverb m not allowed on m␤at /tmp/tmpfile:1␤------> say "ä" ~~ m:m/a/⏏<EOL>␤»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Unrecognized adverb :m(1) at /tmp/tmpfile line 1:␤------> say "ä" ~~ m⏏:m/a/␤␤Regex modifier m not valid on match at /tmp/tmpfile line 1:␤------> say "ä" ~~ m:m⏏/a/[0…»
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? :) 23:50