Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-09

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:02 AlexDaniel joined #perl6
00:04 virtualsue joined #perl6
00:05 wamba joined #perl6
00:07 firstdayonthejob joined #perl6
00:10 apiw joined #perl6
00:13 Fleurety joined #perl6
00:18 Actualeyes joined #perl6
00:21 addison joined #perl6
00:28 squach1 joined #perl6
00:55 BenGoldberg joined #perl6
00:55 MadcapJake joined #perl6
00:55 Guest27967 left #perl6
01:00 MadcapJake joined #perl6
01:00 MadcapJake left #perl6
01:01 raiph joined #perl6
01:06 cmh-fn joined #perl6
01:07 MadcapJake joined #perl6
01:09 kid51 joined #perl6
01:10 apiw joined #perl6
01:12 apiw joined #perl6
01:36 Actualeyes left #perl6
01:40 BenGoldberg joined #perl6
01:45 kurahaupo joined #perl6
01:45 apiw joined #perl6
01:48 kurahaupo_ joined #perl6
01:57 Ben_Goldberg joined #perl6
01:58 dalek doc: cf44bb7 | raiph++ | doc/Language/performance.pod:
01:58 dalek doc: More tweaking
01:58 dalek doc:
01:58 dalek doc: Examples of using native types still missing.
01:58 dalek doc: review: https://github.com/perl6/doc/commit/cf44bb7f51
02:04 AlexDaniel j: say $*PERL.compiler
02:04 camelia rakudo-jvm f99bdb: OUTPUT«rakudo (2015.10.134.g.273.e.895)␤»
02:04 AlexDaniel can we get that updated?
02:05 _PiL_ joined #perl6
02:11 protium joined #perl6
02:24 jolts joined #perl6
02:25 AlexDaniel When I run tests locally how can I skip fudged tests? Right now I'm getting lots of failures which pollutes the output.
02:28 noganex joined #perl6
02:32 yqfvwal joined #perl6
02:36 ugexe i dont think it actually works yet
02:36 ugexe it just builds
02:36 partly_ joined #perl6
02:36 AlexDaniel ah, it seems like I have to use 「fudge」 script
02:38 klapperl joined #perl6
02:41 mr-foobar joined #perl6
02:48 MadcapJake is there anything like ruby's freeze? As in, can I modify a hash, then after completed, "freeze" it preventing further modification
02:50 masak MadcapJake: pour it into a Map, maybe?
02:52 MadcapJake Cool, thanks!
02:56 bpmedley joined #perl6
02:56 gfldex m: my %h; my $m = %h.Map;
02:56 camelia rakudo-moar d68c30: OUTPUT«Method 'Map' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/ZTAi7l5yR1 line 1␤␤»
02:58 gfldex m: my @a; my $l = @a.List;
02:58 camelia rakudo-moar d68c30: ( no output )
02:59 dalek doc: be235bf | raiph++ | doc/Language/performance.pod:
02:59 dalek doc: Yet more tweaks
02:59 dalek doc: review: https://github.com/perl6/doc/commit/be235bf1c9
03:00 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(|%h); m<e> = 5;
03:00 camelia rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at /tmp/UvS1rDTdHe line 1␤␤»
03:01 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(|%h); say m;
03:01 camelia rakudo-moar d68c30: OUTPUT«Map.new(())␤»
03:01 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); say m;
03:01 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3),:d(4)))␤»
03:02 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<e> = 5;
03:02 camelia rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at /tmp/Ra0T4m6QRU line 1␤␤»
03:02 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a> = 'foo';
03:02 camelia rakudo-moar d68c30: ( no output )
03:02 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a> = 'foo'; say m;
03:02 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a("foo"),:b(2),:c(3),:d(4)))␤»
03:02 MadcapJake dang you can still modify it
03:04 raiph .tell jnthn with apologies for .tell'ing you but just an fyi, for anyone reading this, 2 days, no comments/answer for http://stackoverflow.com/questions/35246529/nativecall-struct-which-contains-pointer (I don't feel equipped to answer it)
03:04 yoleaux raiph: I'll pass your message to jnthn.
03:04 jeek joined #perl6
03:05 MadcapJake masak, are a Map's pairs supposed to be immutable too?
03:08 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a>.WHAT.say;
03:08 camelia rakudo-moar d68c30: OUTPUT«(Int)␤»
03:08 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m[0].WHAT.say;
03:08 camelia rakudo-moar d68c30: OUTPUT«(Map)␤»
03:09 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m[1].WHAT.say;
03:09 camelia rakudo-moar d68c30: OUTPUT«(Failure)␤»
03:09 MadcapJake m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m.perl.say;
03:09 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3),:d(4)))␤»
03:11 MadcapJake why are the pairs surrounded by parentheses?
03:12 mr-foobar joined #perl6
03:12 noganex_ joined #perl6
03:12 gfldex MadcapJake: without forcing a list, the named arguments would be considered as being unspecified in the method that is new.
03:13 gfldex m: role FinalHash { multi method ASSIGN-KEY(Hash:D: Str:D \key, Mu \assignval) is raw { die 'boohoo' }; multi method BIND-KEY(Hash:D: Str:D \key, Mu \assignval) is raw { die 'boohoo' }; multi method ASSIGN-KEY(Hash:D: \key, Mu \assignval) is raw { die 'boohoo' } }; my %h = a => 1; %h but FinalHash; dd %h; %h<b> = 2; dd %h;
03:13 camelia rakudo-moar d68c30: OUTPUT«Hash %h = {:a(1)}␤Hash %h = {:a(1), :b(2)}␤»
03:13 gfldex i'm confused that this doesn
03:13 gfldex 't work
03:14 AlexDaniel star: 2 ** 4553535345364535345634543534
03:14 camelia star-m 2015.09: OUTPUT«WARNINGS:␤Useless use of "**" in expression "2 ** 4553535345364535345634543534" in sink context (line 1)␤»
03:14 AlexDaniel star: say 2 ** 4553535345364535345634543534
03:14 camelia star-m 2015.09: OUTPUT«0␤»
03:14 AlexDaniel ah, okay
03:14 AlexDaniel j: 2 ** 4553535345364535345634543534
03:14 camelia rakudo-jvm f99bdb: OUTPUT«WARNINGS:␤Useless use of "**" in expression "2 ** 4553535345364535345634543534" in sink context (line 1)␤»
03:14 AlexDaniel j: say 2 ** 4553535345364535345634543534
03:14 camelia rakudo-jvm f99bdb: OUTPUT«Inf␤»
03:20 Sqirrel joined #perl6
03:20 gfldex MadcapJake: thanks for spotting another hole in the docs that I shall plug after waking up
03:21 dalek roast: f163812 | (Dan Kogai)++ | S32-num/power.t:
03:21 dalek roast: introduce X::Numeric::Overflow
03:21 dalek roast: review: https://github.com/perl6/roast/commit/f163812abf
03:21 dalek roast: ccff90d | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t:
03:21 dalek roast: Merge pull request #96 from dankogai/master
03:21 dalek roast:
03:21 dalek roast: introduce X::Numeric::Overflow
03:21 dalek roast: review: https://github.com/perl6/roast/commit/ccff90d3c7
03:24 TimToady joined #perl6
03:25 vendethiel joined #perl6
03:39 BenGoldberg j: say exp(4553535345364535345634543534)
03:39 camelia rakudo-jvm f99bdb: OUTPUT«Inf␤»
03:39 BenGoldberg star: say exp(4553535345364535345634543534)
03:39 camelia star-m 2015.09: OUTPUT«Inf␤»
03:41 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := %h.map; %m.say;
03:41 camelia rakudo-moar d68c30: OUTPUT«Cannot call map(Hash: ); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at /tmp/mcDIMeYI0a line 1␤␤»
03:42 psy_ joined #perl6
03:43 dalek roast: 2da35ad | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t:
03:43 dalek roast: Fudge/unfudge tests according to ccff90d
03:43 dalek roast:
03:43 dalek roast: JVM behavior of returning Inf is no longer considered correct.
03:43 dalek roast: review: https://github.com/perl6/roast/commit/2da35adfe0
03:49 Actualeyes joined #perl6
03:51 dalek doc: 111695e | raiph++ | doc/Language/performance.pod:
03:51 dalek doc: Last tweaks?
03:51 dalek doc:
03:51 dalek doc: Sorry about tweak stream raiph--
03:51 dalek doc: review: https://github.com/perl6/doc/commit/111695eed2
03:51 BenGoldberg m: my %p := :foo<bar>; %p.say;
03:51 camelia rakudo-moar d68c30: OUTPUT«foo => bar␤»
03:51 BenGoldberg m: my %p := :foo<bar>; %p<foo>.say;
03:51 camelia rakudo-moar d68c30: OUTPUT«bar␤»
03:51 BenGoldberg m: my %p := :foo<bar>; %p<other>.say;
03:51 camelia rakudo-moar d68c30: OUTPUT«(Mu)␤»
03:52 BenGoldberg m: my %p := :foo<bar>; %p<other> = 'baz'; %p.say;
03:52 camelia rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Mu␤  in block <unit> at /tmp/m2_qVtruBd line 1␤␤»
03:53 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := %h.Map.clone; %m.say;
03:53 camelia rakudo-moar d68c30: OUTPUT«Method 'Map' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/ZA1PWgUVAZ line 1␤␤»
03:53 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say;
03:53 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))␤»
03:58 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say; my %i := %m<a> :p; %i.say; ++$i.value; %i.say; (%h<a>:p).say;
03:58 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nyZWbrXIGh␤Variable '$i' is not declared. Did you mean '%i'?␤at /tmp/nyZWbrXIGh:1␤------> 3e; %m.say; my %i := %m<a> :p; %i.say; ++7⏏5$i.value; %i.say; (%h<a>:p).say;␤»
03:58 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say; my %i := %m<a> :p; %i.say; ++%i.value; %i.say; (%h<a>:p).say;
03:58 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))␤a => 1␤a => 2␤a => 2␤»
04:00 BenGoldberg m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(map *.clone, %h); %m.say; my %i := %m<a> :p; %i.say; ++%i.value; %i.say; (%h<a>:p).say;
04:00 camelia rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))␤a => 1␤a => 2␤a => 1␤»
04:05 Herby_ joined #perl6
04:05 Herby_ Evening, everyone!
04:05 Herby_ \o
04:11 BenGoldberg Good evening.
04:13 BenGoldberg m: 2⁴⁵⁵³⁵³⁵³⁴⁵³⁶⁴⁵³⁵³⁴⁵;
04:13 camelia rakudo-moar d68c30: OUTPUT«Numeric overflow␤  in block <unit> at /tmp/_NohIc1Wxq line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/_NohIc1Wxq line 1␤␤»
04:34 adu joined #perl6
04:50 AlexDaniel m: for "A\nB\nC\nD".lines() -> $x, $y { say "$x, then $y" }
04:50 camelia rakudo-moar d68c30: OUTPUT«A, then B␤C, then D␤»
04:59 revhippie left #perl6
05:07 kaare_ joined #perl6
05:32 jeek joined #perl6
05:39 vendethiel joined #perl6
05:46 hankache joined #perl6
05:47 hankache hello
05:50 Cabanossi joined #perl6
05:55 psy_ joined #perl6
05:57 lokien_ joined #perl6
05:57 nakiro joined #perl6
05:58 psy_ joined #perl6
06:15 hankache where are the modules installed? is there a dynamic variable to get hold of the repo?
06:16 jdv79 $*REPO is the head of the list i think
06:17 jdv79 oh, just a guess
06:17 jdv79 m: say $*REPO.repo-chain
06:17 hankache m: say $*REPO
06:17 camelia rakudo-moar d68c30: OUTPUT«(inst#/home/camelia/.perl6/2015.12-307-gd68c304 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => Com…»
06:17 camelia rakudo-moar d68c30: OUTPUT«inst#/home/camelia/.perl6/2015.12-307-gd68c304␤»
06:19 hankache jdv79 thanks
06:23 xiaomiao joined #perl6
06:40 kmel joined #perl6
06:48 hankache joined #perl6
06:48 hankache rakudobrew build moar-2016.01.1 what am i missing?
06:49 hankache oh no hyphen. it should be rakudobrew build moar 2016.01.1
07:12 MadcapJake how would you do the pattern where you have a base class that has a default (overridable) `new` method that creates an instance of "Base::Default"
07:13 MadcapJake either my Base class can't find the Base::Default or my Base::Default can't find the Base it's inheriting from
07:13 MadcapJake (depending on which comes first in a file)
07:23 vendethiel joined #perl6
07:29 FROGGS joined #perl6
07:37 firstdayonthejob joined #perl6
07:39 MadcapJake What does "cannot invoke code type object" mean? why can't it?
07:40 virtualsue joined #perl6
07:40 nine Because it's undefined?
07:43 nine m: my Code $c; $c();
07:43 camelia rakudo-moar d68c30: OUTPUT«Can not invoke a code type object␤  in block <unit> at /tmp/I7QbsaX2fZ line 1␤␤»
07:44 CIAvash joined #perl6
07:45 MadcapJake ok, thanks for the lead, was really stumped :P
07:50 vendethiel joined #perl6
07:56 apiw joined #perl6
07:58 MadcapJake what reason would there be for an exception to not print the message method's result?
07:59 MadcapJake I get this «exception produced no message»
08:02 FROGGS MadcapJake: maybe it failed to construct the text that is generated by .message()?
08:03 FROGGS like, if an attribute of the exception cannot be stringified
08:05 fireartist joined #perl6
08:07 MadcapJake FROGGS, thanks! That was it!
08:11 domidumont joined #perl6
08:11 darutoko joined #perl6
08:16 Laurent_R joined #perl6
08:17 domidumont joined #perl6
08:25 zakharyas joined #perl6
08:27 apiw joined #perl6
08:31 uruwi_ joined #perl6
08:32 lokien_ joined #perl6
08:33 pdcawley joined #perl6
08:34 ely-se joined #perl6
08:51 MadcapJake Working on a port of Github's new Scientist Ruby library into Perl 6. Most of the legwork is done, still not working though (many bugs). after the bugs, I'll try to perl6ify the interface a bit https://github.com/MadcapJake/Test-Lab
08:53 Actualeyes left #perl6
08:55 RabidGravy joined #perl6
08:56 dakkar_ joined #perl6
08:56 eyck joined #perl6
08:57 keithbro joined #perl6
08:58 Zero_Dogg joined #perl6
08:58 Zero_Dogg joined #perl6
09:01 satisfaction joined #perl6
09:09 dalek doc: 4eaf3e7 | Nat++ | doc/Language/regexes.pod:
09:09 dalek doc: Fix example grammar to allow leading spaces so that it parses the example text
09:09 dalek doc: review: https://github.com/perl6/doc/commit/4eaf3e700a
09:09 dalek doc: 7460b29 | sylvarant++ | doc/Language/regexes.pod:
09:09 dalek doc: Merge pull request #386 from tenatus/master
09:09 dalek doc:
09:09 dalek doc: Fix example grammar to allow leading spaces so that it parses the exa…
09:09 dalek doc: review: https://github.com/perl6/doc/commit/7460b297fa
09:12 dpk joined #perl6
09:16 CurtisOvidPoe joined #perl6
09:19 moritz \o
09:19 moritz everybody, if you see the same person repeatedly opening pull requests on perl6/* repos, please let me know so I can give them direct commit access
09:20 moritz I try to follow them myself, but I get several hundred notifications from github per day and can't keep up anymore
09:26 CurtisOvidPoe I have some very simple code, using Rats, which throws the exception "Type check failed in assignment to $w; expected Rat but got Num" https://gist.github.com/Ovid/74ffc49d1b8450036e80
09:28 CurtisOvidPoe Background: it models a funtion that *should* coverge on 6, but every known floating point implementation causes it to converge on 6, and then go crazy and converge on 100. Perl 6 Real numbers exhibit this behavior, so I was hoping Rats would do the right thing, but they don’t. Advice?
09:29 lizmat confirmed here
09:29 lizmat fwiw, it doesn't appear to be spesh or jit related
09:29 lizmat and the error really happens in line 7
09:30 lizmat (so not something inside of the setting)
09:32 partly_ i stumbled over some code which access PIO::PF_INET6(), but I can not find any documentation on PIO
09:32 lizmat CurtisOvidPoe: it looks like it is running out ouf Rat precision:
09:33 lizmat Int $n = 26
09:33 lizmat Rat $v = <21024692798570322907/3494181358965822047>
09:33 lizmat *of
09:33 CurtisOvidPoe lizmat: that makes sense. It’s a weird case, but given that it’s an example of showing how pathologically wrong floating point math can be, I was hoping it would just work. I need to switch to FatRats?
09:36 lizmat that appears to have its issues as well: Type check failed in assignment to $u; expected FatRat but got Rat
09:37 lizmat my FatRat ($u,$v) =  (FatRat(2.0), FatRat(-4.0));    # converges on 6, Perl 6 FTW !
09:38 CurtisOvidPoe lizmat (and anyone else curious): https://perso.ens-lyon.fr/jean-michel.muller/chapitre1.pdf is chock full o’ examples of floating point math going disastrously wrong, with code written in C. Would be nice to make all of them work.
09:38 lizmat I'll make sure it gets mentioned in the next P6W
09:39 CurtisOvidPoe lizmat: cool. I think we’re so close, in many ways, to making these things work nicely.
09:40 CurtisOvidPoe Any reason why Rats can’t be auto-promoted to FatRats on demand?
09:40 lizmat m: my FatRat $a = 2.0   # too bad this fails
09:40 camelia rakudo-moar d68c30: OUTPUT«Type check failed in assignment to $a; expected FatRat but got Rat␤  in block <unit> at /tmp/z8rFJ2i4Io line 1␤␤»
09:40 uruwi joined #perl6
09:43 FROGGS lizmat++
09:43 lizmat CurtisOvidPoe: not sure why they're promoted to floats
09:44 lizmat perhaps someone with more history in the Perl 6 project can tell
09:45 moritz m: my FatRat() $a = 2.0;
09:45 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zyxNGxsOmo␤Coercion FatRat(Any) is insufficiently type-like to qualify a variable␤at /tmp/zyxNGxsOmo:1␤------> 3my FatRat() $a7⏏5 = 2.0;␤    expecting any of:␤        constraint␤»
09:45 moritz CurtisOvidPoe: basically, that's what coercion types are for, and they aren't pervasively enough implemented (yet?)
09:49 apiw joined #perl6
09:50 moritz note that we don't auto-promote other numerical types either
09:50 moritz m: my Num $x = 1;
09:50 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/trm_NwZRdR␤Cannot assign a literal of type Int (1) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 1.Num or Num(1), or just write the value as 1e0…»
09:56 lizmat moritz: put going from Rat to FatRat is not really promoting?   doesn't feel like it to me
09:58 masak <lizmat> perhaps someone with more history in the Perl 6 project can tell
09:58 masak yes.
09:58 dalek nqp: 6ec14a5 | lizmat++ | tools/build/MOAR_REVISION:
09:58 dalek nqp: Bump MOAR_REVISION
09:58 dalek nqp: review: https://github.com/perl6/nqp/commit/6ec14a514b
09:58 leont joined #perl6
09:59 masak this is trying to learn from the mistakes of ABC/Python, where rational precision was kept at all costs, causing programs to fail by being unreasonably slow or running out of memory.
09:59 sjoshi joined #perl6
09:59 masak I agree that there should be an easy way to opt back into keeping all of that nice precision. not sure the opt-in needs to be more fancy than just using FatRat in the first place.
10:00 masak CurtisOvidPoe, lizmat: ^
10:00 lizmat my FatRat $a = 2.0   # masak: should that work?
10:01 moritz lizmat: from a type model point of view, there's no direct relation between Rat and FatRat that could make autopromotion work
10:01 moritz that is, FatRat doesn't inherit from Rat
10:01 CurtisOvidPoe It would be nice if we could use FatRat as a standard type, even if we don’t auto-promote Rat to FatRat. It would also be nice if we had an “auto-promote” pragma to make things easier in this problem space.
10:03 moritz what do you mean by "use FatRat as a standard type"?
10:03 moritz have a literal syntax for it?
10:03 * FROGGS .oO( 2F0 )
10:03 * FROGGS .oO( or 2R0 ? )
10:03 masak lizmat: Perl 6's type system is nominal, not structural. which means you can't fit a FatRat value into a Rat variable, even when it's evident to you by inspection that it'd work.
10:04 moritz masak: fwiw lizmat and CurtisOvidPoe are talking about the other direction: fitting a Rat value into a FatRat variable (though you point still stands)
10:04 jnthn A structural type system wouldn't do it either, no? Because the structure of a FatRat is two bigints, not a bigint and a 64-bit int.
10:05 masak lizmat: taking a longer perspective, your question is yet another instance of a long-running discussion in Perl 6-land: do we have enough coercion by default in Perl 6's numeric types?
10:05 masak jnthn: I was talking about the more general phenomenon of "the shape is enough, don't worry about names and inheritance"
10:06 moritz well, my proposed solution would be to make explicit coercion types work on variables as well
10:06 masak moritz: oh, I meant it in that direction. sorry 'bout le confusion.
10:06 moritz and then we can tell people "if you want coercion to FatRat, declare it as  my FatRat() $r and all is as you want"
10:06 masak moritz: agreed. though that doesn't seem to be enough for a contingency, spearheaded by CurtisOvidPoe.
10:07 masak at least last time I checked in on this discussion.
10:07 jnthn Short of coercion types, where you ask for coercy semantics, I don't see us breaking the "types are constraints" general rule.
10:08 lizmat jnthn: you're suggesting something like an AnyRat ?
10:08 jnthn lizmat: No
10:08 timotimo yo
10:08 jnthn I'm suggesting that my Rat() $foo = ... (that is, you explicitly ask for coercion)
10:08 jnthn Otherwise it's a constraint.
10:09 jnthn As today
10:09 lizmat my FatRat(Rat) $foo = 2.0
10:09 jnthn That'd do it, yes
10:09 lizmat BTW, is yoleaux awol ?
10:11 jnthn I see the problem as this: people want DWIM, but people also want to put types into their programs to check various expectations are met, but the more DWIM you stick into a type system the harder it is to trust what it's checking.
10:13 jnthn Not to mention that it'd make it harder for Perl 6 compilers to reason about, hurting our ability to do static analysis, and similar for VMs, which derive a good amount of performance from understanding what types have showed up.
10:14 jnthn Case in point: when it was decided that we should make Failure allowed to slip through return type constraints, the initial implementation broke inlining of nearly everything, and it still costs us to this day.
10:15 ecocode joined #perl6
10:15 rindolf joined #perl6
10:16 wamba joined #perl6
10:16 * moritz isn't too happy with that
10:18 masak me either, but it's apparently a done thing in type theory too :/
10:19 masak cf ⊥
10:19 moritz you mean by having a bottom type?
10:19 CurtisOvidPoe FWIW: though I sometimes want different behavior from what I experience in Perl 6, I’m also (generally) not beating a drum about it. jnthn’s points are well taken.
10:19 jnthn "Bottom type" and all that...
10:19 masak aye
10:19 dalek rakudo/nom: 470be03 | lizmat++ | tools/build/NQP_REVISION:
10:19 dalek rakudo/nom: Bump NQP_REVISION
10:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/470be03319
10:19 moritz but the bottom type type-checks against all types
10:19 moritz Nil/Failure do not
10:19 CurtisOvidPoe Though I still want “my Rat $foo = 3;” to work ;)
10:19 jnthn CurtisOvidPoe: Is it specifically the literals case that bothers you?
10:19 moritz CurtisOvidPoe: I don't think you'll be successful with that
10:19 lizmat jnthn: rakudo is now on MoarVM HEAd
10:19 jnthn CurtisOvidPoe: What if it was my Rat $foo = sub-that-returns-int() ?
10:20 jnthn lizmat: Cool, Inline::Perl5 built fine for you with HEAD?
10:20 lizmat yup and tested ok
10:20 CurtisOvidPoe For me, it’s the literal case, yes. Though I see your point about return types and the confusion that could cause.
10:20 lizmat there's only one spectest fail now in: t/spec/S32-num/power.t
10:20 lizmat but it feels related to recent roast changes
10:22 jnthn CurtisOvidPoe: The WAT from trying to be special about literals is that people trying stuff out with a literal value can get a surprise when they replace it with some computation that produces such a value. That is, we'd break "you can think of computations as reducing to values".
10:22 masak I think people's intuitions are led wrong because they expect "integers embed into rationals" etc from math to translate into subtyping relationships in Perl 6
10:23 masak m: say Real ~~ Complex
10:23 camelia rakudo-moar d68c30: OUTPUT«False␤»
10:23 masak but the subtyping relationships in Perl 6 for the numeric types express something other than that.
10:24 CurtisOvidPoe Fair enough. I’ll crawl back into my hole now :)
10:24 geekosaur this stuff is why numeric literals in Haskell are polymorphic --- which leads to people becoming confused when they replace the literal with a function, yeh
10:24 apiw joined #perl6
10:24 timotimo CurtisOvidPoe: did you see the helpful error message you get when you have a literal of the wrong kind?
10:24 geekosaur there aren't any good solutions; once again every DWIM comes with a WAT, and all of them suck one way or another
10:24 * jnthn suspects there's no perfect answers here, you just pick your trade-offs
10:25 CurtisOvidPoe What does “WAT” stand for?
10:25 masak I have a great deal of sympathy for the DWIM contingency, even though I switched allegience years ago
10:26 masak CurtisOvidPoe: it's not an acronym
10:26 masak CurtisOvidPoe: only an interjection, like a panicked "WHAT!?"
10:26 jnthn CurtisOvidPoe: https://www.destroyallsoftware.com/talks/wat is the origin
10:26 geekosaur reference to an Internet meme where someone was so startled by a ridiculous assertion they misspelled "what?!"
10:26 CurtisOvidPoe Thanks.
10:26 jnthn Or afaict, the origin in programming language circles.
10:26 geekosaur it was around before that, was making the rounds on tumblr etc.
10:27 jnthn Basically an amusing lightning talk on well-intentioned language features causing surprises :)
10:27 jnthn geekosaur: ah, OK :)
10:27 Roamer`_ hm, am I doing something wrong?  http://www.nntp.perl.org/group/perl.perl6.language/2016/02/msg36587.html says that we should "use 6.c" instead of "use v6.c", but my Rakudo doesn't seem to understand that; 2016.01.1 and moar-nom both say "Undeclared routine: use"
10:27 geekosaur sounds like you're missing a semicolon somewhere before that maybe
10:28 Roamer`_ geekosaur, perl6 -e 'use 6.c' complains about it
10:28 jnthn m: use 6.c;
10:28 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WDwZdcBv2F␤Undeclared routine:␤    use used at line 1␤␤»
10:28 jnthn m: use v6.c;
10:28 camelia rakudo-moar d68c30: ( no output )
10:28 geekosaur hrrr
10:28 jnthn You need the v there, no? :)
10:28 Roamer` jnthn, that's what I thought, but somebody said I didn't, so I tried...
10:28 moritz Roamer`: don't believe everything yary writes :-)
10:28 geekosaur oh
10:29 geekosaur yary confusing use with META6.json?
10:29 lizmat afk for a few hours&
10:29 moritz though it's a bit sad we can't use the same syntax in both
10:30 peteretep Does pmurias hang out here?
10:30 moritz peteretep: often, but not always
10:30 peteretep under that nick?
10:30 moritz yes
10:31 peteretep Thanks :-)
10:31 moritz http://irclog.perlgeek.de/perl6/search/?nick=pmurias&amp;q= :-)
10:31 espadrine joined #perl6
10:33 Roamer` BTW (and I guess you guys may be getting this all the time) what's the preferred migration path from META.info to META6.json?  Create a META6.json copy of META.info, file an ecosystem PR to switch, then remove META.info?
10:34 luiz_lha joined #perl6
10:37 RabidGravy Roamer`, some variant like that
10:38 Roamer` RabidGravy, thanks
10:40 |Tux| <drumroll>
10:40 |Tux| test            21.755
10:40 |Tux| test-t          11.750
10:40 |Tux| csv-parser      50.024
10:40 |Tux| </drumroll>
10:40 |Tux| NEAT!
10:42 stmuk_ who can I email about talking at GPW?
10:48 kurahaupo joined #perl6
10:49 timotimo stmuk_: probably moritz
10:52 [Sno] joined #perl6
10:53 masak |Tux|: something improved greatly?
10:53 |Tux| ask lizmat
10:53 yoleaux joined #perl6
10:53 masak lizmat: something improved greatly? :)
10:53 * masak suspects a lizmat++ is in order
10:54 |Tux| lizmat++
10:59 ralo joined #perl6
11:05 apiw joined #perl6
11:05 ocbtec joined #perl6
11:23 ely-se joined #perl6
11:37 apiw joined #perl6
11:48 kid51 joined #perl6
11:49 hippie1 joined #perl6
11:49 dalek ecosystem: 3f5c49c | (Naoum Hankache)++ | META.list:
11:49 dalek ecosystem: add Acme::Cow to ecosystem
11:49 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3f5c49cf22
11:49 dalek ecosystem: 2bae951 | RabidGravy++ | META.list:
11:49 dalek ecosystem: Merge pull request #148 from hankache/patch-1
11:49 dalek ecosystem:
11:49 dalek ecosystem: add Acme::Cow to ecosystem
11:49 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2bae9516ea
11:58 ralo perl6: 'a,a,a' ~~ /a+ % ','/
11:58 camelia rakudo-moar 470be0, rakudo-jvm f99bdb: ( no output )
11:58 ralo perl6: say 'a,a,a' ~~ /a+ % ','/
11:58 camelia rakudo-moar 470be0, rakudo-jvm f99bdb: OUTPUT«「a,a,a」␤»
11:58 ralo perl6: say 'a,a,a,' ~~ /a+ % ','/
11:58 camelia rakudo-moar 470be0, rakudo-jvm f99bdb: OUTPUT«「a,a,a」␤»
11:59 ralo this seems contrary to what is described in the regex docs: http://doc.perl6.org/language/regexes#Modified_quantifier:_%
12:00 hankache m: 'a,a,a' ~~ /a+ % ','/
12:00 camelia rakudo-moar 470be0: ( no output )
12:00 hankache m: say 'a,a,a' ~~ /a+ % ','/
12:00 camelia rakudo-moar 470be0: OUTPUT«「a,a,a」␤»
12:01 ralo the string with the trailing ',' should not match. or am I wrong?
12:02 jnthn It didn't match the training ,
12:02 yoleaux 03:04Z <raiph> jnthn: with apologies for .tell'ing you but just an fyi, for anyone reading this, 2 days, no comments/answer for http://stackoverflow.com/questions/35246529/nativecall-struct-which-contains-pointer (I don't feel equipped to answer it)
12:02 DrForr It matches 'a,a,a', so yes, it should. It'll also match 'a,a,aBOOGER'.
12:02 jnthn But the regex wasn't anchored to the start/end
12:03 jnthn m: say 'a,a,a,' ~~ /^ a+ % ',' $/
12:03 camelia rakudo-moar 470be0: OUTPUT«Nil␤»
12:03 jnthn m: say 'a,a,a' ~~ /^ a+ % ',' $/
12:03 camelia rakudo-moar 470be0: OUTPUT«「a,a,a」␤»
12:04 ralo I see. sorry, my mistake
12:04 DrForr No worries.
12:07 domidumont joined #perl6
12:07 sena_kun joined #perl6
12:07 sena_kun left #perl6
12:11 adu joined #perl6
12:14 Ven joined #perl6
12:16 apiw joined #perl6
12:16 espadrine_ joined #perl6
12:17 sufrostico joined #perl6
12:18 ChoHag joined #perl6
12:21 Ven hi, #perl6
12:23 pmurias joined #perl6
12:24 pmurias Ven: hi
12:27 wamba joined #perl6
12:29 lizmat [Tux]: is that before or after the NQP bump?  if before, yes, than it's most likely my fault.  If after, it also could be jnthn's fault  :-)
12:30 sftp joined #perl6
12:30 |Tux| check yourself, I built arounf 11:30 MET
12:31 |Tux| s/nf/nd/
12:32 lizmat ok, that's after the bump
12:33 lizmat perhaps we were both responsible then  :-)
12:36 * jnthn just fixed leaks :)
12:36 jnthn Though less memory pressure can help all kinds :)
12:39 pmurias it's great that the individual improvements actually combine to improving more complex brenchmark :)
12:39 pmurias * benchmarks
12:41 timotimo well, leaked memory is mostly inert, rather than actively hindering performance "directly"
12:42 moritz it leads to more allocations instead of reuse
12:42 moritz (allocation from the OS, that is)
12:43 timotimo right, but that's comparatively cheap
12:43 cognominal joined #perl6
12:43 timotimo as opposed to having to sweep over unhelpful objects via the GC, for example
12:46 stmuk_ if anyone has got edit access to http://rosettacode.org/wiki/Image_noise#Perl_6 the libSDL2 reference is now SDL2
12:46 domm_ joined #perl6
12:47 timotimo oi! this is terrible!
12:47 stmuk_ and it should use SDL2::Raw :)
12:47 timotimo especially since you can literally just create a buffer instead and pass it into sdl to be rendered
12:48 timotimo https://github.com/timo/SDL2_raw-p6/blob/master/examples/shooter.pl#L63-L88 - here's an example with cairo
12:48 timotimo but all you need to do is make sure the mode is proper
12:48 lizmat m: use nqp; my %h = a => 42; if nqp::getattr(%h,Map,q/$!storage/) -> $storage { say nqp::atkey(nqp::decont($storage),"a") }  # timotimo jnthn: there's no way to get rid of the decont there, is there?
12:48 camelia rakudo-moar 470be0: OUTPUT«42␤»
12:49 timotimo i don't know, but decont is extremely cheap if it's not actually needed, because spesh knows how to get rid of it
12:49 timotimo (that is, if the type of the thing is stable and spesh can figure that out)
12:49 timotimo (which in this case it might not be able to)
12:51 peteretep pmurias: hi
12:51 peteretep pmurias: if TPF don't give you the JS grant, please get in contact with me
12:51 timotimo i'm not sure, lizmat :(
12:52 timotimo do attributes actually have a container to go with them?
12:53 lizmat no, I guess it's part of the code gen of the if on a nqp type of thing
12:53 moritz lizmat: you could do -> \storage { } in the singature, no?
12:54 timotimo ooooh
12:54 timotimo good point, moritz, that sounds sensible
12:54 lizmat moritz++    # /me not awake yet
12:54 lizmat m: use nqp; my %h = a => 42; if nqp::getattr(%h,Map,q/$!storage/) -> \storage { say nqp::atkey(storage,"a") }  # moritz++
12:54 camelia rakudo-moar 470be0: OUTPUT«42␤»
12:55 * timotimo also not awake yet
12:55 timotimo that'll also save us allocating a scalar container <3
12:56 * lizmat sees another round of optimizations coming up
12:56 timotimo ooooh
12:57 * moritz mostly harmless
13:00 ely-se joined #perl6
13:00 pmurias peteretep: hi
13:02 dalek nqp: b223c44 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
13:02 dalek nqp: [js] Add a $to_bool to hashes rather then special casing them.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/b223c44a3d
13:02 dalek nqp: 412c477 | (Pawel Murias)++ | src/vm/js/nqp-runtime/array.js:
13:02 dalek nqp: [js] Make nqp::bindpos work with negative indexes.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/412c47793d
13:02 dalek nqp: 7991bdb | (Pawel Murias)++ | src/vm/js/ (3 files):
13:02 dalek nqp: [js] Stop wrapping js Arrays on method calls.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/7991bdb6cb
13:02 dalek nqp: eedc255 | (Pawel Murias)++ | src/vm/js/ (2 files):
13:02 dalek nqp: [js] Stop passing raw Arrays to nqp::deserialize.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/eedc255243
13:02 dalek nqp: c0eed50 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
13:02 dalek nqp: [js] Rename object to obj everywhere instead of using an obj/object mix.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/c0eed507e9
13:02 dalek nqp: d003e33 | (Pawel Murias)++ | src/vm/js/ (5 files):
13:02 dalek nqp: [js] Avoid special casing Array. Make nqp::radix* ops return NQPArrays.
13:02 dalek nqp: review: https://github.com/perl6/nqp/commit/d003e330f9
13:08 Actualeyes joined #perl6
13:11 adu joined #perl6
13:12 apiw joined #perl6
13:15 dalek nqp: 48af163 | (Pawel Murias)++ | src/vm/js/nqp-runtime/array.js:
13:15 dalek nqp: [js] Implement nqp::atpos_n and nqp::atpos_s with indexes out of bounds.
13:15 dalek nqp: review: https://github.com/perl6/nqp/commit/48af163580
13:15 dalek nqp: 12dd2e9 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
13:15 dalek nqp: Test nqp::atpos_i, nqp::atpos_n, nqp::atpos_s access with indexes out of bounds.
13:15 dalek nqp: review: https://github.com/perl6/nqp/commit/12dd2e95d3
13:16 espadrine_ joined #perl6
13:17 adu joined #perl6
13:24 dalek nqp: d652e27 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
13:24 dalek nqp: Test nqp::atpos_i,  nqp::atpos_n, nqp::atpos_s with negative indexes.
13:24 dalek nqp: review: https://github.com/perl6/nqp/commit/d652e2759d
13:29 molaf joined #perl6
13:39 dalek star: ca23d40 | (Steve Mynott)++ | ports/darwin_dmg/ (4 files):
13:39 dalek star: fix icon placement in dmg and tweak docs and filenames
13:39 dalek star: review: https://github.com/rakudo/star/commit/ca23d40fc5
13:43 zakharyas joined #perl6
13:47 sufrostico joined #perl6
13:48 sufrosti1o joined #perl6
13:54 sufrostico joined #perl6
13:57 brrt joined #perl6
14:07 cdg joined #perl6
14:08 stmuk_ sergot: can you take a look at https://github.com/sergot/openssl/pull/18 when you get a minute please?
14:10 lizmat timotimo jnthn: something seriously off with optimization of named parameters:
14:10 ecocode joined #perl6
14:10 lizmat m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42) for ^10000; say now - INIT now
14:10 camelia rakudo-moar 470be0: OUTPUT«0.0062036␤»
14:10 lizmat m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42,:B) for ^10000; say now - INIT now
14:11 camelia rakudo-moar 470be0: OUTPUT«0.33642852␤»
14:11 lizmat m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42,666) for ^10000; say now - INIT now
14:11 camelia rakudo-moar 470be0: OUTPUT«0.00866823␤»
14:11 lizmat named parameter is 40x slower ?
14:12 NZKindest joined #perl6
14:12 moritz yes
14:12 hippie joined #perl6
14:12 moritz iirc named params are not part of the toplogical sorting
14:13 moritz and only count as constraints
14:13 timotimo i wonder why the dispatch cache doesn't handle that?
14:14 moritz because hard, I suspect
14:15 jnthn Well, and because slwoing down all the common cases by making the cache a bunch more complex isn't so desirable
14:15 jnthn You're getting a double blow there too; the stuff in the cache is inlinable by spesh
14:16 lizmat but putting such a penalty on something like %h<a>:exists ?
14:17 [Coke] nine++ # merging back to nom
14:17 jnthn lizmat: That's the wrong way to look at it
14:18 jnthn We don't put a penalty on it. That's the *normal* unoptimized performance of multi-dispatch.
14:18 lizmat jnthn: in the setting we use a :SINK to optimize native splice, but at that cost, I wonder whether removing it wouldn't be a better choice
14:18 jnthn Well, depends how big the array is
14:18 jnthn Also
14:18 jnthn You're comparing a routine that does nothing
14:18 jnthn But splice doesn't do nothing
14:19 brrt good * #perl6
14:21 lizmat well...  a simple benchmark shows that %h<a>:exists is 100x slower than %h.EXISTS-KEY("a")
14:22 lizmat that feels very wrong to me
14:22 jnthn I suspect we may end up re-writing postcircumfix calls in Optimizer.nqp
14:22 lizmat well, perhaps...
14:22 jnthn If there's no overloads imported.
14:22 lizmat anyway, I was just blown away by the difference
14:25 jnthn Yeah...well, every single operator application is a postiional multi-dispatch
14:25 jnthn So we've optimized them pretty heavily.
14:26 jnthn I'd be nice to handle the nameds better.
14:26 jnthn But as moritz noted...it's some effort :)
14:26 jnthn Though slowing down the cache lookups now is a bit less of an issue on Moar
14:27 jnthn Because we eliminate the cache lookups during spesh in good cases anyway
14:28 jnthn And spesh is already smart-ish about nameds
14:28 jnthn (In some cases it rewrites named argument passes to positional ones.)
14:29 jnthn (At a low enough level you can't actually catch it :))
14:32 * moritz wonders if a special case for one named argument would give a good balance between performance and complexity
14:32 sergot stmuk_: yes, of course :)
14:32 jnthn moritz: Very possibly
14:32 moritz like, have a special slot for a single required named in the method cache, and store the name there
14:33 brrt can't we lower single required nameds into positional
14:33 timotimo we have code to do that, but apparently it doesn't trigger there
14:33 moritz brrt: there might be several candidates with different single required named
14:33 sergot stmuk_: do the tests pass?
14:34 brrt good point
14:45 [Coke] t/04-nativecall/13-union.t failing on OS X
14:45 gcole joined #perl6
14:46 dalek rakudo/nom: e7ccc99 | lizmat++ | src/core/Hash.pm:
14:46 dalek rakudo/nom: Scrape a few % off of Hash.DELETE-KEY
14:46 dalek rakudo/nom:
14:46 dalek rakudo/nom: - don't bother with the :SINK candidate, the current overhead kills it
14:46 dalek rakudo/nom: - don't bother allocating storage if there is none yet
14:46 dalek rakudo/nom: - don't bother getting value if the key isn't there
14:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e7ccc99489
14:46 Roamer` hm, do any of the package management tools - zef, panda, etc - understand some GitHub tag format so that I can install a specific tagged version of a module?
14:46 [Coke] seems fine when run by hand, though.
14:46 lizmat [Coke]: fwiw, make test is flawless for me
14:46 timotimo Roamer`: none of them do yet. but it might not be very difficult to add :)
14:46 Roamer` I know the ideology is "always use the latest one", just curious how should I tag my releases so that people can install earlier ones (or stable ones) if they want to
14:47 Roamer` timotimo, I might actually try to do that, yes
14:47 Roamer` maybe not right now
14:47 timotimo the ideology is actually "you can specify the exact version your code needs and we'll get that for you"
14:47 [Coke] lizmat: aaaaand it's not repeatable. ah well
14:47 timotimo but we're not there yet, sadly
14:47 Roamer` timotimo, right, yes, sorry, I misspoke there... yes, I know about the version in the identity
14:48 timotimo ;)
14:48 * [Coke] uses a perl6 snippet to randomly add combining chars to his chat blurb at work, and has gotten one person to ask how he did that so he could show them some perl 6.
14:48 timotimo hah, nice.
14:49 Ven pmurias: what's this for? https://github.com/perl6/nqp/commit/412c47793d
14:49 lokien_ joined #perl6
14:50 Ven nqp: my @a = 1, 2, 3; say @a[-1];
14:50 Ven oh. whoops.
14:50 timotimo probably has to be nqp::list(1, 2, 3);
14:50 timotimo and probably also has to be nqp-m:
14:50 Ven :( sorry, camelia
14:51 camelia joined #perl6
14:51 timotimo :S
14:52 moritz nqp: my @a = 1, 2, 3; say(@a[-1]);
14:52 Ven nqp-m: my @a = nqp::list(1, 2, 3); say @a[-1];
14:52 Ven oh yea. no implicit () as wel.
14:52 Ven well*
14:52 timotimo oh, yes
14:52 timotimo that bites me all the time
14:52 flussence \nqp: ought to be an alias for nqp-m:, like perl6: is, imho
14:52 camelia nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " 1, 2, 3; "␤   at gen/moar/stage2/NQPHLL.nqp:521  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from <unknown>:1  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/nqp…»
14:52 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
14:52 camelia ..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 206.␤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…»
14:53 camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 206.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤#perl6 <Ven> nqp-moarvm: my @a = nqp::list(1, 2, 3); say @a[-1];␤Lost connection…»
14:53 timotimo i just want to put a debug statement in, why do i have to do it properly? :P
14:53 camelia ..nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " 1, 2, 3; "␤   at gen/moar/stage2/NQPHLL.nqp:521  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from <unknown>:1  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/nqp…»
14:53 camelia ..nqp-jvm: OUTPUT«(signal ABRT)#␤# 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-20627/hs_error.log␤»
14:53 timotimo what even ...
14:53 moritz nqp-m: my @a := [1, 2, 3]; say(@a[-1]);
14:53 camelia nqp-moarvm: OUTPUT«3␤»
14:53 nige1 joined #perl6
14:53 timotimo i never knew we had that
14:53 nige1 hi o/
14:54 apiw joined #perl6
14:54 nige1 I need a bit of help with something
14:55 nige1 I'm developing a daily email - called "sixfix" - a daily dose of perl 6
14:55 nige1 the catch is you need to answer a question to get your next "fix"
14:56 timotimo oh that's neat
14:56 nige1 It is in early beta state at the moment and I need early adopters who may be able to give feedback on questions / answers - before they reach a more general audience
14:56 timotimo also, daily is quite a challenge to keep up for a long time
14:57 nige1 indeed
14:57 nige1 i've only done a few days and its a challenge
14:57 nige1 maybe weekly is more sustainable
14:57 moritz nige1: I'm happy to review the list; I don't know if I'm motivated to let the mails dribble to me
14:57 nige1 ok cheers moritz
14:58 timotimo we also haven't done anything big with the perlhex account
14:58 timotimo twitter account*
14:58 moritz (for the record, I like the idea. I just don't think I'm in the target audience)
14:58 nige1 sec bbiab
14:58 flussence I'd suggest operate it as if it were daily but release them weekly; that way you have a massive buffer whenever you hit writer's block ;)
15:00 nige1 yes - thanks flussence - good suggestion
15:00 perlpilot sixfix sounds like something that would work better as a webapp/game
15:00 [Coke] I am happy to give the keys to perlhex to someone who will do something with it. I only very occasionally dabble with twitter.
15:00 timotimo give the keys to ... everyone!
15:01 timotimo on the other hand ... if every perl6 dev has the key, bystander effect will activate
15:01 [Coke] no, that's a bad idea. :)
15:01 [Coke] actually, maybe it's not a bad idea. i actually don't know
15:01 MadcapJake [Coke], I'd be happy to post articles and such with it
15:02 nige1 if you would like to help curate/preview the sixfix questions / answers please email me at nige (at) nigelhamilton.com - and can give you early access
15:03 timotimo hm. is perlhex really something to post articles with?
15:03 MadcapJake Something along the lines of these other PL accounts: https://twitter.com/MadcapJake/lists/programming-languages
15:03 Actualeyes joined #perl6
15:03 [Coke] timotimo: it's been dead for months, we can do whatever we want with it.
15:03 nige1 moritz, can organise bulk dose of sixfix - no problems there ;-)
15:04 MadcapJake timotimo, more like tidbits about happenings in the community, a new article, an interesting convo, a new module release, a new optimization in rakudo, etc.
15:04 pmurias Ven: negative indexes on arrays is likely something that should be removed from nqp (and is likely just cargo culted from parrot)
15:04 MadcapJake (that's at least what I would like to see and have been thinking of doing)
15:04 moritz MadcapJake: that would be very nice; then the curators of the p6weekly would just have to follow it :-)
15:05 MadcapJake moritz, xD
15:05 Ven pmurias: ah; okay :). I didn't know nqp had that – was surprised, because 6 doesn't.
15:05 timotimo MadcapJake: i definitely won't stand in your way! :)
15:06 sufrostico joined #perl6
15:06 sufrosti1o joined #perl6
15:06 MadcapJake Well I'd be willing to take over p⬢ if [Coke] is looking to keep the account active, otherwise I'll start a new one
15:07 * MadcapJake looks at account and sees the intent is different
15:07 [Coke] "was" . :)
15:07 * lizmat scratches an optimization idea that didn't work out
15:08 MadcapJake heh
15:08 hoelzro morning #perl6!
15:08 lizmat hoelzro o/
15:08 hoelzro howdy lizmat!
15:08 * MadcapJake tries to think of something as clever as "p⬢"
15:08 [Coke] note that the last tweet was a year+ ago.
15:09 * [Coke] grabbed the creds in case the team wanted to do somethign with it.
15:09 timotimo a year+ or a year⬢?
15:09 moritz p6⌣
15:09 * MadcapJake notices there is a @perlsix that has never tweeted...
15:10 hoelzro MadcapJake: what's wrong with using p⬢?
15:11 hoelzro you can always change the intent =)
15:11 * hoelzro is invested because he helped come up with the name ;)
15:11 MadcapJake hoelzro, totally fine with it! Thought that maybe others wanted to keep it up as a code snippet account
15:11 moritz MadcapJake: just /msg [Coke] and ask for the credentials
15:12 [Coke] moritz: we're working on it. :)
15:12 hoelzro I guess the whole "hex" pun fits with tips and tricks better
15:12 moritz [Coke]: ok, great
15:12 geekosaur (just as long as it's not like @crawlcode >.> )
15:15 hoelzro is there a way to create a Perl 6 subclass of an NQP class?
15:15 moritz nope
15:15 hoelzro I figured out
15:15 hoelzro er
15:15 hoelzro I figured not
15:15 hoelzro thanks for confirming, moritz!
15:15 moritz but you can consume NQP roles from Perl 6 classes, iirc
15:16 hoelzro I'll probably just need to figure out a way for NQP methods to call Perl 6 code
15:16 moritz $code()
15:16 moritz or call a method with a fixed name on a Perl 6 object
15:16 xinming joined #perl6
15:17 hankache joined #perl6
15:17 hoelzro yeah, that'll do
15:17 hoelzro thanks!
15:17 prammer joined #perl6
15:18 hankache does anyone remember cowsay?
15:18 hoelzro hankache: yes!
15:19 hankache hoelzro then https://github.com/hankache/Acme-Cow needs your PR
15:19 hankache :)
15:22 Roamer` OK, a couple more stupid module style questions :)  I noticed Test::Meta declares "module Test::Meta:ver<...>:auth<github:...>"... is it considered a good practice to do that?  And, hm, S22 says to use directly :0.2.1, while Test::Meta has :ver<0.2.1>... which one's better? :)
15:23 skids joined #perl6
15:23 * masak is delighted to see a bunch of new names on the channel
15:24 wamba joined #perl6
15:28 Roamer` (oof, of course, Test::Meta has :ver<0.0.3>, 0.2.1 is what I intend to use for the next bunch of pushed commits to Serialize::Naive)
15:28 khw joined #perl6
15:32 MadcapJake is there anyway to declare multiple same-named classes in a test file? I tried just enblockenating them but still getting redeclaration error
15:33 jnthn my
15:33 MadcapJake oh xD
15:34 moritz oh my :-)
15:35 hankache so is nom still considered the bleeding edge branch?
15:35 lizmat hankache: yes
15:35 tadzik why is Cow in Acme? I thought Acme is for useless stuff :P
15:36 hankache thanks lizmat
15:36 hankache tadzik i didn't know where to put it :)
15:36 jnthn .oO( ProductionReady::Cow :P )
15:36 hankache hehe
15:37 hankache well cow needs your help
15:38 hankache i added a camelia template but i reckon it needs a bit of tweaking
15:39 hankache and the binary is 'cow-say' so it doesn't interfere with the initial one
15:40 perigrin tadzik: have you ever seen a cow actually do any work?
15:40 hankache plus we get to use kebab casing and annoy everyone else ;)
15:40 perigrin they just sorta sit there turning grass into methane.
15:42 Roamer` perigrin, hm, I was going to accuse you of not seeing many "Milka" chocolate ads recently, but then again, your point still stands, they don't actually do much in the ads, either
15:42 Roamer` *not having seen, pfth
15:43 hankache one can do alot with methane..... :P
15:43 domidumont joined #perl6
15:47 stmuk_ sergot: it fixes os x tests and they still pass linux (despite what travis said)
15:48 * jnthn reads recent backlog and starts pondering making beef kebabs...
15:49 stmuk_ pancakes surely?
15:50 DrForr Today's Culture Ship Name: GOU Pancake Day.
15:50 * Roamer` visualizes beef kebab pancakes and... quite likes it, in fact.
15:52 sergot stmuk_++: merged, thanks a lot! :)
15:53 apiw joined #perl6
15:53 stmuk_ sergot: np
16:04 MadcapJake any ideas why an attribute would be empty inside of a method but when you access it outside of the method, it's all there...
16:05 MadcapJake this attribute is declared in a role, i should add
16:05 MadcapJake (as is the method)
16:05 masak MadcapJake: golf it and show it on camelia?
16:07 MadcapJake wait, i think i know what i've done... :)
16:09 robinsmidsrod joined #perl6
16:10 perl6newbee joined #perl6
16:11 MadcapJake how do you take a hash and turn it into named parameters for a method?
16:14 MadcapJake i tried %h.pairs.Slip and !%h but they both still come out as positional params
16:14 ugexe .method(|%hash)
16:14 MadcapJake oops, i meant, i tried that
16:14 MadcapJake |%h still gives me positional params error
16:14 musiKk joined #perl6
16:14 ugexe something is off with your class or hash then
16:14 gfldex MadcapJake: can you provide the Signature of that method?
16:15 kurahaupo joined #perl6
16:16 Laurent_R_ joined #perl6
16:17 MadcapJake gfldex, «method context(*%ctx) {...}»
16:18 MadcapJake and I get «Too many positionals passed; expected 1 argument but got 2»
16:19 apiw joined #perl6
16:19 gfldex m: sub f(*%h){ say %h.perl }; my %h = <a b> Z=> (1,2); f(|%h)
16:19 camelia rakudo-moar e7ccc9: OUTPUT«{:a(1), :b(2)}␤»
16:20 gfldex m: sub f(*%h){ say %h.perl }; my %h = <a b> Z=> (1,2); f(%h)
16:20 camelia rakudo-moar e7ccc9: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub f at /tmp/UVQKKkS0mU line 1␤  in block <unit> at /tmp/UVQKKkS0mU line 1␤␤»
16:20 MadcapJake doing «|%hash» actually gets me a different error «Attempted to push to Nil.»
16:20 MadcapJake so i'm looking in the wrong place for the bug
16:22 gfldex MadcapJake: did you try --ll-exception ?
16:24 sjn \o
16:25 MadcapJake gfldex, i figured it out, was a private attr and I specified a setter but that setter was inadvertently returning Nil when called as a setter
16:25 dalek ecosystem: eefe61e | (Peter Pentchev)++ | META.list:
16:25 dalek ecosystem: Switch to META6.json for Serialize::Naive.
16:25 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/eefe61ef2e
16:25 dalek ecosystem: 2b1fce1 | (Zoffix Znet)++ | META.list:
16:25 dalek ecosystem: Merge pull request #149 from ppentchev/ppentchev-meta6-serialize-naive
16:25 dalek ecosystem:
16:25 dalek ecosystem: Switch to META6.json for Serialize::Naive.
16:25 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2b1fce1eb9
16:25 MadcapJake when called as a *getter*
16:29 perlpilot joined #perl6
16:30 hankache why is everyone switching to META6.json? anything wrong with META.info?
16:31 * [Coke] sees jnthn making beef kebabs and regrets his pork rind snack!
16:31 japhb hankache: Apparently they never META6 they didn't like
16:32 hankache hahahahaha
16:32 hankache japhb apprently it's too 6xy and they know it
16:33 japhb :-D
16:33 stmuk_ http://pl6anet.org/drop/Rakudo_2016-01-RC0.dmg
16:33 stmuk_ thats a R* binary installer which seems to work on OS X 10.9 and 10.11
16:34 hankache stmuk_++
16:34 lizmat hankache: using META6.json will allow for uploading to CPAN
16:35 stmuk_ hmmm I should put star in the name
16:36 hankache lizmat i do like the current way of doing things, github & travis etc.. ;(
16:36 hankache am i the only one?
16:36 lizmat hankache: it's about providing *more* options, not less  :-)
16:36 dalek star: d210150 | (Steve Mynott)++ | ports/darwin_dmg/package_darwin_dmg.pl:
16:36 dalek star: name as windows msi
16:36 dalek star: review: https://github.com/rakudo/star/commit/d210150fc5
16:36 autarch joined #perl6
16:36 lizmat some people aren't happy with github, for that matter
16:36 lizmat we lost a few modules in the ecosystem that way already  :-(
16:37 hankache lizmat if you say so. I never used CPAN so I'll take your word for granted
16:38 hankache it would be fun to do some statistics about People using Perl 6
16:40 MadcapJake first round of tests ported to https://github.com/MadcapJake/Test-Lab
16:42 MadcapJake If anyone hasn't seen it yet, I'm porting http://githubengineering.com/scientist/ to Perl 6
16:50 abaugher_ joined #perl6
16:51 virtualsue joined #perl6
16:55 apiw joined #perl6
16:56 nige1 joined #perl6
16:57 timotimo https://www.youtube.com/watch?v=4KcX9wHjVTM  -  i'd like someone to implement this :)
16:59 moritz m: say 'a꣭'.chars
16:59 camelia rakudo-moar e7ccc9: OUTPUT«1␤»
17:00 moritz m: given "a\c[COMBINING DEVANAGARI LETTER NA]" { .say; say .elems }
17:00 camelia rakudo-moar e7ccc9: OUTPUT«a꣭␤1␤»
17:02 ilmari m: say "foo".elems # that might not be what you meant
17:02 camelia rakudo-moar e7ccc9: OUTPUT«1␤»
17:05 sufrostico joined #perl6
17:06 perl6newbee hi
17:06 perl6newbee how can I coerce a Str to Numeric?
17:06 timotimo m: say "1234".Numeric
17:06 camelia rakudo-moar e7ccc9: OUTPUT«1234␤»
17:06 perl6newbee :-)
17:06 lizmat m: dd +"42"
17:06 camelia rakudo-moar e7ccc9: OUTPUT«42␤»
17:07 lizmat m: dd 666, +"42"
17:07 camelia rakudo-moar e7ccc9: OUTPUT«666␤42␤»
17:07 lizmat hmmmm...
17:07 lizmat m: say "abc".perl
17:07 camelia rakudo-moar e7ccc9: OUTPUT«"abc"␤»
17:07 lizmat m: dd "42", +"42"
17:08 camelia rakudo-moar e7ccc9: OUTPUT«"42"␤42␤»
17:16 perl6newbee thanks. that helps. but if the variable is a string I get an exception. how can I check that there is a numeric scalar? $response ~~ Numeric doesn not work
17:17 gfldex m: my $s = "1234"; say so $s ~~ /\d+/;
17:17 camelia rakudo-moar e7ccc9: OUTPUT«True␤»
17:18 apiw joined #perl6
17:18 timotimo that's not generic enough
17:18 timotimo i'd suggest using "try"
17:18 timotimo m: say try { +"hello" } // "oh no"
17:18 camelia rakudo-moar e7ccc9: OUTPUT«oh no␤»
17:18 timotimo m: say try { +"99999" } // "oh no"
17:18 camelia rakudo-moar e7ccc9: OUTPUT«99999␤»
17:18 perl6newbee nice, but the string can be Numeric. So, Rat und Int is possible
17:19 perl6newbee timotimo thx!
17:19 timotimo you're welcome!
17:20 gfldex perl6newbee: you are mixing input validation with coercion. That may not work well.
17:22 perl6newbee That's true, but in this case I see no alternatives. See: https://github.com/pnu/io-prompt/blob/master/lib/IO/Prompt.pm#L165
17:32 sufrostico joined #perl6
17:34 Celelibi joined #perl6
17:36 perl6newbee w00t. it works! thx
17:39 sufrostico joined #perl6
17:42 Vitrifur joined #perl6
17:43 dalek doc: f9387b7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod:
17:43 dalek doc: fix typo
17:43 dalek doc: review: https://github.com/perl6/doc/commit/f9387b7a26
17:43 dalek doc: 861648f | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod:
17:43 dalek doc: show that try blocks are normal blocks (timotimo++ for the nice idiom)
17:43 dalek doc: review: https://github.com/perl6/doc/commit/861648f303
17:45 timotimo :3
17:45 dalek ecosystem: 2204e22 | RabidGravy++ | META.list:
17:45 dalek ecosystem: Add Oyatul
17:45 dalek ecosystem:
17:45 dalek ecosystem: See https://github.com/jonathanstowe/Oyatul
17:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2204e22615
17:47 RabidGravy Another yak bites the dust
17:47 Hotkeys is there a shorter way to zip two sequences flat without calling flat on them
17:47 Hotkeys m: say (flat (0,1,*+*...*)Z(2,1,*+*...*))[^10]
17:47 camelia rakudo-moar e7ccc9: OUTPUT«(0 2 1 1 1 3 2 4 3 7)␤»
17:47 Hotkeys for example
17:48 Hotkeys er the flat should be outside the parens for 1 byte savings
17:49 timotimo you can abuse that say will only give you the first few items in a list so you can leave out the [^10] btw
17:49 timotimo m: say 1, 1, *+* ... *
17:49 camelia rakudo-moar e7ccc9: OUTPUT«(...)␤»
17:49 timotimo damn you! :D
17:49 timotimo m: say (0, 1, *+* ... *) Z (1, 1, *+* ... *)
17:49 camelia rakudo-moar e7ccc9: OUTPUT«(...)␤»
17:49 timotimo m: say flat (0, 1, *+* ... *) Z (1, 1, *+* ... *)
17:49 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 1 1 2 2 3 3 5 5 8 8 13 13 21 21 34 34 55 55 89 89 144 144 233 233 377 377 610 610 987 987 1597 1597 2584 2584 4181 4181 6765 6765 10946 10946 17711 17711 28657 28657 46368 46368 75025 75025 121393 121393 196418 196418 317811 317811 514229 514229 832…»
17:49 timotimo there we go.
17:50 timotimo all you need to know is it doesn't infiniloop when you say it
17:50 timotimo when you put or print it, however, that's a different story
17:50 Hotkeys right
17:50 Hotkeys I just was wondering if there was a way to not use flat()
17:50 Hotkeys but still get a flat list
17:50 * Hotkeys is trying to find alternate solutions to a golf problem
17:51 Hotkeys this is my current shortest
17:51 Hotkeys m: my &f = {(0,1,1,4,{$^b;$^d;3*$^c-$^a}...*)[0..$_]}; say f(10)
17:51 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)␤»
17:51 Hotkeys the lucas-nacci numbers
17:52 timotimo m: say '.head($_)'.chars; say '[0..$_]'.chars
17:52 camelia rakudo-moar e7ccc9: OUTPUT«9␤7␤»
17:52 timotimo too bad
17:55 b2gills m: #`(Hotkeys: my shortest was 57 bytes) say {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}...*)[1..$_+1]»[0]}(10)
17:55 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)␤»
17:56 Hotkeys that's cray
17:56 Hotkeys I like my 42 byte count
17:56 b2gills Hotkeys is reffering to this: https://codegolf.stackexchange.com/a/71465/1147
17:56 Hotkeys a fun number
17:56 Hotkeys and short
17:56 Hotkeys :p
17:56 Hotkeys I don't like how I discard those positionals I wish ther was a nicer way
17:56 Hotkeys but that's okay
17:57 lizmat afk for a few hours&
17:57 b2gills the post was closed or deleted when I tried to post it
17:57 Hotkeys weird
17:58 Hotkeys man I kind of hate golfing langs
17:58 b2gills m: #`(originally I had) say {flat flat((0,1,*+*...*)Z(2,1,*+*...*)).rotor(1=>2,1=>0)[0..$_]}(10)
17:58 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)␤»
17:58 Hotkeys I feel like it ruins the fun of codegolf
17:58 Hotkeys ah
17:58 Hotkeys I was gonna do
17:58 b2gills m: say {flat ((0,1,*+*...*)Z(2,1,*+*...*)).kv.map({$^b[$^a%2]})[0..$_]}(10) # this was the same length
17:58 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)␤»
17:59 timotimo flat flat? ugh :)
17:59 b2gills The short one I came up with was a translation of the Jelly example
17:59 Hotkeys m: {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(10)
17:59 camelia rakudo-moar e7ccc9: ( no output )
17:59 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(10)
17:59 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55)␤»
17:59 SCHAAP137 joined #perl6
17:59 Hotkeys that was gonna be my alternative
17:59 Hotkeys oh wait
17:59 Hotkeys whoops
17:59 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[^20]
17:59 camelia rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7UOMbGM6hx␤Missing block␤at /tmp/7UOMbGM6hx:1␤------> 3 {flat((0,1,*+*...*)Z(2,1,*+*...*))[^20]7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        stateme…»
17:59 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))(20)
17:59 camelia rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mvhiT8jqs1␤Missing block␤at /tmp/mvhiT8jqs1:1␤------> 3y {flat((0,1,*+*...*)Z(2,1,*+*...*))(20)7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        stateme…»
18:00 Hotkeys m: say flat((0,1,*+*...*)Z(2,1,*+*...*))[^20]
18:00 camelia rakudo-moar e7ccc9: OUTPUT«(0 2 1 1 1 3 2 4 3 7 5 11 8 18 13 29 21 47 34 76)␤»
18:00 Hotkeys oh
18:00 Hotkeys I wanted the odd ones
18:00 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[1,3...2*$_]}(10)
18:00 camelia rakudo-moar e7ccc9: OUTPUT«(2 1 3 4 7 11 18 29 47 76)␤»
18:00 Hotkeys nopes
18:00 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[9,2...2*$_]}(18)
18:00 camelia rakudo-moar e7ccc9: OUTPUT«()␤»
18:01 Hotkeys m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(18)
18:01 camelia rakudo-moar e7ccc9: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584)␤»
18:01 Hotkeys uh
18:01 Hotkeys I have no idea what I'm doing
18:01 Hotkeys I'll stick with my original
18:02 Hotkeys I have 5 upvotes on my lucas-nacci answer
18:03 Hotkeys that's the most I'vegotten on a codegolf so far
18:03 b2gills I just up-voted it
18:03 Hotkeys tyty
18:03 b2gills I keep a tab open on https://codegolf.stackexchange.com/questions?sort=newest
18:05 timotimo https://stackoverflow.com/questions/35265023/unicode-property-space-in-perl-5-and-perl-6 - this here is an interesting thing
18:07 musiKk joined #perl6
18:12 b2gills Hotkeys: I wrote a program to count the bytes of the currently selected text that I use for CG which you might be interested in: https://gist.github.com/b2gills/93d1e2aa6583b95315b2 It makes it real quick to find out if I managed to create shorter code.
18:13 Hotkeys oh I've just been using https://mothereff.in/byte-counter
18:13 sortiz joined #perl6
18:13 Hotkeys because I'm lazy
18:13 timotimo you know about jnthn's code golf assistant?
18:13 timotimo one of the example programs for GTK::Simple and supplies and such
18:14 Hotkeys I do not
18:14 timotimo it even evaluates your code for you!
18:14 timotimo and of course it also shows you exactly how many characters your code has
18:14 timotimo (but it does not have something cool for when your code accidentally infini-loops :(  )
18:15 Hotkeys lol
18:15 Hotkeys I just write all my code in the repl pretty much
18:15 Hotkeys for golf anyway
18:16 RabidGravy joined #perl6
18:19 Hotkeys again because I'm lazy
18:19 b2gills I have one tab in Tilda that is the rlwrapped REPL and another that I just press up+enter in to get the byte count ( because the last thing I ran was the code that I linked earlier )
18:20 Hotkeys neat
18:20 lucs m: say <k d r w b t>.sort({$^a cmp 'w' || $a cmp $^b}); # The sorting function makes no sense, still, why is the undeclared 「$a」 not raising an error?
18:20 camelia rakudo-moar e7ccc9: OUTPUT«(k d r b t w)␤»
18:20 hoelzro I'm wondering if the REPL should try to detect if it's running under rlwrap, and if so, not display the "use Linenoise, Readline, or rlwrap" message
18:20 hoelzro I'm also wondering if that message should be displayed by default; maybe have a --beginner switch or something
18:21 hoelzro interactive help in the REPL might not be bad either
18:21 * hoelzro has spent a lot of time thinking about the REPL lately
18:21 b2gills lucs you did declare $a as $^a earlier
18:22 lucs b2gills: Nope, as the example evaluated by m: shows.
18:22 b2gills m: { $^a; say $a }("Hello")
18:22 camelia rakudo-moar e7ccc9: OUTPUT«Hello␤»
18:22 Hotkeys actually by putting the $^a somewhere
18:22 Hotkeys you make a fn that takes $a
18:22 lucs Hmm...
18:22 Hotkeys m: say {$^a}
18:22 camelia rakudo-moar e7ccc9: OUTPUT«-> $a { #`(Block|65807976) ... }␤»
18:23 Hotkeys I assume $^a has to be the first instance of the thing
18:23 b2gills lucs the code you wrote will put them in the same order if they are on the same side of 'W
18:23 Hotkeys m: say {$a;$^a}
18:23 camelia rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NtU3N3FkfK␤Variable '$a' is not declared␤at /tmp/NtU3N3FkfK:1␤------> 3say {7⏏5$a;$^a}␤»
18:23 Hotkeys yeah
18:23 Hotkeys thought so
18:23 Hotkeys m: say {$^a;$a}
18:23 camelia rakudo-moar e7ccc9: OUTPUT«-> $a { #`(Block|68025544) ... }␤»
18:23 Hotkeys $^a is like a magic declaration of $a
18:24 Hotkeys I didn't actually realize that
18:24 Hotkeys That will let me write shorter things in future maybe
18:24 lucs b2gills: Yeah, the sorting itself is irrelevant in my example -- I just wanted something with both $^a and $a.
18:25 lucs In conclusion, could we say that this is correct (albeit a bit unexpected) behaviour?
18:26 b2gills It's correct, and the way I would expect it.
18:26 b2gills Placeholder parameters confused new Perl 6 programmers regularly though
18:26 lucs b2gills: Hmm... Your expectations appear to match the language better than mine :)
18:27 lucs I'm not totally new to Perl 6, but to placeholders, yeah, rather.
18:27 leont joined #perl6
18:28 samb1 left #perl6
18:28 Hotkeys I say again
18:28 Hotkeys I hate golf langs
18:28 b2gills perhaps I should have said "confuse programmers new to that feature regularly"
18:28 lucs Right :)
18:29 b2gills Hotkeys: I'm right there with you, though I think I have occasionally written programs in Perl 6 that beat every language though
18:29 Hotkeys I usually can't beat things like CJam etc.
18:30 Hotkeys I don't see the point in trying to write code in a language specifically designed to write short code
18:30 Hotkeys takes all the fun out of it
18:30 Hotkeys now that isn't to say I want to golf in java
18:30 Hotkeys but yknow
18:31 huf not being able to golf in a proglang is a bit like not being able to write poetry in a natural language
18:31 Hotkeys it's more of a "look at this golf lang I designed!" more than anything
18:31 huf do i want the instructions for my drain cleaner to be in verse? no
18:31 Hotkeys lol
18:31 huf but i *do* want *some* things to be in verse, it's fun
18:31 Hotkeys right, golfing != good code
18:31 Hotkeys but it is fun
18:31 Hotkeys well
18:32 Hotkeys not good code most of the time
18:32 Hotkeys I quite like my lucas-nacci solution thouhg
18:32 Hotkeys perl 6 sequences are one of my fav things
18:33 b2gills Hotkeys: here is an example where I beat every language handily https://codegolf.stackexchange.com/a/66125/1147
18:34 b2gills The ... sequence operator does help reduce code by a few bytes. I think I have several CGs where I have three of them in the same code block
18:37 b2gills often the shortest way to write something is the way I would write it anyway, except with fewer spaces
18:37 Hotkeys wow
18:37 Hotkeys CJam was at 517
18:37 Hotkeys harsh
18:39 Hotkeys nice solution though
18:45 dolmen joined #perl6
18:50 timotimo i kind of feel like it'd be all right to add ^... and ^...^ to 6.d
18:51 gfldex m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for @a[1..4;1..14].values <-> $v { $v = 0 }; dd @a;
18:51 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [86, 2, 71, 50, 52], [79, 53, 42, 75, 10], [25, 56, 54, 36, 45], [89, 25, 78, 38, 81], [17, 66, 73, 62, 18])␤Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/sMNQyexl45 line 1␤␤»
18:51 gfldex grrr
18:52 timotimo yes, rather.
18:54 gfldex m: my @a[5;5]; say @a.elems;
18:54 camelia rakudo-moar e7ccc9: OUTPUT«5␤»
18:54 gfldex shouldn't that be a list with 2 elements?
18:55 timotimo er, shouldn't it actually be 25 elements?
18:55 gfldex or 25 if it shouldn't be a list
18:55 gfldex m: my @a[5;5]; say @a.values.elems;
18:55 camelia rakudo-moar e7ccc9: OUTPUT«25␤»
18:55 timotimo m: my @a[5;5]; say @a.list.perl;
18:55 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any])␤»
18:55 timotimo humpf.
18:55 gfldex how do i get hold of the dimensions of a shaped Array?
18:55 timotimo you .shape
18:56 timotimo what does roast say about shaped array's .elems?
18:56 gfldex m: my @a[5;5]; dd @a.shape;
18:56 camelia rakudo-moar e7ccc9: OUTPUT«List $shape = $(5, 5)␤»
18:56 addison joined #perl6
18:56 timotimo it's potentially about "how many things can you get from []-ing
18:57 gfldex what is the expert opinion on @a.elems == @a.values.elems ?
18:57 timotimo well, .values gives you all the values in the shaped array. so i *know* for a fact that it's right
18:57 timotimo m: my @a[5;5]; say @a[3].perl;
18:57 camelia rakudo-moar e7ccc9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/zNsKskq00K line 1␤␤»
18:58 timotimo ^- if this were implemented, it'd be a good reason for having .elems work that way
18:58 timotimo because @a[24] ain't gonna work
18:58 gfldex sounds right
18:59 gfldex m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for 1..@a.shape[0]-1 -> $x { for 1..@a.shape[1]-1 -> $y { @a[$x;$y] = 0 } }; dd @a;
18:59 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [56, 19, 91, 32, 2], [1, 77, 83, 25, 52], [49, 68, 85, 59, 23], [10, 69, 91, 16, 66], [2, 3, 92, 41, 24])␤Array.new(:shape(5, 5), [56, 19, 91, 32, 2], [1, 0, 0, 0, 0], [49, 0, 0, 0, 0], [10, 0, 0, 0, 0], [2, 0, 0, 0, 0])␤»
18:59 timotimo cute
19:00 gfldex for @a[1..4;1..14].values <-> $v { $v = 0 }; # would be much better but is sadly NYI
19:00 gfldex for @a[1..4;1..4].values <-> $v { $v = 0 }; # would be much better but is sadly NYI
19:01 timotimo yeah ;(
19:03 [Coke] stmuk_: the readme should mention that this will ONLY work in /Applications. (~/Applications is another common place to install things.)
19:03 dalek ecosystem: c82770d | wbiker++ | META.list:
19:03 dalek ecosystem: Add new module IO::Prompt
19:03 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c82770d788
19:03 dalek ecosystem: c911b6e | (Zoffix Znet)++ | META.list:
19:03 dalek ecosystem: Merge pull request #150 from wbiker/master
19:03 dalek ecosystem:
19:03 dalek ecosystem: Add new module IO::Prompt
19:03 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c911b6e336
19:03 gfldex m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for 1..@a.shape[0]-1 { $^x; for 1..@a.shape[1]-1 { @a[$x;$^y] = 0 } }; dd @a;
19:03 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [75, 16, 35, 64, 79], [88, 94, 47, 11, 6], [71, 92, 31, 46, 12], [78, 23, 20, 53, 58], [34, 45, 96, 46, 8])␤Array.new(:shape(5, 5), [75, 16, 35, 64, 79], [88, 0, 0, 0, 0], [71, 0, 0, 0, 0], [78, 0, 0, 0, 0], [34, 0, 0, 0, 0])␤»
19:03 stmuk_ [Coke]: yes good point
19:04 dalek mu: 4ab82aa | (Zoffix Znet)++ | misc/SHELTER/io-prompt/META.info:
19:04 dalek mu: Remove IO::Prompt from SHELTER
19:04 dalek mu:
19:04 dalek mu: It was been adopted by wbiker: https://github.com/perl6/ecosystem/pull/150
19:04 dalek mu: review: https://github.com/perl6/mu/commit/4ab82aae42
19:05 [Coke] stmuk_++
19:05 dalek star: 8090c51 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt:
19:06 dalek star: needs root apps folder coke++
19:06 dalek star: review: https://github.com/rakudo/star/commit/8090c51291
19:06 apiw joined #perl6
19:06 firstdayonthejob joined #perl6
19:07 sortiz \o #perl6
19:07 dalek star: 4bb9c25 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt:
19:07 dalek star: hand wave about signing security settings
19:07 dalek star: review: https://github.com/rakudo/star/commit/4bb9c2591d
19:08 timotimo m: my @a[5]; for @a.kv -> $k, $v is rw { }
19:08 camelia rakudo-moar e7ccc9: OUTPUT«Parameter '$v' expected a writable container, but got Any value␤  in block <unit> at /tmp/y3M2F4_Sje line 1␤␤»
19:08 timotimo why :<
19:09 bowtie joined #perl6
19:09 lostinfog joined #perl6
19:10 timotimo m: my @a[5;5]; for @a.pairs -> $p { $p.value = 0; $p.value = (^99).pick if any(|$p.key) == any(0, 4); }; say @a.perl
19:10 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [8, 65, 30, 49, 77], [4, 0, 0, 0, 28], [84, 0, 0, 0, 64], [51, 0, 0, 0, 60], [26, 16, 14, 26, 58])␤»
19:10 dalek star: aa89b9c | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt:
19:10 dalek star: lower expectations about GUIness of perl 6
19:10 dalek star: review: https://github.com/rakudo/star/commit/aa89b9cc0e
19:11 MadcapJake could anyone help me figure out how to do a "default" derived class that the base class's `new` blesses?
19:12 timotimo gfldex: how do you like that code? ^
19:12 apiw joined #perl6
19:13 MadcapJake If I place the Cls::Default before the Cls decl, it says it doesn't know what Cls is, if I place it after, Cls' `new` says it doesn't know what Cls::Default is
19:13 timotimo you can just have a "class Cls { ... }" up front
19:13 gfldex timotimo: nice but doesn't fit to http://codegolf.stackexchange.com/questions/71591/hollow-out-an-array
19:13 timotimo a forward declaration, that is
19:13 timotimo too long, eh?
19:14 timotimo ah, it's supposed to do rectangular, not just square
19:14 gfldex i want it to be a complete program, so the init of @a needs to be separated (and come from stdin)
19:14 timotimo well, that'd be easy to pull out
19:15 timotimo it may be shorter code-wise if .kv would give rw containers for the values
19:15 timotimo i wonder if it doesn't because of design reasons
19:16 gfldex m: my @a[5;6]; for @a.pairs -> $p { $p.value = 0; $p.value = (^99).pick if any(|$p.key) == any(0, @a.shape[1]-1); }; say @a.perl
19:16 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 6), [93, 25, 31, 56, 20, 81], [96, 0, 0, 0, 0, 40], [35, 0, 0, 0, 0, 68], [3, 0, 0, 0, 0, 94], [46, 0, 0, 0, 0, 37])␤»
19:17 MadcapJake what's the difference between fail and die and when would you use each?
19:17 MadcapJake the language/Exceptions page only shows «die» being used
19:18 timotimo fail will return a Failure object from the enclosing routine
19:18 perlpilot die is a worse failure :)
19:18 timotimo whereas die will immediately throw
19:18 * moritz still doubts the use case of fail()
19:19 MadcapJake actually I might have a good use-case with my current project: https://github.com/MadcapJake/Test-Lab
19:19 MadcapJake *maybe*
19:20 laz78 joined #perl6
19:21 perlpilot moritz: we seem to use fail in src/core about twice as much as die.
19:22 MadcapJake perlpilot, wow! do the Failures end up arriving at a die sub eventually?
19:22 MadcapJake or where do they go? :P
19:23 timotimo when you try to use the Failure object for stuff, it gets thrown
19:23 perlpilot MadcapJake: that is left as an exercise for someone who wants to do more than just a simple ack  :)
19:23 MadcapJake o_O
19:23 MadcapJake timotimo, you can't inspect it at all?
19:23 timotimo no, you can
19:23 timotimo definedness and boolness and such all work
19:23 timotimo and type checks
19:23 MadcapJake sweet, that's perfect
19:25 moritz perlpilot: yes, because the specs mandate it
19:26 moritz perlpilot: I think all of these use cases could be converted to die in v6.d for example
19:26 pmqs joined #perl6
19:26 moritz afaict there are two main reasons for fail()
19:26 moritz 1) to avoid having exceptions that cross thread boundaries
19:27 moritz 2) to not invalidate a huge parallel computation just by having one data error somewhere
19:27 MadcapJake is this accurate: fail is for when you **don't** want to pass an Exception to CATCH handlers?
19:27 moritz my counter point to 1) is that we already catch exceptions in start { } blocks, and rethrow them on Promise.result
19:28 moritz and to 2) is that if your application isn't prepared to handle data erros in a huge parallel computation, it likely isn't prepared to handle them in resulting data structure either
19:28 vendethiel joined #perl6
19:29 llfourn is there a reason Proc::Async doesn't support .new(:in($iohandle)) like Proc does -- NYI?
19:29 MadcapJake the docs utilize the verbiage «throw» and «unthrow»; do these terms have to do with passing execution to CATCH handlers (or exiting the program where there are none)?
19:30 moritz MadcapJake: it's much simpler
19:30 moritz MadcapJake: if &foo fails, you can write  my $res = foo()
19:30 moritz and there is no exception yet
19:31 moritz and only if you use $res without checking it first (for truth or definedness) are you getting an exception
19:31 MadcapJake oh, so like a lazy exception?
19:32 timotimo yeah. we call it "unthrown exception"
19:36 mr-foobar joined #perl6
19:37 skids To pick a nit, Exception.new is an "unthrown exception" :-)
19:37 gfldex m: my @a[2;2]; @a = 1,2,3,4;
19:37 camelia rakudo-moar e7ccc9: OUTPUT«Assignment to array with shape 2 2 must provide structured data␤  in block <unit> at /tmp/HfN1KuUT9T line 1␤␤»
19:37 gfldex is there any short way to assign a flat list to a shaped array?
19:39 dalek star: 7218fc3 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt:
19:39 dalek star: more tweaking of the final README
19:39 dalek star: review: https://github.com/rakudo/star/commit/7218fc3606
19:39 gfldex i'm silly and don't need the shaped array at all. I just need the shape.
19:39 gfldex I need the shaped Array without the Array. :)
19:42 dbrunton joined #perl6
19:43 [TuxCM] joined #perl6
19:46 skids m: my @a[2;2]; @a.values.cache[*] = 1,2,3,4; @a.perl.say;
19:46 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])␤»
19:48 perlpilot skids++  that's neat
19:49 AlexDaniel joined #perl6
19:51 bowtie_ joined #perl6
19:51 skids m: m: my @a[2;2]; @a.values.cache = 1,2,3,4; @a.perl.say; # Don't need the slice apparently
19:51 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])␤»
19:53 mr-foobar joined #perl6
20:01 keithbro joined #perl6
20:02 skids m: my @a[2;2]; eager @a.values[0,1,2,3] = 1,2,3,4; @a.perl.say;
20:02 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])␤»
20:02 skids m: my @a[2;2]; eager @a.values = 1,2,3,4; @a.perl.say; # Hrmf
20:02 camelia rakudo-moar e7ccc9: OUTPUT«Cannot modify an immutable Seq␤  in block <unit> at /tmp/dtKOj4yVQF line 1␤␤»
20:03 skids m: my @a[2;2]; eager @a.values[] = 1,2,3,4; @a.perl.say; # Double Hrmf
20:03 camelia rakudo-moar e7ccc9: OUTPUT«Cannot modify an immutable Seq␤  in block <unit> at /tmp/Dwm2mneuvV line 1␤␤»
20:04 skids m: my @a[2;2]; eager @(@a.values) = 1,2,3,4; @a.perl.say; # Ahh, makes more sense now.
20:04 mr-foobar joined #perl6
20:04 camelia rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])␤»
20:04 sortiz BTW, I found some contradictions in roast with .elems: https://github.com/perl6/roast/blob/master/S02-types/multi_dimensional_array.t#L45 seems to expect that @foo.elems returns the number of _assigned_ elements.
20:05 b2gills m: sub foo { fail "hello" }; say foo() // "world"; # I prefer fail so that I don't have to use try as often
20:05 camelia rakudo-moar e7ccc9: OUTPUT«world␤»
20:07 skids sortiz: what's that contradict with?
20:08 b2gills m: my $a = [[67,4,-8,5,13],[9,13,42,4,-7],[1,1,3,-9,29],[16,99,8,77,0]];{.[1..*-2]»[1..*-2] »=»0}($a); say $a.perl
20:08 camelia rakudo-moar e7ccc9: OUTPUT«$[[67, 4, -8, 5, 13], [9, 0, 0, 0, -7], [1, 0, 0, 0, 29], [16, 99, 8, 77, 0]]␤»
20:09 sortiz skids, In other places, seems to expect the elements of the first  dimension, let me check...
20:09 musiKk joined #perl6
20:10 keithbro left #perl6
20:10 skids b2gills: problem is the current Failure will spew garbage if it is thrown away unhandled, when it is GCd.
20:11 NZKindest joined #perl6
20:11 sortiz skids, see https://github.com/perl6/roast/blob/master/S09-multidim/methods.t#L11
20:12 skids (There'd be an easy fix of overriding Failure.DESTROY in a subclass but it didn't work last time I tried)
20:13 S41D0 joined #perl6
20:13 skids sortiz: Maybe a difference between fully shaped and partially shaped arrays?
20:14 skids Though, that second behavior I'm dubious as to the utility of.
20:14 sortiz I don't now, but is in my "things that need clarification" list.
20:15 b2gills skids maybe if you had 「submethod DESTROY { self.defined }」 in your subclass
20:15 skids (and if you write a test to see that the first dimension is what is being returned, probably the other one should not also be 2)
20:15 skids b2gills: I tried that it kinda blew up.  But maybe things are better now.
20:16 sortiz skids, I agree.
20:17 timotimo b2gills: wow, your solution is beautiful
20:17 b2gills I don't know if I want the result to print to STDERR if I don't use it, and it happens to be a Failure
20:18 * b2gills takes a bow
20:18 telex joined #perl6
20:24 Hotkeys hello I'm back perl friends
20:25 sortiz o/ Hotkeys
20:26 Hotkeys Just had a linguistics midterm
20:26 Hotkeys was ezz
20:26 Hotkeys ezpz*
20:35 bowtie joined #perl6
20:36 nemo m: 1 ≠ 2
20:36 camelia rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/px2r4VbbCo␤Confused␤at /tmp/px2r4VbbCo:1␤------> 17⏏5 ≠ 2␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement…»
20:36 nemo hm
20:37 Hotkeys don't have those nemo
20:37 Hotkeys at least not yet
20:37 Hotkeys same for ≤ ≥
20:37 nemo Hotkeys: you guys considered configurable mappings?  I guess it could get messy unless the script could define a cheat sheet
20:37 grondilu joined #perl6
20:37 jnthn m: sub infix:<≠>($a, $b) { $a != $b }; say 4 ≠ 3
20:37 camelia rakudo-moar e7ccc9: OUTPUT«True␤»
20:37 Hotkeys nemo ^^
20:37 nemo ah neat
20:38 nemo that's really cool. had no idea it was so easy
20:38 jnthn If you stick that in a module and shove "is export" on it, then you can just use that module and have the mappings :)
20:38 nemo but why wouldn't it be I guess
20:39 Hotkeys yep
20:39 Hotkeys all ops are just functions
20:39 Hotkeys some of them have categories slapped on them
20:39 Hotkeys like infix or postfix etc.
20:40 Hotkeys functions that is
20:41 ely-se joined #perl6
20:43 sortiz What is the expected way for handling things like "2;4" for indexing? A new kind of object in the Capture?
20:44 yqt joined #perl6
20:44 AlexDaniel So I was slightly disappointed by the fact that 「hyper」 does not really work, but whatever. So I decided to do some stuff with plain 「start { }」 and guess what? “double free or corruption (fasttop): 0x00007f68c3048f90”… that's after like 30 minutes of hard work. I've tried running it several times but it always crashes for one reason or another… :/ The problem is that I don't even know how to golf that down… what can I do
20:45 skids sub infix:<≠>($a, $b) is prec(:equiv<=>) { $a != $b }; say 4 ≠ 3 + 1 # Not quite THAT easy, you do need to also set precedence.
20:47 moritz and you probably want equiv to ==, not =
20:48 ely-se I mistook it for <=> initially
20:48 skids Oh yes surely :-)
20:49 skids m: sub infix:<≠>($a, $b) is prec(:equiv<==>) { $a != $b }; say 4 ≠ 3 + 1 # hmm.
20:49 camelia rakudo-moar e7ccc9: OUTPUT«2␤»
20:49 Hotkeys why not equiv to !=
20:50 ely-se I also want e̶q̶
20:50 Hotkeys lol
20:50 Hotkeys how do you even type that
20:50 Hotkeys I can't guess the compose sequence for a combining line like that
20:51 ely-se m: sub infix:<e̶q̶>($a, $b) is prec(:equiv<eq>) { $a ne $b }; say '1' e̶q̶ '01'
20:51 camelia rakudo-moar e7ccc9: OUTPUT«True␤»
20:51 skids Hotkeys: != should work too.
20:51 bowtie_ joined #perl6
20:51 ely-se Hotkeys: strikethrough combining characters
20:51 skids oh.
20:51 skids m: sub infix:<≠>($a, $b) is equiv<!=> { $a != $b }; say 4 ≠ 3 + 1
20:51 camelia rakudo-moar e7ccc9: OUTPUT«False␤»
20:51 Hotkeys ely-se: I guess I'll look at my compose list
20:52 Hotkeys I don't think I have a sequence for that
20:52 Hotkeys hm
20:52 Hotkeys I'll deal with that later
20:53 cdg joined #perl6
20:55 jnthn sortiz: [2;4] calls a different multi, postcircumfix:<[; ]>, which is how they're handled
20:56 jnthn That is, it's a syntactic distinction
20:56 SCHAAP137 joined #perl6
20:57 sortiz jnthn, and in my Indexable's AT-POS, what can I expect to receive?
20:57 jnthn sortiz: Multiple parameters
20:58 jnthn One per indice
20:58 sortiz jnthn, thanks!
21:04 sortiz jnthn, a last question: and in ASSING-POS and BIND-POS the new value should be the last if many args?
21:04 sortiz *of
21:04 bowtie_ joined #perl6
21:05 Hotkeys heh
21:05 Hotkeys ASSING
21:05 revhippie joined #perl6
21:05 jnthn The number of times I did that typo... :)
21:05 jnthn sortiz: Correct
21:06 jnthn @a[1;2] = 3 calls @a.ASSIGN-POS(1, 2, 3)
21:07 sortiz But that need an specific signature depending of the dimensions, no?
21:10 sortiz Or an *@args, and ask for the last one.
21:11 sortiz A little LTA, imo.
21:12 dolmen joined #perl6
21:17 sortiz And too late for changing to ASSIGN-POS(??:CLASS:D: \new, *@indexes) I suppose.
21:17 bowtie_ joined #perl6
21:17 sno joined #perl6
21:17 jnthn sortiz: It was fairly deliberately picked
21:18 jnthn sortiz: Largely for performance reasons
21:18 jnthn sortiz: The overwhelmingly common cases are 2 and 3 dimensions.
21:18 sortiz jnthn, Yes I understand.
21:19 jnthn Which we'll later provide special candidates for in Rakudo's Array/native_array
21:19 jnthn But yeah, it's one of those places we picked easy optimizability over convenience.
21:19 geraud joined #perl6
21:20 jnthn Largely 'cus implementing multi-dim data strucutres won't be that common.
21:20 sortiz The only complication that I see is when $new is typed.
21:20 skids Wouldn't (@, $) be able to be added pretty easily, given you'd not end up passing a Positional as an element normally?
21:21 jnthn skids: That one fails the "make it perform easily" test.
21:21 jnthn It forces construction of something for the @foo
21:21 jnthn Which in turn forces allocation
21:22 skids So the indices aren't already in a Positional post-parse?
21:22 patrickz joined #perl6
21:23 jnthn No, but compile time isn't what matters, the point is you'd have to construct said positional per indexing
21:23 jnthn Most of the time
21:23 jnthn 'cus arrays are normally indexed with dynamic indices, in loops
21:23 virtualsue joined #perl6
21:24 sufrostico joined #perl6
21:25 skids Wouldn't shallow immutability be able to take care of that?
21:25 SCHAAP137 joined #perl6
21:25 jnthn I don't really see it.
21:26 jnthn @foo[$a;$b] can (with a bit more analysis that we do right now) compile into @foo.AT-POS($a, $b)
21:26 jnthn If we passed a positional it'd be more like @foo.AT-POS(make-something-positional($a, $b))
21:27 jnthn Where make-something-positional would need to return something that refers to $a and $b
21:28 * skids was thinking ENTER(or whatnot) { make-something-positional }; something-positional[0] = $a; something-positional[1] = $b; @foo.AT-POS(@something-positional)
21:28 sufrosti1o joined #perl6
21:29 timotimo that'd require a pretty difficult piece of optimization technology
21:29 jnthn skids: Yeah, trouble is that this sneaky bit of storage can easily escape
21:30 sufrostico joined #perl6
21:30 jnthn skids: If you don't try to lift it out of a closure, then it's useless for the block of a for loop, since we ENTER it every time. If you do lift, and the closure gets passed to something that runs it on another thread, you're in bother.
21:31 jolts joined #perl6
21:31 jnthn So it's not as easy as it looks to do it without getting caught. We likely will do escape analysis in MoarVM in not too long, but the analysis is, as timotimo notes, highly non-trivial.
21:32 skids interesting.  Thanks.
21:32 timotimo if, on the other hand, the user writes the code just like that, it's fine. because if the *user* gets caught, that's likely their fault :)
21:32 sortiz Indeed, Thank you jnthn.
21:40 virtualsue joined #perl6
21:50 leont joined #perl6
21:52 TEttinger joined #perl6
21:52 lizmat m: my %h = a => 42; %h.pairs[0].value = 666; dd %h   # should we consider this a bug or not, jnthn timotimo ?
21:52 camelia rakudo-moar e7ccc9: OUTPUT«Hash %h = {:a(666)}␤»
21:53 lizmat jnthn timotimo: or is it a feature ?
21:53 timotimo seems like a feature to me
21:53 timotimo just today i used a for loop over a multi-dimensional array with .pairs in order to set its values via $p.value
21:54 jnthn lizmat: Feature; it's the hash parallel of things like for @a <-> { }
21:54 lizmat oki
21:54 jnthn uh, for @a <-> $x { }
21:54 timotimo jnthn: how do we feel about .kv giving you something where you can't write the value?
21:54 mr-foobar joined #perl6
21:55 jnthn timotimo: It doesn't already?
21:55 timotimo gimme a sec
21:55 timotimo m: my @a[5]; for @a.kv -> $k, $v is rw { }
21:55 camelia rakudo-moar e7ccc9: OUTPUT«Parameter '$v' expected a writable container, but got Any value␤  in block <unit> at /tmp/Cwblq5pyOZ line 1␤␤»
21:55 jnthn m: my %h = a => 1, b => 2; for %h.kv -> $k, $v is rw { $v++ }; say %h
21:55 camelia rakudo-moar e7ccc9: OUTPUT«a => 2, b => 3␤»
21:56 timotimo oh, sorry, why was i not saying "array" there
21:56 jnthn Yeah, but that looks like an accident
21:56 jnthn I'd have thought it'd do the same as with a hash
21:56 timotimo good
21:56 timotimo next step will be doing the eggshell-dance with regards to roast
21:57 lsm-desktop joined #perl6
21:57 jnthn Was gonna be surprised with %foo.kv was busted for that, as I'm sure I've used it a few times :)
21:57 timotimo would it be possible to add a test for that and make that an errata-related thing?
21:57 jnthn timotimo: We only need to care for it errata-wise if there's a spectest we *break* by fixing the bug.
21:57 timotimo ah
21:57 timotimo in that case, let me see if something b0rks when i try it
21:57 timotimo m: my @a = 1, 2, 3; for @a.kv -> $k, $v is rw { }
21:57 camelia rakudo-moar e7ccc9: ( no output )
21:58 timotimo ah, only broken for shaped arrays, it seems
21:58 timotimo and adding a roast test for it, does that require a fudge for 6.c.1?
21:58 jnthn No; 6.c is a tagging
21:58 jnthn Errata will be a 6.c-errata branch
21:58 jnthn Off that tag
21:58 jnthn master is "current work"
21:59 jnthn Or "candidate for the next language version"
21:59 timotimo i meant adding a new test that ensures it works that way with @a[5]
21:59 timotimo not for changing an existing test
21:59 jnthn Right, that's what I was answering. No need to fudge.
21:59 jnthn Because the 6.c test suite is the tag
21:59 jnthn That is, if you want to check an implementation for 6.c compliance, you checkout the 6.c tag
22:00 timotimo right-o
22:00 jnthn (Or more likely 6.c-errata in the future)
22:00 jnthn *sigh* My TL;DR blog post on versioning is going to be longer than the darn versioning doc at this rate :P
22:02 timotimo hah
22:02 MadcapJake is there a simple syntax for running a block multiple times? Best I can seem to get is `{...}() xx n`
22:02 jnthn for ^10 { ... } :P
22:02 timotimo i'm having some difficulty with moar's "make install"
22:02 perlpilot joined #perl6
22:02 MadcapJake ahh i knew there was something
22:03 jnthn Note that if you wrap that in parens it's an expression too
22:03 timotimo timo     32153  0.0  0.0      0     0 pts/4    Z    Feb03   0:00      |       \_ [moar] <defunct>
22:03 timotimo :o
22:03 jnthn m: say (for ^10 { 2 * $_ })
22:03 camelia rakudo-moar e7ccc9: OUTPUT«(0 2 4 6 8 10 12 14 16 18)␤»
22:03 timotimo this is preventing make install from copying over the moar binary properly
22:03 timotimo and make install still doesn't fail >:(
22:03 jnthn :S
22:03 * MadcapJake just noticed that upto's need syntax adjustments in perl6fe
22:04 jnthn .oO( what de funct )
22:04 AlexDaniel m: say (^10)».&(*×2) # hmmm anything shorter?
22:04 camelia rakudo-moar e7ccc9: OUTPUT«(0 2 4 6 8 10 12 14 16 18)␤»
22:05 MadcapJake AlexDaniel, cool never seen that &(...) syntax
22:05 lizmat AlexDaniel: did you verify that Dan Kogai's tests actually pass ?
22:06 lizmat AlexDaniel: they're failing for me :-(
22:06 AlexDaniel lizmat: I did
22:06 AlexDaniel lizmat: but holy…
22:07 AlexDaniel m:   my $big-e = 4553535345364535345634543534; say (-2) ** $big-e
22:07 camelia rakudo-moar e7ccc9: OUTPUT«Numeric overflow␤  in block <unit> at /tmp/xpfA0bGNp0 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/xpfA0bGNp0 line 1␤␤»
22:07 cmh-fn joined #perl6
22:07 timotimo anyway. i recently did an update that included a new kernel and graphics card drivers
22:07 AlexDaniel m: use Test; my $xno = X::Numeric::Overflow; my $big-e = 4553535345364535345634543534; throws-like { EVAL qq[(-2) ** $big-e] }, $xno, "-2 ** $big-e";
22:07 camelia rakudo-moar e7ccc9: OUTPUT«    1..2␤    ok 1 - code dies␤    ok 2 - right exception type (X::Numeric::Overflow)␤ok 1 - -2 ** 4553535345364535345634543534␤»
22:07 timotimo so i might as well just reboot right now
22:08 AlexDaniel lizmat: which one fails exactly?
22:08 lizmat t/spec/S32-num/power.rakudo.moar                            (Wstat: 1536 Tests: 76 Failed: 6)
22:08 lizmat Failed tests:  13-15, 68-70
22:08 AlexDaniel all 6???
22:08 jnthn MadcapJake: btw, I'm now a happy Atom user for Perl 6 and various other things :)
22:09 jnthn Largely thanks to your perl6-fe work giving me the nudge to give it another try :)
22:09 MadcapJake jnthn, great to hear!
22:09 AlexDaniel lizmat: what OS do you have?
22:09 lizmat OS X
22:09 AlexDaniel okay, then we have a problem with OS X I guess…
22:09 cmh-fn joined #perl6
22:10 lizmat 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
22:10 AlexDaniel lizmat: so what do you get? Inf or 0?
22:11 timotimo 'k
22:11 MadcapJake jnthn: awesome! :D it's a great editor and I think I did a pretty good job with perl6fe
22:12 lizmat m: my $xno = X::Numeric::Overflow; my $big-e = 4553535345364535345634543534; say (-2) ** $big-e
22:12 camelia rakudo-moar e7ccc9: OUTPUT«Numeric overflow␤  in block <unit> at /tmp/GyOgEl7JHD line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/GyOgEl7JHD line 1␤␤»
22:12 lizmat AlexDaniel: ^^^ gives me 1
22:12 AlexDaniel lizmat: which is blatantly wrong, isn't it?
22:13 jpoehls_ joined #perl6
22:13 lizmat well, yes, but it doesn't die, so it makes the test fail
22:13 AlexDaniel lizmat: “#?rakudo.moar skip 'big exponents RT #124798: passes on OSX, fails on Linux'” so now I see why this test passes…
22:13 AlexDaniel lizmat: OK geez, how can I undo the mess? Is there any way to fudge it for OS X only?
22:13 MadcapJake I know that azawawi is working on the excellent atom-perl6-editor-tools, but I still plan on continuing with linter-perl6 and autocomplete-perl6 as they'll both take a slightly different angle (in the back and front end, actually)
22:14 jnthn MadcapJake: +1, there's more than one way to do it :)
22:14 lizmat AlexDaniel: not sure  :-(
22:15 cmh-fn joined #perl6
22:16 AlexDaniel lizmat: well… I guess that I'll just fudge these tests and submit a rakudobug…
22:17 jnthn AlexDaniel: Do so, it may be a semantic difference at a level Moar should be hiding.
22:17 lizmat that's perhaps best  :-(
22:17 jnthn (Most likely that's where we'll want to fix it)
22:17 AlexDaniel such a pity. OK
22:17 * jnthn wonders if the next hardware he buys should be from apple, so he can hunt these darn OSX bugs :P
22:19 AlexDaniel .oO( well, maybe we should ask lizmat to fix these bugs :) )
22:20 jnthn Well, lizmat++ did give me an OSX shell account at some point in the past so I could track down a horrible memory corruption GC issue that only seemed to show up on OSX... :)
22:21 dalek rakudo/nom: b542946 | lizmat++ | src/core/Hash.pm:
22:21 dalek rakudo/nom: Refactor object hashes completely
22:21 dalek rakudo/nom:
22:21 dalek rakudo/nom: Before:
22:21 dalek rakudo/nom:   Hash[Any,Any]
22:21 dalek rakudo/nom:     |-- $!keys
22:21 dalek rakudo/nom:     |     |-- object
22:21 dalek rakudo/nom:     \-- $!storage
22:21 dalek rakudo/nom:           |-- value
22:21 dalek rakudo/nom:
22:21 dalek rakudo/nom: After:
22:21 dalek rakudo/nom:   Hash[Any,Any]
22:21 dalek rakudo/nom:     \-- $!storage
22:21 dalek rakudo/nom:           \-- Pair.new(object,value)
22:21 dalek rakudo/nom:
22:21 dalek rakudo/nom: Sample benchmarks showed about 10% less memory usage, and a few percent
22:21 dalek rakudo/nom: less CPU usage.  More importantly, methods such as kv, pairs, antipairs
22:21 dalek rakudo/nom: have become much simpler and faster, whereas methods such as keys/values
22:21 dalek rakudo/nom: didn't suffer much
22:21 dalek rakudo/nom:
22:21 dalek rakudo/nom: This should also make it easier to subclass Bags/Mixes from object hashes.
22:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5429468f9
22:22 MadcapJake can you override an object's methods after class instantiation?
22:22 lizmat m: my $a = 42 but False; say $a; say ?$a
22:22 camelia rakudo-moar e7ccc9: OUTPUT«42␤False␤»
22:22 lizmat MadcapJake: ^^^
22:23 lizmat more elaborately:
22:23 lizmat m: my $a = 42 but role { method Bool { False } }; say $a; say ?$a
22:23 camelia rakudo-moar e7ccc9: OUTPUT«42␤False␤»
22:23 gfldex MadcapJake: see http://design.perl6.org/S14.html#Run-time_Mixins
22:24 Celelibi joined #perl6
22:24 MadcapJake sweet, thanks lizmat, gfldex !
22:27 ramon joined #perl6
22:27 pmurias joined #perl6
22:31 lizmat jnthn: that account is still there, should you need access  :-)
22:32 jnthn lizmat: Could well do so. It's cheaper than a hex-core trash can :)
22:32 jnthn Well, more me it is :D
22:32 lizmat yeah, that, I *have* been thinking of getting one recently
22:32 kurahaupo joined #perl6
22:33 jnthn Yeah, was buying a couple of small items last night online and noticed they had those on alza.cz...for 120,000 CZK :)
22:35 jnthn I don't know off the top of my head what that is in euros, but I know it's "enough" :)
22:35 lizmat ~ 4500 euro
22:35 jnthn :)
22:36 * jnthn is curious what the upcoming Intel i7 with 10 cores will cost
22:36 jnthn That'd run spectests pretty sweet. Especially if it does turn out to have 25MB of cache on the chip.
22:37 diakopter lizmat++ # good refactor
22:37 dalek roast: 2ff9b09 | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t:
22:37 dalek roast: Fudge tests (X::Numeric:Overflow is not thrown on OS X)
22:37 dalek roast: review: https://github.com/perl6/roast/commit/2ff9b09108
22:38 AlexDaniel lizmat: done, I think. Thank you
22:39 jnthn .oO( I should keep this hardware until I make Rakudo fast enough it doesn't matter... :) )
22:39 diakopter I like the ().list
22:39 diakopter surely we can cache an empty list somewhere tho :D
22:39 AlexDaniel 10 cores, that's pretty sweet. Still far from GPU-like core count though! :D
22:40 lizmat jnthn: there's already a trash-can with 12 cores, though
22:40 lizmat but that would set you back at least 7000 US$
22:42 addison joined #perl6
22:42 jnthn lizmat: Wow. They didn't even stock that. :)
22:43 AlexDaniel 127500 is a really nice number, by the way
22:44 * flussence saw something recently about a workstation-oriented POWER8 board with insane specs; shame it's a few years late to consider running OS X on...
22:45 flussence (iirc: 12 cores * 8 threads, $4000)
22:45 diakopter flussence: /.
22:46 flussence diakopter: figures it'd be on there, I only heard it third- or 4th-hand :)
22:46 diakopter http://www.phoronix.com/scan.php?page=article&amp;item=talos-workstation
22:46 timotimo hmm
22:48 timotimo lizmat: you're probably better at this than i am; can you figure out why .kv on a sized/shaped array will not give us writable values?
22:48 diakopter maybe it does now!
22:54 * jnthn finally blaught: https://6guts.wordpress.com/2016/02/09/a-few-words-on-perl-6-versioning-and-compatibility/
22:54 gfldex jnthn++ # for many words
22:56 lizmat timotimo: do you know where that method kv lives ?
22:56 Hotkeys Anybody know the best way to get Linenoise on windows?
22:56 timotimo yeah, i *think* that one's in List.pm
22:56 hoelzro Hotkeys: panda install Linenoise *should* work
22:56 timotimo line 474
22:56 jnthn Array.pm inside the Shaped or so role
22:56 jnthn iirc
22:57 timotimo the Shaped role doesn't have a method for that i think
22:57 jnthn ah
22:57 jnthn But wait, .kv on shapeds must be different
22:57 Hotkeys hoelzro: apparently not in ecosystem
22:57 hoelzro wat
22:57 jnthn Oh, I think there's a Rakudo::Internals role maybe
22:57 hoelzro that's the error  you're getting?
22:57 hoelzro when's the last time you did a panda update?
22:58 jnthn That has shared things between native and non-native shaped arrays
22:58 Hotkeys ah
22:58 jnthn But the keys of a multi-dim array are indice lists
22:58 Hotkeys I didn't realize I needed to do panda update
22:58 timotimo oh!
22:58 Hotkeys I thought it was just install and go
22:58 timotimo i didn't look at RakudoInternals
22:58 hoelzro I f'ed up Linenoise in the ecosystem the other night, and MadcapJake had to fly in to my rescue
22:58 Hotkeys ah
22:58 sortiz lizmat, I *think* that using Any-iterable-methods.pm
22:58 timotimo 425 in Rakudo/Internals.pm
22:59 Hotkeys hm
22:59 Hotkeys Should this allow me to edit multiline in repl
22:59 Hotkeys or is that not a thing
22:59 hoelzro it is if you use my experimental branch
22:59 hoelzro (please do, it needs eyes)
22:59 Hotkeys lol
22:59 Hotkeys how?
22:59 timotimo yeah! go hoelzro, go hoelzro, go!
22:59 hoelzro https://www.reddit.com/r/perl6/comments/44nys3/experimental_multiline_repl_branch_up_for_testing/
22:59 lizmat timotimo: does values or pairs on a shaped array give you writeable containers ?
22:59 hoelzro Hotkeys: ↑
23:00 Hotkeys ok ty
23:00 Hotkeys I assume i should remove the panda one
23:00 hoelzro mhmm
23:00 timotimo lizmat: i haven't looked yet, but it's a good idea to do that
23:00 timotimo m: my @a[5] = 1, 2, 3, 4; for @a.values <-> $a { $a = 5 }; say @a
23:00 camelia rakudo-moar b54294: OUTPUT«[5 5 5 5 5]␤»
23:00 Hotkeys er
23:00 hoelzro it's still a WIP; history doesn't work as multiline just yet
23:00 Hotkeys panda doesn't have a remove option
23:00 timotimo pairs does
23:00 timotimo m: my @a[5] = 1, 2, 3, 4; for @a.pairs <-> $a { $a.value = 5 }; say @a
23:00 camelia rakudo-moar b54294: OUTPUT«Parameter '$a' expected a writable container, but got Pair value␤  in block <unit> at /tmp/yoyzf9K26n line 1␤␤»
23:00 hoelzro and it fails a few roast tetsts
23:00 timotimo m: my @a[5] = 1, 2, 3, 4; for @a.pairs -> $a { $a.value = 5 }; say @a
23:00 camelia rakudo-moar b54294: OUTPUT«[5 5 5 5 5]␤»
23:01 timotimo there we go
23:01 timotimo only kv doesn't work like that
23:01 hoelzro Hotkeys: oh, when I said "mhmm", I meant "blow away your current rakudo install"
23:01 Hotkeys lol
23:01 Hotkeys alright
23:01 timotimo could it be that slip(...) doesn't work right with this?
23:01 lizmat timotimo: then I guess it's the slip() in 425 causing the problem
23:01 timotimo probably is
23:02 Hotkeys why can't panda remove things though
23:02 timotimo m: my $a = 10; my @lol = slip(10, $a); @lol[1] = 99; say $a
23:02 camelia rakudo-moar b54294: OUTPUT«10␤»
23:02 Hotkeys seems like a reasonable thing to do
23:02 timotimo m: my $a = 10; my @lol = Slip.new(10, $a); @lol[1] = 99; say $a
23:02 camelia rakudo-moar b54294: OUTPUT«10␤»
23:02 timotimo so the constructor of Slip needs to have an "is raw" or so?
23:02 kid51 joined #perl6
23:02 hoelzro Hotkeys: agreed
23:02 hoelzro I think it's just NYI
23:02 timotimo but Slip just derives its constructor from List
23:02 Hotkeys ah
23:03 timotimo m: my $a = 10; my @lol := List.new(10, $a); @lol[1] = 99; say $a
23:03 camelia rakudo-moar b54294: OUTPUT«10␤»
23:03 timotimo oh, and List.new also reconts it seems like?
23:03 lizmat m: my $a = 42; sub a(+@a) { $_++ for @a }; a($a); dd $a  # timotimo: think this is the underlying issue
23:03 camelia rakudo-moar b54294: OUTPUT«Int $a = 42␤»
23:03 timotimo oh, these things
23:04 timotimo TBH i don't know how exactly these prefixes work in signatures for the most precise details
23:07 Hotkeys oh wait hoelzero I didn't actually read this
23:07 Hotkeys is this an entire branch of rakudo
23:07 lizmat timotimo: I guess the only way around it, would be to no use .map and slip() in that candidate
23:07 * Hotkeys should pay more attention
23:07 lizmat *not
23:08 jnthn Rest time...'night, #perl6
23:08 hoelzro Hotkeys: yup =)
23:08 lizmat gnight, jnthn!
23:08 hoelzro night jnthn
23:12 timotimo hm
23:15 leont joined #perl6
23:20 Hotkeys hoelzro: http://i.imgur.com/0XXnbY2.png
23:20 Hotkeys :D
23:20 hoelzro \o/
23:20 hoelzro does powershell provide a line editor for you to use?
23:20 hoelzro eg. do the arrow keys work?
23:21 lizmat timotimo: testing a fix
23:21 Hotkeys kinda
23:21 Hotkeys it treats the * lines like any other line
23:21 Hotkeys so i can go left and right
23:21 Hotkeys but up and down just go through history
23:21 hoelzro ok, that's good
23:21 hoelzro well, it's good in that it's consistent with how cmd.exe works =)
23:22 hoelzro I'm going to work on getting history to respect multi-line entries
23:22 Hotkeys I wish I could properly edit the multiple lines but that might be a bigger change than what you're currently doing
23:22 Hotkeys like go up and down
23:22 Hotkeys or is that what you meant
23:22 hoelzro Hotkeys: what exactly do you mean but edit the multiple lines?
23:23 hoelzro like if you enter for ^10 {\n.say\n, hitting up will edit the full for loop?
23:23 Hotkeys http://i.imgur.com/IwL5QnW.png
23:23 Hotkeys lets say I'm hear and see that typo
23:23 Hotkeys and want to fix it
23:23 Hotkeys s/hear/here
23:24 hoelzro ok
23:25 partly_ joined #perl6
23:25 Hotkeys I suppose you might not be able to in powershell
23:25 Hotkeys or cmd
23:25 Hotkeys I am trying the python repl right now and it can't either
23:25 Hotkeys so that's fine
23:26 hoelzro well, I don't want to settle for fine ;)
23:26 Hotkeys I was thinking like
23:26 Hotkeys how in python's IDLE
23:26 Hotkeys it's a repl but also you can edit like I'm talking about
23:26 hoelzro ok
23:26 hoelzro I'll try IDLE
23:27 lizmat timotimo: https://gist.github.com/lizmat/873470fb147185176642   # my line of thought for @a[5].kv
23:27 Hotkeys like if I'm in this situation http://i.imgur.com/aLu4cG4.png
23:27 Hotkeys I can just hit up arrow and I can edit that line
23:27 Hotkeys like I'm in any text editor
23:28 hoelzro hmm
23:28 hoelzro well, with a CLI REPL, that'll be a little trickier
23:28 Hotkeys this also isn't command line though
23:28 Hotkeys yeah
23:28 hoelzro I think anything that requires Curses or a GUI belongs in a module that provides an alternative REPL interface
23:29 Hotkeys fair enough
23:29 lizmat good night, #perl6!
23:29 Hotkeys even this multi-line setup is a good improvement though
23:29 Hotkeys so hoelzro++
23:29 Hotkeys also night lizmat
23:29 hoelzro night lizmat
23:30 hoelzro I think I'll pull a jnthn and summarize my thoughts on the REPL experience
23:30 hoelzro post it here tomorrow
23:36 FreezerburnV joined #perl6
23:37 diakopter m: use v6v6v6v6v6v6v6v6v6
23:37 camelia rakudo-moar b54294: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d0INZGHHZx␤No compiler available for Perl v6v6v6v6v6v6v6v6v6␤at /tmp/d0INZGHHZx:1␤------> 3use v6v6v6v6v6v6v6v6v67⏏5<EOL>␤»
23:40 AlexDaniel indeed, sorry :)
23:40 partly_ joined #perl6
23:40 Yary joined #perl6
23:41 Yary Hi all... think I found  a bug, this bit of code caused R* 2016.01 to eat up memory and make my 64-bit Windows laptop slow to a crawl:
23:41 Yary perl6 -e "say Real.new == 0"
23:42 BenGoldberg joined #perl6
23:42 gfldex m: say Real.new == 0
23:42 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 57792 bytes␤»
23:42 gfldex m: say so Real.new == 0
23:42 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes␤»
23:42 BenGoldberg m: say 'alive';
23:42 camelia rakudo-moar b54294: OUTPUT«alive␤»
23:42 revhippie neat
23:43 gfldex m: say Real.new() == 0
23:43 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 58000 bytes␤»
23:43 BenGoldberg m: say Real.new
23:43 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes␤»
23:43 BenGoldberg m: say 0.f;
23:43 camelia rakudo-moar b54294: OUTPUT«Method 'f' not found for invocant of class 'Int'␤  in block <unit> at /tmp/c6xtbLn4v7 line 1␤␤»
23:43 BenGoldberg m: say 0e0;
23:43 timotimo lizmat: i was afraid it might end up looking like that ... well, it's probably a bunch faster than what we had so far, which is probably nice
23:43 camelia rakudo-moar b54294: OUTPUT«0␤»
23:43 Yary thanks for the simplification ++BenGoldberg
23:44 BenGoldberg m: say 0e0.WHAT;
23:44 camelia rakudo-moar b54294: OUTPUT«(Num)␤»
23:44 * Yary is still trying to kill the hung Moar instance using the Task Manager
23:44 BenGoldberg m: my Real $x; say $x;
23:44 camelia rakudo-moar b54294: OUTPUT«(Real)␤»
23:44 BenGoldberg m: my Real $x; say so $x;
23:44 camelia rakudo-moar b54294: OUTPUT«False␤»
23:44 FreezerburnV Why is the error "Constraint type check failed for parameter '$precomp-id'" still a thing? :(
23:44 BenGoldberg m: my Real $x; $x .= new;
23:44 camelia rakudo-moar b54294: ( no output )
23:44 gfldex star: say Real.new()
23:44 camelia star-m 2015.09: OUTPUT«Memory allocation failed; could not allocate 58768 bytes␤»
23:44 BenGoldberg m: my Real $x; $x .= new; say $x;
23:44 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes␤»
23:44 BenGoldberg m: my Num $x; $x .= new; say $x;
23:44 camelia rakudo-moar b54294: OUTPUT«0␤»
23:45 BenGoldberg Is Real a role?
23:45 gfldex r: so Real.new
23:45 Yary m: say Real.^WHAT
23:45 camelia rakudo-jvm f99bdb: OUTPUT«WARNINGS:␤Useless use of "so " in expression "so Real.new" in sink context (line 1)␤»
23:45 camelia ..rakudo-moar b54294: OUTPUT«WARNINGS for /tmp/tmpfile:␤Useless use of "so " in expression "so Real.new" in sink context (line 1)␤Memory allocation failed; could not allocate 81920 bytes␤»
23:45 camelia rakudo-moar b54294: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SDQf5yVNJQ␤Cannot use .^ on a non-identifier method call␤at /tmp/SDQf5yVNJQ:1␤------> 3say Real.^WHAT7⏏5<EOL>␤    expecting any of:␤        method arguments␤»
23:46 BenGoldberg m: role Foo { }; say Foo.new;
23:46 camelia rakudo-moar b54294: OUTPUT«Foo.new␤»
23:46 BenGoldberg m: role Foo { }; say so Foo.new;
23:46 camelia rakudo-moar b54294: OUTPUT«True␤»
23:46 gfldex r: say Real.WHAT
23:46 camelia rakudo-moar b54294, rakudo-jvm f99bdb: OUTPUT«(Real)␤»
23:46 Yary m: say Real.HOW
23:46 camelia rakudo-moar b54294: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
23:47 BenGoldberg Ahh, now we're getting somewhere.
23:47 Yary m: say Real.WHICH
23:47 camelia rakudo-moar b54294: OUTPUT«Real␤»
23:47 vendethiel joined #perl6
23:48 BenGoldberg m: role Foo [Str $i] { }; say so Foo[2].new;
23:48 camelia rakudo-moar b54294: OUTPUT«No appropriate parametric role variant available for 'Foo'␤  in any specialize at gen/moar/m-Metamodel.nqp line 2600␤  in any specialize at gen/moar/m-Metamodel.nqp line 2194␤  in any compose at gen/moar/m-Metamodel.nqp line 2979␤  in any make_pun …»
23:48 * Yary power cycles laptop
23:49 BenGoldberg m: role Foo [Str $i] { }; say so Foo["baz"].new;
23:49 camelia rakudo-moar b54294: OUTPUT«True␤»
23:49 BenGoldberg m: role Foo [Str $i] { }; say Foo["baz"].new;
23:49 camelia rakudo-moar b54294: OUTPUT«Foo[Str].new␤»
23:50 BenGoldberg m: role Foo [] { }; say Foo[].new;
23:50 camelia rakudo-moar b54294: OUTPUT«Foo.new␤»
23:50 BenGoldberg m: role Foo [] { }; say so Foo[].new;
23:50 camelia rakudo-moar b54294: OUTPUT«True␤»
23:50 BenGoldberg m: role Foo [] { }; say Foo[];
23:50 camelia rakudo-moar b54294: OUTPUT«(Foo)␤»
23:51 cognominal joined #perl6
23:52 BenGoldberg m: role Foo [] does Numeric { }; say Foo[];
23:52 camelia rakudo-moar b54294: OUTPUT«(Foo)␤»
23:52 BenGoldberg m: role Foo [] does Numeric { }; say Foo[].new;
23:52 camelia rakudo-moar b54294: OUTPUT«Foo<140521962559784>␤»
23:52 BenGoldberg Oooh, now we're getting somewhere!
23:52 BenGoldberg m: role Foo [] does Numeric { }; say so Foo[].new;
23:52 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 82944 bytes␤»
23:52 skids joined #perl6
23:53 BenGoldberg m: role Foo does Numeric { }; say so Foo.new;
23:53 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 58624 bytes␤»
23:53 BenGoldberg m: say Numeric.new;
23:53 camelia rakudo-moar b54294: OUTPUT«Numeric<140265779704888>␤»
23:53 BenGoldberg m: say Numeric.new;
23:53 camelia rakudo-moar b54294: OUTPUT«Numeric<139842821289016>␤»
23:53 BenGoldberg m: say so Numeric.new;
23:53 camelia rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 82944 bytes␤»
23:53 revhippie dumb q: what's the number in <> there?
23:54 BenGoldberg It's what you get when you read from an uninitilized memory location, methinks.
23:54 revhippie eek!
23:54 timotimo lizmat: in any case, thank you for working on this!
23:55 BenGoldberg Or it's a pointer address.
23:55 BenGoldberg m: say so Numeric;
23:55 camelia rakudo-moar b54294: OUTPUT«False␤»
23:56 BenGoldberg m: say Numeric.HOW;
23:56 camelia rakudo-moar b54294: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
23:56 brabo joined #perl6
23:56 AlexDaniel m: my $x = Numeric.new; say $x; say $x.WHERE
23:56 camelia rakudo-moar b54294: OUTPUT«Numeric<140157736129848>␤140157736129848␤»
23:56 AlexDaniel that's ok
23:57 espadrine joined #perl6
23:59 AlexDaniel jnthn: please use another delimiter for LTS versions. 2016.02.10 will look like an exact date :) 2016.02-10 is probably fine

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

Perl 6 | Reference Documentation | Rakudo