Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 SuzieQueue joined #perl6
00:03 tokuhiro_ joined #perl6
00:18 aborazmeh joined #perl6
00:18 aborazmeh joined #perl6
00:21 TimToady this is the sort of place you want adverbs, and, in fact, these are not adverbs, just named arguments
00:26 TimToady you can't take a rule-of-thumb like "adverbs may be a design smell" and treat it as a universal truth
00:27 TimToady and this situation is rather parallel to the one place we do use adverbs heavily, namely on subscripts
00:28 Peter_R joined #perl6
00:35 timotimo ah, makes sense. thanks
00:36 hohoho joined #perl6
00:38 dalek rakudo/nom: aedaae8 | TimToady++ | src/Perl6/Grammar.nqp:
00:38 dalek rakudo/nom: tell parser that with/without do implicit $_
00:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aedaae8ac9
00:38 TimToady now for the hard part...
00:39 TimToady 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:49 masak good morning, #perl6
00:49 * masak will be on .cn time for a few weeks from now
00:51 masak 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:53 Juerd joined #perl6
00:56 Hor|zon joined #perl6
01:11 masak haha -- https://perl6advent.wordpress.com/2012/12/23/day-23-macros/ has 4 comments not by me. and they are all about how people dislike the {{{ }}} syntax :P
01:15 kid51 joined #perl6
01:17 Ben_Goldberg joined #perl6
01:35 hohoho joined #perl6
01:52 llfourn joined #perl6
01:56 Hor|zon joined #perl6
02:05 tokuhiro_ joined #perl6
02:13 bjz joined #perl6
02:15 noganex joined #perl6
02:23 BLOKDAK joined #perl6
02:24 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:…»
02:24 BLOKDAK So anybody know the timeline for shaped arrays?
02:24 PsuzeannePsy joined #perl6
02:26 Suzeanne joined #perl6
02:28 SuzieQueue joined #perl6
02:29 PsuzeannePsy joined #perl6
02:30 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␤␤»
02:30 BLOKDAK good for you!
02:31 Suzeanne joined #perl6
02:33 SuzieQueue joined #perl6
02:34 bjz_ joined #perl6
02:51 nightfrog joined #perl6
02:54 Celelibi_ joined #perl6
02:55 Korima joined #perl6
02:55 Korima I have a method which accepts a hash
02:55 Korima method method1(%hash) { ... }
02:55 Korima How can call and pass a hash to it created in place? This doesn't work because of the commas:
02:55 Korima method1('a' => 123, 'b' => 444)
02:58 Hor|zon joined #perl6
02:59 llfourn joined #perl6
03:07 colomon m: sub method1(%h) { dd %h; }; method1({ ‘a’ => 123, ‘b’ => 444})
03:07 camelia rakudo-moar aedaae: OUTPUT«Hash % = {:a(123), :b(444)}␤»
03:11 AlexDaniel colomon: ahhhh, I love when people use real quoting characters
03:11 Korima thx
03:13 labster AlexDaniel: That's a long blog post in a pull request
03:13 AlexDaniel labster: I know…
03:15 AlexDaniel labster: I saw some uncertainty in the community on this question, so I decided to clear up a couple of things :)
03:16 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:17 AlexDaniel labster: I'd say don't
03:17 AlexDaniel :)
03:17 AlexDaniel why bother if “run” does the job
03:19 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:21 AlexDaniel my $p1 = run 'mysqldump', 'foo', :out; run 'mysql', 'bar', :in($p1.out)
03:21 AlexDaniel or use « » if you want
03:22 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);
03:22 AlexDaniel labster: well, then again, you have to use “run”, I guess
03:23 labster Oh, right.  derp.
03:23 AlexDaniel run ‘/usr/bin/zsh’, '-c', 'some shell code'
03:23 AlexDaniel or something like that
03:24 AlexDaniel 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 :)
03:26 labster 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”?
03:27 AlexDaniel labster: yeah. Well, I also see no reason to have that in a quoting construct, but maybe that's just me
03:28 masak BLOKDAK: see https://gist.github.com/jnthn/040f4502899d39b2cbb4 -- I think it was mentioned there :/
03:28 llfourn joined #perl6
03:28 bjz joined #perl6
03:28 masak m: my $y = 42; sub foo($x = $y, $y = 7) { say $x }; foo()
03:28 camelia rakudo-moar aedaae: OUTPUT«42␤»
03:28 masak should that be allowed? this isn't:
03:28 masak m: my $y = 42; { my $x = $y; my $y = 7 }
03:28 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…»
03:30 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()
03:30 AlexDaniel m: my $y = 42; sub foo($x = $y, $y = $x) { say $y }; foo()
03:30 camelia rakudo-moar aedaae: OUTPUT«42␤»
03:31 masak I mean, it's *confusing*, but arguably consistent.
03:39 Karim joined #perl6
03:39 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 Karim a hash but only with the keys-value(arguments) which have been passed. Currently I'm doing this the following way:
03:39 Karim method m1(:$arg1, :$arg2, :$arg3, :$arg4) {
03:39 Karim my %h;
03:39 Karim if $arg1 {
03:39 Karim %h{"arg1"} = $arg1;
03:39 Karim }
03:39 Karim if $arg2 {
03:39 Karim %h{"arg2"} = $arg2;
03:39 Karim }
03:39 Karim # and so on
03:39 Karim Is there a better way?
03:42 Karim better formatted version:
03:42 Karim method m1(:$arg1, :$arg2, :$arg3, :$arg4) {
03:42 Karim my %h;
03:42 Karim if $arg1 {
03:42 Karim %h{"arg1"} = $arg1;
03:42 Karim }
03:42 Karim if $arg2 {
03:42 Karim %h{"arg2"} = $arg2;
03:42 Karim }
03:42 Karim # and so on
03:43 masak Karim: slurp the arguments in as a hash?
03:43 hartenfels Karim: Just pass a slurpy hash: method m1(*%args)
03:43 hartenfels Karim: and then slice it
03:44 hartenfels I think the latter is my %h = %args<arg1 arg2 arg3 arg4>:kv
03:47 Karim hartenfels, but in that case it'll be unknown what keys to pass
03:47 Karim the names of the keys matter
03:47 hartenfels Karim: Unknown to whom?
03:47 Karim to the user
03:48 Karim 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 Karim **to pass
03:48 Karim instead of a hash
03:51 hartenfels Maybe there's a way to get a hash of the passed arguments regardless, but I'm not sure how.
03:52 Karim in case of passing a hash, isn't there a way to make them pass only the certain, predefined keys?
03:52 Karim which I'll describe in the documentation for my library
03:54 hartenfels I think there is actually.
03:54 hartenfels method m1(*%args (:$arg1, :$arg2, :$arg3, $:arg4))
03:54 hartenfels Will slurp up your arguments into %args, but only allow the keys <arg1 arg2 arg3 arg4>.
03:55 Karim thx, is it described in the Perl's documentation?
03:55 tokuhiro_ joined #perl6
03:55 Karim where can I read up on it?
03:56 hartenfels Good question, probably http://doc.perl6.org/language/functions
03:56 hartenfels Not sure where the argument unpacking is documented though.
03:57 labster AlexDaniel: WOP = Whatever-Oriented Programming
03:57 adhoc joined #perl6
03:57 zacts joined #perl6
03:57 Karim is "*" really needed there? that's a hash anyway, so "*" won't make any difference, will it?
03:57 AlexDaniel labster: oh yea
03:58 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: http://doc.perl6.org/type/Signature#Destructuring_Parameters
03:58 Hor|zon joined #perl6
04:00 Karim tnx
04:00 hartenfels np
04:02 BenGoldberg joined #perl6
04:06 masak lol, I blogged! http://strangelyconsistent.org/blog/macros-your-macro-has-been-put-on-hold
04:13 weihan joined #perl6
04:13 adu joined #perl6
04:16 masak lunch &
04:18 mst masak: wtf time zone are you in?
04:19 larion joined #perl6
04:25 awwaiid masak: that README.md ... wow
04:25 yoleaux 15 Oct 2015 20:13Z <jdv79> awwaiid: LREP's meta source-url is borked
04:25 awwaiid pft
04:25 TimToady mst: he's gonna be in .cn for a couple weeks
04:25 awwaiid I think the meta source-url is quite excellent
04:26 TimToady mst: what timezone are *you* in?
04:26 awwaiid jdv79: what does borked look like?
04:29 BLOKDAK so anybody have an idea of when shaped arrays are going to make it into perl6?
04:29 BLOKDAK p6: my @array{-5..5};
04:29 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:…»
04:30 TimToady that part is post Christmas, but 0-based .[] indices will be before
04:30 BLOKDAK ah, thank you
04:30 BLOKDAK i am really looking forward to those since they will make doing math-y stuff sooo much easier...
04:30 TimToady we already have the internals for compact multidim arrays, we just haven't hooked it to the declaration syntax yet
04:31 BLOKDAK translating formulas from papers into programs is made much more difficult by the need to always remember your array offsets.
04:34 BLOKDAK it's like perl6 has the best parts of all the languages
04:34 BLOKDAK do the pages at (eg) http://doc.perl6.org/language.html document all declared functionality or just the implemented stuff?
04:34 mst TimToady: aha. pacific here atm.
04:42 TimToady BLOKDAK: I doubt it has even all the implemented stuff; the docs are still a work in progress
04:42 hohoho joined #perl6
04:42 hohoho joined #perl6
04:44 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 BLOKDAK like, the good attention for perl6 causing dev shops to release perl5 APIs/libraries
04:46 kmel joined #perl6
04:46 kmel m: 'good morning'.say
04:46 camelia rakudo-moar aedaae: OUTPUT«good morning␤»
04:47 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 TimToady kmel: o/
04:49 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'?␤␤»
04:49 softmoth m: sub x { 1 }; x() or say "hi";
04:49 camelia rakudo-moar aedaae: ( no output )
04:49 softmoth ^ are those parens supposed to be required there?
04:50 TimToady yes, all functions default to being list operators
04:51 TimToady so it's always going to be expecting a term next
04:51 TimToady m: sub term:<x> { 1 }; x or say "hi";
04:51 camelia rakudo-moar aedaae: ( no output )
04:51 TimToady you can explicitly define a term if you don't want arguments
04:52 TimToady m: my \x = 1; x or say "hi";
04:52 camelia rakudo-moar aedaae: ( no output )
04:52 TimToady that also defines a term
04:53 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:58 Ch0c0late joined #perl6
04:59 Hor|zon joined #perl6
05:01 tokuhiro_ joined #perl6
05:08 Karim joined #perl6
05:10 Karim this one returns an error when I'm running it:
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:10 Karim }
05:10 Karim m1(arg1 => "some arg1");
05:10 Karim "Too few positionals passed; expected 1 argument but got 0 in sub m1"
05:10 Karim When I remove the whitespace
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:10 Karim }
05:10 Karim it returns the error "Shape declaration with () is reserved;
05:10 Karim please use whitespace if you meant a subsignature for unpacking,
05:10 Karim or use the :() form if you meant to add signature info"
05:10 Karim this one returns an error when I'm running it:
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:10 Karim }
05:10 Karim m1(arg1 => "some arg1");
05:10 Karim "Too few positionals passed; expected 1 argument but got 0 in sub m1"
05:10 Karim When I remove the whitespace
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:10 Karim }
05:10 Karim 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"
05:10 Karim ________________________________________________________________________________________
05:10 Karim this one returns an error when I'm running it:
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:10 Karim }
05:10 Karim m1(arg1 => "some arg1");
05:10 Karim "Too few positionals passed; expected 1 argument but got 0 in sub m1"
05:10 Karim When I remove the whitespace
05:10 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:10 Karim say %h;
05:11 Karim how can I fix it?
05:11 adu Karim: use a pastebin
05:15 Karim http://pastebin.com/TsZ4VTff
05:15 hartenfels Karim There's whitespace missing between your %h and the destructuring I think.
05:16 Karim what's destructuring?
05:16 hartenfels The parens.
05:16 hartenfels sub m1(%h (:$arg1, $arg2))
05:16 Karim sub m1(%h(:$arg1?, :$arg2?)) {
05:17 Karim see my 1st example, I've posted 2.
05:17 hartenfels The question marks are unnecessary too I think.
05:17 hartenfels I know.
05:17 hartenfels Neither has that space between the %h and the (
05:17 hartenfels sub m1(%h (:arg1, $arg2))
05:17 hartenfels ^
05:18 raiph joined #perl6
05:18 Karim without the whitespace and "?" marks:
05:18 Karim ===SORRY!=== Error while compiling test1.pl6
05:18 Karim Shape declaration with () is reserved;
05:18 Karim please use whitespace if you meant a subsignature for unpacking,
05:18 Karim or use the :() form if you meant to add signature info to the function's type
05:19 hartenfels You're *missing* whitespace.
05:19 raiph m: sub m1(*%h (:$arg1?, :$arg2?)) { say %h }; m1(arg1 => "some arg1");
05:19 camelia rakudo-moar aedaae: OUTPUT«arg1 => some arg1␤»
05:19 raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1((arg1 => "some arg1"));
05:19 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␤␤»
05:20 Karim I wonder, why isn't it working without "*"?
05:20 Karim I'd like the keys to be optional also.
05:20 Karim and since it's a hash, why would we use "*"?
05:20 Karim isn't it redundant in this case?
05:21 raiph Karim: "*" is one of several options regarding how arguments get bound to a parameter
05:22 Karim raiph, hence in case of passing a hash with the predefined keys, using the * is mandatory?
05:24 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? "
05:25 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:26 Karim neither. I want the named arguments and hash.
05:26 raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({arg1 => "some arg1"});
05:26 camelia rakudo-moar aedaae: OUTPUT«arg1 => some arg1␤»
05:26 raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({arg3 => "some arg1"});
05:26 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␤␤»
05:26 Karim yeah, it's working, I know.
05:27 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 bjz joined #perl6
05:27 Karim adu, right
05:27 adu then you need a comma
05:27 Karim adu, I mean why doesn't this work
05:28 Karim sub m1(%h (:$arg1, :$arg2)) {
05:28 Karim say %h.elems;
05:28 Karim }
05:28 Karim without "*"
05:29 Timbus because you called it with a list of pairs, not a hash
05:29 adu Karim: http://pastie.org/10487329
05:29 adu Karim: works for me
05:30 Karim and how to make the hash param optional?
05:30 Karim just "?", but where to put it?
05:30 Karim adu, I mean it's not working with the "*"
05:30 Karim why?
05:31 Timbus m: sub m1(%h? (:$arg1, :$arg2)) { say %h }; m1({arg2 => "some arg2"});
05:31 camelia rakudo-moar aedaae: OUTPUT«arg2 => some arg2␤»
05:31 adu Karim: your code doesn't include the *
05:31 Karim Timbus, should I have wrapped it into "{ }"?
05:31 Timbus because that's a hash
05:32 Timbus arg2 => "some arg2" is a pair
05:32 Karim Timbus, it's not a "why" question.
05:32 Timbus oh. then yes
05:32 Karim thx.
05:32 Timbus you can coerce it in other ways
05:32 Karim adu, yes, my code doesn't, but your does.
05:33 Karim Timbus, how?
05:33 Timbus %(arg1 => "some arg1")  or (arg1 => "some arg1").Hash
05:34 dalek ecosystem: 6b54400 | (Fayland Lam)++ | META.list:
05:34 dalek ecosystem: Add WebServices::GitHub to ecosystem
05:34 dalek ecosystem:
05:34 dalek ecosystem: See https://github.com/fayland/perl6-WebService-GitHub
05:34 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6b5440089a
05:34 adu Karim: you're not being consistent
05:34 Karim adu, I'd like not to use "*"
05:35 Karim but I have to. Why?
05:35 adu Karim: then your callsite is wrong
05:35 Karim Timbus, thx.
05:36 adu Karim: either add * to sub m1, or change your callsite to pass a single hash object
05:37 Karim Not working
05:37 Karim sub m2(%h? (:$arg1, :$arg2)) { say %h.elems; }
05:37 Karim m2(h => %(arg1 => 'fdsfds'));
05:37 Karim Unexpected named argument 'arg1' passed
05:37 raiph m: sub m1(*%h (:$arg1?, :$arg2?)) { say %h }; m1(:arg1 :arg2); # *%h slurps pairs
05:37 camelia rakudo-moar aedaae: OUTPUT«arg1 => True, arg2 => True␤»
05:37 raiph m: sub m1(%h (:$arg1?, :$arg2?)) { say %h }; m1({:arg1 :arg2}); # %h requires a single hash
05:37 camelia rakudo-moar aedaae: OUTPUT«arg1 => True, arg2 => 1␤»
05:38 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 Suzeanne joined #perl6
05:39 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);
05:39 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␤␤»
05:39 Karim and the hash should be optional.
05:39 softmoth ^ Probably this is correct, but it surprised me
05:39 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 *
05:40 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:␤      …»
05:40 adu Karim: if you want h to be a named parameter, then you must rewrite the capture as (:%h, :$arg1, :$arg2)
05:41 softmoth sorry for the noise
05:41 Timbus "if you want h to refer to arg1 and arg2, then you must use *" ?
05:42 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:
05:42 Karim m1(:$aa, :$bb, %h? (:$arg1, :$arg2)) { ... }
05:42 Karim that is:
05:42 Karim 1) :$aa, :$bb are named arguments
05:42 Karim 2) they're independent from each other and hash
05:42 Karim 3) hash is optional
05:42 Karim 4) hash accepts only the keys arg1 and arg2, both of them are optional (but not at the same time, of course)
05:42 raiph m: sub m1(:$arg1?, :$arg2?, *%_) { say $arg1; say %_ }; m1(:arg1 :arg2 :arg3)
05:42 camelia rakudo-moar aedaae: OUTPUT«True␤arg3 => True␤»
05:42 adu Karim: so they are dependant
05:43 Karim yes
05:43 adu that's the opposite of what you just said
05:43 uruwi joined #perl6
05:43 Karim where did I say that?
05:43 uruwi Hello
05:43 uruwi Some code is acting extremely weirdly
05:43 uruwi https://github.com/bluebear94/the-world-of-code
05:43 adu <Karim> adu, nope, I want them to be independent.
05:44 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
05:44 Karim **** sorry, INdependant
05:44 uruwi It's also taking a lot of CPU time
05:44 * adu is so confused
05:44 Karim :)
05:44 raiph m: m1(:$aa, :$bb, %h? (:$arg1, :$arg2)) {}
05:44 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)) {}␤»
05:45 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'});
05:45 camelia rakudo-moar aedaae: OUTPUT«asdf␤»
05:45 Karim ===SORRY!=== Error while compiling test1.pl6
05:45 Karim Variable '$aa' is not declared
05:46 adu Karim: do you want $arg1 and %h{arg1}  to refer to the same value?
05:46 adu I mean %h<arg1>
05:47 adu Timbus: that would be changing the callsite
05:47 Timbus I've not been told this isn't possible
05:47 moritz m: sub m1(%h? (:$arg1, :$arg2), :$aa, :$bb ) { say $arg1 }; m1( |{arg1 => 'asdf'})
05:47 camelia rakudo-moar aedaae: OUTPUT«Unexpected named argument 'arg1' passed␤  in sub m1 at /tmp/6OYLD9y9yY:1␤  in block <unit> at /tmp/6OYLD9y9yY:1␤␤»
05:47 adu Timbus: well, it works :)
05:47 Karim Timbus, that's working well. But one more thing: can't I put the args :$aa and :$bb before %h ?
05:48 Timbus no, positionals come before named args, I think
05:48 adu Karim: you can put named parameters anywhere you want
05:48 Timbus in the signature?
05:48 Timbus after*
05:48 raiph m: sub m1(%h? (:$arg1, :$arg2), :$aa, :$bb) {}
05:48 camelia rakudo-moar aedaae: ( no output )
05:48 adu Karim: if they're all named, that is
05:48 Karim ===SORRY!=== Error while compiling test1.pl6
05:48 Karim Cannot put optional positional parameter %h after variadic parameters
05:48 moritz in the signature, positionals go first
05:48 Karim yes, in the signature
05:48 moritz in the argument list, it doesn't matter
05:49 Karim they're all named, aren't they?
05:49 Timbus h is not..
05:49 adu Karim: "%h" is positional ":%h" is named
05:50 Karim thx, now all is working
05:50 raiph :)
05:51 arunesh joined #perl6
06:00 Hor|zon joined #perl6
06:03 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:11 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.
06:14 ShimmerFairy masak: are you suggesting we're being too helpful? :)
06:20 masak not too much help was generated in the end, so no, not suggesting that. :)
06:21 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
06:22 masak but there seemed to be a lot of useful info that didn't get all the way, sort of
06:38 Ven joined #perl6
06:40 adhoc joined #perl6
06:42 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␤»
06:42 masak oh, good.
06:42 masak for some reason I didn't get that warning on -e
06:42 masak can somebody confirm that the warning doesn't show up on -e ?
06:43 Timbus confirm
06:43 Timbus d
06:43 * masak submits rakudobug
06:43 masak Timbus: thank you.
06:44 rindolf joined #perl6
06:51 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 masak "double free" -- that means it's twice as good, right? :P
06:57 weihan_ joined #perl6
07:01 Hor|zon joined #perl6
07:03 tokuhiro_ joined #perl6
07:09 kaare_ joined #perl6
07:11 bjz joined #perl6
07:14 Miriana-Tor joined #perl6
07:28 Ven joined #perl6
07:29 kaare_ http://www.djet.xyz/blogs/6_concerns
07:35 Peter_R joined #perl6
07:36 masak kaare_: agree on a modules focus being important. and that the toolchain also needs to come with that.
07:37 masak 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:40 rurban joined #perl6
07:47 kmel Kaare_ 's blog referenced another one: http://www.dagolden.com/index.php/2406/thoughts-on-getting-perl-6-for-christmas/
07:47 kmel It mentions speed as an important point.
07:47 kmel is 6 faster than 5?
07:48 kmel PS: I never used 5 before.
07:50 Ven joined #perl6
07:52 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:53 FROGGS kmel: Perl 6 is slower, except for some micro benchmarks
07:54 kmel but i don't get it. If you're going to use I::P5 why not stay on 5 then
07:54 kmel why would anyone want to run P5 code on 6.
07:55 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
07:55 FROGGS because often enough you don't look at its code, and foreign api's suck anyway :o)
07:55 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"
07:56 ShimmerFairy where the fake module I named is something whose features you need in your P6 project.
07:57 kmel ShimmerFairy : that makes sence
07:58 kmel *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 #perl6
08:03 Hor|zon joined #perl6
08:04 xfix joined #perl6
08:07 firstdayonthejob joined #perl6
08:13 masak I think it's far too easy to end up thinking "either-or" with languages.
08:14 masak 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 masak 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!
08:15 dalek ecosystem: 3acf1b5 | (Fayland Lam)++ | META.list:
08:15 dalek ecosystem: Add WebService::Google::PageRank to ecosystem
08:15 dalek ecosystem:
08:15 dalek ecosystem: See https://github.com/fayland/perl6-WebService-Google-PageRank
08:15 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3acf1b54ff
08:15 kaare_ masak: Inline::Perl5 could be a fine intermediate solution, I think.
08:16 masak I can co-exist peacefully with people who consider it a "fine intermediate solution" :P
08:16 masak I believe the ambition of independence from Perl 5 may be a useful driver in the community
08:16 masak meanwhile, we can get a lot of use out of Perl 5 too
08:17 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 masak they have to.
08:17 masak there's no realistic alternative.
08:17 kaare_ If 6 will catch on, 5 will be maintenance only. That's my bet.
08:18 kaare_ Why spend time enhancing Moose when you have Perl 6 etc.
08:18 kaare_ It's not my wish, it's my guess.
08:21 masak meanwhile, in reality: there's just so much Perl 5 code out there, making money for people.
08:21 masak if people are having trouble switching from Python *2* to Python *3*, imagine the jump from Perl 5 to 6.
08:21 masak 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.
08:23 [Tux] test             50000    39.325    39.212
08:23 [Tux] test-t           50000    38.865    38.751
08:23 masak lizmat: S32/Str for index still talks about an `Index` type. this is a fossil at this point, yes?
08:23 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
08:24 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 :)
08:24 ShimmerFairy kaare_: the last time someone thought there was no life left in Perl 5, Perl 6 was born :P
08:25 kaare_ If 6 has been out 10 years ago, no Moose would have been born
08:25 brrt joined #perl6
08:25 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
08:26 masak Perl 6 was "out" 10 years ago. that's what gave rise to Moose.
08:26 brrt good *
08:26 masak ahoj brrt
08:26 brrt \o masak
08:26 kaare_ Perl 6 was not useful 10 years ago
08:26 brrt yes, perl5 is and will likely awesome long after this christmas
08:27 brrt *remain
08:27 kmel I like to think of them as 2 different languages
08:27 kmel I know 6 was based on 5 and there are many common denominators
08:28 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
08:28 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)
08:29 kmel indeed ShimmerFairy
08:29 ShimmerFairy kmel: my go-to analogy is C and C++ for the relationship between P5 and P6, fwiw :)
08:30 kmel :)
08:32 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 brrt the early adopters
08:32 ShimmerFairy You could even consider things like Inline::Perl5 as similar to  extern "C" { }  , perhaps :P
08:33 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
08:33 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.
08:35 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"
08:36 kmel exactly! ShimmerFairy
08:38 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:39 dalek specs: e6fcddd | lizmat++ | S32-setting-library/Str.pod:
08:39 dalek specs: Remove Index fossil
08:39 dalek specs: review: https://github.com/perl6/specs/commit/e6fcddd502
08:39 masak t/spec/S32-io/IO-Socket-Async.rakudo.moar hangs locally.
08:40 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
08:40 kmel and the only way to do that is to focus on the current task and stop worrying about Perl 5
08:41 kmel imho again
08:41 kaare_ kmel: Of Course. It's a matter of mindset. Some people consider Perl 5 old, perhaps 6 will attract some more attention
08:42 masak Perl 5 is newer than ever. people are free to ignore it (or be disinterested) at their own peril :)
08:42 masak 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.
08:43 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 :)
08:43 kaare_ At least here, people are surprised when they hear of new development in Perl.
08:44 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
08:45 kmel ShimmerFairy: you are right, the problem is; I never used 5 in anyway. I don't feel that attached to it.
08:46 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") :)
08:47 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)
08:47 ShimmerFairy :P
08:47 kmel masak: no one is judging the relevance of 5
08:47 * FROGGS .oO( On VMS however, this function does something else... )
08:47 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)
08:48 kmel as a matter of fact 5 is more relevant than 6 at the moment
08:48 masak far more.
08:49 lizmat timotimo: re http://irclog.perlgeek.de/perl6/2015-10-16#i_11390437 : people kept arguing that grep-index/first-index/last-index should be adverbs
08:49 lizmat well, now we have boith
08:49 lizmat *both
08:50 lizmat 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
08:51 lizmat ah, the next day of backlog, clarity came about :-)
08:52 llfourn joined #perl6
08:54 bjz_ joined #perl6
08:55 masak Perl 6 is not particularly new at this point :P
08:55 nine What would one do nowadays instead of my $?FILES := ...?
08:58 loren joined #perl6
09:00 margeas joined #perl6
09:00 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␤»
09:00 lizmat m: BEGIN say $?FILES
09:00 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␤»
09:00 lizmat m: BEGIN say $?FILE
09:00 camelia rakudo-moar aedaae: OUTPUT«/tmp/zCVMLBYKfS␤»
09:00 lizmat nine: not sure what the question is ?
09:01 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:03 Hor|zon joined #perl6
09:04 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 tokuhiro_ joined #perl6
09:05 lizmat that's because we only allow that in the setting ...  :-(
09:05 lizmat so, if I understand, v5 has been broken since we did that, several months ago ?
09:05 masak sounds likely.
09:06 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 ?
09:06 lizmat nine?  ^^
09:07 dalek rakudo/nom: 697cfa6 | lizmat++ | src/core/ (4 files):
09:07 dalek rakudo/nom: s/first-index(...)/first(...,:k)/
09:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/697cfa65c8
09:09 masak yay, :k :D
09:09 cygx joined #perl6
09:10 cygx nine: that'S what I did for now: https://github.com/cygx/v5/commit/2f07af9cdfb065b379a81237d0743a308aa088f8
09:10 cygx (work duplication)--
09:10 cygx makes the code at least parse
09:13 espadrine joined #perl6
09:13 Ven joined #perl6
09:14 masak now that Europe is awake, allow me to re-post my latest blog post for everybody's enjoyment/horror/bewilderment: http://strangelyconsistent.org/blog/macros-your-macro-has-been-put-on-hold
09:15 lizmat :-)  I was just starting to read it
09:18 kmel joined #perl6
09:21 * kaare_ is up, but not awake :-)
09:23 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␤␤»
09:24 grondilu m: say <foo bar oof>.classify(*.comb.sort.join).kv.max(:by(*.value.elems));
09:24 camelia rakudo-moar 697cfa: OUTPUT«[foo oof]␤»
09:24 cygx nine: I'm guessing you might try replacing the declatarion with using binddynlex?
09:25 lizmat nine: I'm not sure it is worth the trouble at this point
09:26 lizmat jnthn should be posting a gist on how to proceed with precomp / S11 / S22 soon
09:26 lizmat and then all of that will change anyway
09:26 RabidGravy joined #perl6
09:27 bjz joined #perl6
09:27 bitmap joined #perl6
09:29 FROGGS nine: why do you want to fix v5?
09:30 Psyche^ joined #perl6
09:31 cygx I think theres a $*W. missing from https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L1511 ?
09:31 * cygx needs to leave for a bit
09:33 dalek rakudo/nom: c589177 | lizmat++ | src/core/Any-iterable-methods.pm:
09:33 dalek rakudo/nom: Deprecate grep-index/first-index/last-index
09:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c58917725d
09:34 FROGGS .tell cygx good catch!
09:34 yoleaux FROGGS: I'll pass your message to cygx.
09:35 FROGGS lizmat: can you fix that? I'm unable right now
09:35 lizmat on it already :-)
09:38 nine FROGGS: just because it's probably a couple of easy fixes and the code might become useful again :)
09:38 dalek rakudo/nom: c8b4897 | lizmat++ | src/Perl6/Grammar.nqp:
09:38 dalek rakudo/nom: Fix missing $*W, spotted by cygx++
09:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c8b4897d35
09:38 FROGGS nine: leave it to me... v5's code is tricky in some areas
09:39 FROGGS brb &
09:39 nine FROGGS: ok
09:41 Woodi hallo #perl6 :)
09:42 Ven o/ Woodi
09:42 dalek roast: efae2c9 | lizmat++ | S03-metaops/hyper.t:
09:42 dalek roast: Remove nodality tests for (grep|first|last)-index
09:42 dalek roast: review: https://github.com/perl6/roast/commit/efae2c9885
09:47 dalek specs: 4218c13 | lizmat++ | S (2 files):
09:47 dalek specs: Remove (grep|first|last)-index fossil
09:47 dalek specs: review: https://github.com/perl6/specs/commit/4218c1330a
09:49 dalek roast: dd741e3 | lizmat++ | S32-list/grep- (2 files):
09:49 dalek roast: Rename grep-index.t to grep-k.t
09:49 dalek roast: review: https://github.com/perl6/roast/commit/dd741e3d2c
09:51 mattprelude joined #perl6
09:51 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:57 dalek roast: 0b34248 | lizmat++ | S32-list/grep-k.t:
09:57 dalek roast: Adapt grep-index tests to grep(:k) tests
09:57 dalek roast: review: https://github.com/perl6/roast/commit/0b3424836c
09:57 softmoth joined #perl6
09:57 nine register_op_desugar is seriously underdocumented....
09:58 dalek roast: d9c5922 | lizmat++ | S32-list/first- (2 files):
09:58 dalek roast: Rename first-index.t to first-k.t
09:58 dalek roast: review: https://github.com/perl6/roast/commit/d9c5922359
10:01 dalek roast: 997be32 | lizmat++ | S32-list/first-k.t:
10:01 dalek roast: Adapt first-index tests to first(:k) tests
10:01 dalek roast: review: https://github.com/perl6/roast/commit/997be32e45
10:02 dalek roast: 50b91ec | lizmat++ | S32-list/ (2 files):
10:02 dalek roast: Rename last-index.t to first-end-k.t
10:02 dalek roast: review: https://github.com/perl6/roast/commit/50b91ec785
10:05 Hor|zon joined #perl6
10:06 dalek roast: b38cc69 | lizmat++ | S32-list/first-end-k.t:
10:06 dalek roast: Adapt last-index tests to first(:end,:k) tests
10:06 dalek roast: review: https://github.com/perl6/roast/commit/b38cc693c4
10:08 dalek rakudo/nom: 67df8db | lizmat++ | t/spectest.data:
10:08 dalek rakudo/nom: Adapt to change test file names
10:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67df8dbf13
10:10 cygx joined #perl6
10:10 masak lizmat++ # fossil hunting
10:10 masak lizmat++ # test coverage
10:11 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!
10:12 cygx crossing the language barrir in a tight loop is something Inlne::Perl5 will never be good at
10:12 hartenfels joined #perl6
10:12 cygx *barrier
10:12 nine cygx: except if we get JITed NativeCall
10:12 nine cygx: but in the long term I see v5 much more important than Inline::Perl5
10:13 cygx nine: only if you were to inline the body of the P5 interpreter C function
10:13 cygx I don
10:13 cygx 't see that happening
10:13 dalek rakudo/nom: 68563f4 | lizmat++ | docs/ChangeLog:
10:13 dalek rakudo/nom: Mention new grep/first attributes and deprecations
10:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68563f48eb
10:14 nine cygx: yes, Inline::Perl5 cannot outperform perl5. v5 can at least in theory.
10:14 FROGGS cygx: yes, though without XS...
10:16 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 rakudo/p6for_op: fa56a39 | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
10:16 dalek rakudo/p6for_op: Work in progress: p6for desugar op
10:16 dalek rakudo/p6for_op:
10:16 dalek rakudo/p6for_op: Move some <for> logic into a desugar op for easier handling by the optimizer.
10:16 dalek rakudo/p6for_op: Need to do the same for statement modifier <for>, too.
10:16 dalek rakudo/p6for_op: review: https://github.com/rakudo/rakudo/commit/fa56a399fa
10:17 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 }
10:18 nine cygx: and the best candidate for that is v5 ;)
10:19 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
10:19 nine FROGGS: I'd love to see that happening
10:20 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 FROGGS nine: well, I'd just need to unbreak v5 and disable/alter its module loader registration
10:21 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:22 FROGGS though, without users I'm not very motivated to unbreak v5
10:22 jdv79 awwaiid: invalid
10:23 lizmat afk for most of the rest of the day&
10:23 jdv79 awwaiid: see?:  https://gist.github.com/anonymous/a38e558936fbfe477a53
10:32 leont joined #perl6
10:46 telex joined #perl6
10:50 llfourn joined #perl6
10:50 AlexDaniel joined #perl6
10:53 gtodd joined #perl6
10:53 cygx bye, #perl6
10:53 cygx left #perl6
11:01 spider-mario joined #perl6
11:02 kmel joined #perl6
11:05 Hor|zon joined #perl6
11:07 rurban joined #perl6
11:12 weihan joined #perl6
11:13 brrt joined #perl6
11:13 moritz \o
11:23 hohoho joined #perl6
11:23 Woodi m: my @a; my $f = slurp; for (lines $f) { my @b = $_ ~~ /\w+/; @a.push: slip @b; }; say @a; say @a.unique.elems;
11:23 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␤»
11:24 Woodi what I'm doing wrong ?
11:28 tm joined #perl6
11:32 moritz Woodi: you're not using .words when you should
11:32 apotheon joined #perl6
11:32 moritz Woodi: also it seems you're expecting a regex match to return an array
11:32 cygx joined #perl6
11:33 moritz also, @a.append is much more intuitive than @a.push: slip(...)
11:34 Ven joined #perl6
11:35 cygx you'll also need to throw in a .Str somewhere as match objects probably won't compare as you expect them to
11:38 cygx what's the nqp spelling for say $node.WHAT unless $node ~~ Positional
11:39 cygx 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:40 moritz say($node.HOW.name($name)) unless nqp::istype($node, Positional)
11:40 moritz though NQP doesn't have a Positional type
11:41 camelia joined #perl6
11:42 cygx I want to print dome debug output if the .[] at https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Optimizer.nqp#L1756 fails
11:42 camelia nqp-moarvm: ( no output )
11:42 camelia ..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␤»
11:42 camelia ..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 moritz cygx: nqp::islist
11:45 softmoth joined #perl6
11:47 cygx moritz: that doesn't cut is as apparently the QAST::* support .[] and fail the nqp::islist check...
11:48 SqrtNegInf joined #perl6
11:49 ^elyse^ joined #perl6
11:49 * cygx needs to go buy some groceries
11:51 apotheon joined #perl6
11:52 s_kilk joined #perl6
11:54 s_kilk is it possible to merge/concatenate two arrays in perl6?
11:55 s_kilk without doing a for-loop
11:56 moritz cygx: then you can type check for QAST::Node, which is the base type for QAST::* types
11:57 moritz 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"]␤»
11:59 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 s_kilk my guess is that it's flattening out the @b array into an argument list, but I've not seen this before
12:01 moritz s_kilk: it's just a different syntax for a method call with arguments
12:01 moritz s_kilk: one could write @a.ppend(@b) just as well
12:01 s_kilk ah, I see.
12:01 s_kilk thanks
12:01 ^elyse^ joined #perl6
12:04 kid51 joined #perl6
12:06 Hor|zon joined #perl6
12:17 grondilu joined #perl6
12:22 karim joined #perl6
12:22 karim Could you tell me how can I run all the tests at once in the directory "t"?
12:22 karim this works perl6 t/01-user.t
12:22 karim but this "perl6 t" or "perl6 t/" doesn't ==> "Can not run directory t/."
12:23 moritz karim: PERL6LIB=lib prove -e perl6 t
12:23 kmel the writer is sarcastic (in a good way)
12:23 kmel sorry wrong chat
12:23 kmel ;o
12:24 karim tnx
12:24 leont karim: I'm working on a prove6, it's almost ready :-)
12:25 karim joined #perl6
12:26 karim I can also use "perl6 t/*.t", right? it's easier.
12:27 grondilu joined #perl6
12:27 s_kilk you can also do `prove --exec perl6 -r t`
12:27 marakashi joined #perl6
12:30 karim and "perl6 t/*.t"?
12:30 FROGGS perl6 -Ilib t/*.t
12:30 FROGGS that should work
12:32 moritz no
12:33 karim oh my god, I'm not asking what else will work.
12:33 masak in 2015, how are we doing on chromatic's list in http://modernperlbooks.com/mt/2011/08/why-my-side-project-doesnt-use-perl-6.html ?
12:33 karim "perl6 -Ilib t/*.t " - working
12:33 * moritz would expect that to only run the first *.t file, and pass the other file names as arguments to the first
12:33 masak DB, web API, regexes, HTML templating, DateTime, deployment.
12:34 masak the only ones I can say we're 100% there on are regexes and DateTime.
12:35 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
12:36 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.
12:36 masak FROGGS: tell me more.
12:37 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...
12:37 FROGGS like intersections etc etc
12:37 moritz masak: and it usually gives much better error messages than DBIx::Class
12:38 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.
12:38 FROGGS ohh, I'm not talking about core necessarily... I'm talking about Perl 6 in general
12:39 masak oh, ok. good.
12:39 masak FROGGS: I'd love to see a DateTime::Span and ::SpanSet outside of core.
12:39 FROGGS me too
12:39 FROGGS I'd probably be its first user
12:40 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*
12:40 FROGGS sounds fun :o)
12:40 masak it does, doesn't it? :)
12:40 FROGGS hehe
12:41 * masak .oO( so, when are you available? give the answer as a DateTime::SpanSet... d'oh! )
12:42 masak 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)␤»
12:42 masak well, that was easy :P
12:42 * leont would like a SPORE module for web APIs, though sadly it never seemed to have gotten truly popular
12:43 * masak wonders whether to think about giving a talk called "CPAN is a threat to Perl 6 and must be destroyed" :P
12:45 masak 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
12:45 * masak would like to believe he gets points for thinking creatively
12:45 masak or, as it were, destructively
12:48 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:49 masak FROGGS: understandable. let me know if the situation changes, though.
12:49 FROGGS will do
12:49 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.
12:49 FROGGS the first two things are hopefully solved today
12:51 Ven_ joined #perl6
12:55 _28_ria joined #perl6
12:59 SqrtNegInf left #perl6
13:01 SqrtNegInf joined #perl6
13:04 dalek doc: b11caa1 | moritz++ | WANTED:
13:04 dalek doc: Remove roles from WANTED
13:04 dalek doc:
13:04 dalek doc: http://doc.perl6.org/language/objects#Roles covers them.
13:04 dalek doc: If anybody wants more materials on roles, please be more specific
13:04 dalek doc: in your requests.
13:04 dalek doc: review: https://github.com/perl6/doc/commit/b11caa1f6b
13:07 FROGGS k, $dayjob: done
13:07 Hor|zon joined #perl6
13:17 rurban joined #perl6
13:18 moritz m: my $x = [1, 2, 3]; .say for $x;
13:18 camelia rakudo-moar 68563f: OUTPUT«[1 2 3]␤»
13:18 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 #perl6
13:19 ShimmerFairy And these particular pieces feel quite inappropriate to factor out into specific grammar rules, since they're so specialized
13:20 raiph joined #perl6
13:21 cognominal joined #perl6
13:21 dalek rakudo/p6for_op: 70b54ab | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
13:21 dalek rakudo/p6for_op: Use p6for op for statement modifier for, too.
13:21 dalek rakudo/p6for_op: review: https://github.com/rakudo/rakudo/commit/70b54ab9e5
13:23 margeas joined #perl6
13:33 zakharyas joined #perl6
13:34 softmoth joined #perl6
13:34 zakharyas joined #perl6
13:35 * leont is running spectest with his harness, so far so good
13:35 FROGGS ohh, nice
13:35 dalek ecosystem: 7e02278 | (Fayland Lam)++ | META.list:
13:35 dalek ecosystem: Add Locale::Codes to ecosystem
13:35 dalek ecosystem:
13:35 dalek ecosystem: See https://github.com/fayland/perl6-Locale-Codes
13:35 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7e022783f8
13:39 llfourn joined #perl6
13:39 masak ShimmerFairy: you could always factor them out into lexical regex variables, or `my` regexes.
13:40 dalek rakudo/nom: 033427b | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
13:40 dalek rakudo/nom: p6for desugar op
13:40 dalek rakudo/nom:
13:40 dalek rakudo/nom: Move some <for> logic into a desugar op for easier handling by the optimizer.
13:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/033427b98d
13:40 dalek rakudo/nom: 1b4715f | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
13:40 dalek rakudo/nom: Use p6for op for statement modifier for, too.
13:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b4715f156
13:40 nine .tell timotimo it is done. We now have a p6for desugar op. Hope it helps you :)
13:40 yoleaux nine: I'll pass your message to timotimo.
13:41 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:42 ^elyse^ joined #perl6
13:42 masak no, I meant outside of the rule (but inside the grammar)
13:43 leont Hmmm, two tests seems to have had a freak accident ("no tests run"), no idea what going on there :-s
13:44 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:46 ShimmerFairy (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:48 masak with <~~foo> not implemented, putting it as a lexical regex outside of your rule is what I'd do.
13:54 Ven joined #perl6
13:56 tokuhirom_ https://gist.github.com/tokuhirom/a0b4d844d321f06d06e8
13:56 tokuhirom_ this script works with `ab -c 1 -n 1000 http://127.0.0.1:15555/` but it doesn't work with -c 10
13:56 BenGoldberg joined #perl6
13:56 tokuhirom_ ab says "The timeout specified has expired (70007).
13:57 tokuhirom_ is this script wrong?
13:58 moritz tokuhirom_: more likely it's a bug in rakudo and/or moarvm
13:58 tokuhirom_ :(
14:01 bpmedley joined #perl6
14:02 tokuhiro_ joined #perl6
14:03 RabidGravy joined #perl6
14:05 dalek doc: ae631ec | moritz++ | doc/Language/faq.pod:
14:05 dalek doc: Import FAQs from faq.perl6.org
14:05 dalek doc: review: https://github.com/perl6/doc/commit/ae631ec95a
14:07 jkva joined #perl6
14:08 moritz the other day I identified a frequently asked question that wasn't answered in the FAQ yet
14:08 moritz and now that I wanted to answer it, I forgot what it was :(
14:08 Hor|zon joined #perl6
14:08 masak moritz: do you remember under what circumstances you identified it?
14:09 FireFly joined #perl6
14:10 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?
14:10 moritz I guess excessive IRC log skimming might turn it up
14:12 s_kilk joined #perl6
14:13 FROGGS_ joined #perl6
14:14 gensym joined #perl6
14:16 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:18 dalek doc: 644d726 | moritz++ | doc/Language/faq.pod:
14:18 dalek doc: Explain type smilies
14:18 dalek doc: review: https://github.com/perl6/doc/commit/644d726563
14:18 ^elyse^ so they're officially called "type smilies" now?
14:19 moritz ^elyse^: I call them so
14:19 moritz there is no "officially"
14:19 ^elyse^ nice
14:19 FROGGS_ m: Int:Ups
14:19 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␤»
14:19 moritz https://travis-ci.org/perl6/doc/builds/85905101 # seems that panda is b0rked? :/
14:19 ^elyse^ FROGGS_: :U
14:20 moritz ^elyse^: I'm pretty sure FROGGS_++ is well aware of that, and wanted to show the wording of the error message
14:20 moritz .karma FROGGS_
14:20 moritz ENOKARMABOT :(
14:20 masak we live in a post-karma society
14:21 rindolf joined #perl6
14:21 FROGGS_ hehe
14:21 ^elyse^ :D
14:22 moritz :-)
14:22 ^elyse^ I like how the only error code with a reasonable name is ENAMETOOLONG.
14:23 ^elyse^ Others are needlessly abbreviated, such as EACCES
14:24 ^elyse^ "creat" ugh
14:27 geekosaur what you get from early unix being cross-compiled from GECOS with its ridiculous external symbol length limits
14:28 moritz lemme just say FORTRAN
14:29 moritz excuse me, I meant FORTRA
14:29 moritz after all, identifiers may only be 6 characters long
14:29 moritz (F77, that is)
14:30 moritz 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 moritz making two different identifiers point to the same variable
14:30 moritz oh, the fun
14:31 FROGGS_ :D
14:31 FROGGS_ I bet
14:31 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
14:31 FROGGS_ yes, there was a refactor in rakudo/nqp about that... and also about annotations
14:32 FROGGS_ v5's weakness always has been that it is tied to rakudo/nqp internals
14:34 moritz my naive hope was that the macro effort would give the rakudo compiler some kind of API, which v5 could use
14:35 ^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 ^elyse^ for any type
14:35 dalek roast: ad5e410 | (Stéphane Payrard)++ | S06-traits/precedence.t:
14:35 dalek roast: equiv/tighter/looser with is equiv<+> syntax
14:35 dalek roast:
14:35 dalek roast: rakudo patch forthcoming
14:35 dalek roast: review: https://github.com/perl6/roast/commit/ad5e4103bb
14:36 Ven m: sub f(::T $a, T $b) { $a + $b }; say f(5, 6);
14:36 camelia rakudo-moar 1b4715: OUTPUT«11␤»
14:36 Ven m: sub f(::T $a, T $b) { $a + $b }; say f(5, "hey");
14:36 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:39 cygx perl6 -Isrc -MPerl5 -e 'print $^O' #=> mswin32 \o/
14:39 moritz \o
14:39 moritz cygx: push, push, push!
14:39 cygx moritz: doesn't work yet - I manually added a few .list() calls to Perl6/Optimizer.nqp
14:39 BenGoldberg m: sub accum( ::T \a, T \b ) { a += b }; my $t = 3; accum( $t, $t ); say $t;
14:39 camelia rakudo-moar 1b4715: OUTPUT«6␤»
14:40 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;
14:40 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␤␤»
14:40 BenGoldberg m: sub accum( ::T \a, T \b ) { a += b }; my $t = 2/3; accum( $t, 4 ); say $t;
14:40 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␤␤»
14:41 cygx someone has to fix instantiating NQP objects from P6-land, or parts of v5 has to be translated to NQP
14:42 cygx (or at the very least, some helper functions added)
14:45 s_kilk joined #perl6
14:49 [Tux] joined #perl6
14:53 nine cygx: have you tried .list instead of nqp::list when replacing nqp::p6list?
14:56 skids joined #perl6
14:57 Ven joined #perl6
14:57 dalek doc: c270dae | moritz++ | doc/Language/faq.pod:
14:57 dalek doc: Fix a markdown-ism in FAQs
14:57 dalek doc: review: https://github.com/perl6/doc/commit/c270dae91d
14:58 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:59 cygx nine: I've tried nqp::list, [] and ().list
15:00 nine cygx: IIRC $value.list would have made sense
15:02 dalek faq: f0dd5f9 | moritz++ | / (7 files):
15:02 dalek faq: Delete contents of this repository. Point to new location
15:02 dalek faq: review: https://github.com/perl6/faq/commit/f0dd5f936e
15:02 dalek faq: 356b75a | moritz++ | /:
15:02 dalek faq: Merge branch 'master' of github.com:perl6/faq
15:02 dalek faq:
15:02 dalek faq: Conflicts:
15:02 dalek faq: answers.md
15:02 dalek faq: web/index.tmpl
15:02 dalek faq: review: https://github.com/perl6/faq/commit/356b75a11d
15:02 tokuhiro_ joined #perl6
15:03 Ven joined #perl6
15:03 moritz ugexe: the augment affects the class, not a local copy of the class
15:04 AlexDaniel joined #perl6
15:06 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:07 cygx s/done/down/
15:07 dalek perl6.org: 3508436 | moritz++ | includes/menu-nav:
15:07 dalek perl6.org: Point to new FAQ location
15:07 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/3508436cdb
15:07 ^elyse^ joined #perl6
15:07 ugexe moritz: i see, thanks
15:09 Hor|zon joined #perl6
15:10 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␤»
15:10 moritz m: { superseed class Int is OUTER::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 OUTER::Int␤»
15:10 moritz m: say CORE::Int
15:10 camelia rakudo-moar 1b4715: OUTPUT«(Int)␤»
15:10 moritz m: say CORE::<Int>
15:10 camelia rakudo-moar 1b4715: OUTPUT«(Int)␤»
15:10 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␤»
15:10 khw joined #perl6
15:10 moritz would be nice if that worked.
15:13 masak 'night, #perl6
15:13 nine Good night masak
15:17 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:␤  …»
15:18 FROGGS_ cygx: do you want push rights for v5?
15:18 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…»
15:19 cygx FROGGS_: if you think that makes it easier to coordinate, sure
15:20 cygx I don't really care where my branch lives
15:20 FROGGS_ cygx: I guess so... what's your github id?
15:20 cygx cygx, same as the nick
15:20 FROGGS_ k
15:21 FROGGS_ cygx: I've added you... don't hesitate to ask me about things
15:21 cygx I'll do that
15:21 cygx FROGGS++
15:21 FROGGS cygx++
15:21 FROGGS :o)
15:22 softmoth joined #perl6
15:23 RabidGravy I made this: http://software.gellyfish.co.uk/2015/10/learning-perl-6-from-bad-perl-5-code.html - the target audience is probably not people who are already here ;-)
15:23 cygx and pushed
15:26 nine .tell jnthn could you add some information to https://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:28 cognominal submitted a pull request https://github.com/rakudo/rakudo/pull/555   equiv/tighter/looser traits with is equiv<+> syntax  that goes with https://github.com/perl6/roast/commit/ad5e4103bbff8f595475c9610097e1b9bed4ed15
15:29 cognominal afk&
15:35 virtualsue joined #perl6
15:36 [Sno] joined #perl6
15:36 dalek rakudo/nom: b670517 | (Stéphane Payrard)++ | src/core/ (2 files):
15:36 dalek rakudo/nom: equiv/tighter/looser traits with is equiv<+> syntax
15:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b67051776e
15:36 dalek rakudo/nom: ebe21c4 | moritz++ | src/core/ (2 files):
15:36 dalek rakudo/nom: Merge pull request #555 from cognominal/nom
15:36 dalek rakudo/nom:
15:36 dalek rakudo/nom: equiv/tighter/looser traits with is equiv<+> syntax
15:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ebe21c4551
15:36 moritz cognominal++
15:42 dalek rakudo/nom: 5d8e963 | moritz++ | docs/ChangeLog:
15:42 dalek rakudo/nom: Three more changelog entries
15:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d8e9632cf
15:49 FROGGS cygx: it is possible that these 'is rw' want to be 'is raw'... but I'm not sure: https://github.com/rakudo-p5/v5/commit/f0c6157335a8fd89aeac569401fb9f2499fda4af
15:54 leont Great! «make: *** [m-spectest] Aborted (core dumped)»
15:55 cygx FROGGS: I'll add it to the list of things to look into
16:02 cognominal what is 'is raw' btw?
16:03 firstdayonthejob joined #perl6
16:04 moritz cognominal: what "is rw" used to be. "is rw" now requires a writable container.
16:04 moritz (and that's the way it has been designed for ages)
16:04 moritz m: sub f($x is rw) { $x }; f 42
16:04 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␤␤»
16:04 dalek ecosystem: 7e7d097 | (Shane Kilkelly)++ | META.list:
16:04 dalek ecosystem: Add HTTP::Router::Blind to ecosystem
16:04 dalek ecosystem:
16:04 dalek ecosystem: See https://github.com/ShaneKilkelly/perl6-http-router-blind
16:04 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7e7d097550
16:04 dalek ecosystem: e0eecb1 | RabidGravy++ | META.list:
16:04 dalek ecosystem: Merge pull request #79 from ShaneKilkelly/master
16:04 dalek ecosystem:
16:04 dalek ecosystem: Add HTTP::Router::Blind to ecosystem
16:04 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/e0eecb1187
16:07 cognominal moritz++
16:10 Hor|zon joined #perl6
16:11 rurban joined #perl6
16:11 [Sno] joined #perl6
16:16 ^elyse^ joined #perl6
16:26 rindolf joined #perl6
16:27 domidumont joined #perl6
16:30 s_kilk joined #perl6
16:31 raiph joined #perl6
16:37 Ch0c0late joined #perl6
16:53 s_kilk joined #perl6
16:56 BenGoldberg joined #perl6
16:57 BenGoldberg joined #perl6
16:57 Alina-malina joined #perl6
17:01 pfortuny joined #perl6
17:02 pfortuny Hi. whenever I try to use watch-path with a directory on OS X, I get Trace/BPT trap: 5.
17:02 pfortuny Not so with files.
17:02 pfortuny Even in my own home
17:04 tokuhiro_ joined #perl6
17:05 TimToady that's quite an odd signal to be getting, unless you're running a C-level debugger
17:06 pfortuny nope, just the last version of rakudo
17:07 TimToady sounds like something is maybe trying to execute random garbage somehow
17:07 TimToady unless there's something else that can trap like that on OS X that I don't know about
17:08 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 pfortuny I am running a script in /tmp/
17:08 pfortuny If I am (the shell) in /tmp/, the trap appears
17:08 pfortuny If I run it from elsewhere, it does not happen
17:08 pfortuny weird
17:09 TimToady well, /tmp is often a weird filesystem
17:09 pfortuny nope, nope, sorry
17:09 pfortuny but it has to do with /tmp/ anyway
17:09 pfortuny so please forget until I get a better report. In any case, my system is quite old so not to worry yet
17:10 TimToady did you say something?
17:10 softmoth joined #perl6
17:11 pfortuny not yet.
17:11 apotheon joined #perl6
17:11 TimToady :)
17:11 Hor|zon joined #perl6
17:12 pfortuny So: my $t = IO::Notification.new(); my $sup = $t.watch-path("/tmp");
17:12 pfortuny and then
17:13 pfortuny my $u = $sup.act(-> $v { 1+1; }, done => { 2+2; });
17:13 pfortuny That gives me a Trace/BPT trap: 5
17:13 pfortuny If instead of /tmp/ I give a file (say "/tmp/a"), no trap.
17:14 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;
17:14 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␤␤»
17:14 moritz m: my $sup = IO::Notification.watch-path('/tmp'); $sup.tap(&say); sleep 5;
17:14 camelia rakudo-moar 5d8e96: ( no output )
17:15 * leont is observing a weird bug where run() is losing its output every now and then :-/
17:16 leont It shows deterministically in a full harness run, but not in a small one :-/
17:17 pfortuny ugexe: no problem (just tried a 0600 root file and no problem)
17:18 pfortuny Thanks ugexe, moritz & TimToady. I shall try something more specific and a different system (have to go).
17:22 apotheon joined #perl6
17:22 leont The spectests taking so long to run doesn't exactly help :-/
17:28 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␤␤»
17:28 TimToady ^^^ that oughta work
17:31 Ulti left #perl6
17:32 s_kilk is there an easy way to do a deep-merge of two hashes in perl6 ?
17:33 TimToady what do you mean by a deep merge?
17:33 TimToady how do you wish to treat collisions?
17:35 s_kilk if there is a key collision, the second hash wins, like this: http://clojuredocs.org/clojure.core/merge
17:35 rindolf joined #perl6
17:36 apotheon joined #perl6
17:36 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␤»
17:37 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␤»
17:37 leont s_kilk: and how would you handle lists? Also replacing?
17:37 s_kilk ah, good point. lists could be difficult
17:38 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␤»
17:38 TimToady hmm
17:38 TimToady maybe we need a Hash.append
17:40 tokuhirom_ joined #perl6
17:42 zacts joined #perl6
17:43 jnthn evening, #perl6
17:43 yoleaux 15:26Z <nine> jnthn: could you add some information to https://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:45 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 jnthn .tell nine Maybe not creating fresh Scalar containers or so
17:45 yoleaux jnthn: I'll pass your message to nine.
17:49 apotheon joined #perl6
17:53 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 jnthn Here's what I came up with so far on module/precomp stuff: https://gist.github.com/jnthn/47a42b2e86e7e552b2e2
17:56 vendethiel joined #perl6
18:00 moritz jnthn++ # will have to read carefully later when all(@kids) sleep
18:02 virtualsue joined #perl6
18:04 dalek rakudo/nom: d147280 | TimToady++ | src/core/Hash.pm:
18:04 dalek rakudo/nom: add Hash.append to flatten sublists (unlike push)
18:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d147280a99
18:04 eliasr joined #perl6
18:05 virtualsue_ joined #perl6
18:10 softmoth joined #perl6
18:11 llfourn joined #perl6
18:12 Hor|zon joined #perl6
18:16 BenGoldberg m: https://gist.github.com/BenGoldberg1/47b3a982b1bdd630cbbc
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:20 TimToady moritz: re http://irclog.perlgeek.de/perl6/2015-10-17#i_11392548 it's pretty much guaranteed not to work unless you spell 'supersede' right
18:21 pink_mist supercede..?
18:21 moritz TimToady: :-)
18:22 moritz 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␤»
18:23 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␤»
18:23 moritz that's a bug (or at least LTA), right?
18:23 TimToady m: { supersede class Int is OUTERS::Int { method flurb() 42 }; say 5.flurb }; say 5.flurb;
18:23 camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol OUTERS::Int␤»
18:23 TimToady so it would seem
18:23 moritz m: class A is CORE::<Int> { }
18:23 camelia rakudo-moar 5d8e96: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE␤»
18:23 * moritz submits
18:24 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␤»
18:24 TimToady m: my %a = :a(1), :b(2); my %b = :b(3), :c(4); my %c = %a; %c.append(%b); say %c
18:24 camelia rakudo-moar d14728: OUTPUT«a => 1, b => [2 3], c => 4␤»
18:25 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␤»
18:25 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
18:25 camelia rakudo-moar d14728: OUTPUT«a => 1, b => [2 3 3 4 5], c => 4␤»
18:25 TimToady there we go
18:25 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
18:25 camelia rakudo-moar d14728: OUTPUT«a => (1 2), b => [2 3 3 4 5], c => (4 5)␤»
18:25 TimToady is it okay that a and c are just lists here?
18:26 TimToady (it only promotes to Array when it starts pushing^Wappending)
18:27 * moritz can live with that, presumably
18:27 s_kilk joined #perl6
18:27 moritz I mean, what else would it do? die?
18:28 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
18:28 camelia rakudo-moar d14728: OUTPUT«a => [1 2], b => [2 3 3 4 5], c => [4 5]␤»
18:28 vendethiel I'm still unsure of the implications of () vs [], heh...
18:28 TimToady can always do that if you want the other thing
18:28 vendethiel m: say [].push(3); say ().push(3);
18:28 camelia rakudo-moar d14728: OUTPUT«[3]␤Cannot call 'push' on an immutable 'List'␤  in block <unit> at /tmp/mVLeL47bqP:1␤␤»
18:28 vendethiel right.
18:29 s_kilk leont : the hash-merge ended up actually being pretty straight-forward: https://github.com/ShaneKilkelly/perl6-config-clever/blob/master/lib/Config/Clever.pm6#L22
18:29 TimToady I mean, surely the discontinuity of 4 vs [4,5] is even bigger
18:30 * TimToady has his head into making with topicalize at the moment, so ++someone if they beat me to writing tests for Hash.append
18:32 s_kilk What would the semantics of Hash.append be?
18:33 TimToady see above
18:33 vendethiel TimToady: I'm glad with is turning out to be implicitly "targetting" $_ :3
18:34 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]␤»
18:34 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
18:34 vendethiel TimToady: yeah, I've used it plenty! Thank you for that.
18:35 vendethiel "prompt until you got it": `Nil until $_ = %cmds{prompt "command?"}; $_();` <- is there a "better" way to write this?
18:40 TimToady I dunno, everything else is clunkier
18:40 vendethiel Ok, I'm happy enough with this one anyway :-)
18:41 dalek roast: 7848937 | moritz++ | S32-hash/push.t:
18:41 dalek roast: Sneek some Hash.append tests into S32-hash/push.t
18:41 dalek roast: review: https://github.com/perl6/roast/commit/784893761f
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.
18:41 colomon moritz++
18:41 vendethiel .oO( sneek peek )
18:41 vendethiel moritz++
18:42 * moritz can't spel today
18:42 moritz or, more likely, I never can
18:42 vendethiel BenGoldberg: oh, sure, but I'd just need to replace "Nil" ;-)
18:42 moritz TimToady: do we need Hash.{unshift,prepend} ?
18:42 vendethiel moritz: wouldn't that imply ordering?
18:43 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
18:44 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
18:45 TimToady moritz: that depends on what you mean by "need"; I'm guessing if we implemented them, nobody would ever use them
18:46 softmoth joined #perl6
18:47 moritz TimToady: then I guess we shouldn't do that :-)
18:48 TimToady we might be able to turn it into some kind of HOP thingie though
18:48 TimToady Hash.mesh(:with<&prepend>) or so
18:50 TimToady unfortunately there's also the slip or not dimension that cuts across
18:51 moritz only if you assume you want some list-y magic
18:51 moritz maybe we just want something &reduce-like that reduces only values with the same keys from both sides
18:52 moritz %(a => 5, b =>2).reduce(&[+], %( b => 1)) would produce %( a=> 5, b => 3)
18:52 moritz or maybe s/reduce/mesh/
18:53 jnthn wrt supersede, I think it wants a good NYI message; I don't see us making it work pre-6.christmas
18:55 BenGoldberg Alternatively, we could have a :modifyer to determine what to do.
18:57 FROGGS m: $_ = "a"; say s/a/b/
18:57 camelia rakudo-moar d14728: OUTPUT«「a」␤»
18:57 * vendethiel somewhat likes append, for sure, but is afraid too many Array methods would make it onto Hash
18:57 FROGGS I'd like it to return the replacement...
18:57 BenGoldberg %a.insert(%b, :whensame( -> $a, $b { $a } ) )
18:57 TimToady m: $_ = "a"; say S/a/b/
18:57 camelia rakudo-moar d14728: OUTPUT«b␤»
18:58 TimToady FROGGS: you mean like that? ^^
18:58 FROGGS aye
18:58 BenGoldberg p56: 'abc' =~ s/b/c/r;
18:58 camelia p5-to-p6 : OUTPUT«'abc' ~~ s:P5:r!b!c!␤»
18:58 FROGGS but so that $_ ~~ s/a/b/ still returns the match
18:59 * 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?
18:59 camelia rakudo-moar d14728: OUTPUT«zbc␤abc␤»
19:00 vendethiel ugh, always, I'm late
19:00 BenGoldberg m: say 'abc' ~~ s:P5:r!b!c!
19:00 camelia rakudo-moar d14728: OUTPUT«Parameter '$self' expected a writable container, but got Str value␤  in block <unit> at /tmp/tAGY4hIAH8:1␤␤»
19:00 BenGoldberg m: say('abc' ~~ s:P5:r!b!c)!
19:00 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>␤»
19:00 BenGoldberg m: say('abc' ~~ s:P5:r!b!c!)
19:00 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 #perl6
19:00 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
19:01 TimToady ~~ is not just a topicalizer
19:02 FROGGS my local patch pushes $/ as the result to s/a/b/ in make_smartmatch
19:02 FROGGS so, that works
19:02 FROGGS_ though, I can leave it the way it is... just thought it could be useful
19:03 * FROGGS re-spectests
19:05 tokuhiro_ joined #perl6
19:06 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␤»
19:09 TimToady a list of matches also counts as success
19:09 yqt joined #perl6
19:09 FROGGS TimToady: yes, but that one is bogus: https://github.com/rakudo/rakudo/blob/nom/src/core/Str.pm#L505-L509
19:10 vendethiel joined #perl6
19:11 TimToady yup
19:13 Hor|zon joined #perl6
19:19 vendethiel joined #perl6
19:19 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:45 s_kilk joined #perl6
19:46 ramiros joined #perl6
19:47 ramiros what i can use instead  of perl5's functions hex and oct ?
19:49 geekosaur m: say :16("a")
19:49 camelia rakudo-moar d14728: OUTPUT«10␤»
19:50 vendethiel joined #perl6
19:50 FROGGS m: say :8("0777")
19:50 camelia rakudo-moar d14728: OUTPUT«511␤»
19:50 FROGGS m: say 0o777
19:50 camelia rakudo-moar d14728: OUTPUT«511␤»
19:50 FROGGS m: say 0xDEADBEEF
19:50 camelia rakudo-moar d14728: OUTPUT«3735928559␤»
19:53 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:54 FROGGS :D
19:55 pmurias joined #perl6
19:57 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:58 pmurias masak: with the culture destroyed I might as well use haskell or something similiar
19:59 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>;
19:59 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␤»
19:59 FROGGS awwaiid++
19:59 FROGGS ramiros: use parenthesis
19:59 FROGGS m: my $s=0o200; say :8($s);
19:59 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␤␤»
20:00 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⏏8>' (indicated by 7⏏)␤  in block <unit> at /tmp/4J5V7lXx_d:1␤␤Actually thrown at:␤  in block <unit> at /tmp/4J5V7lXx_d:1␤␤»
20:00 FROGGS err
20:00 FROGGS ramiros: :8(...) wants to have a string, not a number
20:00 geekosaur m: my $s = 0o200; sy :8($s)
20:00 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'?␤␤»
20:01 geekosaur whoops
20:01 geekosaur and oh, you did that. sounds buggy?
20:01 geekosaur m: my $s = 0o200; say $s; :8($s)
20:01 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␤␤»
20:01 geekosaur er
20:01 geekosaur ah, right
20:01 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 geekosaur m: my $s = '0o200'; say :8($s)
20:01 camelia rakudo-moar d14728: OUTPUT«128␤»
20:01 geekosaur derp
20:01 FROGGS correct
20:02 FROGGS m: my $s = '0o200'; say val($s)
20:02 camelia rakudo-moar d14728: OUTPUT«0o200␤»
20:02 FROGGS m: my $s = '0o200'; say +val($s)
20:02 camelia rakudo-moar d14728: OUTPUT«128␤»
20:02 FROGGS nice
20:02 ramiros froggs, thanks
20:04 FROGGS pleasure
20:07 raiph joined #perl6
20:08 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
20:08 camelia rakudo-moar d14728: OUTPUT«[$_] VS $=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish @?INC $/ $?PACKAGE␤»
20:08 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:11 FROGGS jnthn: have fun!
20:11 timotimo awwaiid: because { } gives you a lexical scope
20:11 yoleaux 13:40Z <nine> timotimo: it is done. We now have a p6for desugar op. Hope it helps you :)
20:11 FROGGS (both of you :P)
20:11 awwaiid ah!
20:11 jnthn FROGGS: Thanks! :)
20:12 timotimo jnthn: have an exceptionally pleasant week, you two!
20:13 jnthn timotimo: We fully intend to. And the weather forecast looks cooperative. :-)
20:13 vendethiel jnthn: have tons of fun!
20:14 timotimo yeah, the weather forecast better be cooperative
20:14 timotimo or i'll head to the forecaster's office and tell them to get better!
20:14 jnthn vendethiel: Thanks :)
20:14 Hor|zon joined #perl6
20:14 diana_olhovik joined #perl6
20:15 jnthn OK, going to pack, and rest well before the little flight. Bye! o/
20:15 FROGGS bye o/
20:16 adhoc joined #perl6
20:17 awesomess3 joined #perl6
20:17 awesomess3 if perl 6 doesn't have a good GUI library, I'm gonna be sadz ;-;
20:18 * FROGGS hugs awesomess3
20:18 vendethiel awesomess3: would gtk work?
20:18 timotimo so far we have only a bit of GTK3 and Qt via Inline::Python
20:32 margeas joined #perl6
20:38 ifim joined #perl6
20:44 llfourn joined #perl6
20:46 pink_mist timotimo: heh, it's not even via perl5? :P
20:46 timotimo you can use stuff via perl5, too
20:46 timotimo but i'm not a perl5 person
20:49 dalek rakudo/nom: fe31c4b | (Stéphane Payrard)++ | src/core/operators.pm:
20:49 dalek rakudo/nom: fix to support things like is equiv('>+<')
20:49 dalek rakudo/nom: No brainer escape that test to trigger the problem
20:49 dalek rakudo/nom: run into a LTM parsing problem.
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe31c4b795
20:49 dalek rakudo/nom: d8d6abd | lizmat++ | src/core/operators.pm:
20:49 dalek rakudo/nom: Merge pull request #556 from cognominal/nom
20:49 dalek rakudo/nom:
20:49 dalek rakudo/nom: fix to support things like is equiv('>+<')
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d8d6abdc39
20:59 kaare_ joined #perl6
21:07 tokuhiro_ joined #perl6
21:13 lichtkind joined #perl6
21:13 lichtkind greetings from the second ring of hell
21:15 Hor|zon joined #perl6
21:15 lichtkind ah new horizon perfect
21:17 lizmat .botsnack
21:17 yoleaux :D
21:17 synbot6 om nom nom
21:18 lichtkind lizmat: hugs
21:18 lizmat lichtkind o/
21:18 * lizmat is too tired to make any sense, so gets some shuteye and tries again tomorrow
21:19 lichtkind lizmat swet dreams
21:19 lichtkind i have to stay wake finish perl article
21:19 lichtkind spread the word
21:21 ^elyse^ joined #perl6
21:30 vendethiel joined #perl6
21:41 tokuhirom_ joined #perl6
21:45 TEttinger joined #perl6
21:47 ^elyse^ joined #perl6
21:47 rurban joined #perl6
22:05 FireFly joined #perl6
22:06 telex joined #perl6
22:16 Hor|zon joined #perl6
22:26 FireFly joined #perl6
22:47 llfourn joined #perl6
22:48 iH2O joined #perl6
22:52 FireFly joined #perl6
22:58 kjs_ joined #perl6
23:02 RabidGravy Boom!
23:03 konobi =0P
23:08 tokuhiro_ joined #perl6
23:09 Ven_ joined #perl6
23:09 [Coke] dd
23:12 tokuhirom_ joined #perl6
23:13 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:17 Hor|zon joined #perl6
23:29 RabidGravy konobi, I think pmurias is the expert on that part but not here now
23:30 konobi yup
23:45 RabidGravy right, bed time
23:56 sftp joined #perl6

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

Perl 6 | Reference Documentation | Rakudo