»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:00 SuzieQueue joined 00:03 Suzeanne left, tokuhiro_ joined 00:08 tokuhiro_ left 00:18 aborazmeh joined, aborazmeh left, aborazmeh joined
TimToady this is the sort of place you want adverbs, and, in fact, these are not adverbs, just named arguments 00:21
00:22 leont left
TimToady you can't take a rule-of-thumb like "adverbs may be a design smell" and treat it as a universal truth 00:26
and this situation is rather parallel to the one place we do use adverbs heavily, namely on subscripts 00:27
00:28 Peter_R joined 00:31 thundergnat left
timotimo ah, makes sense. thanks 00:35
00:36 hohoho joined 00:37 Ch0c0late left
dalek kudo/nom: aedaae8 | TimToady++ | src/Perl6/Grammar.nqp:
tell parser that with/without do implicit $_
00:38
TimToady now for the hard part...
which I've failed to do twice, but this time I'll put my work in a branch so jnthn++ can tell me how I'm ignorant :) 00:39
masak good morning, #perl6 00:49
masak will be on .cn time for a few weeks from now
TimToady: backlogging just one screen -- that's what I thought when people started talking about adverbs and design smells. but I wasn't able to verbalize it properly. 00:51
00:52 lichtkind left 00:53 Juerd left, Juerd joined 00:55 cognominal left 00:56 Hor|zon joined 01:00 Hor|zon left 01:06 Zoffix left
masak haha -- perl6advent.wordpress.com/2012/12/...23-macros/ has 4 comments not by me. and they are all about how people dislike the {{{ }}} syntax :P 01:11
01:15 kid51 joined 01:16 adhoc left 01:17 Ben_Goldberg joined 01:31 hohoho left 01:35 hohoho joined 01:52 llfourn joined 01:56 Hor|zon joined 01:58 llfourn left 02:01 Hor|zon left 02:05 tokuhiro_ joined 02:09 tokuhiro_ left 02:10 weihan left 02:11 bjz_ left 02:13 bjz joined 02:15 noganex joined 02:18 hes left, noganex_ left 02:23 BLOKDAK joined
BLOKDAK p6: my @array{-5..5}; 02:24
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5===␤The {} shape syntax with the @ sigil is reserved␤at /tmp/tmpfile:1␤------> 3my @array{-5..57⏏5};␤Shaped arrays not yet implemented. Sorry. ␤at /tmp/tmpfile:1␤------> 3my @array{-5..5}7⏏5;␤ expecting any of:…»
BLOKDAK So anybody know the timeline for shaped arrays?
02:24 PsuzeannePsy joined 02:25 Peter_R left 02:26 Suzeanne joined 02:28 SuzieQueue left, SuzieQueue joined 02:29 PsuzeannePsy left, PsuzeannePsy joined
BLOKDAK p6: shell('id'); 02:30
camelia rakudo-moar aedaae: OUTPUT«shell is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in sub shell at src/RESTRICTED.setting:15␤ in block <unit> at /tmp/tmpfile:1␤␤»
BLOKDAK good for you!
02:30 Suzeanne left 02:31 Suzeanne joined 02:33 SuzieQueue left, SuzieQueue joined 02:34 PsuzeannePsy left, bjz_ joined 02:35 Suzeanne left, bjz left 02:38 SuzieQueue left, kid51 left 02:43 bpmedley left 02:50 nightfrog left 02:51 nightfrog joined 02:54 Celelibi left, Celelibi_ joined 02:55 Korima joined
Korima I have a method which accepts a hash 02:55
method method1(%hash) { ... }
How can call and pass a hash to it created in place? This doesn't work because of the commas:
method1('a' => 123, 'b' => 444)
02:58 Hor|zon joined, bjz_ left 02:59 llfourn joined 03:03 Hor|zon left
colomon m: sub method1(%h) { dd %h; }; method1({ ‘a’ => 123, ‘b’ => 444}) 03:07
camelia rakudo-moar aedaae: OUTPUT«Hash % = {:a(123), :b(444)}␤»
AlexDaniel colomon: ahhhh, I love when people use real quoting characters 03:11
Korima thx
03:13 Celelibi_ is now known as Celelibi
labster AlexDaniel: That's a long blog post in a pull request 03:13
03:13 Korima left
AlexDaniel labster: I know… 03:13
labster: I saw some uncertainty in the community on this question, so I decided to clear up a couple of things :) 03:15
labster I was going to write a Shell::Quote module at YAPC, and then that code got lost under a pile of $dayjob work. 03:16
AlexDaniel labster: I'd say don't 03:17
:)
why bother if “run” does the job
labster I'm thinking of some $dayjob code along the lines of `mysqldump foo | mysql bar`, which is way easier than messing around with IPC::Run. 03:19
03:19 llfourn left
AlexDaniel my $p1 = run 'mysqldump', 'foo', :out; run 'mysql', 'bar', :in($p1.out) 03:21
or use « » if you want
labster Can shellout specify its shell? Because there are time I'd consider non-sh to be a better choice. 03:22
AlexDaniel my $p1 = run «mysqldump foo», :out; run «mysql bar», in($p1.out);
labster: well, then again, you have to use “run”, I guess
labster Oh, right. derp. 03:23
AlexDaniel run ‘/usr/bin/zsh’, '-c', 'some shell code'
or something like that
that's actually what “shell” does in moarvm, if I'm not mistaken 03:24
labster I think the hesitance has more to do with the WOP nature of Perl. And that when you're doing little scripts, you don't want it to get too far away from shell scripting. In a wierd way, it's another quoting language that runs random stuff on your system :)
And your PR is basically arguing that it needs to be Huffmanned to be longer rather than shorter, because it's not all that safe. 03:26
AlexDaniel labster: “WOP”?
labster: yeah. Well, I also see no reason to have that in a quoting construct, but maybe that's just me 03:27
masak BLOKDAK: see gist.github.com/jnthn/040f4502899d39b2cbb4 -- I think it was mentioned there :/ 03:28
03:28 llfourn joined, bjz joined
masak m: my $y = 42; sub foo($x = $y, $y = 7) { say $x }; foo() 03:28
camelia rakudo-moar aedaae: OUTPUT«42␤»
masak should that be allowed? this isn't:
m: my $y = 42; { my $x = $y; my $y = 7 }
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xfMUlBjFWK␤Lexical symbol '$y' is already bound to an outer symbol;␤the implicit outer binding must be rewritten as OUTER::<$y>␤before you can unambiguously declare a new '$y' in this scope␤at /tmp/xfMU…»
masak I guess the parameter case could be argued to be more like `my $y = 42; { my $x = $y; { my $y = 7 } }`, though... 03:30
AlexDaniel my $y = 42; sub foo($x = $y, $y = $x) { say $y }; foo()
m: my $y = 42; sub foo($x = $y, $y = $x) { say $y }; foo()
camelia rakudo-moar aedaae: OUTPUT«42␤»
masak I mean, it's *confusing*, but arguably consistent. 03:31
03:39 Karim joined
Karim I want to pass the certain argument to a method and some of them can be optional. In the method I want to create 03:39
a hash but only with the keys-value(arguments) which have been passed. Currently I'm doing this the following way:
method m1(:$arg1, :$arg2, :$arg3, :$arg4) {
my %h;
if $arg1 {
%h{"arg1"} = $arg1;
}
if $arg2 {
%h{"arg2"} = $arg2;
}
# and so on
Is there a better way?
better formatted version: 03:42
method m1(:$arg1, :$arg2, :$arg3, :$arg4) {
my %h;
if $arg1 {
%h{"arg1"} = $arg1;
}
if $arg2 {
%h{"arg2"} = $arg2;
}
# and so on
03:43 aborazmeh left
masak Karim: slurp the arguments in as a hash? 03:43
hartenfels Karim: Just pass a slurpy hash: method m1(*%args)
Karim: and then slice it
I think the latter is my %h = %args<arg1 arg2 arg3 arg4>:kv 03:44
Karim hartenfels, but in that case it'll be unknown what keys to pass 03:47
the names of the keys matter
hartenfels Karim: Unknown to whom?
Karim to the user
I want to somehow make them understand or restrict them to passing only the certain keys, that's why I'm using named parameters 03:48
**to pass
instead of a hash
hartenfels Maybe there's a way to get a hash of the passed arguments regardless, but I'm not sure how. 03:51
Karim in case of passing a hash, isn't there a way to make them pass only the certain, predefined keys? 03:52
which I'll describe in the documentation for my library
hartenfels I think there is actually. 03:54
method m1(*%args (:$arg1, :$arg2, :$arg3, $:arg4))
Will slurp up your arguments into %args, but only allow the keys <arg1 arg2 arg3 arg4>.
Karim thx, is it described in the Perl's documentation? 03:55
03:55 tokuhiro_ joined
Karim where can I read up on it? 03:55
hartenfels Good question, probably doc.perl6.org/language/functions 03:56
Not sure where the argument unpacking is documented though.
labster AlexDaniel: WOP = Whatever-Oriented Programming 03:57
03:57 adhoc joined, zacts joined
Karim is "*" really needed there? that's a hash anyway, so "*" won't make any difference, will it? 03:57
AlexDaniel labster: oh yea
hartenfels Karim: I don't think it's necessary if it's a hash anyway. And the argument destructuring (not unpacking) might be documented here: doc.perl6.org/type/Signature#Destru...Parameters 03:58
03:58 Hor|zon joined 04:00 tokuhiro_ left
Karim tnx 04:00
hartenfels np
04:01 Karim left 04:02 BenGoldberg joined 04:03 Hor|zon left 04:04 Ben_Goldberg left
masak lol, I blogged! strangelyconsistent.org/blog/macros...ut-on-hold 04:06
04:13 weihan joined, adu joined 04:15 BenGoldberg left
masak lunch & 04:17
mst masak: wtf time zone are you in? 04:18
04:19 larion joined 04:21 zacts left 04:24 bjz left
awwaiid masak: that README.md ... wow 04:25
yoleaux 15 Oct 2015 20:13Z <jdv79> awwaiid: LREP's meta source-url is borked
awwaiid pft
TimToady mst: he's gonna be in .cn for a couple weeks
awwaiid I think the meta source-url is quite excellent
TimToady mst: what timezone are *you* in? 04:26
04:26 hohoho left
awwaiid jdv79: what does borked look like? 04:26
BLOKDAK so anybody have an idea of when shaped arrays are going to make it into perl6? 04:29
p6: my @array{-5..5};
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5===␤The {} shape syntax with the @ sigil is reserved␤at /tmp/tmpfile:1␤------> 3my @array{-5..57⏏5};␤Shaped arrays not yet implemented. Sorry. ␤at /tmp/tmpfile:1␤------> 3my @array{-5..5}7⏏5;␤ expecting any of:…»
TimToady that part is post Christmas, but 0-based .[] indices will be before 04:30
BLOKDAK ah, thank you
i am really looking forward to those since they will make doing math-y stuff sooo much easier...
TimToady we already have the internals for compact multidim arrays, we just haven't hooked it to the declaration syntax yet
BLOKDAK translating formulas from papers into programs is made much more difficult by the need to always remember your array offsets. 04:31
it's like perl6 has the best parts of all the languages 04:34
do the pages at (eg) doc.perl6.org/language.html document all declared functionality or just the implemented stuff?
mst TimToady: aha. pacific here atm.
04:36 AlexDaniel left
TimToady BLOKDAK: I doubt it has even all the implemented stuff; the docs are still a work in progress 04:42
04:42 hohoho joined, hohoho left, hohoho joined
BLOKDAK TT: cool, cool - thanks for the info. So do you think the cutting-edge-ness of perl6 will have an effect on perl5? 04:44
like, the good attention for perl6 causing dev shops to release perl5 APIs/libraries
04:46 kmel joined
kmel m: 'good morning'.say 04:46
camelia rakudo-moar aedaae: OUTPUT«good morning␤»
TimToady I think so far that Perl 5 is getting more interest now than it would have been if we hadn't gone for Perl 6, but who knows if that trend will continue 04:47
kmel: o/
softmoth m: sub x { 1 }; x or say "hi"; 04:49
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FM_e7J4Ryl␤Undeclared routine:␤ or used at line 1. Did you mean 'on'?␤␤»
softmoth m: sub x { 1 }; x() or say "hi";
camelia ( no output )
softmoth ^ are those parens supposed to be required there?
TimToady yes, all functions default to being list operators 04:50
so it's always going to be expecting a term next 04:51
m: sub term:<x> { 1 }; x or say "hi";
camelia ( no output )
TimToady you can explicitly define a term if you don't want arguments
m: my \x = 1; x or say "hi"; 04:52
camelia ( no output )
TimToady that also defines a term
softmoth Right. I am sure I knew the first part at some time, but got surprised all of a sudden. I'm surprised I don't hit it more often, actually. :-) 04:53
04:58 Ch0c0late joined 04:59 Hor|zon joined 05:01 tokuhiro_ joined 05:05 Hor|zon left 05:06 tokuhiro_ left 05:08 Karim joined
Karim this one returns an error when I'm running it: 05:10
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
}
m1(arg1 => "some arg1");
"Too few positionals passed; expected 1 argument but got 0 in sub m1"
When I remove the whitespace
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
}
it returns the error "Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info"
this one returns an error when I'm running it:
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
}
m1(arg1 => "some arg1");
"Too few positionals passed; expected 1 argument but got 0 in sub m1"
When I remove the whitespace
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
}
it returns the error "Shape declaration with () is reserved; please use whitespace if you meant a subsignature for unpacking, or use the :() form if you meant to add signature info"
________________________________________________________________________________________
this one returns an error when I'm running it:
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
}
m1(arg1 => "some arg1");
"Too few positionals passed; expected 1 argument but got 0 in sub m1"
When I remove the whitespace
sub m1(%h(:$arg1?, :$arg2?)) {
say %h;
how can I fix it? 05:11
adu Karim: use a pastebin
05:13 khw left
Karim pastebin.com/TsZ4VTff 05:15
hartenfels Karim There's whitespace missing between your %h and the destructuring I think.
Karim what's destructuring? 05:16
hartenfels The parens.
sub m1(%h (:$arg1, $arg2))
Karim sub m1(%h(:$arg1?, :$arg2?)) {
see my 1st example, I've posted 2. 05:17
hartenfels The question marks are unnecessary too I think.
I know.
Neither has that space between the %h and the (
sub m1(%h (:arg1, $arg2))
^
05:18 raiph joined
Karim without the whitespace and "?" marks: 05:18
===SORRY!=== Error while compiling test1.pl6
Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info to the function's type
hartenfels You're *missing* whitespace. 05:19
raiph m: sub m1(*%h (:$arg1?, :$arg2?)) { say %h }; m1(arg1 => "some arg1");
camelia rakudo-moar aedaae: OUTPUT«arg1 => some arg1␤»
raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1((arg1 => "some arg1"));
camelia rakudo-moar aedaae: OUTPUT«2 unexpected named arguments passed (key,value) in sub-signature of parameter %h␤ in sub m1 at /tmp/NGtJPElDY2:1␤ in block <unit> at /tmp/NGtJPElDY2:1␤␤»
Karim I wonder, why isn't it working without "*"? 05:20
I'd like the keys to be optional also.
and since it's a hash, why would we use "*"?
isn't it redundant in this case?
raiph Karim: "*" is one of several options regarding how arguments get bound to a parameter 05:21
Karim raiph, hence in case of passing a hash with the predefined keys, using the * is mandatory? 05:22
hartenfels Karim The keys are already optional. You use ! to make them required in the case of named arguments. 05:24
Karim ok, but "in case of passing a hash with the predefined keys, using the * is mandatory? "
adu Karim: do you want the sub do accept a single hash positional argument, or do you want the sub to accept multiple named arguments into a slurpy hash? 05:25
Karim neither. I want the named arguments and hash. 05:26
raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({arg1 => "some arg1"});
camelia rakudo-moar aedaae: OUTPUT«arg1 => some arg1␤»
raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({arg3 => "some arg1"});
camelia rakudo-moar aedaae: OUTPUT«Unexpected named argument 'arg3' passed in sub-signature of parameter %h␤ in sub m1 at /tmp/LAVhdJnal9:1␤ in block <unit> at /tmp/LAVhdJnal9:1␤␤»
Karim yeah, it's working, I know.
adu Karim: so you want 3 named parameters, h, arg1, arg2, and you don't want them to be related in any way? 05:27
05:27 bjz joined
Karim adu, right 05:27
adu then you need a comma
Karim adu, I mean why doesn't this work
sub m1(%h (:$arg1, :$arg2)) { 05:28
say %h.elems;
}
without "*"
Timbus because you called it with a list of pairs, not a hash 05:29
adu Karim: pastie.org/10487329
Karim: works for me
05:30 larion left
Karim and how to make the hash param optional? 05:30
just "?", but where to put it?
adu, I mean it's not working with the "*"
why?
Timbus m: sub m1(%h? (:$arg1, :$arg2)) { say %h }; m1({arg2 => "some arg2"}); 05:31
camelia rakudo-moar aedaae: OUTPUT«arg2 => some arg2␤»
adu Karim: your code doesn't include the *
Karim Timbus, should I have wrapped it into "{ }"?
Timbus because that's a hash
arg2 => "some arg2" is a pair 05:32
Karim Timbus, it's not a "why" question.
Timbus oh. then yes
Karim thx.
Timbus you can coerce it in other ways
Karim adu, yes, my code doesn't, but your does.
Timbus, how? 05:33
05:33 hartenfels left
Timbus %(arg1 => "some arg1") or (arg1 => "some arg1").Hash 05:33
dalek osystem: 6b54400 | (Fayland Lam)++ | META.list:
Add WebServices::GitHub to ecosystem

See github.com/fayland/perl6-WebService-GitHub
05:34
adu Karim: you're not being consistent
Karim adu, I'd like not to use "*"
but I have to. Why? 05:35
adu Karim: then your callsite is wrong
Karim Timbus, thx.
adu Karim: either add * to sub m1, or change your callsite to pass a single hash object 05:36
Karim Not working 05:37
sub m2(%h? (:$arg1, :$arg2)) { say %h.elems; }
m2(h => %(arg1 => 'fdsfds'));
Unexpected named argument 'arg1' passed
raiph m: sub m1(*%h (:$arg1?, :$arg2?)) { say %h }; m1(:arg1 :arg2); # *%h slurps pairs
camelia rakudo-moar aedaae: OUTPUT«arg1 => True, arg2 => True␤»
raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({:arg1 :arg2}); # %h requires a single hash
camelia rakudo-moar aedaae: OUTPUT«arg1 => True, arg2 => 1␤»
adu Karim: you say you want 3 independant parameters, but the way you've written it implies that wou want %h to refer to all named parameters, which are called arg1 and arg2, which means they would be dependant on each other, but you previously said the opposite, which one is it? 05:38
05:38 Suzeanne joined
Karim adu, nope, I want them to be independent. 05:39
softmoth m: my $a = 1; sub x(:$a = $a) { say $a }; x; x :a(42);
camelia rakudo-moar aedaae: OUTPUT«Type check failed in binding $a; expected Any but got Mu␤ in sub x at /tmp/JmigJjWW2H:1␤ in block <unit> at /tmp/JmigJjWW2H:1␤␤»
Karim and the hash should be optional.
softmoth ^ Probably this is correct, but it surprised me
adu Karim: if you don't want to use *, then you must rewrite the capture as (%h, :$arg1, :$arg2), in which case they will be independant, if you want h to refer to arg1 and arg2, then you must use *
softmoth m: my $a = 1; { my $a = $a; ++$a; say "in: $a" }; say "out: $a"; # OK, I was mistaken about how this works, so it's all consistent 05:40
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gfpxuwjgrN␤Cannot use variable $a in declaration to initialize itself␤at /tmp/gfpxuwjgrN:1␤------> 3my $a = 1; { my $a = $7⏏5a; ++$a; say "in: $a" }; say "out: $a"; ␤ expecting any of:␤ …»
adu Karim: if you want h to be a named parameter, then you must rewrite the capture as (:%h, :$arg1, :$arg2)
softmoth sorry for the noise 05:41
Timbus "if you want h to refer to arg1 and arg2, then you must use *" ?
adu Timbus: the alternative would be to change the callsite, but I didn't think that was an option 05:42
Karim I want something like this:
m1(:$aa, :$bb, %h? (:$arg1, :$arg2)) { ... }
that is:
1) :$aa, :$bb are named arguments
2) they're independent from each other and hash
3) hash is optional
4) hash accepts only the keys arg1 and arg2, both of them are optional (but not at the same time, of course)
raiph m: sub m1(:$arg1?, :$arg2?, *%_) { say $arg1; say %_ }; m1(:arg1 :arg2 :arg3)
camelia rakudo-moar aedaae: OUTPUT«True␤arg3 => True␤»
adu Karim: so they are dependant
Karim yes 05:43
adu that's the opposite of what you just said
05:43 uruwi joined
Karim where did I say that? 05:43
uruwi Hello
Some code is acting extremely weirdly
github.com/bluebear94/the-world-of-code
adu <Karim> adu, nope, I want them to be independent.
Karim right, independent, like I said this time and previously. 05:44
uruwi First it printed messages that I didn't tell it to print anymore, and now it's printing "await" but when I connect to port 4444 it doesn't say "accept" as it should
Karim **** sorry, INdependant
uruwi It's also taking a lot of CPU time
adu is so confused
Karim :)
raiph m: m1(:$aa, :$bb, %h? (:$arg1, :$arg2)) {}
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pz_sHEKjFu␤Variable '$aa' is not declared␤at /tmp/Pz_sHEKjFu:1␤------> 3m1(:7⏏5$aa, :$bb, %h? (:$arg1, :$arg2)) {}␤»
uruwi Can anyone try running the code to confirm these results? 05:45
Timbus m: sub m1(%h? (:$arg1, :$arg2), :$aa, :$bb ) { say $arg1 }; m1({arg1 => 'asdf'});
camelia rakudo-moar aedaae: OUTPUT«asdf␤»
Karim ===SORRY!=== Error while compiling test1.pl6
Variable '$aa' is not declared
adu Karim: do you want $arg1 and %h{arg1} to refer to the same value? 05:46
I mean %h<arg1>
Timbus: that would be changing the callsite 05:47
Timbus I've not been told this isn't possible
moritz m: sub m1(%h? (:$arg1, :$arg2), :$aa, :$bb ) { say $arg1 }; m1( |{arg1 => 'asdf'})
camelia rakudo-moar aedaae: OUTPUT«Unexpected named argument 'arg1' passed␤ in sub m1 at /tmp/6OYLD9y9yY:1␤ in block <unit> at /tmp/6OYLD9y9yY:1␤␤»
adu Timbus: well, it works :)
Karim Timbus, that's working well. But one more thing: can't I put the args :$aa and :$bb before %h ?
Timbus no, positionals come before named args, I think 05:48
adu Karim: you can put named parameters anywhere you want
Timbus in the signature?
after*
raiph m: sub m1(%h? (:$arg1, :$arg2), :$aa, :$bb) {}
camelia ( no output )
adu Karim: if they're all named, that is
Karim ===SORRY!=== Error while compiling test1.pl6
Cannot put optional positional parameter %h after variadic parameters
moritz in the signature, positionals go first
Karim yes, in the signature
moritz in the argument list, it doesn't matter
Karim they're all named, aren't they? 05:49
Timbus h is not..
adu Karim: "%h" is positional ":%h" is named
Karim thx, now all is working 05:50
raiph :)
05:50 Karim left 05:51 arunesh joined 05:54 uruwi left 06:00 Hor|zon joined
masak ah; I'm a bit sorry I missed that helping of Karim. in the backlog, it looked terribly inefficient, in the sense of too much energy going in and too little help resulting :) 06:03
06:05 Hor|zon left
Timbus uruwi : runs for me, no CPU use, but it's not parsing the request correctly? so I get no response 06:11
masak maybe there's a high conversion cost when someone is not used to #perl6 and the Perl 6 community.
ShimmerFairy masak: are you suggesting we're being too helpful? :) 06:14
masak not too much help was generated in the end, so no, not suggesting that. :) 06:20
ShimmerFairy masak: I meant more "eager to help" than "giving ultimately useful info" :) 06:21
masak oh, I think useful info was being given, too
but there seemed to be a lot of useful info that didn't get all the way, sort of 06:22
06:24 raiph left 06:38 Ven joined 06:39 adhoc left 06:41 adhoc joined
masak m: my $a = 2; my $b = 2; $a, $b = $b, $a + $b; say $b 06:42
camelia rakudo-moar aedaae: OUTPUT«WARNINGS:␤Useless use of variable $a in sink context (line 1)␤2␤»
masak oh, good.
for some reason I didn't get that warning on -e
can somebody confirm that the warning doesn't show up on -e ?
Timbus confirm 06:43
d
masak submits rakudobug
Timbus: thank you.
06:44 rindolf joined
masak t/spec/S17-lowlevel/lock.t .................................... 9/23 *** Error in `/home/masak/ours/rakudo/install/bin/moar': double free or corruption (!prev): 0x00002b00f4012710 *** 06:51
"double free" -- that means it's twice as good, right? :P
06:53 llfourn left 06:57 weihan_ joined, weihan left 07:01 Hor|zon joined 07:03 tokuhiro_ joined 07:06 Hor|zon left 07:07 tokuhiro_ left 07:09 kaare_ joined 07:10 bjz left 07:11 bjz joined 07:12 adu left 07:14 Miriana-Tor joined 07:17 Ch0c0late left 07:24 Miriana-Tor left 07:25 Ven left 07:28 Ven joined
kaare_ www.djet.xyz/blogs/6_concerns 07:29
07:31 weihan_ left 07:35 Peter_R joined
masak kaare_: agree on a modules focus being important. and that the toolchain also needs to come with that. 07:36
kaare_: as a stopgap very much worth considering (which I found missing from your post), Inline::Perl5 is a real alternative today. people seem to consdier that "cheating", but to me it really isn't. it's exactly the kind of pragmatism that Perl people usually like. 07:37
07:40 rurban joined 07:44 bitmap left 07:45 Ven left
kmel Kaare_ 's blog referenced another one: www.dagolden.com/index.php/2406/tho...christmas/ 07:47
It mentions speed as an important point.
is 6 faster than 5?
PS: I never used 5 before. 07:48
07:50 Ven joined
ShimmerFairy masak: I personally worry that I::P5 could slow down development of the Perl 6 ecosystem if I::P5 gets advertised too much, but I don't deny its usefulness as a "bootstrap" for the community :) 07:52
FROGGS kmel: Perl 6 is slower, except for some micro benchmarks 07:53
kmel but i don't get it. If you're going to use I::P5 why not stay on 5 then 07:54
why would anyone want to run P5 code on 6.
FROGGS well, the code *I* write is preferable written in Perl 6, but I wouldn't mind if a lib I use is actually Perl 5 or Python or C 07:55
kmel if they're going to switch to 6 it has to be for something
FROGGS because often enough you don't look at its code, and foreign api's suck anyway :o)
ShimmerFairy kmel: I think the reasoning usually would go "Perl 6 is much nicer for me to use, but I don't want to spend weeks perfecting a P6 version of The::Perfect::SGML::Parser"
where the fake module I named is something whose features you need in your P6 project. 07:56
kmel ShimmerFairy : that makes sence 07:57
*sense 07:58
ShimmerFairy kmel: it's really the same reason for using any library over diverting your attention to make your own. P5 just happens to be a bit more special than other foreign langs are to P6 because of the historical relationship :)
07:59 darutoko joined 08:03 Hor|zon joined, Ven left 08:04 xfix joined 08:07 firstdayonthejob joined, Hor|zon left
masak I think it's far too easy to end up thinking "either-or" with languages. 08:13
in that light, yes, Inline::Perl5 is deleterious and harmful, because it detracts from slugging it out and making Perl 6 stand on its own. 08:14
but I don't care much for that kind of purity. I care more for doing cool things and reaching awesome results. if that can be done with Perl 5 *alongside* Perl 6, then more power to you for realizing and making use of that!
dalek osystem: 3acf1b5 | (Fayland Lam)++ | META.list:
Add WebService::Google::PageRank to ecosystem

See github.com/fayland/perl6-WebServic...e-PageRank
08:15
kaare_ masak: Inline::Perl5 could be a fine intermediate solution, I think.
masak I can co-exist peacefully with people who consider it a "fine intermediate solution" :P 08:16
I believe the ambition of independence from Perl 5 may be a useful driver in the community
meanwhile, we can get a lot of use out of Perl 5 too
kaare_ Perhaps you're right. I just find it hard to believe that 5 and 6 will co-exist in the mind of the developers. 08:17
08:17 softmoth left
masak they have to. 08:17
there's no realistic alternative.
kaare_ If 6 will catch on, 5 will be maintenance only. That's my bet.
Why spend time enhancing Moose when you have Perl 6 etc. 08:18
It's not my wish, it's my guess.
masak meanwhile, in reality: there's just so much Perl 5 code out there, making money for people. 08:21
if people are having trouble switching from Python *2* to Python *3*, imagine the jump from Perl 5 to 6.
so, no. Perl 5 is not going into maintenance mode anytime soon. that includes if Perl 6 is a roaring success, which remains to be seen.
[Tux] test 50000 39.325 39.212 08:23
test-t 50000 38.865 38.751
masak lizmat: S32/Str for index still talks about an `Index` type. this is a fossil at this point, yes?
ShimmerFairy masak: for me, I don't want to use Perl 5 for various reasons (such as "I don't know it" and "I'm proud to be using P6"), so I won't be using I::P5. Part of my semi-objection is selfish "I want P6 modules!", but for the most part it's a "what if" concern
kaare_ I'm talking about new "exciting" development. Do you really see enough development power for both? 08:24
ShimmerFairy masak: I don't totally object to I::P5, for the record, I just worry that if we're too quick to suggest it, we may possibly deter (temporarily at least) people who are the module-writing type to do so for P6 :)
kaare_: the last time someone thought there was no life left in Perl 5, Perl 6 was born :P
kaare_ If 6 has been out 10 years ago, no Moose would have been born 08:25
08:25 brrt joined
masak kaare_: you're coming at this from a zero-sum point of view. there's lots of "depelopment power" to go around -- the question is more what's worthwhile/useful to spend time on. 08:25
kaare_ ShimmerFairy: I don't predict the death of Perl 5. There'll be money in that for many years
masak Perl 6 was "out" 10 years ago. that's what gave rise to Moose. 08:26
brrt good *
masak ahoj brrt
brrt \o masak
08:26 skids left
kaare_ Perl 6 was not useful 10 years ago 08:26
brrt yes, perl5 is and will likely awesome long after this christmas
*remain 08:27
kmel I like to think of them as 2 different languages
I know 6 was based on 5 and there are many common denominators
ShimmerFairy My prediction for Christmas is that the people who more often use Perl to accomplish other tasks will be disappointed in whatever deficiencies there are, while the people who more often work on things for Perl will see lots of opportunity to make new things in Perl 6 :) 08:28
kmel but guess what c++ was based on C too
ShimmerFairy (and thus that it'll take some time and a considerable base of "making things for Perl" people to get something that more and more "use Perl for other tasks" will find fun and useful for them)
kmel indeed ShimmerFairy 08:29
ShimmerFairy kmel: my go-to analogy is C and C++ for the relationship between P5 and P6, fwiw :)
kmel :) 08:30
brrt oh, on top of that, there is always a 'hidden community' of people who see perl6 as a brand new thing and start figuring out what it is useful for 08:32
the early adopters
ShimmerFairy You could even consider things like Inline::Perl5 as similar to extern "C" { } , perhaps :P
kmel Perl 6 is a new language and like any new language it attracts a lot of people exclusively interested in it. 08:33
kaare_ I don't believe that there's an infinite amount of tuits. Perhaps 5 and 6 will go in different directions in their usage
kmel Then when it is mature enough and has it's own vibe people from other languages may start coming over 08:34
kaare_ 5 as the more ad-hoc language it always was. 6 to build systems.
kmel People move from python to ruby or vice versa if they see a value 08:35
ShimmerFairy In short, I predict the basic stages will turn out to be "people who like making a new language exist" (current), "people who like making stuff for a language", and "people who like using a language"
kmel exactly! ShimmerFairy 08:36
masak kaare_: of course there isn't an infinite amount of tuits. there's enough, however, for Perl 5 and Perl 6 to thrive alongside each other for years to come. after that, who knows? 08:38
dalek ecs: e6fcddd | lizmat++ | S32-setting-library/Str.pod:
Remove Index fossil
08:39
masak t/spec/S32-io/IO-Socket-Async.rakudo.moar hangs locally.
kmel imho we shouldn't be only interested in converting Perl 5 people to Perl 6. We should be interested in converting EVERYBODY to Perl 6 (python, ruby etc.) 08:40
ShimmerFairy masak: that's been hanging for me for a while now
kmel and the only way to do that is to focus on the current task and stop worrying about Perl 5 08:41
imho again
kaare_ kmel: Of Course. It's a matter of mindset. Some people consider Perl 5 old, perhaps 6 will attract some more attention
masak Perl 5 is newer than ever. people are free to ignore it (or be disinterested) at their own peril :) 08:42
I say that as someone who is not even a heavy user of Perl 5. I see that the Perl 5 community is doing very well right now.
kaare_ masak: I'm not talking about present company. But look around and talk to companies hiring people. 08:43
ShimmerFairy Of course we shouldn't be solely focused on Perl 5 people who may try Perl 6. It just happens to be special for historical reasons, and I don't think you can ignore that :)
kaare_ At least here, people are surprised when they hear of new development in Perl.
kmel masak: sure, 6 borrowed from 5 and later 5 borrowed a lot of 6's ideas 08:44
kaare_ new development using Perl, I should say
kmel ShimmerFairy: you are right, the problem is; I never used 5 in anyway. I don't feel that attached to it. 08:45
masak those of you who have never used Perl 5 should perhaps not be so quick in judging how relevant the language is ;) 08:46
ShimmerFairy kmel: I've never used 5 either. And believe me, I've been annoyed by some of the 5<->6 connections in the past (in particular when the design docs omit info because it's "just like in P5") :)
masak ShimmerFairy: the p5 pieces that are not spec'd are just like in p5... unspec'd :P 08:47
FROGGS masak++ # unspecced, but documented :o)
ShimmerFairy :P
kmel masak: no one is judging the relevance of 5
FROGGS .oO( On VMS however, this function does something else... )
kaare_ Is masak unspecced but documented? 08:48
ShimmerFairy (But seriously, I'd love to get to modernizing the language in the design docs sometime, hopefully soonish)
kmel as a matter of fact 5 is more relevant than 6 at the moment
masak far more.
lizmat timotimo: re irclog.perlgeek.de/perl6/2015-10-16#i_11390437 : people kept arguing that grep-index/first-index/last-index should be adverbs 08:49
well, now we have boith
*both
I'll leave it up to anyone with a pumpkin hat on, to decide which ones to keep 08:50
kmel but (there's always a but :) ) this is why it is important no to compare them together. Perl 6 is new language. that's it
lizmat ah, the next day of backlog, clarity came about :-) 08:51
08:52 llfourn joined 08:54 bjz_ joined 08:55 bjz left
masak Perl 6 is not particularly new at this point :P 08:55
nine What would one do nowadays instead of my $?FILES := ...?
08:55 Suzeanne left 08:56 llfourn left 08:58 loren joined 09:00 margeas joined
lizmat m: say $?FILES 09:00
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yVxjpLg4Wu␤Variable '$?FILES' is not declared␤at /tmp/yVxjpLg4Wu:1␤------> 3say 7⏏5$?FILES␤»
lizmat m: BEGIN say $?FILES
camelia rakudo-moar aedaae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q23qoZ0Kb1␤Variable '$?FILES' is not declared␤at /tmp/q23qoZ0Kb1:1␤------> 3BEGIN say 7⏏5$?FILES␤»
lizmat m: BEGIN say $?FILE
camelia rakudo-moar aedaae: OUTPUT«/tmp/zCVMLBYKfS␤»
lizmat nine: not sure what the question is ?
nine kaare_: Asking if there's enough developer power for Perl 5 and Perl 6 is like asking: there are several thousand programming languages out there. Are there enough developers for several thousand + 1? 09:01
09:01 kmel left 09:03 Hor|zon joined
nine lizmat: trying to fix v5 here and it does my $?FILES := %chosen<pm>; which fails with "Cannot use ? twigil on 'my' variable because it is reserved" 09:04
09:04 tokuhiro_ joined
lizmat that's because we only allow that in the setting ... :-( 09:05
so, if I understand, v5 has been broken since we did that, several months ago ?
masak sounds likely.
ShimmerFairy nine: writing to $? variables is broken for the time being. Note that you'd have to write it as constant $?FILES anyway, once it does work. 09:06
lizmat well, that part of code is probably about loading modules, is it not ?
nine? ^^
dalek kudo/nom: 697cfa6 | lizmat++ | src/core/ (4 files):
s/first-index(...)/first(...,:k)/
09:07
09:08 Hor|zon left 09:09 tokuhiro_ left
masak yay, :k :D 09:09
09:09 cygx joined
cygx nine: that'S what I did for now: github.com/cygx/v5/commit/2f07af9c...308aa088f8 09:10
(work duplication)--
makes the code at least parse
09:13 espadrine joined, Ven joined
masak now that Europe is awake, allow me to re-post my latest blog post for everybody's enjoyment/horror/bewilderment: strangelyconsistent.org/blog/macros...ut-on-hold 09:14
lizmat :-) I was just starting to read it 09:15
09:18 kmel joined
kaare_ is up, but not awake :-) 09:21
grondilu m: say <foo bar oof>.classify(*.comb.sort.join).max(:by(*.value.elems)); 09:23
camelia rakudo-moar aedaae: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in block <unit> at /tmp/NxhTnlgjHB:1␤␤Actually thrown at:␤ in block <unit> at /tmp/NxhTnlgjHB:1␤␤»
grondilu m: say <foo bar oof>.classify(*.comb.sort.join).kv.max(:by(*.value.elems)); 09:24
camelia rakudo-moar 697cfa: OUTPUT«[foo oof]␤»
cygx nine: I'm guessing you might try replacing the declatarion with using binddynlex?
lizmat nine: I'm not sure it is worth the trouble at this point 09:25
jnthn should be posting a gist on how to proceed with precomp / S11 / S22 soon 09:26
and then all of that will change anyway
09:26 RabidGravy joined, bjz_ left 09:27 bjz joined, bitmap joined
FROGGS nine: why do you want to fix v5? 09:29
09:30 Psyche^ joined
cygx I think theres a $*W. missing from github.com/rakudo/rakudo/blob/nom/....nqp#L1511 ? 09:31
cygx needs to leave for a bit
09:31 cygx left
dalek kudo/nom: c589177 | lizmat++ | src/core/Any-iterable-methods.pm:
Deprecate grep-index/first-index/last-index
09:33
09:34 Psyche^_ left
FROGGS .tell cygx good catch! 09:34
yoleaux FROGGS: I'll pass your message to cygx.
FROGGS lizmat: can you fix that? I'm unable right now 09:35
lizmat on it already :-)
nine FROGGS: just because it's probably a couple of easy fixes and the code might become useful again :) 09:38
dalek kudo/nom: c8b4897 | lizmat++ | src/Perl6/Grammar.nqp:
Fix missing $*W, spotted by cygx++
FROGGS nine: leave it to me... v5's code is tricky in some areas
brb & 09:39
nine FROGGS: ok
Woodi hallo #perl6 :) 09:41
Ven o/ Woodi 09:42
dalek ast: efae2c9 | lizmat++ | S03-metaops/hyper.t:
Remove nodality tests for (grep|first|last)-index
ecs: 4218c13 | lizmat++ | S (2 files):
Remove (grep|first|last)-index fossil
09:47
ast: dd741e3 | lizmat++ | S32-list/grep- (2 files):
Rename grep-index.t to grep-k.t
09:49
09:51 mattprelude joined
Woodi masak: quasis seems to be like "templates" in html, usefull but rather "objects for the future". but I found post about NaNs interesting: maybe we should stop to think in idealistic concepts like Reals/Ints and start about "just a set with edge cases". div by 0 is probably marketed quite good, othere cases aren't such well known 09:51
dalek ast: 0b34248 | lizmat++ | S32-list/grep-k.t:
Adapt grep-index tests to grep(:k) tests
09:57
09:57 softmoth joined
nine register_op_desugar is seriously underdocumented.... 09:57
dalek ast: d9c5922 | lizmat++ | S32-list/first- (2 files):
Rename first-index.t to first-k.t
09:58
ast: 997be32 | lizmat++ | S32-list/first-k.t:
Adapt first-index tests to first(:k) tests
10:01
10:01 softmoth left
dalek ast: 50b91ec | lizmat++ | S32-list/ (2 files):
Rename last-index.t to first-end-k.t
10:02
10:05 Hor|zon joined
dalek ast: b38cc69 | lizmat++ | S32-list/first-end-k.t:
Adapt last-index tests to first(:end,:k) tests
10:06
kudo/nom: 67df8db | lizmat++ | t/spectest.data:
Adapt to change test file names
10:08
10:09 Hor|zon left 10:10 cygx joined
masak lizmat++ # fossil hunting 10:10
lizmat++ # test coverage
cygx FROGGS: if the sufficiently smart optimizer arrives, v5 may in principle outperform Inline::Perl5 (eg cross-language inlining) 10:11
yoleaux 09:34Z <FROGGS> cygx: good catch!
cygx crossing the language barrir in a tight loop is something Inlne::Perl5 will never be good at 10:12
10:12 hartenfels joined
cygx *barrier 10:12
nine cygx: except if we get JITed NativeCall
cygx: but in the long term I see v5 much more important than Inline::Perl5
cygx nine: only if you were to inline the body of the P5 interpreter C function 10:13
I don
't see that happening
dalek kudo/nom: 68563f4 | lizmat++ | docs/ChangeLog:
Mention new grep/first attributes and deprecations
nine cygx: yes, Inline::Perl5 cannot outperform perl5. v5 can at least in theory. 10:14
FROGGS cygx: yes, though without XS...
cygx FROGGS: I imagine something like use v5 <slang> / use v5 <inline> to let the user choose (dynamically sopced?) which perl5 backend to use 10:16
dalek kudo/p6for_op: fa56a39 | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
Work in progress: p6for desugar op

Move some <for> logic into a desugar op for easier handling by the optimizer. Need to do the same for statement modifier <for>, too.
nine cygx: use v5 <inline> cannot realistically work, since you need to parse the Perl 5 code to find the place where you switch back to Perl 6. 10:17
cygx nine: you need to install a slang that can detect basic p5 syntax constructs (strings/heredoc) to find the final }
nine cygx: and the best candidate for that is v5 ;) 10:18
cygx not necessarily if you want to be as fast as possible 10:19
FROGGS cygx: the only sane way I can imagine is that we use v5 for Perl 5 blocks in your Perl 6 code and Inline::Perl5 for every use statement
nine FROGGS: I'd love to see that happening
FROGGS though, we can of course have to from's... use :from<Perl5> would be I::P5, and :from<v5> might be v5 10:20
nine: well, I'd just need to unbreak v5 and disable/alter its module loader registration
cygx why can't { use v5 <inline>; ... } be made to work? of course you would not get access to the p6 lexical environment, ie it's just sugar for EVAL "...", :lang<Perl5>; 10:21
FROGGS though, without users I'm not very motivated to unbreak v5 10:22
jdv79 awwaiid: invalid
lizmat afk for most of the rest of the day& 10:23
jdv79 awwaiid: see?: gist.github.com/anonymous/a38e558936fbfe477a53 10:24
10:31 Ven left 10:32 leont joined 10:44 telex left 10:45 kmel left 10:46 telex joined 10:49 firstdayonthejob left, brrt left 10:50 gtodd left, llfourn joined, AlexDaniel joined 10:53 gtodd joined
cygx bye, #perl6 10:53
10:53 cygx left 10:55 llfourn left, hohoho left 11:01 spider-mario joined, TEttinger left 11:02 kmel joined 11:05 Hor|zon joined 11:06 rurban left 11:07 rurban joined 11:10 Hor|zon left 11:12 weihan joined 11:13 brrt joined
moritz \o 11:13
11:14 rurban left 11:23 hohoho joined
Woodi m: my @a; my $f = slurp; for (lines $f) { my @b = $_ ~~ /\w+/; @a.push: slip @b; }; say @a; say @a.unique.elems; 11:24
camelia rakudo-moar 68563f: OUTPUT«[「Céad」 「Agus」 「Nuair」 「I」 (Any) 「Ag」 「Ní」 「Go」 「D」 (Any) 「Níorbh」 「Ach」 「B」 「S」 「fá」 (Any) 「Slán」 「Is」 「Tá」 「Atá」]␤2␤»
Woodi what I'm doing wrong ?
11:26 tm left 11:27 apotheon left 11:28 tm joined
moritz Woodi: you're not using .words when you should 11:32
11:32 apotheon joined
moritz Woodi: also it seems you're expecting a regex match to return an array 11:32
11:32 cygx joined
moritz also, @a.append is much more intuitive than @a.push: slip(...) 11:33
11:34 RabidGravy left, Ven joined
cygx you'll also need to throw in a .Str somewhere as match objects probably won't compare as you expect them to 11:35
what's the nqp spelling for say $node.WHAT unless $node ~~ Positional 11:38
the v5 ast seems ok, but it dies in the optimizer with "This type does not support positional operations" 11:39
grondilu nqp: my $node := pi; unless $node ~~ Positional { say($node).WHAT; }
11:39 camelia left
moritz say($node.HOW.name($name)) unless nqp::istype($node, Positional) 11:40
though NQP doesn't have a Positional type
11:40 margeas left 11:41 camelia joined
cygx I want to print dome debug output if the .[] at github.com/rakudo/rakudo/blob/nom/....nqp#L1756 fails 11:42
camelia ( no output )
..nqp-jvm: OUTPUT«#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-8211/hs_error.log␤»
..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Quit: camelia)␤Lost connect…»
11:42 ChanServ sets mode: +v camelia
moritz cygx: nqp::islist 11:42
11:45 softmoth joined 11:46 apotheon left
cygx moritz: that doesn't cut is as apparently the QAST::* support .[] and fail the nqp::islist check... 11:47
11:48 SqrtNegInf joined 11:49 ^elyse^ joined
cygx needs to go buy some groceries 11:49
11:50 softmoth left 11:51 apotheon joined 11:52 s_kilk joined
s_kilk is it possible to merge/concatenate two arrays in perl6? 11:54
without doing a for-loop 11:55
moritz cygx: then you can type check for QAST::Node, which is the base type for QAST::* types 11:56
m: my @a = <a b>; my @b = <c e>; @a.append: @b; say @a.perl; # for s_kilk 11:57
camelia rakudo-moar 68563f: OUTPUT«["a", "b", "c", "e"]␤»
s_kilk thanks moritz, what's going on with the colon after `@a.append`? how is it different from a normal call to append? 11:59
11:59 ^elyse^ left
s_kilk my guess is that it's flattening out the @b array into an argument list, but I've not seen this before 11:59
moritz s_kilk: it's just a different syntax for a method call with arguments 12:01
s_kilk: one could write @a.ppend(@b) just as well
s_kilk ah, I see.
thanks
12:01 ^elyse^ joined 12:04 kid51 joined 12:06 Hor|zon joined 12:11 Hor|zon left 12:15 ^elyse^ left 12:16 grondilu left 12:17 brrt left, grondilu joined 12:22 karim joined
karim Could you tell me how can I run all the tests at once in the directory "t"? 12:22
this works perl6 t/01-user.t
but this "perl6 t" or "perl6 t/" doesn't ==> "Can not run directory t/."
moritz karim: PERL6LIB=lib prove -e perl6 t 12:23
kmel the writer is sarcastic (in a good way)
sorry wrong chat
;o
karim tnx 12:24
leont karim: I'm working on a prove6, it's almost ready :-)
12:24 karim left 12:25 karim joined 12:26 grondilu left
karim I can also use "perl6 t/*.t", right? it's easier. 12:26
12:27 grondilu joined
s_kilk you can also do `prove --exec perl6 -r t` 12:27
12:27 marakashi joined 12:28 marakashi left
karim and "perl6 t/*.t"? 12:30
FROGGS perl6 -Ilib t/*.t
that should work
moritz no 12:33
karim oh my god, I'm not asking what else will work.
masak in 2015, how are we doing on chromatic's list in modernperlbooks.com/mt/2011/08/why-...erl-6.html ?
karim "perl6 -Ilib t/*.t " - working
moritz would expect that to only run the first *.t file, and pass the other file names as arguments to the first
masak DB, web API, regexes, HTML templating, DateTime, deployment.
the only ones I can say we're 100% there on are regexes and DateTime. 12:34
12:35 karim left
masak I know we have partial solutions for the other four -- sorry if I'm unaware of someone's effort in estimating that. maybe there are 100% solutions I'm not familiar with. the ecosystem is getting big :) 12:35
moritz would love to port sqlalchemy to Perl 6, but it's too big a project
FROGGS masak: we're not there at 100% for DateTime 12:36
masak moritz: you like sqlalchemy? I've encountered it, but never delved deeper into it.
FROGGS: tell me more.
moritz masak: aye; it makes simple things easy, and hard things possible. Very perlish :-) 12:37
FROGGS we need DateTime::Span and DateTime::SpanSet to do mathwith it...
like intersections etc etc
moritz masak: and it usually gives much better error messages than DBIx::Class
FROGGS and we're also not good at date(time) formatting 12:38
masak FROGGS: in (almost reflexive) defense of DateTime, that doesn't sound core to me.
FROGGS ohh, I'm not talking about core necessarily... I'm talking about Perl 6 in general
masak oh, ok. good. 12:39
FROGGS: I'd love to see a DateTime::Span and ::SpanSet outside of core.
FROGGS me too
I'd probably be its first user
masak in fact, I could probably sit down and pair with someone, and we could have something going in one or two hours... :) 12:40
FROGGS *g*
sounds fun :o)
masak it does, doesn't it? :)
FROGGS hehe
masak .oO( so, when are you available? give the answer as a DateTime::SpanSet... d'oh! ) 12:41
m: say DateTime.now .. DateTime.now.later(:3days) 12:42
camelia rakudo-moar 68563f: OUTPUT«DateTime.new(year => 2015, month => 10, day => 17, hour => 14, minute => 42, second => <2986/729>, timezone => 7200)..DateTime.new(year => 2015, month => 10, day => 20, hour => 14, minute => 42, second => <4847/1182>, timezone => 7200)␤»
masak well, that was easy :P
leont would like a SPORE module for web APIs, though sadly it never seemed to have gotten truly popular
masak wonders whether to think about giving a talk called "CPAN is a threat to Perl 6 and must be destroyed" :P 12:43
sort of an anti-nine message. "hey, have you considered erasing CPAN from existence? Perl 6 doesn't look so bad then, does it?" 12:45
jdv79 ha
masak would like to believe he gets points for thinking creatively
or, as it were, destructively
FROGGS masak: I would really like to do but but currently do $dayjob stuff, have a regex patch in the cue and would need to work on libxml2 bindings and box2d bindings before I start another module... 12:48
masak FROGGS: understandable. let me know if the situation changes, though. 12:49
FROGGS will do
masak unrelated question: there's abstract interpretation for interpreters. is there something similar for parsers, some kind of "abstract parsing"? I think I may need it, soon.
FROGGS the first two things are hopefully solved today
12:51 Ven left, Ven_ joined 12:55 _28_ria joined 12:58 Ven_ left 12:59 SqrtNegInf left 13:01 SqrtNegInf joined
dalek c: b11caa1 | moritz++ | WANTED:
Remove roles from WANTED

  doc.perl6.org/language/objects#Roles covers them.
If anybody wants more materials on roles, please be more specific in your requests.
13:04
FROGGS k, $dayjob: done 13:07
13:07 Hor|zon joined 13:12 Hor|zon left 13:17 rurban joined
moritz m: my $x = [1, 2, 3]; .say for $x; 13:18
camelia rakudo-moar 68563f: OUTPUT«[1 2 3]␤»
ShimmerFairy Am I right in thinking the NYI <~~foo> is meant to be the regex version of inner subs (considering a $<foo>=(...) definition in the regex)? Because I'm encountering a situation where I'd either have to copy-paste parts of regexes, or make those parts into other grammar rules.
13:19 Ven joined
ShimmerFairy And these particular pieces feel quite inappropriate to factor out into specific grammar rules, since they're so specialized 13:19
13:20 raiph joined 13:21 cognominal joined
dalek kudo/p6for_op: 70b54ab | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
Use p6for op for statement modifier for, too.
13:21
13:24 margeas joined 13:33 zakharyas joined 13:34 softmoth joined, zakharyas left, zakharyas joined
leont is running spectest with his harness, so far so good 13:35
FROGGS ohh, nice
dalek osystem: 7e02278 | (Fayland Lam)++ | META.list:
Add Locale::Codes to ecosystem

See github.com/fayland/perl6-Locale-Codes
13:36 Ven left 13:38 softmoth left 13:39 llfourn joined
masak ShimmerFairy: you could always factor them out into lexical regex variables, or `my` regexes. 13:39
dalek kudo/nom: 033427b | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
p6for desugar op

Move some <for> logic into a desugar op for easier handling by the optimizer.
13:40
kudo/nom: 1b4715f | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
Use p6for op for statement modifier for, too.
nine .tell timotimo it is done. We now have a p6for desugar op. Hope it helps you :)
yoleaux nine: I'll pass your message to timotimo.
ShimmerFairy masak: I tried playing with that, but it didn't work. :my token foo ... ; doesn't work, and :my &a = rx/.../; doesn't always work (and it also feels kinda awkward to write it as a rx// anyway) 13:41
13:42 ^elyse^ joined
masak no, I meant outside of the rule (but inside the grammar) 13:42
leont Hmmm, two tests seems to have had a freak accident ("no tests run"), no idea what going on there :-s 13:43
ShimmerFairy Like I said, it feels wrong to factor it out like that. I basically want the regex version of an inner sub :) (like how you _could_ define a 'my sub' inside a class but outside the method, but it exposes such a sub to places that don't need it, and feels like a poor organizational choice) 13:44
(If I didn't have the sneaking suspicion that <~~foo> is a pain to implement, I'd be fool enough to try it :P) 13:46
masak with <~~foo> not implemented, putting it as a lexical regex outside of your rule is what I'd do. 13:48
13:50 rurban left 13:52 rindolf left 13:54 hohoho is now known as tokuhirom_, Ven joined
tokuhirom_ gist.github.com/tokuhirom/a0b4d844d321f06d06e8 13:56
this script works with `ab -c 1 -n 1000 127.0.0.1:15555/` but it doesn't work with -c 10
13:56 BenGoldberg joined
tokuhirom_ ab says "The timeout specified has expired (70007). 13:56
is this script wrong? 13:57
moritz tokuhirom_: more likely it's a bug in rakudo and/or moarvm 13:58
tokuhirom_ :(
14:01 bpmedley joined 14:02 tokuhiro_ joined 14:03 RabidGravy joined, jevin left
dalek c: ae631ec | moritz++ | doc/Language/faq.pod:
Import FAQs from faq.perl6.org
14:05
14:05 FireFly left 14:06 tokuhiro_ left 14:07 jkva joined
moritz the other day I identified a frequently asked question that wasn't answered in the FAQ yet 14:08
and now that I wanted to answer it, I forgot what it was :(
14:08 Hor|zon joined
masak moritz: do you remember under what circumstances you identified it? 14:08
14:09 FireFly joined
moritz masak: somebody asking the question in #perl6, and remembering that I came up a few times already 14:10
masak ok, so it's somewhere in the backlog, then?
moritz I guess excessive IRC log skimming might turn it up
14:10 s_kilk left 14:12 s_kilk joined 14:13 FROGGS_ joined, Hor|zon left 14:14 gensym joined
moritz m: my Int:D $x = 42; $x = Int 14:16
camelia rakudo-moar 68563f: OUTPUT«Type check failed in assignment to $x; expected Int:D but got Int␤ in block <unit> at /tmp/CRkTdcsvBt:1␤␤»
14:17 FROGGS left
dalek c: 644d726 | moritz++ | doc/Language/faq.pod:
Explain type smilies
14:18
^elyse^ so they're officially called "type smilies" now?
moritz ^elyse^: I call them so 14:19
there is no "officially"
^elyse^ nice
FROGGS_ m: Int:Ups
camelia rakudo-moar 68563f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S5QFU6rsz_␤Invalid type smiley 'Ups' used in type name␤at /tmp/S5QFU6rsz_:1␤------> 3Int:Ups7⏏5<EOL>␤ expecting any of:␤ pair value␤»
moritz travis-ci.org/perl6/doc/builds/85905101 # seems that panda is b0rked? :/
^elyse^ FROGGS_: :U
moritz ^elyse^: I'm pretty sure FROGGS_++ is well aware of that, and wanted to show the wording of the error message 14:20
.karma FROGGS_
ENOKARMABOT :(
masak we live in a post-karma society
14:21 rindolf joined
FROGGS_ hehe 14:21
^elyse^ :D
14:22 s_kilk left
moritz :-) 14:22
^elyse^ I like how the only error code with a reasonable name is ENAMETOOLONG.
Others are needlessly abbreviated, such as EACCES 14:23
"creat" ugh 14:24
geekosaur what you get from early unix being cross-compiled from GECOS with its ridiculous external symbol length limits 14:27
moritz lemme just say FORTRAN 14:28
excuse me, I meant FORTRA 14:29
after all, identifiers may only be 6 characters long
(F77, that is)
and it's not even specified that you get an error for longer identifiers; the compiler is allowed to simply truncate it for you 14:30
making two different identifiers point to the same variable
oh, the fun
FROGGS_ :D 14:31
I bet
cygx ok, I think I know what goes on with the v5 breakage: the QAST::Op node created in P6-land apparently fails to set up its positional_delegate member @!children
FROGGS_ yes, there was a refactor in rakudo/nqp about that... and also about annotations
v5's weakness always has been that it is tied to rakudo/nqp internals 14:32
moritz my naive hope was that the macro effort would give the rakudo compiler some kind of API, which v5 could use 14:34
^elyse^ can you express that two arguments must have the same type? or that the return type must be the type of an argument? 14:35
for any type
dalek ast: ad5e410 | (Stéphane Payrard)++ | S06-traits/precedence.t:
equiv/tighter/looser with is equiv<+> syntax

rakudo patch forthcoming
14:35 ^elyse^ left
Ven m: sub f(::T $a, T $b) { $a + $b }; say f(5, 6); 14:36
camelia rakudo-moar 1b4715: OUTPUT«11␤»
Ven m: sub f(::T $a, T $b) { $a + $b }; say f(5, "hey");
camelia rakudo-moar 1b4715: OUTPUT«Type check failed in binding $b; expected Int but got Str␤ in sub f at /tmp/RgMAg3Bbkc:1␤ in block <unit> at /tmp/RgMAg3Bbkc:1␤␤»
14:37 Alina-malina left, [Tux] left
cygx perl6 -Isrc -MPerl5 -e 'print $^O' #=> mswin32 \o/ 14:39
moritz \o
cygx: push, push, push!
cygx moritz: doesn't work yet - I manually added a few .list() calls to Perl6/Optimizer.nqp
BenGoldberg m: sub accum( ::T \a, T \b ) { a += b }; my $t = 3; accum( $t, $t ); say $t;
camelia rakudo-moar 1b4715: OUTPUT«6␤»
cygx doesn't work yet in general, that is 14:40
BenGoldberg m: sub accum( ::T \a, T \b ) { a += b }; my $t = 3; accum( $t, 2/3 ); say $t;
camelia rakudo-moar 1b4715: OUTPUT«Type check failed in binding b; expected Int but got Rat␤ in sub accum at /tmp/szDF1Hge6_:1␤ in block <unit> at /tmp/szDF1Hge6_:1␤␤»
BenGoldberg m: sub accum( ::T \a, T \b ) { a += b }; my $t = 2/3; accum( $t, 4 ); say $t;
camelia rakudo-moar 1b4715: OUTPUT«Type check failed in binding b; expected Rat but got Int␤ in sub accum at /tmp/oVVeuRir49:1␤ in block <unit> at /tmp/oVVeuRir49:1␤␤»
cygx someone has to fix instantiating NQP objects from P6-land, or parts of v5 has to be translated to NQP 14:41
(or at the very least, some helper functions added) 14:42
14:45 s_kilk joined 14:49 [Tux] joined 14:52 jkva left
nine cygx: have you tried .list instead of nqp::list when replacing nqp::p6list? 14:53
14:53 Ven left 14:56 skids joined 14:57 Ven joined
dalek c: c270dae | moritz++ | doc/Language/faq.pod:
Fix a markdown-ism in FAQs
14:57
ugexe sub foo() { use MONKEY-TYPING; augment IO { }; }; will scoped monkey-typing affect compiler optimizations to (in this example) class IO everywhere else? or just inside the scope? 14:58
cygx nine: I've tried nqp::list, [] and ().list 14:59
nine cygx: IIRC $value.list would have made sense 15:00
15:01 Ven left
dalek q: f0dd5f9 | moritz++ | / (7 files):
Delete contents of this repository. Point to new location
15:02
q: 356b75a | moritz++ | /:
Merge branch 'master' of github.com:perl6/faq

Conflicts:
  answers.md
web/index.tmpl
15:02 tokuhiro_ joined 15:03 Ven joined
moritz ugexe: the augment affects the class, not a local copy of the class 15:03
15:03 pochi_ is now known as pochi 15:04 AlexDaniel left, AlexDaniel joined
cygx nine: you're talking NQP-side? Sure, that's what I did, and that works - but you'll also have to add it again a few lines done, and if you want to be on the safe side, everywhere 15:06
15:07 tokuhiro_ left
cygx s/done/down/ 15:07
dalek href="https://perl6.org:">perl6.org: 3508436 | moritz++ | includes/menu-nav:
Point to new FAQ location
15:07 ^elyse^ joined
ugexe moritz: i see, thanks 15:07
15:09 Hor|zon joined
moritz m: { superseed class Int is CORE::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb; 15:10
camelia rakudo-moar 1b4715: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE::Int␤»
moritz m: { superseed class Int is OUTER::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb;
camelia rakudo-moar 1b4715: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol OUTER::Int␤»
moritz m: say CORE::Int
camelia rakudo-moar 1b4715: OUTPUT«(Int)␤»
moritz m: say CORE::<Int>
camelia rakudo-moar 1b4715: OUTPUT«(Int)␤»
moritz m: { superseed class Int is CORE::<Int> { method flurb() 42 }; say 5.flurb }; say 5.flurb;
camelia rakudo-moar 1b4715: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE␤»
15:10 khw joined
moritz would be nice if that worked. 15:10
masak 'night, #perl6 15:13
nine Good night masak
15:14 Hor|zon left 15:15 llfourn left
nine m: role R { has @.s is rw }; multi trait_mod:<is>($r, :$x!) { $r does R; sub h(|$){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b 15:17
camelia rakudo-moar 1b4715: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EJ3YNJGpp9␤Obsolete use of | or \ with sigil on param $␤at /tmp/EJ3YNJGpp9:1␤------> 3mod:<is>($r, :$x!) { $r does R; sub h(|$7⏏5){ for $r.s { &^m() } }; $r.wrap(&h) }; ␤ expecting any of:␤ …»
FROGGS_ cygx: do you want push rights for v5? 15:18
15:18 kmel left
nine m: role R { has @.s is rw }; multi trait_mod:<is>($r, :$x!) { $r does R; sub h(|){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b 15:18
camelia rakudo-moar 1b4715: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NzsSyW138o␤Can't use unknown trait 'is x' in a sub declaration.␤at /tmp/NzsSyW138o:1␤ expecting any of:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ cached pure default DEPRECATED…»
cygx FROGGS_: if you think that makes it easier to coordinate, sure 15:19
I don't really care where my branch lives 15:20
FROGGS_ cygx: I guess so... what's your github id?
15:20 skids left
cygx cygx, same as the nick 15:20
FROGGS_ k
cygx: I've added you... don't hesitate to ask me about things 15:21
15:21 FROGGS_ is now known as FROGGS
cygx I'll do that 15:21
FROGGS++
FROGGS cygx++
:o)
15:22 softmoth joined
RabidGravy I made this: software.gellyfish.co.uk/2015/10/le...-code.html - the target audience is probably not people who are already here ;-) 15:23
cygx and pushed
nine .tell jnthn could you add some information to rt.perl.org/Ticket/Display.html?id=112666 on what you think the actual bug is? "not doing the right kinda thing with arrays" doesn't tell me that much ;) Maybe I can do something with more info 15:26
yoleaux nine: I'll pass your message to jnthn.
15:26 softmoth left
cognominal submitted a pull request github.com/rakudo/rakudo/pull/555 equiv/tighter/looser traits with is equiv<+> syntax that goes with github.com/perl6/roast/commit/ad5e...b9bed4ed15 15:28
afk& 15:29
15:35 [Sno] left, virtualsue joined 15:36 [Sno] joined
dalek kudo/nom: b670517 | (Stéphane Payrard)++ | src/core/ (2 files):
equiv/tighter/looser traits with is equiv<+> syntax
15:36
kudo/nom: ebe21c4 | moritz++ | src/core/ (2 files):
Merge pull request #555 from cognominal/nom

equiv/tighter/looser traits with is equiv<+> syntax
moritz cognominal++
dalek kudo/nom: 5d8e963 | moritz++ | docs/ChangeLog:
Three more changelog entries
15:42
15:46 ^elyse^ left
FROGGS cygx: it is possible that these 'is rw' want to be 'is raw'... but I'm not sure: github.com/rakudo-p5/v5/commit/f0c...2499fda4af 15:49
15:54 [Sno] left
leont Great! «make: *** [m-spectest] Aborted (core dumped)» 15:54
cygx FROGGS: I'll add it to the list of things to look into 15:55
16:02 raiph left
cognominal what is 'is raw' btw? 16:02
16:03 firstdayonthejob joined
moritz cognominal: what "is rw" used to be. "is rw" now requires a writable container. 16:04
(and that's the way it has been designed for ages)
m: sub f($x is rw) { $x }; f 42
camelia rakudo-moar ebe21c: OUTPUT«Parameter '$x' expected a writable container, but got Int value␤ in sub f at /tmp/FummESZElp:1␤ in block <unit> at /tmp/FummESZElp:1␤␤»
dalek osystem: 7e7d097 | (Shane Kilkelly)++ | META.list:
Add HTTP::Router::Blind to ecosystem

See github.com/ShaneKilkelly/perl6-htt...uter-blind
osystem: e0eecb1 | RabidGravy++ | META.list:
Merge pull request #79 from ShaneKilkelly/master

Add HTTP::Router::Blind to ecosystem
16:06 zakharyas left 16:07 tokuhirom_ left
cognominal moritz++ 16:07
16:10 Hor|zon joined 16:11 rurban joined, [Sno] joined 16:15 Hor|zon left 16:16 ^elyse^ joined 16:23 rindolf left 16:26 rindolf joined 16:27 s_kilk left, domidumont joined 16:29 Ven left 16:30 s_kilk joined 16:31 raiph joined 16:37 Ch0c0late joined 16:42 loren left, s_kilk left 16:53 s_kilk joined 16:56 BenGoldberg left, BenGoldberg joined, BenGoldberg left 16:57 BenGoldberg joined, Alina-malina joined 17:01 pfortuny joined
pfortuny Hi. whenever I try to use watch-path with a directory on OS X, I get Trace/BPT trap: 5. 17:02
Not so with files.
Even in my own home
17:04 tokuhiro_ joined
TimToady that's quite an odd signal to be getting, unless you're running a C-level debugger 17:05
17:06 apotheon left
pfortuny nope, just the last version of rakudo 17:06
TimToady sounds like something is maybe trying to execute random garbage somehow 17:07
unless there's something else that can trap like that on OS X that I don't know about
pfortuny I think I am getting the thingie 17:08
TimToady or is watch-path relying on a signal, and just catching the wrong one?
17:08 tokuhiro_ left
pfortuny I am running a script in /tmp/ 17:08
If I am (the shell) in /tmp/, the trap appears
If I run it from elsewhere, it does not happen
weird
TimToady well, /tmp is often a weird filesystem 17:09
pfortuny nope, nope, sorry
but it has to do with /tmp/ anyway
so please forget until I get a better report. In any case, my system is quite old so not to worry yet
TimToady did you say something? 17:10
17:10 softmoth joined
pfortuny not yet. 17:11
17:11 apotheon joined
TimToady :) 17:11
17:11 Hor|zon joined
pfortuny So: my $t = IO::Notification.new(); my $sup = $t.watch-path("/tmp"); 17:12
and then
my $u = $sup.act(-> $v { 1+1; }, done => { 2+2; }); 17:13
That gives me a Trace/BPT trap: 5
If instead of /tmp/ I give a file (say "/tmp/a"), no trap.
ugexe what if its a file that user doesnt have access to 17:14
moritz m: my $sup = IO::Notificaiton.watch-path('/tmp'); $sup.tap(&say); sleep 5;
camelia rakudo-moar 5d8e96: OUTPUT«Could not find symbol '&Notificaiton'␤ in block <unit> at /tmp/2xgBkPwT4L:1␤␤Actually thrown at:␤ in block <unit> at /tmp/2xgBkPwT4L:1␤␤»
moritz m: my $sup = IO::Notification.watch-path('/tmp'); $sup.tap(&say); sleep 5;
17:14 softmoth left
camelia ( no output ) 17:14
leont is observing a weird bug where run() is losing its output every now and then :-/ 17:15
It shows deterministically in a full harness run, but not in a small one :-/ 17:16
17:16 Hor|zon left, apotheon left
pfortuny ugexe: no problem (just tried a 0600 root file and no problem) 17:17
Thanks ugexe, moritz & TimToady. I shall try something more specific and a different system (have to go). 17:18
17:18 pfortuny left 17:21 rindolf left 17:22 apotheon joined
leont The spectests taking so long to run doesn't exactly help :-/ 17:22
TimToady m: sub accum( ::T \a, T(Cool) \b ) { a += b }; my $t = 3; accum( $t, 2/3 ); say $t; 17:28
camelia rakudo-moar 5d8e96: OUTPUT«Method 'T' not found for invocant of class 'Rat'␤ in sub accum at /tmp/nOlXuzjbQh:1␤ in block <unit> at /tmp/nOlXuzjbQh:1␤␤»
TimToady ^^^ that oughta work
17:30 apotheon left 17:31 Ulti left
s_kilk is there an easy way to do a deep-merge of two hashes in perl6 ? 17:32
TimToady what do you mean by a deep merge? 17:33
how do you wish to treat collisions?
s_kilk if there is a key collision, the second hash wins, like this: clojuredocs.org/clojure.core/merge 17:35
17:35 rindolf joined 17:36 apotheon joined
TimToady m: my %a = :a(1), :b(2); my %b = :b(3), :c(4); my %c = %a,%b; say %c 17:36
camelia rakudo-moar 5d8e96: OUTPUT«a => 1, b => 3, c => 4␤»
TimToady m: my %a = :a(1), :b(2); my %b = :b(3), :c(4); my %c = %a; %c.push(%b); say %c 17:37
camelia rakudo-moar 5d8e96: OUTPUT«a => 1, b => [2 3], c => 4␤»
leont s_kilk: and how would you handle lists? Also replacing?
s_kilk ah, good point. lists could be difficult
TimToady m: my %a = :a(1), :b(2,3); my %b = :b(3,4,5), :c(4); my %c = %a; %c.push(%b); say %c 17:38
camelia rakudo-moar 5d8e96: OUTPUT«a => 1, b => [(2 3) (3 4 5)], c => 4␤»
TimToady hmm
maybe we need a Hash.append
17:40 tokuhirom_ joined 17:42 mattprelude left, ^elyse^ left, zacts joined, rindolf left
jnthn evening, #perl6 17:43
yoleaux 15:26Z <nine> jnthn: could you add some information to rt.perl.org/Ticket/Display.html?id=112666 on what you think the actual bug is? "not doing the right kinda thing with arrays" doesn't tell me that much ;) Maybe I can do something with more info
17:44 apotheon left
jnthn .tell nine IIRC, it was .clone not being deep enough, but I don't remember exactly either :( 17:45
yoleaux jnthn: I'll pass your message to nine.
17:45 tokuhirom_ left
jnthn .tell nine Maybe not creating fresh Scalar containers or so 17:45
yoleaux jnthn: I'll pass your message to nine.
17:46 virtualsue left 17:49 apotheon joined
jnthn So, I'm off away for 7-8 days from tomorrow, and not taking laptop. (It's honeymoon, so my attention should be elsewhere. :P And I really need to properly rest...) 17:53
Here's what I came up with so far on module/precomp stuff: gist.github.com/jnthn/47a42b2e86e7e552b2e2
17:55 weihan left 17:56 vendethiel joined
moritz jnthn++ # will have to read carefully later when all(@kids) sleep 18:00
18:00 zacts left 18:02 virtualsue joined
dalek kudo/nom: d147280 | TimToady++ | src/core/Hash.pm:
add Hash.append to flatten sublists (unlike push)
18:04
18:04 eliasr joined 18:05 virtualsue_ joined 18:06 virtualsue left 18:07 virtualsue_ is now known as virtualsue 18:10 softmoth joined 18:11 llfourn joined 18:12 Hor|zon joined 18:13 margeas left 18:15 llfourn left
BenGoldberg m: gist.github.com/BenGoldberg1/47b3a...bdd630cbbc 18:16
camelia rakudo-moar 5d8e96: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤»
18:17 Hor|zon left 18:19 softmoth left
TimToady moritz: re irclog.perlgeek.de/perl6/2015-10-17#i_11392548 it's pretty much guaranteed not to work unless you spell 'supersede' right 18:20
pink_mist supercede..? 18:21
18:21 s_kilk left
moritz TimToady: :-) 18:21
m: { supersede class Int is CORE::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb; 18:22
camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE::Int␤»
moritz m: class A is CORE::Int { } 18:23
camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE::Int␤»
moritz that's a bug (or at least LTA), right?
TimToady m: { supersede class Int is OUTERS::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb;
camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol OUTERS::Int␤»
TimToady so it would seem
moritz m: class A is CORE::<Int> { }
camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE␤»
moritz submits
TimToady m: { my class Int is OUTERS::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb; 18:24
camelia rakudo-moar d14728: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol OUTERS::Int␤»
TimToady m: my %a = :a(1), :b(2); my %b = :b(3), :c(4); my %c = %a; %c.append(%b); say %c
camelia rakudo-moar d14728: OUTPUT«a => 1, b => [2 3], c => 4␤»
TimToady m: my %a = :a(1), :b(2,3); my %b = :b(3,4,5), :c(4); my %c = %a; %c.push(%b); say %c 18:25
camelia rakudo-moar d14728: OUTPUT«a => 1, b => [(2 3) (3 4 5)], c => 4␤»
TimToady m: my %a = :a(1), :b(2,3); my %b = :b(3,4,5), :c(4); my %c = %a; %c.append(%b); say %c
camelia rakudo-moar d14728: OUTPUT«a => 1, b => [2 3 3 4 5], c => 4␤»
TimToady there we go
m: my %a = :a(1,2), :b(2,3); my %b = :b(3,4,5), :c(4,5); my %c = %a; %c.append(%b); say %c
camelia rakudo-moar d14728: OUTPUT«a => (1 2), b => [2 3 3 4 5], c => (4 5)␤»
TimToady is it okay that a and c are just lists here?
(it only promotes to Array when it starts pushing^Wappending) 18:26
18:26 cygx left
moritz can live with that, presumably 18:27
18:27 s_kilk joined
moritz I mean, what else would it do? die? 18:27
vendethiel a list just means it's not containerized, right? 18:28
TimToady m: my %a = :a[1,2], :b[2,3]; my %b = :b[3,4,5], :c[4,5]; my %c = %a; %c.append(%b); say %c
camelia rakudo-moar d14728: OUTPUT«a => [1 2], b => [2 3 3 4 5], c => [4 5]␤»
vendethiel I'm still unsure of the implications of () vs [], heh...
TimToady can always do that if you want the other thing
vendethiel m: say [].push(3); say ().push(3);
camelia rakudo-moar d14728: OUTPUT«[3]␤Cannot call 'push' on an immutable 'List'␤ in block <unit> at /tmp/mVLeL47bqP:1␤␤»
vendethiel right.
s_kilk leont : the hash-merge ended up actually being pretty straight-forward: github.com/ShaneKilkelly/perl6-con...er.pm6#L22 18:29
TimToady I mean, surely the discontinuity of 4 vs [4,5] is even bigger
TimToady has his head into making with topicalize at the moment, so ++someone if they beat me to writing tests for Hash.append 18:30
s_kilk What would the semantics of Hash.append be? 18:32
TimToady see above 18:33
vendethiel TimToady: I'm glad with is turning out to be implicitly "targetting" $_ :3
moritz m: my %a = :a[1,2], :b[2,3]; my %b = :b[3,4,5], :c[4,5]; my %c = %a; %c.push(%b); say %c 18:34
camelia rakudo-moar d14728: OUTPUT«a => [1 2], b => [2 3 [3 4 5]], c => [4 5]␤»
TimToady well, the statement modifier forms have done it since the start, but getting { .foo } to turn into -> $_ { .foo } is kinda tricky for the statement controls
vendethiel TimToady: yeah, I've used it plenty! Thank you for that.
"prompt until you got it": `Nil until $_ = %cmds{prompt "command?"}; $_();` <- is there a "better" way to write this? 18:35
TimToady I dunno, everything else is clunkier 18:40
vendethiel Ok, I'm happy enough with this one anyway :-)
dalek ast: 7848937 | moritz++ | S32-hash/push.t:
Sneek some Hash.append tests into S32-hash/push.t
18:41
BenGoldberg Depending on the task, you might want to tell them that they typed an invalid command, or offer a list of what commands are valid, etc.
colomon moritz++
vendethiel
.oO( sneek peek )
moritz++
moritz can't spel today 18:42
or, more likely, I never can
vendethiel BenGoldberg: oh, sure, but I'd just need to replace "Nil" ;-)
moritz TimToady: do we need Hash.{unshift,prepend} ?
18:42 rurban left
vendethiel moritz: wouldn't that imply ordering? 18:42
BenGoldberg It would imply which values to use, in the case of duplicate keys. 18:43
moritz vendethiel: uhm, the arrays in those hashes are ordered
vendethiel moritz: ah, yeah. I overlooked what append did. interesting :) 18:44
vendethiel thinks he's seen this somewhere else, but can't quite recall it
TimToady moritz: that depends on what you mean by "need"; I'm guessing if we implemented them, nobody would ever use them 18:45
18:46 softmoth joined
moritz TimToady: then I guess we shouldn't do that :-) 18:47
TimToady we might be able to turn it into some kind of HOP thingie though 18:48
Hash.mesh(:with<&prepend>) or so
18:49 s_kilk left
TimToady unfortunately there's also the slip or not dimension that cuts across 18:50
moritz only if you assume you want some list-y magic 18:51
maybe we just want something &reduce-like that reduces only values with the same keys from both sides
%(a => 5, b =>2).reduce(&[+], %( b => 1)) would produce %( a=> 5, b => 3) 18:52
or maybe s/reduce/mesh/
jnthn wrt supersede, I think it wants a good NYI message; I don't see us making it work pre-6.christmas 18:53
BenGoldberg Alternatively, we could have a :modifyer to determine what to do. 18:55
FROGGS m: $_ = "a"; say s/a/b/ 18:57
camelia rakudo-moar d14728: OUTPUT«「a」␤»
vendethiel somewhat likes append, for sure, but is afraid too many Array methods would make it onto Hash
FROGGS I'd like it to return the replacement...
18:57 Ch0c0late left
BenGoldberg %a.insert(%b, :whensame( -> $a, $b { $a } ) ) 18:57
TimToady m: $_ = "a"; say S/a/b/
camelia rakudo-moar d14728: OUTPUT«b␤»
TimToady FROGGS: you mean like that? ^^ 18:58
FROGGS aye
BenGoldberg p56: 'abc' =~ s/b/c/r;
camelia p5-to-p6 : OUTPUT«'abc' ~~ s:P5:r!b!c!␤»
FROGGS but so that $_ ~~ s/a/b/ still returns the match
BenGoldberg thinks that p56 should be updated so that s///r gets turned into S:P5/// 18:59
vendethiel m: $_ = 'abc'; say S/a/z/; say $_; # FROGGS?
camelia rakudo-moar d14728: OUTPUT«zbc␤abc␤»
vendethiel ugh, always, I'm late 19:00
BenGoldberg m: say 'abc' ~~ s:P5:r!b!c!
camelia rakudo-moar d14728: OUTPUT«Parameter '$self' expected a writable container, but got Str value␤ in block <unit> at /tmp/tAGY4hIAH8:1␤␤»
BenGoldberg m: say('abc' ~~ s:P5:r!b!c)!
camelia rakudo-moar d14728: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lQzLtPHJPH␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/lQzLtPHJPH:1␤------> 3say('abc' ~~ s:P5:r!b!c)!7⏏5<EOL>␤»
BenGoldberg m: say('abc' ~~ s:P5:r!b!c!)
camelia rakudo-moar d14728: OUTPUT«Parameter '$self' expected a writable container, but got Str value␤ in block <unit> at /tmp/cKIKyTFK_k:1␤␤»
19:00 FROGGS_ joined
FROGGS TimToady / vendethiel: I mean, I get the match in $/ anyway... so why should s/a/b/ return the same? 19:00
TimToady so that the smartmatch succeeds
~~ is not just a topicalizer 19:01
FROGGS my local patch pushes $/ as the result to s/a/b/ in make_smartmatch 19:02
so, that works
FROGGS_ though, I can leave it the way it is... just thought it could be useful
FROGGS re-spectests 19:03
19:03 FROGGS_ left, vendethiel left 19:05 adhoc left, tokuhiro_ joined
FROGGS m: my $foo = "foo foo"; say $/; say $foo ~~ s:g/foo/bar/; say +$/ 19:06
camelia rakudo-moar d14728: OUTPUT«Nil␤(「foo」 「foo」)␤2␤»
TimToady a list of matches also counts as success 19:09
19:09 yqt joined
FROGGS TimToady: yes, but that one is bogus: github.com/rakudo/rakudo/blob/nom/...#L505-L509 19:09
19:10 tokuhiro_ left, vendethiel joined
TimToady yup 19:11
19:13 Hor|zon joined 19:18 Hor|zon left, vendethiel left 19:19 vendethiel joined
awwaiid jdv79: well... what I was trying to do is make panda install the "stable" version or something. oh well, I'll remove it for now 19:19
19:45 s_kilk joined 19:46 ramiros joined
ramiros what i can use instead of perl5's functions hex and oct ? 19:47
19:49 vendethiel left
geekosaur m: say :16("a") 19:49
camelia rakudo-moar d14728: OUTPUT«10␤»
19:50 vendethiel joined
FROGGS m: say :8("0777") 19:50
camelia rakudo-moar d14728: OUTPUT«511␤»
FROGGS m: say 0o777
camelia rakudo-moar d14728: OUTPUT«511␤»
FROGGS m: say 0xDEADBEEF
camelia rakudo-moar d14728: OUTPUT«3735928559␤»
awwaiid <<The Cool type is derived from Any, and contains all the methods that are "cool" (as in, "I'm cool with an argument of that type.").>> -- NOW I get it! 19:53
FROGGS :D 19:54
19:55 pmurias joined
pmurias masak: re "destroyed CPAN" talk for me the really important part of the Perl 6 appeal is that it's a combination of an awesome language and the Perl culture 19:57
masak: with the culture destroyed I might as well use haskell or something similiar 19:58
awwaiid also I was showing off Int:D to people at work (ruby land). I'm also trying to get Idris fans to appreciate Int where * > 5 19:59
ramiros m: my $s=0o200; say :8<$s>;
camelia rakudo-moar d14728: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kCGxkBkbpH␤Malformed radix number␤at /tmp/kCGxkBkbpH:1␤------> 3my $s=0o200; say :8<7⏏5$s>;␤ expecting any of:␤ number in radix notation␤»
FROGGS awwaiid++
ramiros: use parenthesis
m: my $s=0o200; say :8($s);
camelia rakudo-moar d14728: OUTPUT«This call only converts base-8 strings to numbers; value 128 is of type Int, so cannot be converted!␤(If you really wanted to convert 128 to a base-8 string, use 128.base(8) instead.)␤ in block <unit> at /tmp/OPEmuEPYnn:1␤␤»
FROGGS m: my $s=0o200; say :8("$s"); 20:00
camelia rakudo-moar d14728: OUTPUT«Cannot convert string to number: malformed ':8' style radix number, expecting '>' after the body in '3:8<127⏏058>' (indicated by 7⏏)␤ in block <unit> at /tmp/4J5V7lXx_d:1␤␤Actually thrown at:␤ in block <unit> at /tmp/4J5V7lXx_d:1␤␤»
FROGGS err
ramiros: :8(...) wants to have a string, not a number
geekosaur m: my $s = 0o200; sy :8($s)
camelia rakudo-moar d14728: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0wapxhwF_E␤Undeclared routine:␤ sy used at line 1. Did you mean 'so'?␤␤»
geekosaur whoops 20:01
and oh, you did that. sounds buggy?
m: my $s = 0o200; say $s; :8($s)
camelia rakudo-moar d14728: OUTPUT«128␤This call only converts base-8 strings to numbers; value 128 is of type Int, so cannot be converted!␤(If you really wanted to convert 128 to a base-8 string, use 128.base(8) instead.)␤ in block <unit> at /tmp/ELdU6QRsDy:1␤␤»
geekosaur er
ah, right
FROGGS ramiros: so either pass a string to :8(...), or write it down literally as you did, which already does the right thing
20:01 raiph left
geekosaur m: my $s = '0o200'; say :8($s) 20:01
camelia rakudo-moar d14728: OUTPUT«128␤»
geekosaur derp
FROGGS correct
m: my $s = '0o200'; say val($s) 20:02
camelia rakudo-moar d14728: OUTPUT«0o200␤»
FROGGS m: my $s = '0o200'; say +val($s)
camelia rakudo-moar d14728: OUTPUT«128␤»
FROGGS nice
ramiros froggs, thanks
20:03 ramiros left
FROGGS pleasure 20:04
20:07 raiph joined
jnthn OK, wish you all a week of pleasant and productive hacking. Back a week on Monday. :-) o/ 20:08
awwaiid m: say "[{LEXICAL::.keys}] VS " ~ LEXICAL::.keys
camelia rakudo-moar d14728: OUTPUT«[$_] VS $=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish @?INC $/ $?PACKAGE␤»
awwaiid so when I do it in the string I get just $_, when I do it out I get a bunch of stuff. what's up with that?
20:09 raiph left
FROGGS jnthn: have fun! 20:11
timotimo awwaiid: because { } gives you a lexical scope
yoleaux 13:40Z <nine> timotimo: it is done. We now have a p6for desugar op. Hope it helps you :)
FROGGS (both of you :P)
awwaiid ah!
jnthn FROGGS: Thanks! :)
timotimo jnthn: have an exceptionally pleasant week, you two! 20:12
jnthn timotimo: We fully intend to. And the weather forecast looks cooperative. :-) 20:13
vendethiel jnthn: have tons of fun!
timotimo yeah, the weather forecast better be cooperative 20:14
or i'll head to the forecaster's office and tell them to get better!
jnthn vendethiel: Thanks :)
20:14 Hor|zon joined, diana_olhovik joined
jnthn OK, going to pack, and rest well before the little flight. Bye! o/ 20:15
FROGGS bye o/
20:16 adhoc joined 20:17 awesomess3 joined
awesomess3 if perl 6 doesn't have a good GUI library, I'm gonna be sadz ;-; 20:17
FROGGS hugs awesomess3 20:18
vendethiel awesomess3: would gtk work?
timotimo so far we have only a bit of GTK3 and Qt via Inline::Python
20:19 Hor|zon left 20:25 awesomess3 left 20:32 margeas joined 20:34 s_kilk left 20:38 ifim joined 20:43 darutoko left 20:44 diana_olhovik left, llfourn joined
pink_mist timotimo: heh, it's not even via perl5? :P 20:46
timotimo you can use stuff via perl5, too
but i'm not a perl5 person
dalek kudo/nom: fe31c4b | (Stéphane Payrard)++ | src/core/operators.pm:
fix to support things like is equiv('>+<')

run into a LTM parsing problem.
20:49
kudo/nom: d8d6abd | lizmat++ | src/core/operators.pm:
Merge pull request #556 from cognominal/nom

fix to support things like is equiv('>+<')
20:51 llfourn left 20:54 xfix left 20:58 kaare_ left 20:59 kaare_ joined, kaare_ left 21:05 domidumont left 21:07 tokuhiro_ joined 21:11 tokuhiro_ left 21:13 lichtkind joined
lichtkind greetings from the second ring of hell 21:13
21:15 Hor|zon joined
lichtkind ah new horizon perfect 21:15
lizmat .botsnack 21:17
yoleaux :D
synbot6 om nom nom
lichtkind lizmat: hugs 21:18
lizmat lichtkind o/
lizmat is too tired to make any sense, so gets some shuteye and tries again tomorrow
lichtkind lizmat swet dreams 21:19
i have to stay wake finish perl article
spread the word
21:20 Hor|zon left 21:21 ^elyse^ joined 21:25 vendethiel left 21:27 SqrtNegInf left 21:30 vendethiel joined 21:31 WizJin left 21:32 pmurias left 21:38 ^elyse^ left 21:41 tokuhirom_ joined 21:45 TEttinger joined 21:46 tokuhirom_ left 21:47 ^elyse^ joined, rurban joined 21:50 arunesh left 21:54 FireFly left 22:05 FireFly joined, telex left 22:06 telex joined 22:15 FireFly left 22:16 Hor|zon joined 22:21 Hor|zon left 22:26 FireFly joined 22:37 FireFly left 22:38 ^elyse^ left 22:47 llfourn joined 22:48 sftp left, iH2O joined 22:49 virtualsue left 22:50 iH2O left 22:52 FireFly joined 22:53 llfourn left 22:58 kjs_ joined
RabidGravy Boom! 23:02
konobi =0P 23:03
23:07 firstdayonthejob left 23:08 tokuhiro_ joined 23:09 Ven_ joined
[Coke] dd 23:09
23:11 spider-mario left 23:12 tokuhirom_ joined 23:13 tokuhiro_ left
konobi [Coke]: is tools/build/gen-js-makefile.nqp the core piece that would be needed to changed to affect the js backend build? 23:13
23:17 tokuhirom_ left, Hor|zon joined 23:18 Ven_ left 23:21 margeas left 23:22 Hor|zon left
RabidGravy konobi, I think pmurias is the expert on that part but not here now 23:29
konobi yup 23:30
23:34 rurban left 23:42 xvcds left 23:43 espadrine left
RabidGravy right, bed time 23:45
23:49 kjs_ left 23:51 RabidGravy left 23:56 sftp joined 23:58 yqt left