Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo right. but do note the "you get two pairs per iteration" thing when you leave out the parenthesis
00:00 sena_kun Ah, sorry, I mistyped. s/.pairs/.kv/
00:00 timotimo ah, yes
00:01 timotimo well, after you've sorted, you're at pairs already
00:01 sena_kun m: %a = :1one, :2two; say %a.sort;
00:01 camelia rakudo-moar c587b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5%a = :1one, :2two; say %a.sort;␤»
00:01 sena_kun m: my %a = :1one, :2two; say %a.sort;
00:01 camelia rakudo-moar c587b9: OUTPUT«(one => 1 two => 2)␤»
00:01 sena_kun m: my %a = :1one, :2two; say %a.sort[0];
00:01 camelia rakudo-moar c587b9: OUTPUT«one => 1␤»
00:02 sena_kun m: my %a = :1one, :2two; for %a.sort -> $a, $b {};
00:02 camelia rakudo-moar c587b9: ( no output )
00:02 sena_kun Ah, perfect.
00:02 timotimo um, no, not perfect
00:02 sena_kun No, it's not.
00:02 timotimo m: my %a = :1one, :2two, :3three; for %a.sort -> $a, $b {};
00:02 camelia rakudo-moar c587b9: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
00:05 MasterDuke joined #perl6
00:05 cpage_ joined #perl6
00:10 sena_kun I wonder if it worked back there.
00:11 dalek modules.perl6.org/bit-rot: 05b5d4f | (Zoffix Znet)++ | / (19 files):
00:11 dalek modules.perl6.org/bit-rot: Switch to new ::AssetPack pipe interface
00:11 dalek modules.perl6.org/bit-rot: review: https://github.com/perl6/modules.perl6.org/commit/05b5d4fafc
00:12 timotimo possibly untested ;)
00:12 sena_kun It can be. Perhaps, it'd better to rewrite it with .pairs.
00:13 cpage_ joined #perl6
00:13 sena_kun Ah, stop.
00:13 pierre_ joined #perl6
00:14 sena_kun m: y %a = one => 1, two => 2; for %a.sort.kv -> Int $a, $b { say $a, $b };
00:14 camelia rakudo-moar c587b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of y///; in Perl 6 please use tr///␤at <tmp>:1␤------> 3y7⏏5 %a = one => 1, two => 2; for %a.sort.kv␤»
00:14 sena_kun m: %a = one => 1, two => 2; for %a.sort.kv -> Int $a, $b { say $a, $b };
00:14 camelia rakudo-moar c587b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5%a = one => 1, two => 2; for %a.sort.kv ␤»
00:14 sena_kun m: my %a = one => 1, two => 2; for %a.sort.kv -> Int $a, $b { say $a, $b };
00:14 camelia rakudo-moar c587b9: OUTPUT«0one => 1␤1two => 2␤»
00:14 cdg joined #perl6
00:14 sena_kun Neat. Thanks, gfldex, timotimo!
00:15 dalek doc: 4d0a4d5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod6:
00:15 dalek doc: doc sub USAGE
00:15 dalek doc: review: https://github.com/perl6/doc/commit/4d0a4d552b
00:15 dalek doc: a44b6cb | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
00:15 dalek doc: add USAGE
00:15 dalek doc: review: https://github.com/perl6/doc/commit/a44b6cbcf6
00:16 sena_kun Argh.
00:16 timotimo do watch out, though
00:16 timotimo for that eval you get the index in the iteration in your $a and the key-value-Pair object in your $b
00:17 sena_kun Yeah, I noticed it just a moment ago. Probably a bit sleepy.
00:17 timotimo i feel sleepy, too
00:22 gfldex m: my %h = a => 1; %h.append('b', 2, 'c', 3); %h.append(d => 4); say %h;
00:22 camelia rakudo-moar c587b9: OUTPUT«{a => 1, b => 2, c => 3}␤»
00:23 gfldex should append treat %_ special? This will cause confusion or bugs.
00:24 TimToady m: my %h = a => 1; %h.append('b', 2, 'c', 3); %h.append((d => 4)); say %h;
00:24 camelia rakudo-moar c587b9: OUTPUT«{a => 1, b => 2, c => 3, d => 4}␤»
00:25 gfldex m: my %h = a => 1; %h.append('b', 2, 'c', 3); %h.append({d => 4}); say %h;
00:25 camelia rakudo-moar c587b9: OUTPUT«{a => 1, b => 2, c => 3, d => 4}␤»
00:25 gfldex thinking about it, it should not just work but warn
00:26 TimToady well, do we ever want to allow an append with an option?
00:26 TimToady it kinda comes out to the unrecognized option on a method thing again
00:26 BenGoldberg joined #perl6
00:27 sena_kun We have a little warning about this in the docs. Perhaps it can be described as a "trap" on appropriate page.
00:27 gfldex %_ can be passed on when wrapping or assuming (if assuming would work on methods)
00:28 gfldex but I see little use for that outside of constructors
00:28 gfldex Hash is kind of a base class and wont pass anything on, at least in .append. So warning their would make sense.
00:30 dalek whateverable: 60ebbcc | (Daniel Green)++ | / (4 files):
00:30 dalek whateverable: Add short aliases for all the bots
00:30 dalek whateverable: review: https://github.com/perl6/whateverable/commit/60ebbcc9f4
00:31 cpage joined #perl6
00:31 mr-foobar joined #perl6
00:38 BenGoldberg If we added a .assuming to Metamodel::ClassHOW, you could probably do my $curried = $obj.^assuming( "methodname", ... ); $obj.$curried( ... );
00:42 canopus joined #perl6
00:50 dalek doc: 2f88c5e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6:
00:50 dalek doc: doc Hash.append
00:50 dalek doc: review: https://github.com/perl6/doc/commit/2f88c5e15e
00:50 dalek doc: 52d9df9 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6:
00:50 dalek doc: uniformify method definition
00:50 dalek doc: review: https://github.com/perl6/doc/commit/52d9df9d9b
00:50 dalek doc: cfeafef | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
00:50 dalek doc: Match doesn't coerce to Str by default
00:50 dalek doc: review: https://github.com/perl6/doc/commit/cfeafef442
00:58 dalek doc: fdbd478 | Altai-man++ | doc/Type/ (6 files):
00:58 dalek doc: make examples compile fir Hash, MixHash, Pair, Pod::Item, Proc and Promise types
00:58 dalek doc: review: https://github.com/perl6/doc/commit/fdbd478003
00:58 sena_kun >fir
00:58 sena_kun Oh.
00:59 dalek doc: 77be84d | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
00:59 dalek doc: Set and array containers don't mix so well
00:59 dalek doc: review: https://github.com/perl6/doc/commit/77be84df59
01:01 dalek modules.perl6.org/bit-rot: 72c3ff6 | (Zoffix Znet)++ | / (6 files):
01:01 dalek modules.perl6.org/bit-rot: If the mountain won't come to Muhammad then Muhammad must...
01:01 dalek modules.perl6.org/bit-rot:
01:01 dalek modules.perl6.org/bit-rot: ... steal sprite generating code from now-deprecated
01:01 dalek modules.perl6.org/bit-rot: Mojolicious::Plugin::AssetPack::Handler::Sprites and store it
01:01 dalek modules.perl6.org/bit-rot: in the repo as module.
01:01 dalek modules.perl6.org/bit-rot: review: https://github.com/perl6/modules.perl6.org/commit/72c3ff622d
01:04 Actualeyes joined #perl6
01:08 dalek doc: 669b7c9 | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
01:08 dalek doc: drop 'Defined as:' from detection. Less false positives that say.
01:08 dalek doc: review: https://github.com/perl6/doc/commit/669b7c9976
01:09 dalek modules.perl6.org/bit-rot: 7b62fe2 | (Zoffix Znet)++ | / (2 files):
01:09 dalek modules.perl6.org/bit-rot: Update docs to use newer --restart-app switch
01:09 dalek modules.perl6.org/bit-rot: review: https://github.com/perl6/modules.perl6.org/commit/7b62fe2a73
01:09 gfldex output of util/list-missing-methods.p6 looks quite good now
01:09 sena_kun gfldex++
01:11 dalek doc: b8691e8 | Altai-man++ | doc/Type/ (6 files):
01:11 dalek doc: Make some more examples compile, the easy ones here
01:11 dalek doc: review: https://github.com/perl6/doc/commit/b8691e8da2
01:11 gfldex now AlexDaniel can enter the stage and add a few 100 issues :)
01:12 sena_kun gfldex, noooooooo
01:13 gfldex i need to add a way to ignore methods that we don't want to doc
01:13 gfldex given I can implement that in Perl 6, that can't be hard. :)
01:17 sena_kun Actually, I plan to do a Big Review after we finish compileable examples work. I'm trying to do things a bit quickly here, but I saw some, um, really bad pages and I want to list them all(and learn the docs entirely, what an evil plan). It will be the next todo for me, I suppose. And caching. And offline version of docs. Okay, it's already 4 a.m. here, so I'm going to bed. Good night, #perl6!
01:20 sena_kun About the issues number... There are many pragma-related issues, many of "document this and that" issues, etc. There are not so many big and important issues like dead links and such, so we should be okay with it somehow.
01:20 sena_kun \quit
01:20 sena_kun Ah.
01:21 AlexDaniel gfldex: why me? :)
01:22 gfldex you are real good at adding issues on github. Any as they say: If you are good at digging trenches, you get a bigger shovel.
01:27 gfldex m: my \factory = gather for 1..10 { say 'eager'; take .Str => .Int * 2 }; say factory.is-lazy; say factory[0];
01:27 camelia rakudo-moar c587b9: OUTPUT«False␤eager␤1 => 2␤»
01:27 gfldex i did think that it is lazy
01:27 bob777 joined #perl6
01:29 TimToady is-lazy really means something more like "known arbitrarily large"
01:34 BenGoldberg m: my \almost-surely-finite = gather for ^Inf { last if Bool.pick; .take }; almost-surely-finite.is-lazy.say; almost-surely-finite.say;
01:34 camelia rakudo-moar c587b9: OUTPUT«False␤()␤»
01:35 BenGoldberg m: my \almost-surely-finite = gather for ^Inf { last if Bool.pick; .take }; almost-surely-finite.is-lazy.say; almost-surely-finite[^10].say;
01:35 camelia rakudo-moar c587b9: OUTPUT«False␤(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
01:35 TimToady so more like, "we know it must be treated lazily"
01:35 BenGoldberg m: my \almost-surely-finite = gather for ^Inf { last if Bool.pick; .take }; almost-surely-finite.is-lazy.say; almost-surely-finite[^10].say;
01:35 camelia rakudo-moar c587b9: OUTPUT«False␤(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
01:35 TimToady you need 'lazy gather' to have that True
01:35 mst TimToady: so if one imagines it as 'must-lazy' one won't go too far wrong?
01:36 BenGoldberg m: my \almost-surely-finite = gather for ^Inf { "a".take; last if Bool.pick; .take }; almost-surely-finite.is-lazy.say; almost-surely-finite[^10].say;
01:36 camelia rakudo-moar c587b9: OUTPUT«False␤(a 0 a 1 a Nil Nil Nil Nil Nil)␤»
01:37 TimToady mst: nodnod
01:39 dalek modules.perl6.org/bit-rot: d78f41c | (Zoffix Znet)++ | Build.PL:
01:39 dalek modules.perl6.org/bit-rot: Bump Test::Mojo::Role::ElementCounter version
01:39 dalek modules.perl6.org/bit-rot: review: https://github.com/perl6/modules.perl6.org/commit/d78f41c580
01:46 dalek modules.perl6.org/bit-rot: 10ef84b | (Zoffix Znet)++ | / (5 files):
01:46 dalek modules.perl6.org/bit-rot: Fix bit rot in test suit
01:46 dalek modules.perl6.org/bit-rot:
01:46 dalek modules.perl6.org/bit-rot: Part of #60
01:46 dalek modules.perl6.org/bit-rot: review: https://github.com/perl6/modules.perl6.org/commit/10ef84be9e
01:52 dalek modules.perl6.org: 3b57edf | (Zoffix Znet)++ | Build.PL:
01:52 dalek modules.perl6.org: Update prereqs
01:52 dalek modules.perl6.org:
01:52 dalek modules.perl6.org: - Bump for major releases of Mojolicious and ::AssetPack
01:52 dalek modules.perl6.org: - Remove now-deprecated Mojolicious::Plugin::Bootstrap3
01:53 unmatched} ha-ha!
01:53 dalek joined #perl6
01:53 unmatched} But it was this: https://github.com/perl6/modules.perl6.org/pull/61
01:53 unmatched} I'm done with bit rot stuff
02:04 unmatched} You know what dalek needs? Perl 6 rewrite :}
02:18 pierre_ joined #perl6
02:18 dj_goku is there a way to compare a matrix?
02:22 noganex_ joined #perl6
02:25 pierre_ joined #perl6
02:26 SmokeMachine____ joined #perl6
02:27 pduh_ joined #perl6
02:28 gfldex m: say ?( ((1,2),(3,4)) »==« ((1,2),(3,4)) ).flat.all, ?( ((5,2),(3,4)) »==« ((1,2),(3,4)) ).flat.all
02:28 camelia rakudo-moar c587b9: OUTPUT«TrueFalse␤»
02:28 gfldex dj_goku: ^^^
02:29 gfldex m: say [&&] ( flat ((5,2),(3,4)) »==« ((1,2),(3,4)) )
02:29 camelia rakudo-moar c587b9: OUTPUT«False␤»
02:31 unmatched} gfldex++
02:32 unmatched} m: say ((1,2),(3,4)) eqv ((1,2),(3,4)); say ((5,2),(3,4)) eqv ((1,2),(3,4))
02:32 camelia rakudo-moar c587b9: OUTPUT«True␤False␤»
02:32 dj_goku m: my @a[2,2]; @a[0,0] = 'test'; my @b[2,2]; @b[0,0] = 'test'; say @b ~~ @a;
02:32 camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
02:32 dj_goku m: my @a[2,2]; @a[0,0] = 'test'; my @b[2,2]; @b[0,0] = 'test'; say @b[0,0] ~~ @a[0,0];
02:32 camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
02:32 TimToady m: say ((1,2),(3,4)) eqv ((1,2),(3,4)), ((5,2),(3,4)) eqv ((1,2),(3,4))
02:32 camelia rakudo-moar c587b9: OUTPUT«TrueFalse␤»
02:33 timotimo dj_goku: we separate coordinates in dimensions with ; rather than ,
02:34 unmatched} m: my @a[2;2]; @a[0;0] = 'test'; my @b[2;2]; @b[0;0] = 'test'; say @b[0;0] ~~ @a[0;0];
02:34 camelia rakudo-moar c587b9: OUTPUT«True␤»
02:34 wamba joined #perl6
02:34 TimToady m: my @a[2;2]; @a[0;0] = 'test'; my @b[2;2]; @b[0;0] = 'test'; say @b eqv @a;
02:34 camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
02:35 TimToady say wot?
02:35 pduh_ joined #perl6
02:36 pduh_ joined #perl6
02:38 pduh_ left #perl6
02:38 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (['test', Any], [Any, Any]); say @a eqv @array;
02:38 camelia rakudo-moar c587b9: OUTPUT«False␤»
02:38 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a eqv @array;
02:38 camelia rakudo-moar c587b9: OUTPUT«False␤»
02:39 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); dd @a; dd @array;
02:39 camelia rakudo-moar c587b9: OUTPUT«Array.new(:shape(2, 2), ["test", Any], [Any, Any])␤Array @array = [("test", Any), (Any, Any)]␤»
02:39 mcmillhj joined #perl6
02:40 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[0;0] ~~ @array[0;0];
02:40 camelia rakudo-moar c587b9: OUTPUT«True␤»
02:40 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[0;1] ~~ @array[0;1];
02:40 camelia rakudo-moar c587b9: OUTPUT«True␤»
02:40 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[1;1] ~~ @array[1;1];
02:40 camelia rakudo-moar c587b9: OUTPUT«True␤»
02:41 TimToady m: my @a[2;2]; @a[0;0] = 'test'; my @b[2;2]; @b[0;0] = 'test'; say @b[*;*] eqv @a[*;*];
02:41 camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
02:41 dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[0;0] ~~ @array[0;0]; @a[0;0] = 'testy'; say @a[0;0] ~~ @array[0;0];
02:41 camelia rakudo-moar c587b9: OUTPUT«True␤False␤»
02:42 pduh joined #perl6
02:44 dj_goku TimToady: so did I find a bug?
02:45 dalek doc: 0cfc940 | (Wenzel P. P. Peppmeyer)++ | util/ (2 files):
02:45 dalek doc: add file with types/methods to be ignored
02:45 dalek doc: review: https://github.com/perl6/doc/commit/0cfc9409d3
02:49 unmatched} dj_goku: to me looks like either a bug or NIY. Worth reporting IMO
02:52 dj_goku ok, I haven't ever done this before so. will search for what info is needed.
02:54 unmatched} "this" is what? Bug reporting?
02:54 unmatched} huggable: rakudobug
02:54 huggable unmatched}, rakudobug@perl.org or use perl6 query on http://rt.perl.org ; see https://github.com/rakudo/rakudo/#reporting-bugs
02:55 unmatched} dj_goku: ^ there. Just include the code snippet (can copy-paste from IRC, and include camelia's output). Then include some description of what you expected and it's also useful to include the chat log URL: http://irclog.perlgeek.de/perl6/2016-08-12#i_13009730
02:55 mithaldu_ joined #perl6
02:55 notbenh_ joined #perl6
02:56 dj_goku alright cool.
02:57 SmokeMachine____ joined #perl6
02:58 dalek modules.perl6.org: 42e215b | (Zoffix Znet)++ | lib/ModulesPerl6.pm:
02:58 dalek modules.perl6.org: Remove extraneous whitespace
02:58 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/42e215ba9a
02:58 kipd joined #perl6
03:04 dalek doc: 6597c26 | (Wenzel P. P. Peppmeyer)++ | util/ignored-methods.txt:
03:04 dalek doc: ignore Dateish::IO
03:04 dalek doc: review: https://github.com/perl6/doc/commit/6597c268cf
03:04 dalek doc: 3843813 | (Wenzel P. P. Peppmeyer)++ | util/ignored-methods.txt:
03:04 dalek doc: Dateish::earlier is doced in Date
03:04 dalek doc: review: https://github.com/perl6/doc/commit/3843813adb
03:13 gfldex m: my SetHash $sh .= new; $sh.push('a');
03:13 camelia rakudo-moar c587b9: OUTPUT«Cannot resolve caller push(SetHash: Str); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at <tmp> line 1␤␤»
03:14 gfldex Any.push tries to call SetHash.push
03:14 gfldex does that qualify as a bug?
03:15 unmatched} s: Any, push
03:15 SourceBaby unmatched}, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Calling push() will never work with declared signature (\a, |elems is raw)â�¤at -e:6â�¤------> [32m    put sourcery( Any, [33mâ��[31mpush )[1];[0mâ�¤
03:15 unmatched} s: Any, "push"
03:15 SourceBaby unmatched}, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|71402672>} (Method+{<anon|7140267...)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e l
03:15 dj_goku m: say [[1,2]] ~~ [[1,2]];
03:15 camelia rakudo-moar c587b9: OUTPUT«True␤»
03:15 unmatched} 0.o
03:15 dj_goku m: say [[1,2]] eqv [[1,2]];
03:15 camelia rakudo-moar c587b9: OUTPUT«True␤»
03:15 dj_goku m: say [[1,2]] ~~ [[1,1]];
03:15 camelia rakudo-moar c587b9: OUTPUT«False␤»
03:15 dj_goku m: say [[1,2]] eqv [[1,1]];
03:15 camelia rakudo-moar c587b9: OUTPUT«False␤»
03:15 unmatched} m: say [[1,2],] eqv [[1,1],];
03:15 camelia rakudo-moar c587b9: OUTPUT«False␤»
03:16 unmatched} hm, wtf
03:16 dj_goku m: say [[1,2],] eqv [[1,2],];
03:16 camelia rakudo-moar c587b9: OUTPUT«True␤»
03:16 unmatched} s: Any, "push", \()
03:16 SourceBaby unmatched}, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/Any.pm#L180
03:16 dj_goku second one is [[1,1],] not [[1,2],]
03:17 BenGoldberg s: Any.push: ()
03:17 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot modify an immutable Any␤  in block <unit> at -e line 6␤␤
03:18 BenGoldberg s: $.push: ()
03:18 SourceBaby BenGoldberg, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Variable $.push used where no 'self' is availableâ�¤at -e:6â�¤------> [32m    put sourcery( $.push[33mâ��[31m: () )[1];[0mâ�¤    expecting any of:â�¤        argument listâ�¤        termâ�¤
03:19 BenGoldberg s: (my @a).push: ();
03:19 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
03:19 BenGoldberg s: my @a.push: ();
03:19 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
03:19 BenGoldberg s: my @a;
03:19 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
03:19 unmatched} BenGoldberg: it's worth reading the help of the bot before feeding it garbage
03:19 BenGoldberg SourceBaby, help
03:19 SourceBaby BenGoldberg, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
03:20 unmatched} gfldex: isn't it calling Any.push with the SetHash as invocant and fails because there's no such candidate?
03:21 unmatched} s: SetHash, "push"
03:21 SourceBaby unmatched}, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|71402672>} (Method+{<anon|7140267...)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e l
03:21 unmatched} wtf...
03:21 BenGoldberg s: &say
03:21 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/io_operators.pm#L20
03:21 unmatched} s: SetHash, "push", \()
03:21 SourceBaby unmatched}, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/Any.pm#L180
03:22 BenGoldberg s: &say, \(Int);
03:22 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
03:22 BenGoldberg s: &say, \("foo");
03:22 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
03:22 unmatched} BenGoldberg: no ending semicolon
03:23 BenGoldberg s: &say, \("foo")
03:23 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/io_operators.pm#L22
03:23 BenGoldberg SourceBaby, You are too finicky :P
03:24 BenGoldberg s: &say, \(Int)
03:24 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/io_operators.pm#L27
03:25 unmatched} m: say Any.^can("push")[0] ~~ Callable;
03:25 camelia rakudo-moar c587b9: OUTPUT«False␤»
03:25 unmatched} bisect: m: say Any.^can("push")[0] ~~ Callable;
03:25 bisectable unmatched}: On both starting points (good=2015.12 bad=c587b9d) the exit code is 0 and the output is identical as well
03:25 bisectable unmatched}: Output on both points: False
03:25 unmatched} really...
03:25 unmatched} m: say Any.^can("push")[0](42)
03:25 camelia rakudo-moar c587b9: OUTPUT«Cannot resolve caller push(Int: ); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at <tmp> line 1␤␤»
03:25 unmatched} m: my @a; say Any.^can("push")[0](@a,42)
03:25 camelia rakudo-moar c587b9: OUTPUT«Cannot resolve caller push(Array: Int); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at <tmp> line 1␤␤»
03:26 unmatched} m: say Any.^can("push")[0]
03:26 camelia rakudo-moar c587b9: OUTPUT«Method+{<anon|42801984>}.new␤»
03:26 unmatched} Why isn't that a Callable?
03:26 dj_goku unmatched}: thanks I open this rt bug: 128904
03:26 unmatched} dj_goku++
03:26 unmatched} m: say Any.^can("push")[0].^mro
03:26 camelia rakudo-moar c587b9: OUTPUT«((Method+{<anon|42801984>}) (Method) (Routine) (Block) (Code) (Any) (Mu))␤»
03:26 unmatched} m: say Any.^can("say")[0].^mro
03:26 camelia rakudo-moar c587b9: OUTPUT«((Method) (Routine) (Block) (Code) (Any) (Mu))␤»
03:26 dj_goku unmatched}: I have a rt.perl.org bitcard account but can't see anything or open tickets.
03:26 unmatched} m: say Any.^can("say")[0] ~~ Callable
03:26 camelia rakudo-moar c587b9: OUTPUT«True␤»
03:27 unmatched} dj_goku: talk to [Coke] about that. There's some way to contact admins.
03:28 dj_goku .tell [Coke] unmatched} told me to contact you about bitcard and rt.perl.org about open tickets.
03:28 yoleaux dj_goku: I'll pass your message to [Coke].
03:30 unmatched} m: sub (&thing) {}( Any.^can("push")[0] )
03:30 camelia rakudo-moar c587b9: OUTPUT«Type check failed in binding to &thing; expected Callable but got Method+{<anon|42801984>} (Method+{<anon|4280198...)␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
03:30 unmatched} m: sub (&thing) {}( Any.^can("say")[0] )
03:30 camelia rakudo-moar c587b9: ( no output )
03:32 unmatched} RTed the missing Callable: https://rt.perl.org/Ticket/Display.html?id=128905
03:39 wamba1 joined #perl6
03:39 BenGoldberg m: sub foo (&bar) { bar() }; foo( Any.^can("say")[0] );
03:39 camelia rakudo-moar c587b9: OUTPUT«Too few positionals passed; expected at least 1 arguments but got only 0␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
03:39 BenGoldberg m: dd Any.^can("say");
03:39 camelia rakudo-moar c587b9: OUTPUT«(method say (Mu $: | is raw) { #`(Method|42088008) ... },)␤»
03:40 BenGoldberg m: dd Any.^can("say")[0];
03:40 camelia rakudo-moar c587b9: OUTPUT«Method say = method say (Mu $: | is raw) { #`(Method|52737608) ... }␤»
03:40 BenGoldberg m: sub foo (&bar) { bar(42) }; foo( Any.^can("say")[0] );
03:40 camelia rakudo-moar c587b9: OUTPUT«42␤»
03:41 BenGoldberg m: sub foo (&bar) { bar(Mu) }; foo( Any.^can("say")[0] );
03:41 camelia rakudo-moar c587b9: OUTPUT«(Mu)␤»
03:42 BenGoldberg m: sub foo (&bar) { bar(True|False) }; foo( Any.^can("say")[0] );
03:42 camelia rakudo-moar c587b9: OUTPUT«any(True, False)␤»
04:29 Cabanossi joined #perl6
04:36 itaipu joined #perl6
04:40 dalek doc: dbc3d25 | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
04:40 dalek doc: add some comments, clean up some code
04:40 dalek doc: review: https://github.com/perl6/doc/commit/dbc3d25c54
05:03 konobi https://cs.stanford.edu/~zdevito/zdevito_thesis.pdf
05:09 konobi nice read
05:12 TEttinger ha, I was sure I had heard the name z. devito before
05:13 TEttinger terra's sorta a good thing, sorta very strange
05:14 TEttinger it is embedded into lua code, and lua code uses 1-indexing... but terra uses 0-indexing, since it's closer to C for interop
05:14 TEttinger so depending on what layer you're in, "the first item" means a different index
05:15 TEttinger they don't have much choice about the lua using 1-indexing
05:16 harovali joined #perl6
05:21 itaipu joined #perl6
05:27 konobi TEttinger: the code generation and thought process of the underlying peices is really the interesting part to me
05:36 konobi "Eager specialization with lazy typechecking"
05:51 avenj joined #perl6
05:53 konobi mkay... a _lot_ of formal proofs in there that go straight over my head
06:08 konobi it's turtles all the way down... o.O
06:23 pierre_ joined #perl6
06:23 trnh joined #perl6
06:23 trnh joined #perl6
06:28 firstdayonthejob joined #perl6
06:35 labster joined #perl6
06:39 gfldex m: my &fac_gen = -> &n { (n == 0) }
06:39 camelia rakudo-moar c587b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix == instead␤at <tmp>:1␤------> 3my &fac_gen = -> &n { (n ==7⏏5 0) }␤»
06:39 gfldex m: my &fac_gen = -> &n { n == 0 }
06:39 camelia rakudo-moar c587b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix == instead␤at <tmp>:1␤------> 3my &fac_gen = -> &n { n ==7⏏5 0 }␤»
06:40 gfldex m: my &fac_gen = -> &n { n() == 0 }
06:40 camelia rakudo-moar c587b9: ( no output )
06:46 sssd joined #perl6
06:51 kanl joined #perl6
07:01 kanl Supply . throttle returns a supply of promises. How does each promise correspond to the original items? e.g. my $s = Supply.from-list( |@a ).throttle: 3, -> $v { do-something-with( $a ) }; $s.tap: -> $v { how-to-figure-out-relation-here() }
07:04 kanl this matters because when running a number of things in parallel, one supposedly would need to know whose promise got kept and whose got broken, not just which.
07:15 kanl i don't suppose it's safe to stick things into a hash inside throttle's pointy block, not knowing it's act() or tap(), Someone care to share, please?
07:20 kanl m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; die if $_ == 1 }; $s.act: -> $v { $v.status.say }; $s.wait;
07:20 camelia rakudo-moar c587b9: OUTPUT«Kept␤Broken␤Kept␤Kept␤Kept␤Memory allocation failed; could not allocate 4 bytes␤»
07:20 kanl m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; die if $_ == 1 }; $s.act: -> $v { $v.status.say }; $s.wait;
07:21 camelia rakudo-moar c587b9: OUTPUT«Broken␤Kept␤Kept␤Kept␤Kept␤Memory allocation failed; could not allocate 32 bytes␤Memory allocation failed; could not allocate 4 bytes␤»
07:21 kanl m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; die if $_ == 1 }; $s.act: -> $v { $v.status.say }; $s.wait;
07:21 camelia rakudo-moar c587b9: OUTPUT«Kept␤Broken␤Kept␤Kept␤Memory allocation failed; could not allocate 4 bytes␤»
07:22 TheLemonMan joined #perl6
07:22 kanl The same code produces weirder results on my machine.
07:24 labster joined #perl6
07:25 gfldex m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; Failure.new("booboo") if $_ == 1 }; $s.act: { .status.say }; $s.wait;
07:25 camelia rakudo-moar c587b9: OUTPUT«Kept␤Kept␤Kept␤Kept␤Kept␤Kept␤Kept␤Kept␤»
07:25 gfldex m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; Failure.new("booboo") if $_ == 1 }; $s.act: { .status.say }; $s.wait;
07:25 camelia rakudo-moar c587b9: OUTPUT«Kept␤Kept␤Kept␤Kept␤Kept␤Kept␤Memory allocation failed; could not allocate 32 bytes␤»
07:26 gfldex nice new bug for jnthn :)
07:29 darutoko joined #perl6
07:31 wbill joined #perl6
07:31 kanl even if said bug is fixed, i still have no way of knowing the broken promise belongs to 1.
07:32 kanl well, i do, because i put it there. but if i didn't, then how?
07:32 gfldex m: my @a = 1..3; my %h; %h[|@a] = 1; dd %h;
07:32 camelia rakudo-moar c587b9: OUTPUT«Hash %h = {}␤»
07:34 gfldex m: my @a = 1..3; my %h; %h{1;2;3} = 1; dd %h;
07:34 camelia rakudo-moar c587b9: OUTPUT«Hash %h = {"1" => ${"2" => ${"3" => 1}}}␤»
07:34 gfldex is there any way to turn an Array into a multidim subscript?
07:43 dalek joined #perl6
07:49 RabidGravy joined #perl6
07:56 gregf_ m: my &foo = ->&bar, $x { &bar.($x) }; &foo({ say "Morning Perl " x $_ }, 3)
07:56 camelia rakudo-moar 7399a3: OUTPUT«Morning Perl Morning Perl Morning Perl ␤»
07:58 TimToady m: for 1,2,3 { .map: *.say }
07:58 camelia rakudo-moar 7399a3: OUTPUT«1␤2␤3␤»
07:59 labster m: my $x = "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]"; $x ~~ s:mm:g/ '$' /€/; $x.say
07:59 camelia rakudo-moar 7399a3: OUTPUT«[̲̅€̲̅(̲̅5̲̅)̲̅€̲̅]␤»
08:01 labster m: "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]".subst( / '$' / , '€', :mm, :g).say
08:01 camelia rakudo-moar 7399a3: OUTPUT«[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]␤»
08:01 labster How do I convert currencies in the method form?
08:03 TimToady you need a :m on the pattern as well
08:03 TimToady m: "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]".subst( / :m '$' / , '€', :mm, :g).say
08:03 camelia rakudo-moar 7399a3: OUTPUT«[̲̅€̲̅(̲̅5̲̅)̲̅€̲̅]␤»
08:05 kanl m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; $_ => start { die if $_ == 1 } }; $s.act: -> $v { $v.result.say }; $s.wait;
08:05 camelia rakudo-moar 7399a3: OUTPUT«0 => Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable), status => PromiseStatus::Kept)␤1 => Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, un…»
08:05 sno joined #perl6
08:05 kanl good grief.
08:06 kanl *inception*
08:08 labster ignoremark.  OK, thanks TimToady
08:09 labster "so it is not necessary to put both :m and :mm." in S05
08:09 zakharyas joined #perl6
08:09 TimToady on the s/// form
08:10 labster Yeah.  As usual just needs docced somewhere.  It might be if I keep reading.
08:10 TimToady m: my @a; @a.grep({ .value andthen $_ eq "foo" })
08:10 camelia rakudo-moar 7399a3: OUTPUT«WARNINGS for <tmp>:␤Useless use of "eq" in expression "$_ eq \"foo\"" in sink context (line 1)␤»
08:10 TimToady m: my @a; @a.grep({ .value andthen $_ eq "foo" })
08:10 camelia rakudo-moar 4dd622: ( no output )
08:23 RabidGravy boo!
08:37 kurahaupo joined #perl6
08:40 kurahaupo_ joined #perl6
08:42 kurahaupo` joined #perl6
08:43 kurahaupo joined #perl6
08:50 kurahaupo_ joined #perl6
08:52 kurahaupo` joined #perl6
08:54 * RabidGravy ponders which one of these half finished modules he should work on today
08:54 RabidGravy resisting the urge to start even more
08:59 dalek whateverable: e84ccc8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
08:59 dalek whateverable: Set description when uploading bisect log
08:59 dalek whateverable: review: https://github.com/perl6/whateverable/commit/e84ccc8a7a
08:59 dalek whateverable: 7815457 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (4 files):
08:59 dalek whateverable: Allow users to set any STDIN (URLs work fine too!)
08:59 dalek whateverable:
08:59 dalek whateverable: “STDIN foo” or “STDIN=foo”. Use it as a separate command. Set it once and it
08:59 dalek whateverable: will use the same input for all following commands of this bot.
08:59 dalek whateverable:
08:59 dalek whateverable: Use “STDIN clear” to set it to its original value. You can also use “delete”,
08:59 dalek whateverable: “reset” and “unset”, just in case you forget the right word.
08:59 dalek whateverable:
08:59 dalek whateverable: This does not work with bisectable yet.
08:59 dalek whateverable: review: https://github.com/perl6/whateverable/commit/78154573e0
09:00 RabidGravy anyway reboot is in order
09:14 pierre_ joined #perl6
09:21 walkerlala joined #perl6
09:22 walkerlala hi there
09:22 walkerlala anyone online?
09:22 tadzik quite a lot of us, yes :)
09:23 gfldex Total of 325 nicks
09:24 walkerlala is those on the right side all online?
09:24 AlexDaniel maybe
09:25 walkerlala so all of you write perl6 instead of perl nowadays?
09:26 stmuk_ walkerlala: I'm not sure that sort of generalisation is useful and suspectt people use a number of languages
09:26 stmuk_ but yes we share perl 6 as a common interest
09:27 walkerlala I am also interested in it. seem like a new language
09:28 AlexDaniel define “new” :)
09:28 RabidGravy joined #perl6
09:28 gfldex it was made new over a timespan of 15 years
09:30 walkerlala what situation is perl6 in? Is it now being actively developed?
09:30 DrForr Very much so, yes.
09:31 gfldex this year is bug hunting year
09:32 walkerlala eh...would it be appropriate if I post some perl5 question here?
09:32 AlexDaniel gfldex: wasn't it a performance year?
09:32 walkerlala @gfldex why?
09:32 DrForr walkerlala: Try #perl on freenode.
09:32 gfldex terribad performace is a bug :)
09:32 AlexDaniel walkerlala: not really, try #perl instead
09:33 gfldex that's one of the Perl 6 repos: https://github.com/rakudo/rakudo/graphs/contributors
09:33 stmuk_ or #perl-help
09:34 gregf_ er, theres perl5 folks here as well ;)
09:34 stmuk_ I think most of the perl people use irc.perl.org rather than freenode
09:34 gregf_ freenode #perl is for puns *ducks*
09:37 walkerlala gregf_: what do you mean by puns ducks (none-native English speaker asking...)
09:39 walkerlala_ joined #perl6
09:39 gregf_ walkerlala: sorry about that. i was just trying to say that freenode #perl is a bit casual :). but you can sure get help on there as well. as stmuk_ said, irc.perl.org is where the main guys hang out.
09:40 stmuk_ http://www.irc.perl.org/faq.html suggests 3 channels
09:41 walkerlala Is larry wall still developing perl6?
09:41 gregf_ walkerlala: would'nt want to pollute this channel with Perl5 questions. but, folks should be ok to answer some trivial oh here i would imagine
09:41 gregf_ yep, TimToady is the nick :)
09:42 gregf_ still, #perl freenode  or #perl-help on irc.perl.org
09:43 gregf_ s/trivial/trivial questions/, s/oh/on/
09:54 lambd0x joined #perl6
09:55 lambd0x hello everyone \o/
09:56 lizmat lambd0x o/
09:58 TRUMP-PENCE joined #perl6
09:59 lambd0x m: my $a = 5; for $a...0 -> $b { say $b; }
09:59 camelia rakudo-moar 6c7eb3: OUTPUT«5␤4␤3␤2␤1␤0␤»
09:59 DrForr Afternoon. And preemptive sigh.
09:59 e163 joined #perl6
10:00 lambd0x is there other way to loop downward without using loop?
10:00 nine lambd0x: reverse?
10:00 lizmat while?
10:00 lambd0x nine: yes.
10:01 nine m: for 3...1 { say $_ } # or like this?
10:01 camelia rakudo-moar 6c7eb3: OUTPUT«3␤2␤1␤»
10:01 arnsholt m: for reverse ^5 { .say } # What nine meant, I think
10:01 camelia rakudo-moar 6c7eb3: OUTPUT«4␤3␤2␤1␤0␤»
10:01 nine lambd0x: it very much depends on what you want to loop over
10:01 lambd0x nine and arnsholt that's it.
10:01 lambd0x yes
10:02 lambd0x nine: wanted to iterate over one descending X ascending loop
10:02 lambd0x but its giving me error because the operators are !identical.
10:03 rindolf joined #perl6
10:04 lambd0x m:  my $a = 8; for $a...0 X 0...$a -> ($i,$j){ say "$i $j"; }
10:04 camelia rakudo-moar 6c7eb3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Only identical operators may be list associative; since '...' and 'X' differ, they are non-associative and you need to clarify with parentheses␤at <tmp>:1␤------> 3my $a = 8; for $a...0 X7⏏5 0...$a …»
10:05 gfldex m:  my $a = 8; for ($a...0) X (0...$a) -> ($i,$j){ say "$i $j"; }
10:05 camelia rakudo-moar 6c7eb3: OUTPUT«8 0␤8 1␤8 2␤8 3␤8 4␤8 5␤8 6␤8 7␤8 8␤7 0␤7 1␤7 2␤7 3␤7 4␤7 5␤7 6␤7 7␤7 8␤6 0␤6 1␤6 2␤6 3␤6 4␤6 5␤6 6␤6 7␤6 8␤5 0␤5 1␤5 2␤5 3␤5 4␤5 5␤5 6␤5 7␤5 8␤4 0␤4 1␤4 2␤4 3␤4 4␤4 5␤4 6…»
10:05 nine lambd0x: as the error message told you: "you need to clarify with parentheses"
10:05 lambd0x gfldex: just noticed that hahaah
10:06 lambd0x nine: yes yes... need to pay more attention to compiler messages thanks everyone
10:07 lambd0x learned more ways to iterate downwards to a list :D
10:07 lambd0x *a ..
10:10 tokomer joined #perl6
10:10 gfldex m: my @a = 1..5; (do for @a { .Str }).reverse.say
10:10 camelia rakudo-moar 6c7eb3: OUTPUT«(5 4 3 2 1)␤»
10:13 lambd0x gfldex: \o/
10:14 holyghost joined #perl6
10:15 gregf_ m: say 1..5.reverse
10:15 camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤»
10:15 gregf_ m: say (1..5).reverse
10:15 camelia rakudo-moar 6c7eb3: OUTPUT«(5 4 3 2 1)␤»
10:23 lizmat m: say 1..5 .reverse  # note space
10:23 camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤»
10:23 lizmat hmmm
10:23 lizmat that feels wrong
10:29 gfldex m: dd 1..(5,)
10:29 camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤»
10:29 gfldex lizmat: ^^^
10:30 lizmat gfldex: that makes sense, though
10:30 lizmat m: dd 1..(5,6)
10:30 camelia rakudo-moar 6c7eb3: OUTPUT«1..2␤»
10:32 gfldex m: dd 5.reverse
10:32 camelia rakudo-moar 6c7eb3: OUTPUT«(5,)␤»
10:32 kaare_ joined #perl6
10:32 lizmat that's because Any.reverse does .list
10:33 lizmat (I think)
10:33 gfldex i don't do ranges without () anymore
10:34 lizmat m: say ^5 .reverse
10:34 camelia rakudo-moar 6c7eb3: OUTPUT«(4 3 2 1 0)␤»
10:34 lizmat m: say ^5.reverse
10:34 camelia rakudo-moar 6c7eb3: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at <tmp>:1␤    ------> 3say ^57⏏5.reverse␤^1␤»
10:34 lizmat perhaps we need something like that for the 1..5 case as well
10:44 mcmillhj joined #perl6
10:58 ShimmerFairy joined #perl6
11:00 pierre_ joined #perl6
11:01 mvorg joined #perl6
11:12 fepat joined #perl6
11:14 fepat left #perl6
11:21 trnh joined #perl6
11:22 kid51 joined #perl6
11:42 darutoko- joined #perl6
11:42 revdiablo joined #perl6
11:49 trnh joined #perl6
12:04 ragge|2 joined #perl6
12:21 n1lp7r joined #perl6
12:24 edehont joined #perl6
12:29 wamba joined #perl6
12:34 prammer joined #perl6
12:36 Sgeo__ joined #perl6
12:38 sena_kun joined #perl6
12:41 bazzaar joined #perl6
12:46 canopus joined #perl6
12:57 trnh joined #perl6
13:05 mcmillhj joined #perl6
13:12 awwaiid TimToady: I'm super excited that you'll be talking at abstractions.io, and am sad I won't be there to cheer you on but StrangeLoop won out on my conference budget
13:14 awwaiid The way they have their schedule staggard it looks like you might have more people at the end than the beginning of the talk
13:16 trnh joined #perl6
13:16 trnh joined #perl6
13:20 AlexDaniel joined #perl6
13:26 mvorg joined #perl6
13:27 cdg joined #perl6
13:29 autarch joined #perl6
13:39 trnh joined #perl6
13:43 MilkmanDan joined #perl6
13:43 j75 joined #perl6
13:45 grondilu joined #perl6
13:49 adu joined #perl6
13:52 autarch joined #perl6
14:00 pochi m: &slurp.signature
14:00 camelia rakudo-moar 4cef9e: ( no output )
14:00 pochi m: say &slurp.signature
14:00 camelia rakudo-moar 4cef9e: OUTPUT«(| is raw)␤»
14:00 pochi the source says (IO::Path:D: :$bin, :$enc)
14:04 grondilu learnt something today:
14:04 trnh joined #perl6
14:04 grondilu m: say 7[0]; # integers do positional?
14:04 camelia rakudo-moar 4cef9e: OUTPUT«7␤»
14:04 grondilu m: say 7[^5]];
14:04 camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3say 7[^5]7⏏5];␤»
14:04 grondilu m: say 7[^5];
14:04 camelia rakudo-moar 4cef9e: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:05 lizmat grondilu: any scalar can act as a one element list
14:05 lizmat m: say "foo"[0]
14:05 camelia rakudo-moar 4cef9e: OUTPUT«foo␤»
14:05 lizmat m: say "foo"[1]
14:05 camelia rakudo-moar 4cef9e: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:05 grondilu ok, good to know.
14:06 lizmat m: class Foo { has $.a }; dd Foo.new(a => 42)[0]
14:06 camelia rakudo-moar 4cef9e: OUTPUT«Foo.new(a => 42)␤»
14:06 lizmat m: class Foo { has $.a }; dd Foo.new(a => 42)[1]
14:06 camelia rakudo-moar 4cef9e: OUTPUT«Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => "0..0", comment => Any), backtrace => Backtrace.new)␤»
14:08 pduh joined #perl6
14:11 kshannon joined #perl6
14:12 mst so, given the way CUR and etc. work, is it possible to load a new version of a class off disk and then create new objects using that instead of the old version?
14:13 * mst pondering how to ignore startup times ;)
14:13 mcmillhj joined #perl6
14:14 mcmillhj joined #perl6
14:14 unmatched} you mean doing that in a running script?
14:15 mst yes
14:15 jdv79 unloading an old version or swapping in a new one would be neat
14:15 jdv79 hot swap
14:15 unmatched} Last I wanted to do that for IRC::Client plugins and the answer was you can't do that.
14:16 unmatched} That was ~December 2015. Not sure if things changed.
14:16 khw joined #perl6
14:16 grondilu m: say sub { rand for ^5 }() # I expected to get the last rand value here
14:16 camelia rakudo-moar 4cef9e: OUTPUT«Nil␤»
14:16 mst given we already have the possibility for two bits of code to resolve different CUR entries for the same module
14:16 mst it seems like it should be doable somehow?
14:17 mst lizmat: any ideas?
14:17 ptolemarch joined #perl6
14:17 j75 joined #perl6
14:17 unmatched} m: say sub { do rand for ^5 }()
14:17 camelia rakudo-moar 4cef9e: OUTPUT«(0.64767356449853 0.694437188064503 0.0819238247509301 0.819354342755905 0.417867833490778)␤»
14:19 rmmm joined #perl6
14:19 awwaiid joined #perl6
14:20 _4d47 joined #perl6
14:24 unmatched} mst: what if I load Foo, spin off a bunch of Foo objects that have attribute bar. Now, I reload new Foo, with bar no longer existing. What happens?
14:24 unmatched} Also, what if bar takes a closure and it olds on to some scope.
14:25 mst unmatched}: that's why what I asked for was to load a new Foo and create *new* objects from that class
14:25 mst I don't see how it would matter at all, given that
14:25 unmatched} Ah
14:27 mst similar to the way when you hot reload a module in erlang, it only applies to new processes
14:46 unmatched} My fruitless test of the matter, with the value of Volatile.bar changed during the sleep: https://gist.github.com/zoffixznet/b7e29eb8f24e8a8b6c1b7509914df6c0
14:46 Sgeo__ joined #perl6
14:46 dalek ecosystem: f5f46bb | jnthn++ | META.list:
14:46 dalek ecosystem: Add HTTP::HPACK.
14:46 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f5f46bbace
14:46 unmatched} The produced value is unchanged, so it looks like the `use` of a module is not repeated
14:48 unmatched} jnthn: https://github.com/jnthn/p6-http-hpack/pull/1
14:48 jnthn Dammit JSON :/
14:48 jnthn Thanks!
14:49 unmatched} :)
14:49 sena_kun jnthn++
14:49 pierre_ joined #perl6
14:50 dalek doc: b416dd9 | titsuki++ | doc/Type/Signature.pod6:
14:50 dalek doc: Fix the error message to be the acutual one
14:50 dalek doc: review: https://github.com/perl6/doc/commit/b416dd91cc
14:50 dalek doc: c615f9a | Altai-man++ | doc/Type/Signature.pod6:
14:50 dalek doc: Merge pull request #837 from titsuki/fix-catch
14:50 dalek doc:
14:50 dalek doc: Fix the error message to be the acutual one
14:50 dalek doc: review: https://github.com/perl6/doc/commit/c615f9a7b7
14:50 tailgate I'm curious as to why this code compiles correctly and the other doesn't: https://gist.github.com/ahalbert/f4536b2c4d03ab7cb7fadf95298a04c0 can anyone give me some insght as to what's up?
14:51 unmatched} tailgate: perhaps because } at the end of the line ends the statement?
14:52 tailgate } ends a statement?
14:52 unmatched} yup
14:52 unmatched} eval: sub foo {} sub bar {}
14:52 sena_kun goto is already implemented? Wow.
14:52 timotimo otherwise you'd have to put a ; after every }
14:52 unmatched} m: sub foo {} sub bar {}
14:52 camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub foo {}7⏏5 sub bar {}␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤       …»
14:52 unmatched} m: sub foo {} ␤␤␤␤sub bar {}
14:52 camelia rakudo-moar 4cef9e: ( no output )
14:52 tailgate ah, but only in the case when it's at the EOL?
14:53 unmatched} tailgate: yeah
14:53 timotimo well, it allows spaces and comments after the }
14:53 unmatched} tailgate: you can use an unspace there   \
14:53 unmatched} m: sub foo {} \ ␤␤␤␤sub bar {}
14:53 camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:5␤------> 3sub foo {}7⏏5 \ ␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        stateme…»
14:54 jnthn sena_kun: Was some fun to implement. :)
14:54 sena_kun jnthn, we need to update http://perl6.org/compilers/features then.
14:55 unmatched} m: start BAR: { say "meow" }; goto BAR
14:55 camelia rakudo-moar 4cef9e: OUTPUT«Label.goto() not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
14:55 AlexDaniel TIL committing each rakudo build in a git repo, running 「git gc」 and then compressing the whole thing with something else results in better compression than when using almost anything else. But lrzip wins anyway. See https://github.com/perl6/whateverable/issues/23
14:55 AlexDaniel also, perhaps somebody more informed on that topic can give a better recommendation?
14:56 jnthn sena_kun: Oh, I was talking about HPACK, not goto :)
14:56 jnthn sena_kun: If goto got implemetned it sneaked in without me noticing :)
14:58 bdmatatu joined #perl6
14:59 MilkmanDan joined #perl6
14:59 sena_kun jnthn, good to hear, I can delete my thirty-percent-ready code of HPACK now. (: I'll read the actual code of your implementation later.
14:59 Nex6 joined #perl6
14:59 jnthn sena_kun: Aw, you'd started on it. Didn't know :) Feel free to contribute any improvements/extra tests :)
15:00 zero__ joined #perl6
15:01 setty1 joined #perl6
15:01 sena_kun jnthn, I tried to port a python version about a season ago, iirc, but progress was awful and I decided to do something else, so no problem.
15:05 jnthn Ah, I did a ground-up implementation from the RFC. :)
15:05 rindolf joined #perl6
15:06 zacts joined #perl6
15:06 kid511 joined #perl6
15:24 bob777 joined #perl6
15:25 skids joined #perl6
15:27 mspo good
15:31 edehont joined #perl6
15:32 MilkmanDan joined #perl6
15:47 tailgate say I want to fold an Array into an Int with the starting value as 0 and I have a function. What does that entail?
15:49 raiph joined #perl6
15:49 sena_kun m: sub infix:<f>($a, $b) { $a + $b }; [f] [1,2,3,4,5];
15:49 camelia rakudo-moar 4cef9e: ( no output )
15:49 sena_kun m: sub infix:<f>($a, $b) { $a + $b }; say [f] [1,2,3,4,5];
15:49 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
15:50 sena_kun tailgate, something like above?
15:50 tailgate yeah
15:50 tailgate thanks
15:51 skids You can use .reduce on the Array, too, if you don't want to create an operator.
15:51 * [Coke] wonders where "fold" comes from.
15:51 yoleaux 03:28Z <dj_goku> [Coke]: unmatched} told me to contact you about bitcard and rt.perl.org about open tickets.
15:51 ugexe m: sub f(*@_) { [+] @_ }; say f 1,2,3,4,5; # along similar lines
15:51 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
15:52 [Coke] dj_goku: I need an id or email addy
15:52 frew joined #perl6
15:52 sena_kun [Coke], folds come from math, iirc.
15:53 skids [Coke]: well, all the Wikipedia examples are in Haskell, so blame that :-)
15:53 sena_kun But in math it is "catamorphism" iirc. "Fold" looks better. (:
15:58 gregf_ m: say [1..5].reduce(*+*)
15:58 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
15:58 gregf_ m: say [\+] [1..5]
15:58 camelia rakudo-moar 4cef9e: OUTPUT«(1 3 6 10 15)␤»
15:59 gregf_ m: say [1..5].reduce: {$^a + $^b}
15:59 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
15:59 MilkmanDan joined #perl6
16:00 tailgate If I have "a"..."z", how can I add " " to the end of the Seq?
16:02 TimToady m: say( 'a' ... 'z', ' ' ).perl
16:02 camelia rakudo-moar 4cef9e: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z  )␤»
16:03 TimToady there arguments to ... are actually lists
16:03 TimToady *the
16:04 TimToady and the sequences implied by ... only consider the last three values of the previous list, and the first argument of the next list
16:04 TimToady well, just the last arg of the previous list if it's a function
16:05 TimToady three args if it has to intuit a function
16:05 TimToady but on the other end, it's always just one arg it considers, and the rest are just tacked on the end
16:06 TimToady m: say( 'a' ...^ 'z', 'Z' ).perl
16:06 camelia rakudo-moar 4cef9e: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y Z)␤»
16:10 TRUMP-PENCE joined #perl6
16:12 gregf_ m: sub reduce(@arr is copy, $sum is copy){ @arr.Int ?? do { $sum += @arr.pop; reduce(@arr, $sum) } !! $sum; }; say reduce([1..5], 0);
16:12 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
16:13 gregf_ TRUMP *shudders*
16:14 huf what's he done now
16:14 tailgate thnaks TimToady
16:14 grondilu m: say [+] 1..5
16:14 camelia rakudo-moar 4cef9e: OUTPUT«15␤»
16:15 adu joined #perl6
16:19 crowe joined #perl6
16:23 dalek Inline-Perl5/long_double_perl: 39e2a47 | niner++ | p5helper.c:
16:23 dalek Inline-Perl5/long_double_perl: WIP on long double perl support
16:23 dalek Inline-Perl5/long_double_perl: review: https://github.com/niner/Inline-Perl5/commit/39e2a47da4
16:25 tailgate So @a ==> map {...} ==> [+]; gives me the length of @a. If I want to sum the array after map(), what should it be?
16:26 sena_kun tailgate, maybe just `.sum` method on the map result?
16:27 sena_kun m: [1,2,3].map( { $_ + 1; } ).sum;
16:27 camelia rakudo-moar 4cef9e: ( no output )
16:28 sena_kun m: say [1,2,3].map( { $_ + 1; } ).sum;
16:28 camelia rakudo-moar 4cef9e: OUTPUT«9␤»
16:29 grondilu is ==> working?
16:29 grondilu m: say ^10 ==> map *+*
16:29 camelia rakudo-moar 4cef9e: OUTPUT«^10␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
16:29 timotimo should be
16:29 timotimo m: ^10 ==> map(*+*) ==> say()
16:29 camelia rakudo-moar 4cef9e: OUTPUT«(1 5 9 13 17)␤»
16:30 grondilu m: ^3 ==> *+* ==> &say
16:30 camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Sorry, do not know how to handle this case of a feed operator yet.␤at <tmp>:1␤------> 3^3 ==> *+* ==> &say7⏏5<EOL>␤»
16:30 grondilu I would have expected the map to be implicit
16:31 grondilu but that's ok
16:31 grondilu I don't know much about this operator anyway
16:32 timotimo well, it could as well be reduce instead of map
16:32 timotimo hm. nah, that doesn't make as much sense
16:36 TimToady m: |^10 ==> [\[&(*+*)]](Empty) ==> say()
16:36 camelia rakudo-moar 4cef9e: OUTPUT«(0 1 3 6 10 15 21 28 36 45)␤»
16:36 TimToady kind of a shame one needs the slips there
16:40 mcmillhj joined #perl6
16:40 TimToady m: ^10 ==> produce(*+*) ==> say()
16:40 camelia rakudo-moar 4cef9e: OUTPUT«(0 1 3 6 10 15 21 28 36 45)␤»
16:40 TimToady that's better
16:40 Actualeyes joined #perl6
16:41 zengargoyle joined #perl6
16:41 timotimo i've never heard of "produce" so far
16:46 TimToady it's a production line based on reduce
16:46 TimToady aka triangle operator
16:47 timotimo right
16:47 timotimo that's what i imagined
16:47 harmil_wk Hmm... this seems wrong to me. I must be missing something.
16:47 harmil_wk m: grammar GRAM { rule TOP {^ "a" [ <B> | "a" ] $}; rule B { "b" || fail "No b" } }; say ~GRAM.parse("a a"); say ~("a" ~~ /^<GRAM::B>/)
16:47 camelia rakudo-moar 4cef9e: OUTPUT«a a␤Use of Nil in string context  in block <unit> at <tmp> line 1␤␤»
16:47 harmil_wk Why don't I get the failure as an exception propagating in the second case?
16:48 timotimo perhaps the inner workings of the regex engine doesn't .sink the failure?
16:48 zacts joined #perl6
16:51 TimToady er, /fail "No b"/ is an odd thing to be matching
16:52 timotimo oh, hahaha :D
16:52 TimToady m: grammar GRAM { rule TOP {^ "a" [ <B> | "a" ] $}; rule B { "b" || { fail "No b" } } }; say ~GRAM.parse("a a"); say ~("a" ~~ /^<GRAM::B>/)
16:52 camelia rakudo-moar 4cef9e: OUTPUT«a a␤No b␤  in any  at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤  in regex B at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:52 timotimo i imagined { } around that
16:52 timotimo hallucinated, more like
16:53 TimToady .oO(thought he had Curly, but had Shemp)
16:55 acrussell joined #perl6
16:58 trnh joined #perl6
16:58 dalek Inline-Perl5: fed6b10 | niner++ | p5helper.c:
16:58 dalek Inline-Perl5: Support perls compiled with uselongdouble enabled
16:58 dalek Inline-Perl5:
16:58 dalek Inline-Perl5: Rakudo doesn't support long doubles but instead of bailing out we can at
16:58 dalek Inline-Perl5: least support operating with reduced precision.
16:58 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/fed6b10b10
17:02 harmil_wk TimToady: I hallucinated the very same!
17:06 harmil_wk er, timotimo that is
17:07 harmil_wk too many dang tims!
17:12 dj_goku joined #perl6
17:14 * TimToady is not a tim, he is just a toady of the timmy variety
17:18 harovali1 joined #perl6
17:21 Sgeo joined #perl6
17:28 lambd0x Guys what's the difference between @a[size;size]; and @a[size,size]; ?
17:29 lambd0x Was looping through an array and changing ; -> , made a whole difference.. :S
17:30 ab5tract hmmm.. does anyone know how up-to-snuff OO::Monitors currently is?
17:30 yoleaux 31 Mar 2016 23:05Z <TimToady> ab5tract: The optimizer was not quite the best place to fix the Useless use, so I cleaned it up for you.  Thanks.
17:31 _28_ria joined #perl6
17:32 spider-mario joined #perl6
17:33 mcmillhj joined #perl6
17:38 ab5tract i'm not having much luck with it
17:38 ab5tract also: you're quite welcome, TimToady :)
17:38 ab5tract sorry for putting the fix in a dumb place
17:38 e163 joined #perl6
17:39 jnthn lambd0x: ; is for multiple dimensions, , is for slicing
17:39 jnthn ab5tract: It's been a while since I used it, but it worked OK back then, aside from issues around precomping things. But I *think* those got fixed since...
17:40 ab5tract jnthn: it may be that it really doesn't appreciate custom BUILD or new?
17:40 jnthn Oh, all the way back in January... https://github.com/MoarVM/MoarVM/commit/7e95c057ba8ba82ca35b3ebcbea42bac8d9f74bf
17:41 jnthn ab5tract: Can't think why it'd trip up over those...
17:41 ab5tract jnthn: yeah, that seems like it might have been my issue. without BUILD or new i seem to regain the ability to construct the object
17:42 ab5tract i was getting 'Cannot invoke this object (REPR: Null; VMNull)'
17:42 ab5tract would a test case be useful?
17:43 jnthn Yes; it's a small module so I can probably figure it out pretty quick
17:43 lambd0x jnthn: hm...
17:43 jnthn m: my @a = 1..10; say @a[2,3]
17:43 camelia rakudo-moar 4cef9e: OUTPUT«(3 4)␤»
17:44 jnthn m: my @a[2;2] = [1,2],[3,4]; say @a[0;1]
17:44 camelia rakudo-moar 4cef9e: OUTPUT«2␤»
17:44 jnthn ab5tract: Heh, there's even an issue by you about this: https://github.com/jnthn/oo-monitors/issues/2
17:45 lambd0x jnthn: that's so nice :)
17:45 Sgeo joined #perl6
17:47 stmuk_ http://act.yapc.eu/ye2016/schedule?day=2016-08-24
17:47 ab5tract jnthn: https://gist.github.com/ab5tract/414e6b6cda21d7f167e27b322932fd14
17:47 ab5tract whoops :D
17:49 ab5tract wow, yeah, the previous was not a simple case at *all*
17:49 ab5tract not even sure if it is the same bug or not..
17:50 jnthn Thanks...will see if I've a spare moment to look at it while cooking. :)
17:51 ab5tract thanks jnthn! in the end i can get what i need out of using attribute instantiation ordering and a cr(a|u)fty do block :)
17:52 trnh joined #perl6
17:53 Sgeo_ joined #perl6
18:03 TRUMP-PENCE joined #perl6
18:06 sno joined #perl6
18:07 jnthn ab5tract: Turned it into a .t file :)
18:12 ab5tract jnthn: now i'm really curious, because my extended attempt to use it is now failing when trying to call an attribute accessor on the monitor object
18:12 ab5tract but i haven't managed to reproduce that in golf form
18:14 rindolf joined #perl6
18:15 adu joined #perl6
18:15 prammer joined #perl6
18:21 trnh joined #perl6
18:24 ab5tract got the test case, pre-converting to a .t to shave as many tuits as possible for jnthn++
18:29 AlexDaniel joined #perl6
18:37 sufrostico joined #perl6
18:38 ab5tract hmm.. i'm not sure how this happened but i refactored the bug out of my test case
18:38 xinming joined #perl6
18:40 wamba joined #perl6
19:00 dj_goku joined #perl6
19:00 dj_goku joined #perl6
19:06 kurahaupo joined #perl6
19:08 kurahaupo_ joined #perl6
19:09 rindolf joined #perl6
19:09 tailgate In substr, *-3 is the third char from the end. How can I use a number stored in a varible? i.e. *$x
19:10 ab5tract tailgate: should work like a normal index
19:13 skids m: my $x = 4; "0123456789".substr(*-$x).say;
19:13 camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
19:14 ab5tract m: my $x = 4; "01234".substr($x).say;
19:14 camelia rakudo-moar 4cef9e: OUTPUT«4␤»
19:14 tailgate ah. I was trying to use $x = -4
19:15 skids There's been more a less a purge of magic negative indices from the language.
19:15 [Coke] m: "0123456789".substr(*-+-+-+-4).say;
19:15 camelia rakudo-moar 4cef9e: OUTPUT«Start argument to substr out of range. Is: 14, should be in 0..10; use *-14 if you want to index relative to the end␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:17 skids m: my $x = 4; "0123456789".substr($x%*).say;
19:17 camelia rakudo-moar 4cef9e: OUTPUT«456789␤»
19:17 skids m: my $x = -4; "0123456789".substr($x%*).say;
19:17 camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
19:17 ab5tract tailgate: ah! that's an interesting one. Then you aren't really creating a WhateverCode
19:18 [Coke] m: my $x = -4; say ($x%*).WHAT
19:18 camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤»
19:18 [Coke] sure you are
19:18 [Coke] m: my $x = -4; "0123456789".substr(*+$x).say;
19:18 camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
19:19 * skids wonders if the % trick is in 5to6 somewhere yet.
19:20 ab5tract m: my $f = -4; my $g = *$f
19:20 camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my $f = -4; my $g = *7⏏5$f␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modif…»
19:20 ab5tract ^ this is what i meant
19:20 skids What are you expecting as a result in $g?
19:21 ab5tract the sign on the number is not going to cause currying
19:21 ab5tract skids: i'm not expecting anything. this is what i thought tailgate might have been running into
19:21 skids OIC
19:23 tailgate ab5tract: so what's a WhateverCode?
19:24 skids It's a routine created using the Whatever (the '*').
19:24 tailgate ah
19:28 ab5tract m: my $biggener = * ** 2; $biggener.WHAT.say; $biggener(5)
19:28 camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤»
19:28 ab5tract m: my $biggener = * ** 2; $biggener.WHAT.say; say $biggener(5)
19:28 camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤25␤»
19:30 labster joined #perl6
19:30 ab5tract m: my $indexer = * - 6; ^16 .join.substr($indexer).say
19:30 camelia rakudo-moar 4cef9e: OUTPUT«131415␤»
19:31 pduh joined #perl6
19:33 pduh left #perl6
19:34 jnthn ab5tract: Dinner won my attention for a while. :) I just fixed and added a test for having a custom method new in a monitor. BUILD is still an issue, however.
19:36 jnthn Got some ideas how to fix the BUILD case also...still pondering which one will be least bad. :-)
19:36 ab5tract tailgate: is it clearer? they can take a bit of getting used to, but basically its a 'fancy' way of creating a Callable without entering a new lexical scope
19:38 ab5tract which also allows for niceties in the language design, like creating a multi target that accepts a WhateverCode and passes that WhateverCode its own length
19:38 ab5tract as seen in .substr
19:38 nowan_ joined #perl6
19:40 xinming joined #perl6
19:41 ab5tract jnthn: you've had dinner after only passing *one* of the test cases? ;) ;) ;)
19:42 ab5tract jnthn: but seriously, thank you for looking into it. you're bug squashing abilities will never cease to amaze me!
19:43 firstdayonthejob joined #perl6
19:44 sufrostico joined #perl6
19:46 PotatoGim joined #perl6
19:48 grondilu joined #perl6
19:51 mcmillhj joined #perl6
20:00 cdg joined #perl6
20:12 wamba joined #perl6
20:14 sena_kun joined #perl6
20:18 ab5tract man, I don't know how it happened, but over the years I've started to completely fail at the your/you're distinction, after years of being an insufferable nag on the topic.
20:18 perlpilot old age affects everyone differently  ;)
20:18 ab5tract ;)
20:25 firstdayonthejob joined #perl6
20:31 masak ab5tract: I find I get worse at such distinctions when I'm really tired.
20:31 yoleaux 9 Aug 2016 20:47Z <brrt> masak: i'd like to discuss macros some time in the future
20:31 masak brrt: ready when you are!
20:31 * masak looks at his watch. it says "some time in the future"!
20:32 masak ab5tract: also, it always feels like (to me) that these errors creep into my writing because I only think "in spoken language"
20:33 masak and in spoken language the difference vanishes
20:35 itaipu joined #perl6
20:38 jnthn ab5tract: So, now a custom BUILD works in monitor worked too, and I added your case as a test. I also whacked `no precompilation` in until I can track the precomp issue with monitors down and fix it (not tonight... :)), so people won't stub their toe on that issue in the meantime.
20:38 jnthn *works too
20:38 jnthn Apparently the fix back in January wasn't enough...
20:39 niceperl joined #perl6
20:39 jnthn Hm, I guess META6.json is all the rage now instead of META.info, right? :)
20:40 dalek doc: ecdb5ad | Altai-man++ | / (13 files):
20:40 dalek doc: Make examples compile, improve signature catching part of extract-examples script.
20:40 dalek doc: review: https://github.com/perl6/doc/commit/ecdb5ada5e
20:42 TEttinger joined #perl6
20:43 sena_kun I cannot see RT queue without sign up?
20:44 dalek ecosystem: 0df987b | jnthn++ | META.list:
20:44 dalek ecosystem: OO::Monitors now has a META6.json.
20:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0df987b6ff
20:44 Wiertek joined #perl6
20:49 dj_goku joined #perl6
20:49 dj_goku joined #perl6
20:49 ab5tract jnthn: yeah, I've noticed an increase in swapped-homophone misspellings in general
20:50 lizmat .oO( as long as not everybody spoonerize leir thines, it's ok )
20:51 TEttinger munki-si-noe-ivall
20:51 * masak .oO( .say for @lines.pick(*) )
20:52 TEttinger pines.lick(*)?
20:52 jnthn On your own tongue be it... :P
20:52 TEttinger the freshmaker
20:53 TEttinger snipe.lick
20:53 anser joined #perl6
20:54 mcmillhj joined #perl6
20:54 TEttinger kline.pics, for the IRC informed
20:55 * TEttinger continues dancing around the subject
20:56 TEttinger pisces link foray
20:59 ab5tract jnthn: that fixed my larger case, too! thank you !!!!
20:59 jnthn yay \o/
21:00 ab5tract still have a fair bit of refactoring to do, but I'm really happy to outsource the "only one change to the grid at a time" work to OO::Monitors
21:01 ab5tract for Terminal::Print
21:02 ab5tract and, as cool as it is that it works, I think @!grid will appreciate being filled in via BUILD as opposed to a do block :)
21:02 jnthn :)
21:17 mvorg joined #perl6
21:22 mcmillhj joined #perl6
21:25 Nex6 joined #perl6
21:30 sena_kun Does panda currently supports installation of scripts from /bin directory?
21:31 gfldex sena_kun: it does but it wont tell you what you have to set $PATH to
21:32 sena_kun gfldex, thanks.
21:32 mcmillhj joined #perl6
21:36 harmil_wk I know why the operators work the way they do, but I just wish that "@a >>*=>> 10" had <'s instead of >'s. It would be so much more intuitive to me. Still, the fact that I can even do that... sort of mind-blowing.
21:36 sena_kun >>*=>>
21:36 sena_kun Fish operator!
21:36 sena_kun Almost.
21:38 adu joined #perl6
21:38 harmil_wk I was transcribing an algorithm that said "now multiply everything by 10" and just typed that and it worked...
21:39 sena_kun m: say (1 .. 1000).eager.lazy;
21:39 camelia rakudo-moar be7ce0: OUTPUT«(...)␤»
21:41 sena_kun Laziness is a bit strange here. :<
21:42 sena_kun Ah, nevermind.
21:44 gfldex m: my @a = 1..10; my &mul10 = &infix:<*>.assuming(10); say @a».&mul10;
21:44 camelia rakudo-moar be7ce0: OUTPUT«[10 20 30 40 50 60 70 80 90 100]␤»
21:44 gfldex if you multiply by 10 often ...
21:44 jluis joined #perl6
21:47 adu joined #perl6
21:49 harmil_wk gfldex: that doesn't seem a lot easier to type than @a»*=»10...
21:50 ugexe it also doesnt mutate the array though
21:50 harmil_wk True. In this case, that's what I wanted, but I see the value.
21:52 harmil_wk m: my @a = 1..10; say @a»*»10;
21:52 camelia rakudo-moar be7ce0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3my @a = 1..10; say @a»7⏏5*»10;␤    expecting any of:␤        postfix␤»
21:52 harmil_wk m: my @a = 1..10; say @a »*» 10;
21:52 camelia rakudo-moar be7ce0: OUTPUT«[10 20 30 40 50 60 70 80 90 100]␤»
21:52 harmil_wk Huh, spaces required I guess
21:52 sufrostico joined #perl6
21:53 MilkmanDan joined #perl6
21:56 ugexe m: my @a = 1,2,3; @a .= map: * * 10; say @a # >:)
21:56 camelia rakudo-moar be7ce0: OUTPUT«[10 20 30]␤»
21:58 kyclark joined #perl6
22:01 kyclark Re: http://pastie.org/10935333
22:01 kyclark I’m trying to figure out how to create a MAIN signature to take (only) integers to add
22:02 kyclark Program must have two or more numbers to add.  Any suggestions?
22:04 mohae joined #perl6
22:07 gfldex m: sub MAIN(@a where * ~~ Int){ put [+] @a }; MAIN(1,2,3);
22:07 camelia rakudo-moar be7ce0: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:07 gfldex m: sub MAIN(*@a where * ~~ Int){ put [+] @a }; MAIN(1,2,3);
22:07 camelia rakudo-moar be7ce0: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:08 ugexe sub MAIN(*@numbers (Int $, Int $, *@_)) { say [+] @numbers };
22:09 ab5tract harmil_wk: the reason for differentiating between ">>" vs "<<" in that example is to allow equal sized lists to DWIM-but-fail when using the latter
22:09 ugexe sub MAIN(*@numbers ($, $, *@_) where {$_.all ~~ Int}) { say [+] @numbers };
22:09 ab5tract m: my @a = ^10; say @a >>*=>> 10; say @a >>*=<< 10; say  @a >>*=<< ^10
22:09 camelia rakudo-moar be7ce0: OUTPUT«[0 10 20 30 40 50 60 70 80 90]␤Lists on either side of non-dwimmy hyperop of  are not of the same length␤left: 10 elements, right: 1 elements␤  in block <unit> at <tmp> line 1␤␤»
22:10 gfldex m: sub MAIN(*@a where { .all ~~ Int } ){ put [+] @a }; MAIN(1,2,3);
22:10 camelia rakudo-moar be7ce0: OUTPUT«6␤0␤»
22:10 gfldex kyclark: ^^^
22:10 ugexe missing 2 or more constraint
22:11 gfldex his problem is the type constraint on the (semi) slurpy
22:11 ab5tract m: my @a = ^10; say @a >>*=>> 10; say  @a >>*=<< ^10; say @a >>*=<< 10
22:11 camelia rakudo-moar be7ce0: OUTPUT«[0 10 20 30 40 50 60 70 80 90]␤[0 10 40 90 160 250 360 490 640 810]␤Lists on either side of non-dwimmy hyperop of  are not of the same length␤left: 10 elements, right: 1 elements␤  in block <unit> at <tmp> line 1␤␤»
22:11 gfldex MAIN doesn't do slurpies
22:18 kyclark I’m going to be introducing my students to “gradual typing,” and I thought this might be a chance to show off enforcing “Int” on the arguments.  It all comes down to the fact that “Slurpy positional parameters with type constraints are not supported.” OK. I’m still saved by the fact that “+” throws up on strings, e.g., 1 + “foo”
22:18 kyclark Thanks for all the suggestions!
22:23 unmatched} Does anyone want to do a good deed? pmurias++'s changes a few days ago removed koality from modules.perl6.org but the column in the db on the site is still there so now it's failing the NULL check on any new module added to the ecosystem. Someone needs to login to www.p6c.org and remove the dists.koality column in /home/modules.perl6.org/modules.perl6.org/modulesperl6.db
22:24 unmatched} The easiest way is to just toss that file and let the site autogenerate the new and fixed version, but that kills the site for about an hour. Another easier way is to run the build process elsewhere and copy the file over :)
22:24 unmatched} (I forget, but I don't think sqlite has a DROP COLUMN)
22:24 * unmatched} whisks away to drink even more beer and play No Man's Sky
22:26 sufrostico joined #perl6
22:26 sena_kun We store our modules data in the sqlite base? Why not postgres or something(I mean, almost everything) better than this?
22:27 sena_kun Also... http://storage3.static.itmages.com/i/16/0812/h_1471040750_3049725_1426e8ad3d.png - hyper operator "eats" list occasinally. Is it a known bug?
22:28 unmatched} sena_kun: I'm faling to see the betterment :)
22:28 sena_kun It seems sign up on RT is a must.
22:29 heatsink joined #perl6
22:30 TimToady m: my @a = ^10; say @a X*= 10
22:30 camelia rakudo-moar be7ce0: OUTPUT«(0 10 20 30 40 50 60 70 80 90)␤»
22:30 sena_kun unmatched}, what about proper concurrency connections support? I can be too scared, because I had an accident with sqlite in the past, but still. Sqlite purpose is only testing/micro-examples.
22:30 sena_kun s/too scared/"too scared"/
22:31 TimToady .oO(too scarred)
22:31 unmatched} sena_kun: what do we need that for? We only need one connection.
22:32 heatsink fear nothing, but fear itself....someone said
22:32 unmatched} FWIW: turns out I already have modules.perl6.org checkout with the key setup, so I'm generating the new file now and will upload it
22:32 trnh joined #perl6
22:32 trnh joined #perl6
22:33 sena_kun It's not my business, of course. And I'm not blaming anyone. Just a random thought. Folks here have much more experience than I have anyway.
22:33 unmatched} sena_kun: you're part of the community and it's a community project, so it's your business too :)
22:34 unmatched} sqlite is very easy to setup, so that's the benefit, IMO
22:34 unmatched} Also: the current system is meant to be temporary :)
22:36 unmatched} Also: we're almost at 700 modules \o/
22:37 dj_goku joined #perl6
22:37 sena_kun Oh, I can see RT now.
22:38 sena_kun Ah, yeah, it's already filled.
22:59 skids joined #perl6
23:02 sena_kun m: my @arr; my @a = gather { take 1; take 2; take 3; take (1 .. Inf); }; @a.iterator.push-until-lazy(@arr); say @arr;
23:02 camelia rakudo-moar be7ce0: OUTPUT«[1 2 3 1..Inf]␤»
23:02 sena_kun m: my @arr; my @a = gather { take 1; take 2; take 3; take (1 .. Inf); take (1 .. Inf); }; @a.iterator.push-until-lazy(@arr); say @arr;
23:02 camelia rakudo-moar be7ce0: OUTPUT«[1 2 3 1..Inf 1..Inf]␤»
23:03 sena_kun Why it doesn't stop here?
23:10 pduh joined #perl6
23:19 skids m: my @arr; my @a = gather { take 1; take 2; take 3; take |(1 .. Inf); take |(1 .. Inf); };
23:19 camelia rakudo-moar be7ce0: OUTPUT«(timeout)»
23:19 skids Hrm.
23:19 skids Well in the first case because it isn't iterating the ranges.
23:20 skids The second case because of the assignment.
23:21 skids m: my @arr; my $a = gather { take 1; take 2; take 3; take |(1 .. Inf); take |(1 .. Inf); }; $a.iterator.push-until-lazy(@arr);
23:22 camelia rakudo-moar be7ce0: OUTPUT«(timeout)»
23:22 skids Eh, I'm not in the mood for iterators today.
23:22 skids oh maybe...
23:23 skids m: my @arr; my $a = gather { take 1; take 2; take 3; take |(1 .. Inf); take |(1 .. Inf); }; @arr.iterator.push-until-lazy($a);
23:23 camelia rakudo-moar be7ce0: ( no output )
23:23 skids m: my @arr; my $a = gather { take 1; take 2; take 3; take |(1 .. Inf); take |(1 .. Inf); }; @arr.iterator.push-until-lazy($a);  @arr.say;
23:23 camelia rakudo-moar be7ce0: OUTPUT«[]␤»
23:23 skids nm.
23:24 sena_kun This while gather thing can be wrong, but actually my goal is to make a good example for .push-until-lazy method.
23:24 sena_kun *whole
23:26 dalek ecosystem: 7d8f860 | (Wenzel P. P. Peppmeyer)++ | META.list:
23:26 dalek ecosystem: add Rakudo::Slippy::Semilist
23:26 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7d8f8600fb
23:50 pierre_ joined #perl6
23:53 unmatched} ( http://modules.perl6.org/ is now fixed )
23:55 sena_kun unmatched}++

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

Perl 6 | Reference Documentation | Rakudo