»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
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/
timotimo ah, yes 00:01
well, after you've sorted, you're at pairs already
sena_kun m: %a = :1one, :2two; say %a.sort;
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;␤»
sena_kun m: my %a = :1one, :2two; say %a.sort;
camelia rakudo-moar c587b9: OUTPUT«(one => 1 two => 2)␤»
sena_kun m: my %a = :1one, :2two; say %a.sort[0]; 00:02
camelia rakudo-moar c587b9: OUTPUT«one => 1␤»
sena_kun m: my %a = :1one, :2two; for %a.sort -> $a, $b {};
camelia ( no output )
sena_kun Ah, perfect.
timotimo um, no, not perfect
sena_kun No, it's not.
timotimo m: my %a = :1one, :2two, :3three; for %a.sort -> $a, $b {}; 00:03
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 00:06 cpage_ joined
sena_kun I wonder if it worked back there. 00:10
00:10 cpage_ left
dalek href="https://modules.perl6.org/bit-rot:">modules.perl6.org/bit-rot: 05b5d4f | (Zoffix Znet)++ | / (19 files):
Switch to new ::AssetPack pipe interface
00:11
timotimo possibly untested ;) 00:12
sena_kun It can be. Perhaps, it'd better to rewrite it with .pairs.
00:13 cpage_ joined
sena_kun Ah, stop. 00:13
00:13 cdg left, pierre_ joined
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␤»
sena_kun m: %a = one => 1, two => 2; for %a.sort.kv -> Int $a, $b { say $a, $b };
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 ␤»
sena_kun m: my %a = one => 1, two => 2; for %a.sort.kv -> Int $a, $b { say $a, $b };
camelia rakudo-moar c587b9: OUTPUT«0one => 1␤1two => 2␤»
00:14 cdg joined
sena_kun Neat. Thanks, gfldex, timotimo! 00:14
dalek c: 4d0a4d5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod6:
doc sub USAGE
00:15
c: a44b6cb | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
add USAGE
sena_kun Argh. 00:16
timotimo do watch out, though
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 mcmillhj left, Nex6 left
timotimo i feel sleepy, too 00:18
00:18 cdg left
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}␤»
gfldex should append treat %_ special? This will cause confusion or bugs. 00:23
TimToady 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}␤»
gfldex m: my %h = a => 1; %h.append('b', 2, 'c', 3); %h.append({d => 4}); say %h;
camelia rakudo-moar c587b9: OUTPUT«{a => 1, b => 2, c => 3, d => 4}␤»
gfldex thinking about it, it should not just work but warn
TimToady well, do we ever want to allow an append with an option? 00:26
it kinda comes out to the unrecognized option on a method thing again
00:27 BenGoldberg joined
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)
but I see little use for that outside of constructors 00:28
Hash is kind of a base class and wont pass anything on, at least in .append. So warning their would make sense.
dalek ateverable: 60ebbcc | (Daniel Green)++ | / (4 files):
Add short aliases for all the bots
00:30
00:31 cpage joined, mr-foobar joined 00:37 canopus left
BenGoldberg If we added a .assuming to Metamodel::ClassHOW, you could probably do my $curried = $obj.^assuming( "methodname", ... ); $obj.$curried( ... ); 00:38
00:42 canopus joined
dalek c: 2f88c5e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6:
doc Hash.append
00:50
c: 52d9df9 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6:
uniformify method definition
c: cfeafef | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
Match doesn't coerce to Str by default
00:52 mvorg left
dalek c: fdbd478 | Altai-man++ | doc/Type/ (6 files):
make examples compile fir Hash, MixHash, Pair, Pod::Item, Proc and Promise types
00:58
sena_kun >fir
Oh.
dalek c: 77be84d | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
Set and array containers don't mix so well
00:59
href="https://modules.perl6.org/bit-rot:">modules.perl6.org/bit-rot: 72c3ff6 | (Zoffix Znet)++ | / (6 files):
If the mountain won't come to Muhammad then Muhammad must...

  ... steal sprite generating code from now-deprecated
Mojolicious::Plugin::AssetPack::Handler::Sprites and store it in the repo as module.
01:01
01:04 Actualeyes joined
dalek c: 669b7c9 | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
drop 'Defined as:' from detection. Less false positives that say.
01:08
href="https://modules.perl6.org/bit-rot:">modules.perl6.org/bit-rot: 7b62fe2 | (Zoffix Znet)++ | / (2 files):
Update docs to use newer --restart-app switch
01:09
gfldex output of util/list-missing-methods.p6 looks quite good now
sena_kun gfldex++
dalek c: b8691e8 | Altai-man++ | doc/Type/ (6 files):
Make some more examples compile, the easy ones here
01:11
gfldex now AlexDaniel can enter the stage and add a few 100 issues :)
sena_kun gfldex, noooooooo 01:12
gfldex i need to add a way to ignore methods that we don't want to doc 01:13
given I can implement that in Perl 6, that can't be hard. :)
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:17
01:19 rpburkholder left
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
\quit
Ah.
01:20 grondilu left, sena_kun left
AlexDaniel gfldex: why me? :) 01:21
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:23
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␤»
gfldex i did think that it is lazy
01:28 bob777 joined
TimToady is-lazy really means something more like "known arbitrarily large" 01:29
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:35
camelia rakudo-moar c587b9: OUTPUT«False␤()␤»
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;
camelia rakudo-moar c587b9: OUTPUT«False␤(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
TimToady so more like, "we know it must be treated lazily"
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;
camelia rakudo-moar c587b9: OUTPUT«False␤(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
TimToady you need 'lazy gather' to have that True
mst TimToady: so if one imagines it as 'must-lazy' one won't go too far wrong?
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)␤»
TimToady mst: nodnod 01:37
01:38 kid511 is now known as kid51
dalek href="https://modules.perl6.org/bit-rot:">modules.perl6.org/bit-rot: d78f41c | (Zoffix Znet)++ | Build.PL:
Bump Test::Mojo::Role::ElementCounter version
01:39
href="https://modules.perl6.org/bit-rot:">modules.perl6.org/bit-rot: 10ef84b | (Zoffix Znet)++ | / (5 files):
Fix bit rot in test suit

Part of #60
01:46
modules.perl6.org: 3b57edf | (Zoffix Znet)++ | Build.PL: 01:52
modules.perl6.org: Update prereqs
modules.perl6.org:
modules.perl6.org: - Bump for major releases of Mojolicious and ::AssetPack
modules.perl6.org: - Remove now-deprecated Mojolicious::Plugin::Bootstrap3
01:52 dalek left
unmatched} ha-ha! 01:53
01:53 dalek joined
unmatched} But it was this: github.com/perl6/modules.perl6.org/pull/61 01:53
01:53 ChanServ sets mode: +v dalek
unmatched} I'm done with bit rot stuff 01:54
You know what dalek needs? Perl 6 rewrite :} 02:04
02:09 jcallen_ is now known as jcallen 02:12 pierre_ left 02:18 pierre_ joined
dj_goku is there a way to compare a matrix? 02:18
02:22 noganex_ joined 02:23 pierre_ left 02:25 noganex left, pierre_ joined, SmokeMachine____ left 02:26 SmokeMachine____ joined 02:27 pduh_ joined
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␤»
gfldex dj_goku: ^^^
m: say [&&] ( flat ((5,2),(3,4)) »==« ((1,2),(3,4)) ) 02:30
camelia rakudo-moar c587b9: OUTPUT«False␤»
unmatched} gfldex++ 02:31
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␤»
dj_goku m: my @a[2,2]; @a[0,0] = 'test'; my @b[2,2]; @b[0,0] = 'test'; say @b ~~ @a;
camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
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:33
TimToady m: say ((1,2),(3,4)) eqv ((1,2),(3,4)), ((5,2),(3,4)) eqv ((1,2),(3,4))
camelia rakudo-moar c587b9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
rakudo-moar c587b9: OUTPUT«TrueFalse␤»
timotimo dj_goku: we separate coordinates in dimensions with ; rather than ,
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 pduh_ left, wamba joined
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␤␤»
TimToady say wot? 02:35
02:35 pduh_ joined 02:36 pduh_ left, pduh_ joined 02:38 pduh_ left
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␤»
dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a eqv @array;
camelia rakudo-moar c587b9: OUTPUT«False␤»
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
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␤»
dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[0;1] ~~ @array[0;1];
camelia rakudo-moar c587b9: OUTPUT«True␤»
dj_goku m: my @a[2;2]; @a[0;0] = 'test'; my @array = (('test', Any), (Any, Any)); say @a[1;1] ~~ @array[1;1];
camelia rakudo-moar c587b9: OUTPUT«True␤»
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␤␤»
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];
camelia rakudo-moar c587b9: OUTPUT«True␤False␤»
02:42 pduh joined 02:44 kid51 left
dj_goku TimToady: so did I find a bug? 02:44
02:44 mcmillhj left
dalek c: 0cfc940 | (Wenzel P. P. Peppmeyer)++ | util/ (2 files):
add file with types/methods to be ignored
02:45
unmatched} dj_goku: to me looks like either a bug or NIY. Worth reporting IMO 02:50
dj_goku ok, I haven't ever done this before so. will search for what info is needed. 02:52
02:53 pduh left
unmatched} "this" is what? Bug reporting? 02:54
huggable: rakudobug
huggable unmatched}, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
02:55 mithaldu_ left, SmokeMachine____ left, kipd left
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: irclog.perlgeek.de/perl6/2016-08-12#i_13009730 02:55
02:55 mithaldu_ joined, notbenh_ joined
dj_goku alright cool. 02:56
02:57 SmokeMachine____ joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 42e215b | (Zoffix Znet)++ | lib/ModulesPerl6.pm:
Remove extraneous whitespace
02:58
02:58 kipd joined
dalek c: 6597c26 | (Wenzel P. P. Peppmeyer)++ | util/ignored-methods.txt:
ignore Dateish::IO
03:04
c: 3843813 | (Wenzel P. P. Peppmeyer)++ | util/ignored-methods.txt:
Dateish::earlier is doced in Date
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␤␤»
gfldex Any.push tries to call SetHash.push 03:14
does that qualify as a bug?
unmatched} s: Any, push 03:15
SourceBaby unmatched}, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Calling push() will never work with declared signature (\a, |elems is raw)␤at -e:6␤------> put sourcery( Any, ⏏push )[1];␤
unmatched} s: Any, "push"
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 li
dj_goku m: say [[1,2]] ~~ [[1,2]];
camelia rakudo-moar c587b9: OUTPUT«True␤»
unmatched} 0.o
dj_goku m: say [[1,2]] eqv [[1,2]];
camelia rakudo-moar c587b9: OUTPUT«True␤»
dj_goku m: say [[1,2]] ~~ [[1,1]];
camelia rakudo-moar c587b9: OUTPUT«False␤»
dj_goku m: say [[1,2]] eqv [[1,1]];
camelia rakudo-moar c587b9: OUTPUT«False␤»
unmatched} m: say [[1,2],] eqv [[1,1],];
camelia rakudo-moar c587b9: OUTPUT«False␤»
unmatched} hm, wtf 03:16
dj_goku m: say [[1,2],] eqv [[1,2],];
camelia rakudo-moar c587b9: OUTPUT«True␤»
unmatched} s: Any, "push", \()
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/c587...ny.pm#L180
dj_goku second one is [[1,1],] not [[1,2],] 03:17
BenGoldberg s: Any.push: ()
SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot modify an immutable Any␤ in block <unit> at -e line 6␤␤
BenGoldberg s: $.push: () 03:18
SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Variable $.push used where no 'self' is available␤at -e:6␤------> put sourcery( $.push⏏: () )[1];␤ expecting any of:␤ argument list␤ term␤
BenGoldberg s: (my @a).push: (); 03:19
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
BenGoldberg s: my @a.push: ();
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
BenGoldberg s: my @a;
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
unmatched} BenGoldberg: it's worth reading the help of the bot before feeding it garbage
BenGoldberg SourceBaby, help
SourceBaby BenGoldberg, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
unmatched} gfldex: isn't it calling Any.push with the SetHash as invocant and fails because there's no such candidate? 03:20
03:20 cpage_ left
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 li
unmatched} wtf...
BenGoldberg s: &say
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/c587...ors.pm#L20
unmatched} s: SetHash, "push", \()
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/c587...ny.pm#L180
BenGoldberg s: &say, \(Int); 03:22
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
BenGoldberg s: &say, \("foo");
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
unmatched} BenGoldberg: no ending semicolon
BenGoldberg s: &say, \("foo") 03:23
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/c587...ors.pm#L22
BenGoldberg SourceBaby, You are too finicky :P
s: &say, \(Int) 03:24
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/c587...ors.pm#L27
unmatched} m: say Any.^can("push")[0] ~~ Callable; 03:25
camelia rakudo-moar c587b9: OUTPUT«False␤»
unmatched} bisect: m: say Any.^can("push")[0] ~~ Callable;
bisectable unmatched}: On both starting points (good=2015.12 bad=c587b9d) the exit code is 0 and the output is identical as well
unmatched}: Output on both points: False
unmatched} really...
m: say Any.^can("push")[0](42)
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␤␤»
unmatched} m: my @a; say Any.^can("push")[0](@a,42)
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␤␤»
unmatched} m: say Any.^can("push")[0] 03:26
camelia rakudo-moar c587b9: OUTPUT«Method+{<anon|42801984>}.new␤»
unmatched} Why isn't that a Callable?
dj_goku unmatched}: thanks I open this rt bug: 128904
unmatched} dj_goku++
m: say Any.^can("push")[0].^mro
camelia rakudo-moar c587b9: OUTPUT«((Method+{<anon|42801984>}) (Method) (Routine) (Block) (Code) (Any) (Mu))␤»
unmatched} m: say Any.^can("say")[0].^mro
camelia rakudo-moar c587b9: OUTPUT«((Method) (Routine) (Block) (Code) (Any) (Mu))␤»
dj_goku unmatched}: I have a rt.perl.org bitcard account but can't see anything or open tickets. 03:27
unmatched} m: say Any.^can("say")[0] ~~ Callable
camelia rakudo-moar c587b9: OUTPUT«True␤»
unmatched} dj_goku: talk to [Coke] about that. There's some way to contact admins.
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].
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 khw left
unmatched} m: sub (&thing) {}( Any.^can("say")[0] ) 03:31
camelia ( no output )
unmatched} RTed the missing Callable: rt.perl.org/Ticket/Display.html?id=128905 03:32
03:39 wamba left, wamba1 joined
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␤␤»
BenGoldberg m: dd Any.^can("say");
camelia rakudo-moar c587b9: OUTPUT«(method say (Mu $: | is raw) { #`(Method|42088008) ... },)␤»
BenGoldberg m: dd Any.^can("say")[0]; 03:40
camelia rakudo-moar c587b9: OUTPUT«Method say = method say (Mu $: | is raw) { #`(Method|52737608) ... }␤»
BenGoldberg m: sub foo (&bar) { bar(42) }; foo( Any.^can("say")[0] ); 03:41
camelia rakudo-moar c587b9: OUTPUT«42␤»
BenGoldberg m: sub foo (&bar) { bar(Mu) }; foo( Any.^can("say")[0] );
camelia rakudo-moar c587b9: OUTPUT«(Mu)␤»
BenGoldberg m: sub foo (&bar) { bar(True|False) }; foo( Any.^can("say")[0] ); 03:42
camelia rakudo-moar c587b9: OUTPUT«any(True, False)␤»
03:45 wamba1 left 04:27 Cabanossi left 04:29 Cabanossi joined 04:31 itaipu left 04:36 itaipu joined
dalek c: dbc3d25 | (Wenzel P. P. Peppmeyer)++ | util/list-missing-methods.p6:
add some comments, clean up some code
04:40
04:43 skids left 04:46 itaipu left 05:00 pierre_ left
konobi cs.stanford.edu/~zdevito/zdevito_thesis.pdf 05:03
nice read 05:09
TEttinger ha, I was sure I had heard the name z. devito before 05:13
terra's sorta a good thing, sorta very strange
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
so depending on what layer you're in, "the first item" means a different index
they don't have much choice about the lua using 1-indexing 05:15
05:16 harovali left, harovali joined 05:21 itaipu joined 05:24 avenj left
konobi TEttinger: the code generation and thought process of the underlying peices is really the interesting part to me 05:27
"Eager specialization with lazy typechecking" 05:37
05:47 j75 left 05:52 avenj joined, labster left
konobi mkay... a _lot_ of formal proofs in there that go straight over my head 05:53
it's turtles all the way down... o.O 06:08
06:23 pierre_ joined, trnh joined, trnh left, trnh joined 06:28 firstdayonthejob joined, pierre_ left 06:35 labster joined
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) }␤»
gfldex m: my &fac_gen = -> &n { n == 0 }
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 }␤»
gfldex m: my &fac_gen = -> &n { n() == 0 } 06:40
camelia ( no output )
06:42 firstdayonthejob left 06:43 BenGoldberg left 06:46 sssd joined 06:51 kanl joined 06:52 itaipu left 06:55 sno left 06:56 rmmm left 06:58 labster left
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:01
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:04
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:15
07:17 sssd left
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␤»
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␤»
kanl m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; die if $_ == 1 }; $s.act: -> $v { $v.status.say }; $s.wait;
camelia rakudo-moar c587b9: OUTPUT«Kept␤Broken␤Kept␤Kept␤Memory allocation failed; could not allocate 4 bytes␤»
07:22 TheLemonMan joined
kanl The same code produces weirder results on my machine. 07:22
07:24 labster joined
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␤»
gfldex m: my $s = Supply.from-list(^6).throttle: 3, { sleep 3; Failure.new("booboo") if $_ == 1 }; $s.act: { .status.say }; $s.wait;
camelia rakudo-moar c587b9: OUTPUT«Kept␤Kept␤Kept␤Kept␤Kept␤Kept␤Memory allocation failed; could not allocate 32 bytes␤»
gfldex nice new bug for jnthn :) 07:26
07:29 darutoko joined 07:31 wbill joined
kanl even if said bug is fixed, i still have no way of knowing the broken promise belongs to 1. 07:31
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:33
camelia rakudo-moar c587b9: OUTPUT«Hash %h = {}␤»
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}}}␤»
gfldex is there any way to turn an Array into a multidim subscript? 07:35
07:42 dalek left 07:43 dalek joined, ChanServ sets mode: +v dalek 07:49 RabidGravy joined
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 ␤»
TimToady m: for 1,2,3 { .map: *.say } 07:58
camelia rakudo-moar 7399a3: OUTPUT«1␤2␤3␤»
labster m: my $x = "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]"; $x ~~ s:mm:g/ '$' /€/; $x.say 07:59
camelia rakudo-moar 7399a3: OUTPUT«[̲̅€̲̅(̲̅5̲̅)̲̅€̲̅]␤»
labster m: "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]".subst( / '$' / , '€', :mm, :g).say 08:01
camelia rakudo-moar 7399a3: OUTPUT«[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]␤»
labster How do I convert currencies in the method form? 08:02
TimToady you need a :m on the pattern as well 08:03
m: "[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]".subst( / :m '$' / , '€', :mm, :g).say
camelia rakudo-moar 7399a3: OUTPUT«[̲̅€̲̅(̲̅5̲̅)̲̅€̲̅]␤»
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
kanl good grief. 08:05
*inception* 08:06
labster ignoremark. OK, thanks TimToady 08:08
"so it is not necessary to put both :m and :mm." in S05 08:09
08:09 zakharyas joined
TimToady on the s/// form 08:09
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" })
camelia rakudo-moar 7399a3: OUTPUT«WARNINGS for <tmp>:␤Useless use of "eq" in expression "$_ eq \"foo\"" in sink context (line 1)␤»
TimToady m: my @a; @a.grep({ .value andthen $_ eq "foo" }) 08:11
camelia ( no output )
RabidGravy boo! 08:23
08:37 kurahaupo joined 08:40 kurahaupo_ joined 08:42 kurahaupo` joined 08:43 kurahaupo left, kurahaupo joined 08:46 kurahaupo_ left 08:47 kurahaupo` left 08:51 kurahaupo_ joined 08:52 kurahaupo` joined 08:53 kurahaupo left
RabidGravy ponders which one of these half finished modules he should work on today 08:54
resisting the urge to start even more
08:55 kurahaupo_ left 08:59 kanl left
dalek ateverable: e84ccc8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Set description when uploading bisect log
08:59
ateverable: 7815457 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (4 files):
Allow users to set any STDIN (URLs work fine too!)

  “STDIN foo” or “STDIN=foo”. Use it as a separate command. Set it once and it
will use the same input for all following commands of this bot.
Use “STDIN clear” to set it to its original value. You can also use “delete”,
  “reset” and “unset”, just in case you forget the right word.
This does not work with bisectable yet.
RabidGravy anyway reboot is in order 09:00
09:00 RabidGravy left 09:10 jack_rabbit left 09:11 ShimmerFairy left 09:14 pierre_ joined 09:22 walkerlala joined
walkerlala hi there 09:22
anyone online?
tadzik quite a lot of us, yes :)
gfldex Total of 325 nicks 09:23
walkerlala is those on the right side all online? 09:24
AlexDaniel maybe
walkerlala so all of you write perl6 instead of perl nowadays? 09:25
stmuk_ walkerlala: I'm not sure that sort of generalisation is useful and suspectt people use a number of languages 09:26
but yes we share perl 6 as a common interest
walkerlala I am also interested in it. seem like a new language 09:27
AlexDaniel define “new” :) 09:28
09:28 RabidGravy joined
gfldex it was made new over a timespan of 15 years 09:28
walkerlala what situation is perl6 in? Is it now being actively developed? 09:30
DrForr Very much so, yes.
gfldex this year is bug hunting year 09:32
walkerlala eh...would it be appropriate if I post some perl5 question here?
AlexDaniel gfldex: wasn't it a performance year?
walkerlala @gfldex why?
DrForr walkerlala: Try #perl on freenode.
gfldex terribad performace is a bug :)
AlexDaniel walkerlala: not really, try #perl instead
gfldex that's one of the Perl 6 repos: github.com/rakudo/rakudo/graphs/contributors 09:33
stmuk_ or #perl-help
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
gregf_ freenode #perl is for puns *ducks*
walkerlala gregf_: what do you mean by puns ducks (none-native English speaker asking...) 09:37
09:37 AlexDaniel left 09:39 walkerlala_ joined
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:39
stmuk_ www.irc.perl.org/faq.html suggests 3 channels 09:40
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
yep, TimToady is the nick :) 09:42
still, #perl freenode or #perl-help on irc.perl.org
s/trivial/trivial questions/, s/oh/on/ 09:43
09:49 bob777 left 09:54 lambd0x joined
lambd0x hello everyone \o/ 09:55
lizmat lambd0x o/ 09:56
09:58 TRUMP-PENCE joined
lambd0x m: my $a = 5; for $a...0 -> $b { say $b; } 09:59
camelia rakudo-moar 6c7eb3: OUTPUT«5␤4␤3␤2␤1␤0␤»
DrForr Afternoon. And preemptive sigh.
10:00 e163 joined
lambd0x is there other way to loop downward without using loop? 10:00
10:00 e163 left
nine lambd0x: reverse? 10:00
lizmat while?
lambd0x nine: yes.
nine m: for 3...1 { say $_ } # or like this? 10:01
camelia rakudo-moar 6c7eb3: OUTPUT«3␤2␤1␤»
arnsholt m: for reverse ^5 { .say } # What nine meant, I think
camelia rakudo-moar 6c7eb3: OUTPUT«4␤3␤2␤1␤0␤»
nine lambd0x: it very much depends on what you want to loop over
lambd0x nine and arnsholt that's it.
yes
nine: wanted to iterate over one descending X ascending loop 10:02
but its giving me error because the operators are !identical.
10:03 rindolf joined
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 …»
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…»
nine lambd0x: as the error message told you: "you need to clarify with parentheses"
lambd0x gfldex: just noticed that hahaah
nine: yes yes... need to pay more attention to compiler messages thanks everyone 10:06
learned more ways to iterate downwards to a list :D 10:07
*a ..
10:10 tokomer joined
gfldex m: my @a = 1..5; (do for @a { .Str }).reverse.say 10:10
camelia rakudo-moar 6c7eb3: OUTPUT«(5 4 3 2 1)␤»
lambd0x gfldex: \o/ 10:13
10:14 holyghost left, holyghost joined
gregf_ m: say 1..5.reverse 10:15
camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤»
gregf_ m: say (1..5).reverse 10:16
camelia rakudo-moar 6c7eb3: OUTPUT«(5 4 3 2 1)␤»
lizmat m: say 1..5 .reverse # note space 10:23
camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤»
lizmat hmmm
that feels wrong
gfldex m: dd 1..(5,) 10:29
camelia rakudo-moar 6c7eb3: OUTPUT«1..1␤» 10:30
gfldex lizmat: ^^^
lizmat gfldex: that makes sense, though
m: dd 1..(5,6)
camelia rakudo-moar 6c7eb3: OUTPUT«1..2␤»
gfldex m: dd 5.reverse 10:32
camelia rakudo-moar 6c7eb3: OUTPUT«(5,)␤»
10:32 kaare_ joined
lizmat that's because Any.reverse does .list 10:33
(I think)
gfldex i don't do ranges without () anymore
lizmat m: say ^5 .reverse 10:34
camelia rakudo-moar 6c7eb3: OUTPUT«(4 3 2 1 0)␤»
lizmat m: say ^5.reverse
camelia rakudo-moar 6c7eb3: OUTPUT«Potential difficulties:␤ Precedence of ^ is looser than method call; please parenthesize␤ at <tmp>:1␤ ------> 3say ^57⏏5.reverse␤^1␤»
lizmat perhaps we need something like that for the 1..5 case as well
10:42 TEttinger left 10:45 mcmillhj joined 10:50 mcmillhj left 10:56 labster left 10:58 ShimmerFairy joined 11:00 pierre_ left, pierre_ joined 11:01 mvorg joined 11:10 xinming left 11:11 trnh left 11:12 fepat joined 11:15 fepat left 11:21 trnh joined 11:22 kid51 joined 11:29 rindolf left 11:30 trnh left 11:31 wbill left 11:41 revdiablo left 11:42 darutoko- joined, revdiablo joined 11:45 darutoko left 11:49 ARM9 left, trnh joined 11:54 darutoko- left 12:05 ragge|2 joined 12:12 tokomer left 12:13 pierre_ left 12:14 zengargoyle left 12:21 n1lp7r joined 12:24 edehont joined 12:26 mvorg left 12:29 wamba joined 12:32 Sgeo__ left 12:34 prammer joined 12:36 Sgeo__ joined 12:38 sena_kun joined 12:39 canopus left 12:40 ragge|2 left 12:42 bazzaar joined 12:44 Sgeo__ left 12:46 canopus joined 12:53 trnh left 12:55 edehont left 12:57 trnh joined 13:02 bazzaar left 13:05 mcmillhj joined
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:13
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:14
13:16 trnh left 13:17 trnh joined, trnh left, trnh joined 13:20 AlexDaniel joined 13:22 autarch left 13:26 trnh left, mvorg joined 13:27 cdg joined 13:29 autarch joined 13:39 trnh joined 13:41 MilkmanDan left 13:43 MilkmanDan joined, j75 joined 13:45 grondilu joined 13:49 trnh left, adu joined 13:52 autarch left, autarch joined
pochi m: &slurp.signature 14:00
camelia ( no output )
pochi m: say &slurp.signature
camelia rakudo-moar 4cef9e: OUTPUT«(| is raw)␤»
pochi the source says (IO::Path:D: :$bin, :$enc)
grondilu learnt something today: 14:04
14:04 trnh joined
grondilu m: say 7[0]; # integers do positional? 14:04
camelia rakudo-moar 4cef9e: OUTPUT«7␤»
grondilu m: say 7[^5]];
camelia rakudo-moar 4cef9e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3say 7[^5]7⏏5];␤»
grondilu m: say 7[^5];
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␤␤»
lizmat grondilu: any scalar can act as a one element list 14:05
m: say "foo"[0]
camelia rakudo-moar 4cef9e: OUTPUT«foo␤»
lizmat m: say "foo"[1]
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␤␤»
grondilu ok, good to know.
lizmat m: class Foo { has $.a }; dd Foo.new(a => 42)[0] 14:06
camelia rakudo-moar 4cef9e: OUTPUT«Foo.new(a => 42)␤»
lizmat m: class Foo { has $.a }; dd Foo.new(a => 42)[1]
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 14:11 kshannon joined
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
14:13 mcmillhj left
mst pondering how to ignore startup times ;) 14:13
14:13 mcmillhj joined 14:14 mcmillhj left, mcmillhj joined
unmatched} you mean doing that in a running script? 14:14
mst yes 14:15
jdv79 unloading an old version or swapping in a new one would be neat
hot swap
unmatched} Last I wanted to do that for IRC::Client plugins and the answer was you can't do that. 14:16
That was ~December 2015. Not sure if things changed.
14:16 khw joined
grondilu m: say sub { rand for ^5 }() # I expected to get the last rand value here 14:16
camelia rakudo-moar 4cef9e: OUTPUT«Nil␤»
mst given we already have the possibility for two bits of code to resolve different CUR entries for the same module
it seems like it should be doable somehow?
lizmat: any ideas? 14:17
14:17 j75 left, ptolemarch joined, j75 joined
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:18
14:18 awwaiid left 14:19 rmmm joined 14:20 awwaiid joined, _4d47 joined 14:22 adu left
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
Also, what if bar takes a closure and it olds on to some scope.
mst unmatched}: that's why what I asked for was to load a new Foo and create *new* objects from that class 14:25
I don't see how it would matter at all, given that
unmatched} Ah
14:26 pduh left
mst similar to the way when you hot reload a module in erlang, it only applies to new processes 14:27
14:27 TheLemonMan left
unmatched} My fruitless test of the matter, with the value of Volatile.bar changed during the sleep: gist.github.com/zoffixznet/b7e29eb...09914df6c0 14:46
14:46 Sgeo__ joined
dalek osystem: f5f46bb | jnthn++ | META.list:
Add HTTP::HPACK.
14:46
unmatched} The produced value is unchanged, so it looks like the `use` of a module is not repeated
jnthn: github.com/jnthn/p6-http-hpack/pull/1 14:48
jnthn Dammit JSON :/
Thanks!
unmatched} :) 14:49
sena_kun jnthn++
14:50 pierre_ joined
dalek c: b416dd9 | titsuki++ | doc/Type/Signature.pod6:
Fix the error message to be the acutual one
14:50
c: c615f9a | Altai-man++ | doc/Type/Signature.pod6:
Merge pull request #837 from titsuki/fix-catch

Fix the error message to be the acutual one
tailgate I'm curious as to why this code compiles correctly and the other doesn't: gist.github.com/ahalbert/f4536b2c4...95298a04c0 can anyone give me some insght as to what's up?
unmatched} tailgate: perhaps because } at the end of the line ends the statement? 14:51
tailgate } ends a statement? 14:52
unmatched} yup
eval: sub foo {} sub bar {}
sena_kun goto is already implemented? Wow.
timotimo otherwise you'd have to put a ; after every }
unmatched} m: sub foo {} sub bar {}
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␤ …»
unmatched} m: sub foo {} ␤␤␤␤sub bar {} 14:53
camelia ( no output )
tailgate ah, but only in the case when it's at the EOL?
unmatched} tailgate: yeah
timotimo well, it allows spaces and comments after the }
unmatched} tailgate: you can use an unspace there \
m: sub foo {} \ ␤␤␤␤sub bar {}
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…»
jnthn sena_kun: Was some fun to implement. :) 14:54
sena_kun jnthn, we need to update perl6.org/compilers/features then.
14:55 _4d47 left
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␤␤»
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 github.com/perl6/whateverable/issues/23
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 :)
sena_kun: If goto got implemetned it sneaked in without me noticing :)
14:57 MilkmanDan left 14:58 bdmatatu joined 14:59 MilkmanDan joined
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
14:59 Nex6 joined
jnthn sena_kun: Aw, you'd started on it. Didn't know :) Feel free to contribute any improvements/extra tests :) 14:59
15:00 zero__ joined 15:01 setty1 joined
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:01
15:03 pierre_ left 15:04 Nex6 left
jnthn Ah, I did a ground-up implementation from the RFC. :) 15:05
15:05 rindolf joined 15:06 MilkmanDan left, zacts joined 15:07 kid511 joined, wamba left 15:09 kid51 left 15:24 bob777 joined 15:25 skids joined
mspo good 15:28
15:30 pierrot_ is now known as pierrot 15:31 edehont joined 15:32 MilkmanDan joined
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:47
15:49 raiph joined
sena_kun m: sub infix:<f>($a, $b) { $a + $b }; [f] [1,2,3,4,5]; 15:49
camelia ( no output )
sena_kun m: sub infix:<f>($a, $b) { $a + $b }; say [f] [1,2,3,4,5];
camelia rakudo-moar 4cef9e: OUTPUT«15␤»
sena_kun tailgate, something like above? 15:50
tailgate yeah
thanks
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.
yoleaux 03:28Z <dj_goku> [Coke]: unmatched} told me to contact you about bitcard and rt.perl.org about open tickets.
ugexe m: sub f(*@_) { [+] @_ }; say f 1,2,3,4,5; # along similar lines
camelia rakudo-moar 4cef9e: OUTPUT«15␤»
[Coke] dj_goku: I need an id or email addy 15:52
15:52 frew joined
sena_kun [Coke], folds come from math, iirc. 15:52
skids [Coke]: well, all the Wikipedia examples are in Haskell, so blame that :-) 15:53
15:53 zacts left
sena_kun But in math it is "catamorphism" iirc. "Fold" looks better. (: 15:54
gregf_ m: say [1..5].reduce(*+*) 15:58
camelia rakudo-moar 4cef9e: OUTPUT«15␤»
gregf_ m: say [\+] [1..5]
camelia rakudo-moar 4cef9e: OUTPUT«(1 3 6 10 15)␤»
15:58 MilkmanDan left
gregf_ m: say [1..5].reduce: {$^a + $^b} 15:59
camelia rakudo-moar 4cef9e: OUTPUT«15␤»
15:59 MilkmanDan joined
tailgate If I have "a"..."z", how can I add " " to the end of the Seq? 16:00
16:01 mcmillhj left
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 )␤»
TimToady there arguments to ... are actually lists 16:03
*the
16:04 zakharyas left
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
well, just the last arg of the previous list if it's a function
three args if it has to intuit a function 16:05
but on the other end, it's always just one arg it considers, and the rest are just tacked on the end
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:07 TRUMP-PENCE left 16:08 walkerlala left 16:09 j75 left 16:10 TRUMP-PENCE joined
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␤»
gregf_ TRUMP *shudders* 16:13
huf what's he done now 16:14
tailgate thnaks TimToady
grondilu m: say [+] 1..5
camelia rakudo-moar 4cef9e: OUTPUT«15␤»
16:15 adu joined 16:19 crowe joined 16:20 Actualeyes left
dalek line-Perl5/long_double_perl: 39e2a47 | niner++ | p5helper.c:
WIP on long double perl support
16:23
tailgate So @a ==> map {...} ==> [+]; gives me the length of @a. If I want to sum the array after map(), what should it be? 16:25
sena_kun tailgate, maybe just `.sum` method on the map result? 16:27
m: [1,2,3].map( { $_ + 1; } ).sum; 16:28
camelia ( no output )
sena_kun m: say [1,2,3].map( { $_ + 1; } ).sum;
camelia rakudo-moar 4cef9e: OUTPUT«9␤»
16:28 trnh left
grondilu is ==> working? 16:29
16:29 walkerlala_ left
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␤␤»
timotimo should be
m: ^10 ==> map(*+*) ==> say()
camelia rakudo-moar 4cef9e: OUTPUT«(1 5 9 13 17)␤»
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>␤»
grondilu I would have expected the map to be implicit
but that's ok 16:31
I don't know much about this operator anyway
timotimo well, it could as well be reduce instead of map 16:32
hm. nah, that doesn't make as much sense
TimToady m: |^10 ==> [\[&(*+*)]](Empty) ==> say() 16:36
camelia rakudo-moar 4cef9e: OUTPUT«(0 1 3 6 10 15 21 28 36 45)␤»
TimToady kind of a shame one needs the slips there
16:40 mcmillhj joined
TimToady m: ^10 ==> produce(*+*) ==> say() 16:40
camelia rakudo-moar 4cef9e: OUTPUT«(0 1 3 6 10 15 21 28 36 45)␤»
TimToady that's better
16:40 crowe left, Actualeyes joined 16:41 zengargoyle joined
timotimo i've never heard of "produce" so far 16:41
TimToady it's a production line based on reduce 16:46
aka triangle operator
timotimo right 16:47
that's what i imagined
harmil_wk Hmm... this seems wrong to me. I must be missing something.
m: grammar GRAM { rule TOP {^ "a" [ <B> | "a" ] $}; rule B { "b" || fail "No b" } }; say ~GRAM.parse("a a"); say ~("a" ~~ /^<GRAM::B>/)
camelia rakudo-moar 4cef9e: OUTPUT«a a␤Use of Nil in string context in block <unit> at <tmp> line 1␤␤»
harmil_wk Why don't I get the failure as an exception propagating in the second case?
timotimo perhaps the inner workings of the regex engine doesn't .sink the failure? 16:48
16:48 zacts joined
TimToady er, /fail "No b"/ is an odd thing to be matching 16:51
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>/)
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␤␤»
timotimo i imagined { } around that
16:52 zacts left
timotimo hallucinated, more like 16:52
TimToady
.oO(thought he had Curly, but had Shemp)
16:53
16:55 acrussell joined, sno left 16:58 trnh joined
dalek line-Perl5: fed6b10 | niner++ | p5helper.c:
Support perls compiled with uselongdouble enabled

Rakudo doesn't support long doubles but instead of bailing out we can at least support operating with reduced precision.
16:58
16:59 trnh left
harmil_wk TimToady: I hallucinated the very same! 17:02
17:06 edehont left
harmil_wk er, timotimo that is 17:07
too many dang tims!
17:10 _28_ria left 17:12 dj_goku left, dj_goku joined 17:13 Sgeo__ left
TimToady is not a tim, he is just a toady of the timmy variety 17:14
17:14 heatsink left 17:18 harovali1 joined, dj_goku left 17:20 harovali left 17:21 Sgeo joined 17:24 AlexDaniel left
lambd0x Guys what's the difference between @a[size;size]; and @a[size,size]; ? 17:29
Was looping through an array and changing ; -> , made a whole difference.. :S
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:30 mcmillhj left 17:31 _28_ria joined 17:32 spider-mario joined 17:33 mcmillhj joined
ab5tract i'm not having much luck with it 17:38
also: you're quite welcome, TimToady :)
sorry for putting the fix in a dumb place
17:38 e163 joined
jnthn lambd0x: ; is for multiple dimensions, , is for slicing 17:39
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?
jnthn Oh, all the way back in January... github.com/MoarVM/MoarVM/commit/7e...ac8d9f74bf
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
i was getting 'Cannot invoke this object (REPR: Null; VMNull)'
would a test case be useful? 17:43
jnthn Yes; it's a small module so I can probably figure it out pretty quick
lambd0x jnthn: hm...
jnthn m: my @a = 1..10; say @a[2,3]
camelia rakudo-moar 4cef9e: OUTPUT«(3 4)␤»
jnthn m: my @a[2;2] = [1,2],[3,4]; say @a[0;1] 17:44
camelia rakudo-moar 4cef9e: OUTPUT«2␤»
jnthn ab5tract: Heh, there's even an issue by you about this: github.com/jnthn/oo-monitors/issues/2
17:44 Sgeo left
lambd0x jnthn: that's so nice :) 17:45
17:45 Sgeo joined
stmuk_ act.yapc.eu/ye2016/schedule?day=2016-08-24 17:47
ab5tract jnthn: gist.github.com/ab5tract/414e6b6cd...322932fd14
whoops :D
wow, yeah, the previous was not a simple case at *all* 17:49
not even sure if it is the same bug or not..
jnthn Thanks...will see if I've a spare moment to look at it while cooking. :) 17:50
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:51
17:52 trnh joined 17:53 Sgeo_ joined, acrussell left, bdmatatu left 17:55 Sgeo left 17:56 prammer left 18:02 TRUMP-PENCE left 18:03 TRUMP-PENCE joined 18:04 trnh left 18:06 sno joined 18:07 rindolf left
jnthn ab5tract: Turned it into a .t file :) 18:07
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
but i haven't managed to reproduce that in golf form
18:14 rindolf joined, adu left 18:15 adu joined, n1lp7r left, prammer joined 18:17 adu left 18:19 ptolemarch left 18:21 trnh joined
ab5tract got the test case, pre-converting to a .t to shave as many tuits as possible for jnthn++ 18:24
18:29 AlexDaniel joined 18:31 mvorg left 18:37 sufrostico joined
ab5tract hmm.. i'm not sure how this happened but i refactored the bug out of my test case 18:38
18:38 xinming joined 18:40 wamba joined 18:45 cdg left 18:50 prammer left 18:57 e163 left 19:00 kurahaupo` left, dj_goku joined, dj_goku left, dj_goku joined 19:05 rindolf left 19:06 dj_goku left 19:07 kurahaupo joined 19:08 kurahaupo_ joined, ggoebel left 19:09 rindolf joined
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:09
ab5tract tailgate: should work like a normal index 19:10
19:11 kurahaupo left
skids m: my $x = 4; "0123456789".substr(*-$x).say; 19:13
camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
ab5tract m: my $x = 4; "01234".substr($x).say; 19:14
camelia rakudo-moar 4cef9e: OUTPUT«4␤»
tailgate ah. I was trying to use $x = -4
skids There's been more a less a purge of magic negative indices from the language. 19:15
[Coke] m: "0123456789".substr(*-+-+-+-4).say;
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␤␤»
skids m: my $x = 4; "0123456789".substr($x%*).say; 19:17
camelia rakudo-moar 4cef9e: OUTPUT«456789␤»
skids m: my $x = -4; "0123456789".substr($x%*).say;
camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
ab5tract tailgate: ah! that's an interesting one. Then you aren't really creating a WhateverCode
[Coke] m: my $x = -4; say ($x%*).WHAT 19:18
camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤»
[Coke] sure you are
m: my $x = -4; "0123456789".substr(*+$x).say;
camelia rakudo-moar 4cef9e: OUTPUT«6789␤»
skids wonders if the % trick is in 5to6 somewhere yet. 19:19
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…»
ab5tract ^ this is what i meant
skids What are you expecting as a result in $g?
ab5tract the sign on the number is not going to cause currying 19:21
skids: i'm not expecting anything. this is what i thought tailgate might have been running into
skids OIC
tailgate ab5tract: so what's a WhateverCode? 19:23
skids It's a routine created using the Whatever (the '*'). 19:24
tailgate ah
ab5tract m: my $biggener = * ** 2; $biggener.WHAT.say; $biggener(5) 19:28
camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤»
ab5tract m: my $biggener = * ** 2; $biggener.WHAT.say; say $biggener(5)
camelia rakudo-moar 4cef9e: OUTPUT«(WhateverCode)␤25␤»
19:28 sena_kun left 19:30 labster joined
ab5tract m: my $indexer = * - 6; ^16 .join.substr($indexer).say 19:30
camelia rakudo-moar 4cef9e: OUTPUT«131415␤»
19:31 AlexDaniel left 19:32 pduh joined 19:33 pduh left
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:34
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
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
as seen in .substr
19:38 nowan_ joined, kurahaupo_ is now known as kurahaupo 19:40 xinming left 19:41 xinming joined, nowan left
ab5tract jnthn: you've had dinner after only passing *one* of the test cases? ;) ;) ;) 19:41
jnthn: but seriously, thank you for looking into it. you're bug squashing abilities will never cease to amaze me! 19:42
19:43 sufrostico left, PotatoGim left, firstdayonthejob joined 19:45 sufrostico joined, grondilu left 19:46 PotatoGim joined 19:48 grondilu joined 19:49 mcmillhj left 19:52 mcmillhj joined, firstdayonthejob left 20:00 cdg joined 20:05 nbg left 20:09 wamba left 20:12 wamba joined 20:14 sena_kun joined
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 ;)
ab5tract ;)
20:21 wamba left 20:25 firstdayonthejob joined 20:28 nightfrog left
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
masak brrt: ready when you are!
masak looks at his watch. it says "some time in the future"! 20:32
ab5tract: also, it always feels like (to me) that these errors creep into my writing because I only think "in spoken language" 20:33
and in spoken language the difference vanishes
20:35 itaipu joined
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
*works too
Apparently the fix back in January wasn't enough...
20:39 niceperl joined
jnthn Hm, I guess META6.json is all the rage now instead of META.info, right? :) 20:39
dalek c: ecdb5ad | Altai-man++ | / (13 files):
Make examples compile, improve signature catching part of extract-examples script.
20:40
20:42 TEttinger joined
sena_kun I cannot see RT queue without sign up? 20:43
dalek osystem: 0df987b | jnthn++ | META.list:
OO::Monitors now has a META6.json.
20:44
20:45 Wiertek joined, mcmillhj left 20:49 dj_goku joined, dj_goku left, dj_goku joined
ab5tract jnthn: yeah, I've noticed an increase in swapped-homophone misspellings in general 20:49
lizmat
.oO( as long as not everybody spoonerize leir thines, it's ok )
20:51
TEttinger munki-si-noe-ivall
masak .oO( .say for @lines.pick(*) )
TEttinger pines.lick(*)? 20:52
jnthn On your own tongue be it... :P
TEttinger the freshmaker
snipe.lick 20:53
20:54 anser joined, mcmillhj joined, dj_goku left
TEttinger kline.pics, for the IRC informed 20:54
TEttinger continues dancing around the subject 20:55
pisces link foray 20:56
20:58 skids left
ab5tract jnthn: that fixed my larger case, too! thank you !!!! 20:59
jnthn yay \o/
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:00
for Terminal::Print 21:01
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:12 mcmillhj left 21:16 itaipu left 21:18 mvorg joined 21:22 mcmillhj joined 21:25 zero__ left, grondilu left 21:26 Nex6 joined, sufrostico left, mcmillhj left 21:28 setty1 left
sena_kun Does panda currently supports installation of scripts from /bin directory? 21:30
gfldex sena_kun: it does but it wont tell you what you have to set $PATH to 21:31
sena_kun gfldex, thanks. 21:32
21:32 mcmillhj joined 21:33 perlpilot left
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 >>*=>>
Fish operator! 21:37
Almost.
21:37 mcmillhj left 21:38 mohae left, adu joined
harmil_wk I was transcribing an algorithm that said "now multiply everything by 10" and just typed that and it worked... 21:38
sena_kun m: say (1 .. 1000).eager.lazy; 21:39
camelia rakudo-moar be7ce0: OUTPUT«(...)␤»
sena_kun Laziness is a bit strange here. :< 21:41
Ah, nevermind. 21:42
21:44 adu left
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]␤»
gfldex if you multiply by 10 often ...
21:44 jluis joined, Wiertek left 21:48 adu joined
harmil_wk gfldex: that doesn't seem a lot easier to type than @a»*=»10... 21:50
21:50 niceperl left
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:51
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␤»
harmil_wk m: my @a = 1..10; say @a »*» 10;
camelia rakudo-moar be7ce0: OUTPUT«[10 20 30 40 50 60 70 80 90 100]␤»
harmil_wk Huh, spaces required I guess
21:52 sufrostico joined 21:53 MilkmanDan left, MilkmanDan joined
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
kyclark Re: pastie.org/10935333 22:01
I’m trying to figure out how to create a MAIN signature to take (only) integers to add
Program must have two or more numbers to add. Any suggestions? 22:02
22:04 mohae joined, sufrostico left 22:06 zengargoyle left
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␤␤»
gfldex m: sub MAIN(*@a where * ~~ Int){ put [+] @a }; MAIN(1,2,3);
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␤␤»
ugexe sub MAIN(*@numbers (Int $, Int $, *@_)) { say [+] @numbers }; 22:08
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 };
ab5tract m: my @a = ^10; say @a >>*=>> 10; say @a >>*=<< 10; say @a >>*=<< ^10 22:10
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␤␤»
gfldex m: sub MAIN(*@a where { .all ~~ Int } ){ put [+] @a }; MAIN(1,2,3);
camelia rakudo-moar be7ce0: OUTPUT«6␤0␤»
gfldex kyclark: ^^^
ugexe missing 2 or more constraint
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
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␤␤»
gfldex MAIN doesn't do slurpies
22:17 trnh left
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
Thanks for all the suggestions!
22:21 rindolf left
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:23
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
(I forget, but I don't think sqlite has a DROP COLUMN)
unmatched} whisks away to drink even more beer and play No Man's Sky
22:26 sufrostico joined
sena_kun We store our modules data in the sqlite base? Why not postgres or something(I mean, almost everything) better than this? 22:26
Also... storage3.static.itmages.com/i/16/08...e8ad3d.png - hyper operator "eats" list occasinally. Is it a known bug? 22:27
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
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)␤»
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.
s/too scared/"too scared"/ 22:31
TimToady
.oO(too scarred)
unmatched} sena_kun: what do we need that for? We only need one connection. 22:32
heatsink fear nothing, but fear itself....someone said
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:33 trnh joined, trnh left, trnh joined
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 :)
sqlite is very easy to setup, so that's the benefit, IMO 22:34
Also: the current system is meant to be temporary :)
22:35 firstdayonthejob left
unmatched} Also: we're almost at 700 modules \o/ 22:37
22:37 dj_goku joined
sena_kun Oh, I can see RT now. 22:37
Ah, yeah, it's already filled. 22:38
22:42 dj_goku left 22:43 adu left, cdg left 22:55 spider-mario left 22:59 skids joined 23:01 trnh left
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]␤»
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:03
camelia rakudo-moar be7ce0: OUTPUT«[1 2 3 1..Inf 1..Inf]␤»
sena_kun Why it doesn't stop here?
23:09 heatsink left 23:10 pduh joined
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)»
skids Hrm.
Well in the first case because it isn't iterating the ranges. 23:20
The second case because of the assignment.
23:20 lambd0x left
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:21
camelia rakudo-moar be7ce0: OUTPUT«(timeout)» 23:22
skids Eh, I'm not in the mood for iterators today.
oh maybe... 23:23
m: my @arr; my $a = gather { take 1; take 2; take 3; take |(1 .. Inf); take |(1 .. Inf); }; @arr.iterator.push-until-lazy($a);
camelia ( no output )
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;
camelia rakudo-moar be7ce0: OUTPUT«[]␤»
skids nm.
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
*whole 23:25
dalek osystem: 7d8f860 | (Wenzel P. P. Peppmeyer)++ | META.list:
add Rakudo::Slippy::Semilist
23:26
23:50 pierre_ joined
unmatched} ( modules.perl6.org/ is now fixed ) 23:53
sena_kun unmatched}++ 23:55
23:55 mvorg left 23:56 kyclark left