»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by masak on 28 November 2015.
00:01 Zoffix joined
Zoffix m: my %Units = time => ( <second> => 60, <minute> => 60, <hour> => 24, <day> => 7, <week> ); subset ValidUnitSet of Str where any %Units.keys; sub denominate ($num, ValidUnitSet :$set = 'time') { say 42 } 00:01
m: package Foo { my %Units = time => ( <second> => 60, <minute> => 60, <hour> => 24, <day> => 7, <week> ); subset ValidUnitSet of Str where any %Units.keys; sub denominate ($num, ValidUnitSet :$set = 'time') is export { say 42 }}; import Foo; denominate 42, :set<time>;
camelia ( no output )
rakudo-moar eb275d: OUTPUT«Constraint type check failed for parameter '$set'␤ in sub denominate at /tmp/6QGuEE6cmO:1␤ in block <unit> at /tmp/6QGuEE6cmO:1␤␤»
Zoffix Is that a bug?
The only difference that I see is the failing version is an 'is export' sub inside a package
m: package Foo { my %Units = time => ( <second> => 60, <minute> => 60, <hour> => 24, <day> => 7, <week> ); subset ValidUnitSet of Str where any <time>; sub denominate ($num, ValidUnitSet :$set = 'time') is export { say 42 }}; import Foo; denominate 42, :set<time>; 00:02
camelia rakudo-moar eb275d: OUTPUT«42␤»
Zoffix Hm.
Seems to not like the any %Units.keys; thing
00:05 skids joined 00:08 khw joined
Zoffix m: my $x = 42; say "${x}s" 00:14
camelia rakudo-moar eb275d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xSNIp2pJQi␤Undeclared routine:␤ x used at line 1␤␤»
Zoffix m: my $x = 42; say "{$x}s"
camelia rakudo-moar eb275d: OUTPUT«42s␤»
Zoffix
.oO( probably something to add to 5to6-nutshell
00:15
)
00:18 lucasb left
dalek kudo-star-daily: a3316e2 | coke++ | log/ (2 files):
today (automated commit)
00:19
MadcapJake nine: what's inside the env hash returned? Only a couple of direct uses of it in rakudo and nqp repos and the nqp docs just say "returns an environment hash" 00:25
dalek c: ef45a6a | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
Variable next to text inclusion
00:27
00:30 Psyche^_ joined
MadcapJake m: use nqp; my Mu $env := nqp::getenvhash(); 00:31
camelia ( no output )
MadcapJake m: use nqp; my Mu $env := nqp::getenvhash(); say $env;
camelia rakudo-moar eb275d: OUTPUT«HOME => /home/camelia, LANG => POSIX, LC_CTYPE => en_US.UTF-8, LOGNAME => camelia, MANPATH => /home/camelia/perl5/perlbrew/perls/perl-5.20.1/man:, PATH => /home/camelia/perl5/perlbrew/bin:/home/camelia/perl5/perlbrew/perls/perl-5.20.1/bin:/usr/local/sbin:/…»
MadcapJake why does that work in camelia but not on my own machine :( 00:32
Zoffix works on my box too
jdv79 m: my %h; say !%h{"k"}:exists
camelia rakudo-moar eb275d: OUTPUT«Unexpected named parameter 'exists' passed␤ in block <unit> at /tmp/EVyujN9uP9:1␤␤»
MadcapJake hmm, weird it worked now, not sure what I did to give me "cannot stringify this" 00:33
jdv79 is that correct or am i doing something wrong?
Zoffix jdv79, wasn't that stuff added to the docs today?
m: my %h; say !(%h{"k"}:exists)
camelia rakudo-moar eb275d: OUTPUT«True␤»
Zoffix jdv79, github.com/perl6/doc/commit/606d55...a1205f2519
m: my %h; say not %h{"k"}:exists 00:34
ugexe m: my %h; say %h{"k"}:!exists
camelia rakudo-moar eb275d: OUTPUT«True␤»
Zoffix ah
00:34 Psyche^ left
MadcapJake loves that `put` splits hash pairs by newlines 00:34
jdv79 oh, unintuitive but ok
i didn't know it was discussed recently. just ran into it
dalek c: fedd922 | (Zoffix Znet)++ | doc/Language/traps.pod:
Add another example ugexe++
00:35
ast: 2113310 | skids++ | S12-class/magical-vars.t:
Add test for RT#126754
00:36
flussence «write_fhb requires a native array of uint8 or int8» - how do I convert a Buf[utf16] to that? I'm trying to talk a network protocol where strings are all U16BE and this part of the language just seems... nonexistent
jdv79 ugexe++
MadcapJake Oh, I didn't realize that getenvhash was just a call to my machine's env. 00:37
Zoffix: I fixed that regex string bug and a couple others in the latest language-perl6fe patch 00:52
Zoffix MadcapJake++ 00:53
dj_goku hi 00:58
00:58 pecastro_ joined
Zoffix \o 00:58
01:02 xjrK_ joined 01:03 rindolf left
xjrK_ pastebin.com/ZTuTmrXU -- can someone tell me why im getting "===SORRY!=== Could not find House in any of"? 01:07
Zoffix xjrK_, how are you calling it? 01:08
timotimo xjrK_: try any of a) -Ilib in your commandline, b) use lib 'lib'; in your code
01:09 yeahnoob joined
xjrK_ timotimo: cheers 01:13
Zoffix m: my %h = foo => 1, bar => 0; %h{ %h.keys.grep( %h{$_} == 0) }:delete; say %h 01:14
camelia rakudo-moar eb275d: OUTPUT«Use of uninitialized value $_ of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/wkYPdqGZoX:1␤Use of uninitialized value of type Any in numeric context in block <unit>…»
Zoffix m: my %h = foo => 1, bar => 0; %h{ %h.keys.grep( %h{*} == 0) }:delete; say %h
camelia rakudo-moar eb275d: OUTPUT«Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at /tmp/qfUddlvMYT:1␤␤Actually thrown at:␤ in block <unit> at /tmp/qfUddlvMYT:1␤␤»
Zoffix :/\
How can I toss all keys whose values are zero ? 01:15
ShimmerFairy m: my %h = foo => 1, bar => 0; %h{ %h.keys.grep({ %h{$_} == 0 }) }:delete; say %h 01:16
camelia rakudo-moar eb275d: OUTPUT«foo => 1␤»
Zoffix ah
ShimmerFairy++
01:18 AlexDaniel left 01:22 leont left 01:27 n0tjack joined
Zoffix Well, I'll be damned.... Reimplementing one of my P5 modules... logic that takes 145 lines of write-only P5 code takes only 30 lines of P6 code. 01:28
s/30 lines/30 lines of perfectly readable/; 01:29
Comparison isn't exactly apples to apples, but still...
timotimo surely you must be lying! after all, perl6 wants to be like the english language, an ambiguous thing with a backwards grammar!
Zoffix ¯\_(ツ)_/¯ I did make one change where I'm taking args in reverse. Maybe that's [part of] the reason for more concise and readable code. 01:33
timotimo you could have just .reverse'd the args :P
anyway
off to bed i go!
gnite folks
Zoffix night
01:35 edehont joined 01:36 rurban left 01:38 edehont left 01:40 kaare_ joined 01:42 n0tjack left, n0tjack joined
ugexe when doing a use statement, will the order of :keys<value> matter on the module name? `use XXX:ver(1):auth<github:foo>` vs `use XXX:auth<github:foo>:ver(1)`? 01:43
01:45 lustlife joined
Zoffix Does it matter? Both reference a single item, don't they? 01:45
ugexe well, i literally asked if it mattered 01:46
Zoffix sorry 01:47
flussence doesn't matter, cause afaik most stuff seems to ignore it anyway :/ 01:50
01:54 khw left 02:02 snarkyboojum joined 02:09 khw joined, ChristopherBotto joined 02:15 km3 joined
dj_goku Zoffix: btw not sure if you saw there is an updated wireshark 2.0. I couldn't figure out how to send the correct bytes using IO.Socket.Async. I used another client I knew worked and listened in (which I have done). I am more excited to write the client/worker. 02:15
flussence m: sub foo($ (uint16 $bar)) { say 'alive' }; foo((1,)) # having found this is probably a sign I've gone off the deep end again :D 02:27
camelia rakudo-moar eb275d: OUTPUT«Lexical with name '$bar' has a different type in this frame␤ in sub foo at /tmp/BTs9adJhzj:1␤ in block <unit> at /tmp/BTs9adJhzj:1␤␤»
02:28 Sqirrel left 02:31 kaare_ left
skids m: sub foo($ (uint16 $)) { 42.say }; foo((1,)) 02:35
camelia rakudo-moar eb275d: OUTPUT«42␤»
skids m: sub foo($ (uint16 $ where { .say })) { 42.say }; foo((3,)) 02:36
camelia rakudo-moar eb275d: OUTPUT«3␤42␤»
lucs Can I do better than this to say "use lib <in the same directory this file is in>"?: use lib IO::Path.new($?FILE).dirname 02:38
skids lucs: yeah hold on
flussence $?FILE.IO.dirname 02:39
lucs flussence: Aha, already better.
skids $*SPEC.catdir($*PROGRAM-NAME.IO.dirname, "foo") is what I've been using 02:40
lucs Yow!
I like mine better, and flussence's even more :) 02:41
skids Well, you need the $*SPEC.catdir to choose the right slashes
lucs Really? Hmm... 02:42
skids Though I guess you don't need to catdor if you just want the dir.
zengargoyle doesn't Perl 6 magically treat /path/foo and \path\foo the same...
skids hrm good question
konobi maybe \\?UNC\: 02:43
konobi ducks
lucs I'm not sure I understand the problem with the slash/backslashes. 02:44
skids m: "\\tmp\\foo.txt".IO.slurp.say
camelia rakudo-moar eb275d: OUTPUT«Failed to open file /home/camelia/\tmp\foo.txt: no such file or directory␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm:1␤ in block <unit> at /tmp/lT8oMKFZ1Q:1␤␤Actually thrown at:␤ in any at gen/moar/m-Met…»
lucs If the expression evaluates to something with backslashes, I'd suppose that's what the environment it's in uses, no?
skids lucs: yeah, my solution is more if you need to find "the file named X in the same directory as the script" 02:45
02:47 ilbot3 joined
lucs skids: Ah, rereading it carefully, I think I see now, yeah. 02:47
02:51 n0tjack left, lustlife left 02:52 BenGoldberg joined 02:54 kid51 left
zengargoyle m: say $?FILE 02:59
camelia rakudo-moar eb275d: OUTPUT«/tmp/hKPj5xX1Yh␤»
zengargoyle m: say $?FILE.IO.parent.child('lib').path
camelia rakudo-moar eb275d: OUTPUT«/tmp/lib␤»
zengargoyle ^^ avoid $*SPEC and probably get things right. 03:00
skids zengargoyle++ 03:01
zengargoyle now i wonder if 'use' will take an IO object and do the right thing...
nope. :) 03:02
dalek kudo/nom: 978ee76 | TimToady++ | src/Perl6/Grammar.nqp:
Un-disable ${x} P5ism warning inside strings
03:04
03:07 Actualeyes joined
dalek ast: 1de7ffd | TimToady++ | S03-operators/context.t:
catch ${} P5isms in strings again
03:08
03:14 snarkyboojum left
ugexe fwiw "{$?FILE}/../lib" works on windows 03:17
03:19 snarkyboojum joined
MadcapJake are .pod6 and .t6 supported extensions? 03:21
psch supported by what? 03:22
afaik, the only thing that rakudo cares about is your modules having a pm or pm6 extension 03:23
MadcapJake perl6 tools/editors
psch tools and editors i don't know about. i prefer no syntax highlighting to the one vim brings where i'm running it to edit Perl 6 code :) 03:24
MadcapJake there was some discussion of how to detect perl 6 pod files but it looks unresolved yet 03:26
psch that'd seem useful for e.g. github 03:31
although they probably work on a file ext basis
MadcapJake github.com/perl6/doc/issues/167
they do, but they also support using gitattributes
psch ah, that's neat 03:32
i suspect we'd still want .pod6 as best-practice (for e.g. vim) though 03:33
i don't know how feasible it is to decide between POD(5) and POD6 in the general case though 03:34
as in, i strongly suspect that similar to the underlying language there's an input string that can be parsed as either
s/an/at least one/
MadcapJake yeah there's some cases where pod is more flexible but if anything it's a superset of pod5 03:35
psch uh, "pod" is which one? :) 03:36
('cause pod5 is still a superset of pod5, if not a strict one... :P )
MadcapJake lol xD; i mean pod6 is a superset of pod5, i botched that sentence
psch i don't know if pod6 is a superset of pod5, i know too little pod5 to make that call 03:37
also, why does a test that i added fail on HEAD *and* on the patch i added that i added the test for..? o.o 03:38
zengargoyle seeing a «=begin pod» is a decent sign for pod6
psch m: say :(:$a, *%) ~~ :(:$a, *%_)
camelia rakudo-moar 978ee7: OUTPUT«False␤»
psch that *should* be True
and it *was* True when i commited 62a029b44 03:39
but now it's False, even on 62a029b44
which is a bit spo0ky
*o
zengargoyle seeing «=over» or «=pod» or «=cut» is pretty much pod5
psch zengargoyle: right, but there exists valid pod6 that doesn't use < =begin pod >, just as there's valid pod5 that doesn't use e.g. < =cut > (the empty file excluded) 03:40
...again, unless my knowledge of pod5 is too little :)
well, of course that doesn't mean heuristics are useless, it just means that they might break on minimal input vOv 03:42
i don't want to sound like too much of a downer here, sorry :S
zengargoyle =item# is pod6, any form of =code is pod6
really, i *think* the pod5 usage of =begin/=for is distinct enough from pod6 to tell the difference. 03:43
in pod5 those were for external processing type stuff. «=for html» like... i don't think say «=for head1» is workable pod5 03:44
MadcapJake I could add `.pod6` as a supported extension to my langauge-perl6fe, as all pod6 directives are special types of perl6 comments 03:45
zengargoyle not sure either tho... been a long time since i've read perlpod.
psch MadcapJake: supporting .pod6 explicitly seems like a sensible start, yeah 03:46
MadcapJake ok cool, adding now
psch MadcapJake: and heuristics are mostly a github thing, afaict
well, at least i'm not aware of any editors guessing file type by content
...probably because i'm not using emacs :P
MadcapJake atom supports it
psch: github.com/atom/language-perl/blob...l.cson#L12 03:47
zengargoyle settles for «=comment vim: ft=perl6» :P
MadcapJake language-shellscript has a much larger regex: github.com/atom/language-shellscri...h.cson#L23 03:48
but alas, you can only access the first line
psch that is slightly terrifying
it kind of reminds me of the www
oh 03:49
only the first line is a bit better, 'cause shebangs are pretty established vOv
MadcapJake remembers that he meant to outsource shell quoting to the builtin language-shellscript 03:50
psch (i don't want to call it "reassuring", 'cause it kind of isn't... )
hrm, still no idea what exactly is up with that Junction ~~ Block thing 03:51
MadcapJake yeah the builtin language-perl looks for `use v6;` as a first line match but I think I will stick with `.pl6`, `.pm6`, `.pod6` (and I would like to support `.t6` but I don't think that's the standard :( )
psch m: say (1|2) ~~ { say .isa(Int) } # ..? 03:52
camelia rakudo-moar 978ee7: OUTPUT«False␤True␤»
psch m: (1|2) ~~ { say .isa(Int) } # ..?
camelia rakudo-moar 978ee7: OUTPUT«False␤»
psch TimToady: can i get an opinion on that from you?
m: (1|2) ~~ -> Any $_ { say .isa(Int) } # vs. this one
camelia rakudo-moar 978ee7: OUTPUT«True␤True␤»
psch TimToady: as in, i'm wondering if Blocks with an implicit $_ as parameter constraining that $_ as Mu is correct 03:53
zengargoyle psch: i think { block } only gets automatic $_ in certain situations. tho i see the use for this being one of those cases. 03:55
03:55 jdong joined 03:56 jdong left
psch zengargoyle: that's not the point. the point is that *when* we get an implicit $_, it's constraint as Mu, not as Any 03:56
03:56 jdong joined
psch m: (1|2) ~~ { .WHAT.say } 03:56
camelia rakudo-moar 978ee7: OUTPUT«(Junction)␤»
psch m: (1|2) ~~ -> Any $_ { .WHAT.say }
camelia rakudo-moar 978ee7: OUTPUT«(Int)␤(Int)␤»
psch zengargoyle: ^^^ as seen there
zengargoyle ah
psch hrm, afk for a ~15 min or so 03:57
03:59 noganex_ joined 04:02 noganex left 04:12 pierre-vigier joined
TimToady psch: blocks default to Mu parameters by spec, S02:1351 04:17
psch TimToady: alright, thanks. 04:20
it seems unintuitive to me, but i suspect there's been enough thought behind it to justify the decision :)
04:21 llfourn joined
dalek kudo/nom: 2d337f1 | peschwa++ | src/core/Signature.pm:
Fix slurpy hashes in Signature ACCEPTS.

For some reason or other, the previous fix (62a029b44) worked when commited, but doesn't anymore. Constraining the RHS Block of the infix:<~~> to Any helps, and having to constrain it is specification-compliant.
04:22
psch s/unintuitive/counter-intuitive/ (fwiw) 04:23
ah, right, there it is. "Mu Perl 6 object (default block parameter type, Any, Junction, or Each)" 04:24
TimToady we didn't want all our loops and topicalizers to suddenly start autothreading
psch yeah, that's probably waterbedding again 04:25
putting a Block on the RHS of infix:<~~> probably doesn't happen as often as having a Junction somewhere in an iterating construct
...with the LHS of the infix:<~~> being a Junction
TimToady note that when you use something like * == 42, it's still autothreads, just not at the block boundary, but at the == boundary where it's more expected 04:26
you only notice when you use a very primitive construct like .WHAT
psch right, the actual case was something like < any($some-list) ~~ { .attr &infix $something } > 04:27
TimToady the place where we fought most was where to draw the line
some folks wanted === and eqv to be more primitive, and I decided they should auththread too 04:28
psch which didn't do the right thing, where an Any $_ signature to the Block helped
TimToady well, I'd say use of junctions on the left of a smartmatch is probably a bit of a design smell to begin with 04:29
it's starting to get into the realm of "do these patterns match each other", which is a world of hurt
04:31 jdong left, molaf joined
psch hm, what's cleaner though? < [&&] $smartmatch-lhs.map($smartmatch-rhs) > ? 04:31
TimToady so we're not about to distort the semantics of blocks everywhere in the language just to support that better :)
psch oh, yeah, i agree. infix:<~~> is weird enough to want Mu for the LHS, and Blocks always autothreading is bad for iterations 04:32
04:34 CQ2 joined, lucs left
psch m: say :(:$a, *%_) ~~ :(:$a, *%_) # at least it does work now :P 04:35
camelia rakudo-moar 2d337f: OUTPUT«True␤»
04:36 CQ left, CQ2 is now known as CQ
TimToady m: say :(:$a, *%_) ~~ :(:$a, :$b, *%_) 04:36
camelia rakudo-moar 2d337f: OUTPUT«True␤»
TimToady m: say :(:$a, :$b, *%_) ~~ :(:$a, *%_) 04:37
camelia rakudo-moar 2d337f: OUTPUT«True␤»
TimToady seems like one or the other of those should be false
psch hm, yes 04:39
the first one, if i'm not misthinking this
that is a hard thing to nail down correctly, apparently :/ 04:40
hm, actually
04:40 vendethiel joined
psch m: my \cap = \(:1a, :1b, :1c, :1d); sub f (:$a, :$b, *%_) { }; sub g (:$a, :$b, :$c, *%_) { }; f |cap; g |cap 04:41
camelia ( no output )
psch as i understand it, the LHS of a Signature ~~ Signature has to be a subset of what the RHS would accept for dispatch 04:42
04:42 yqt left
psch right 04:42
which means the *second* one is wrong, 'cause the LHS needs :b, the RHS doesn't
04:43 molaf left
psch sheesh, those generative test files are hard to fudge :/ 04:44
...i guess i'll have to revisit Signature.ACCEPTS soonish :l 04:46
but that test case is noted, TimToady++ 04:47
05:00 pierre-vigier left 05:02 vendethiel left 05:05 pierre-vigier joined
pierre-vigier m: <1 2> == <3 4> 05:05
camelia rakudo-moar 2d337f: OUTPUT«WARNINGS:␤Useless use of "==" in expression "<1 2> == <3 4>" in sink context (line 1)␤»
pierre-vigier m: say <1 2> == <3 4> 05:06
camelia rakudo-moar 2d337f: OUTPUT«True␤»
pierre-vigier m: say <1 2> eq <3 4>
camelia rakudo-moar 2d337f: OUTPUT«False␤»
pierre-vigier Is eq a good way to compare list ...
psch m: say <1 2> eqv <3 4>; 05:08
camelia rakudo-moar 2d337f: OUTPUT«False␤»
psch pierre-vigier: note that < ... > gives you a List
m: say <1 2>.Str; say <3 4>.Str; 05:09
camelia rakudo-moar 2d337f: OUTPUT«1 2␤3 4␤»
pierre-vigier m: say <1 2> eqv <1 2>
camelia rakudo-moar 2d337f: OUTPUT«True␤»
psch pierre-vigier: further, infix:<eq> does Str comparison, while infix:<==> does .Numeric comparison
pierre-vigier yes, indeed, so how would you compare 2 lists to see if they are equal? eqv ? 05:10
psch m: say ^5 eqv 0..4
camelia rakudo-moar 2d337f: OUTPUT«False␤»
psch m: say ^5 eqv eager 0..4
camelia rakudo-moar 2d337f: OUTPUT«False␤»
psch m: say eager ^5 eqv eager 0..4
camelia rakudo-moar 2d337f: OUTPUT«(False)␤»
psch vOv
Ranges are weird is the take-away from that i guess..?
m: say (eager ^5) eqv (eager 0..4)
camelia rakudo-moar 2d337f: OUTPUT«True␤»
psch pierre-vigier: in general, comparing Lists with eqv seems better than eq or == 05:11
pierre-vigier seems better indeed
TimToady yes, eqv works find as long as you actual do have two lists (^5 isn't a list, as you discovered) 05:12
psch m: say <1 2> eqv <'1' '2'> # still pit falls thereabouts...
camelia rakudo-moar 2d337f: OUTPUT«False␤»
psch m: say <1 2> eqv ('1', '2') # *here* actually
camelia rakudo-moar 2d337f: OUTPUT«False␤»
TimToady m: say <1 2>.perl
camelia rakudo-moar 2d337f: OUTPUT«(IntStr.new(1, "1"), IntStr.new(2, "2"))␤»
TimToady those aren't just strings
psch but that's 'cause <> quoting isn't '' quoting...
05:12 psy_ joined
psch as TimToady showed.. :) 05:13
pierre-vigier m: say [ [ 1,2 ], [2,3] ] eqv [ [ 1,2 ], [2,3] ];
camelia rakudo-moar 2d337f: OUTPUT«True␤»
pierre-vigier m: say [ [ 1,2 ], [2,3] ] eqv [ [ 1,2 ], [2,4] ];
camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:13 psy_ left
pierre-vigier works for array of array, nice :) 05:13
TimToady m: say [ [ 1,2 ], [2,3] ] ~~ [ [ 1,2 ], [2,*] ]; 05:15
camelia rakudo-moar 2d337f: OUTPUT«True␤»
TimToady that also works recursively 05:16
m: say [ [ 1,2 ], [2,3,4] ] ~~ [ [ 1,2 ], [2,*] ];
camelia rakudo-moar 2d337f: OUTPUT«False␤»
TimToady m: say [ [ 1,2 ], [2,3,4] ] ~~ [ [ 1,2 ], [2,**] ];
camelia rakudo-moar 2d337f: OUTPUT«True␤»
pierre-vigier Let's say i write an object, and i want to test if two object are equal, 05:21
05:21 skids left
TimToady what do you mean by "equal"? 05:23
pierre-vigier the exact case is 05:24
TimToady usually you only care if they're the same object
pierre-vigier i define 2 matrices
i want to check if they are equal
github.com/pierre-vigier/Perl6-Math-Matrix 05:25
my $matrix = Math::Matrix.new([[1,2],[3,4]]); my $matrix2 = Math::Matrix.new([[1,2],[3,4]]);
TimToady if you provide a .perl, you get eqv automatically
pierre-vigier i want to check the equality
so using eqv should be the way 05:26
TimToady or you can provide your own eqv multies
pierre-vigier for now i redifined == and eq but it feels wrong
it is more, what operator should be used to compare "custom" object 05:27
TimToady you know we have matrices kinda built-in, now?
pierre-vigier with [ [] [] ]
missing some part,
like to calculate a dotProduct of 2 matrices
or i am missing some interesting part of the language :) 05:28
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix[2;2]
camelia rakudo-moar 2d337f: OUTPUT«9␤»
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix[1;1]
camelia rakudo-moar 2d337f: OUTPUT«5␤»
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix.shape
camelia rakudo-moar 2d337f: OUTPUT«(3 3)␤»
pierre-vigier indeed, shaped array do part of what i need :) 05:29
psch m: say [+] [ [1, 2], [3, 4] ] X* [ [5, 6], [7, 8] ] # ?
camelia rakudo-moar 2d337f: OUTPUT«16␤»
TimToady you can probably overload most of the rest on multis, since the dimensionality is part of the type
psch my vector math isn't quite up to share i think...
TimToady arrays of arrays aren't quite the same 05:30
psch yeah, it really isn't...
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix.perl
camelia rakudo-moar 2d337f: OUTPUT«Array.new(:shape(3, 3), [1, 2, 3], [4, 5, 6], [7, 8, 9])␤»
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say (@matrix»++).perl 05:31
camelia rakudo-moar 2d337f: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤ in block <unit> at /tmp/Y6Ceu5IMVY:1␤␤»
pierre-vigier m: my @matrix[2;3] = [1,2,3],[4,5,6]; my @matrix2[3;2] = [7,8],[9,10],[11,12]; say @matrix * @matrix2;
camelia rakudo-moar 2d337f: OUTPUT«6␤»
TimToady I guess hypers aren't really up on multidims yet
m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say (@matrix »+» 1).perl
camelia rakudo-moar 2d337f: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤ in block <unit> at /tmp/WfeLtcNN6p:1␤␤»
TimToady yeah, that bit is still NYI
psch huh 05:32
pierre-vigier anyway, i should refactor my "lib" to use shape array instead of array of array
psch hyper are supposed to more than one level down?
+s
+go
m: [$[$[$1]]]>>++.say 05:33
camelia rakudo-moar 2d337f: OUTPUT«[[[0]]]␤»
psch m: [$[$[1]]]>>++.say
camelia rakudo-moar 2d337f: OUTPUT«[[[1]]]␤»
TimToady m: .say for [[1,2,3],[4,5,6],[7,8,9]] »*» 2
camelia rakudo-moar 2d337f: OUTPUT«[2 4 6]␤[8 10 12]␤[14 16 18]␤»
psch but the for introduced another level of flattening..?
pierre-vigier say [[1,2,3],[4,5,6],[7,8,9]] »*» 2 05:34
TimToady m: say ([[1,2,3],[4,5,6],[7,8,9]] »*» 2).perl
camelia rakudo-moar 2d337f: OUTPUT«[[2, 4, 6], [8, 10, 12], [14, 16, 18]]␤»
pierre-vigier m: say [[1,2,3],[4,5,6],[7,8,9]] »*» 2
camelia rakudo-moar 2d337f: OUTPUT«[[2 4 6] [8 10 12] [14 16 18]]␤»
psch it's definitely hard to get a comprehensive grasp on this language :P
m: say [[[1,2,3],[4,5,6],[7,8,9]]] »*» 2
camelia rakudo-moar 2d337f: OUTPUT«[[2 4 6] [8 10 12] [14 16 18]]␤»
psch huh, that surprised me. i guess it's really about something in shaped arrays... 05:35
TimToady your outer [] is one-arging the 2nd level
m: say [[[1,2,3],[4,5,6],[7,8,9]],] »*» 2
camelia rakudo-moar 2d337f: OUTPUT«[[[2 4 6] [8 10 12] [14 16 18]]]␤»
TimToady m: say [$[[1,2,3],[4,5,6],[7,8,9]]] »*» 2
camelia rakudo-moar 2d337f: OUTPUT«[[[2 4 6] [8 10 12] [14 16 18]]]␤»
TimToady [] is a no-op around a [] 05:36
psch right, but it still doesn't complain the same way the shaped array complained
TimToady shaped array is complaining because it's not implemented right yet 05:37
psch yeah, that's what i belatedly arrived at as well... :)
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say (@matrix »+« @matrix).perl 05:38
camelia rakudo-moar 2d337f: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤ in block <unit> at /tmp/j5ZRlfcOX2:1␤␤»
TimToady yeah, not even if the arrays are identical
pierre-vigier i'll still keep my implementation with Array od Array for now i think 05:39
TimToady sure, this is obviously still brand-new stuff
pierre-vigier however, really need to keep an eye on shaped array, loks great
so let 05:40
let's say i have my $matrix1 = Matrix.new([1,2],[3,4]); my $matrix1 = Matrix.new([2,3],[8,9]); 05:42
to compare those 2 matrices,
if $matrix1 == matrix2 , if $matrix1 eqv matrix2 , if $matrix1 eq matrix2 05:43
i'm feeling none of those operators are fitting perfectly
TimToady eqv should be used for value equality here 05:44
and if it doesn't, it should :)
pierre-vigier ok, so i will remove my operator overload
== and eq :) 05:45
i felt it was not right
05:45 regreg joined
dalek kudo/thunkyreduce: a1bed15 | TimToady++ | src/ (5 files):
Revert "Revert "get reductions thunking for left/list assoc""

This reverts commit c5f81ae6086a5b1aa80d47f3251d495a1c02fea0.
05:50
05:50 sarya joined
dalek kudo/thunkyreduce: 6516930 | TimToady++ | src/ (3 files):
redo reduce thunking, ignoring slip args now
05:50
sarya hello
05:51 sarya left
TimToady psch: it looks like there's another any() ~~ earlier in the same routine 05:51
05:53 keix joined
b2gills I have written 3 Perl 6 code golfs today that are basically how I would have written them anyway. 05:54
TimToady .tell masak try the thunkyreduce branch on 007 now
yoleaux TimToady: I'll pass your message to masak.
TimToady b2gills: that's either a very good sign, or a very bad sign, or both :) 05:55
psch TimToady: right, there is, but it doesn't impact the named + slurpy ~~ slurpy case 05:56
b2gills 「'a'..'z'⊆*.lc.comb」 「{[*] $^a..$^b}」 「.say for get.uninames」
psch TimToady: i'll have a closer look later on, not enough thinking power left, fwiw... 05:57
b2gills codegolf.stackexchange.com/a/66240/1147 codegolf.stackexchange.com/a/66233/1147 codegolf.stackexchange.com/a/66125/1147
hahainternet b2gills: thanks for reminding me i still need to sort out my quote characters :) 05:59
b2gills That 「.say for get.uninames」 is the shortest, even among the languages specifically designed for code golfing
hahainternet b2gills: you're not going to win on product over a range vs Jelly looking at that score 06:01
2 bytes lol
06:01 BenGoldberg left 06:06 khw left 06:07 pierre-vigier left 06:08 pierre-vigier joined
TimToady hmm, too bad we don't allow [..] @_ 06:10
b2gills I would like to see 「4 ==> {...}」 work instead of having to do 「4 ==> {...}()」 before I'd worry about that. 06:12
06:14 pierre-vigier left 06:25 pierre-vigier joined 06:26 pierre-vigier left 06:27 xjrK_ left
MadcapJake anyone interested in attempting to make a ludumdare.com game in perl6? :) 06:40
06:47 xjrK_ joined 06:48 domidumont joined
[Tux] test 50000 22.934 22.824 06:48
test-t 50000 20.200 20.090
csv-parser 50000 25.414 25.304
still no Inline::Perl5 and I started afresh
gist.github.com/Tux/31f7033183773546da69 06:50
06:52 domidumont left 06:53 regreg left, domidumont joined
[Tux] Unhandled exception: Cannot locate native library '/pro/3gl/CPAN/rakudobrew/.panda-work/1449730304_1/resources/p5helper.so': /pro/3gl/CPAN/rakudobrew/.panda-work/1449730304_1/resources/p5helper.so: cannot open shared object file: No such file or directory 06:55
found it here: /pro/3gl/CPAN/rakudobrew/.panda-work/1449730304_1/blib/resources/p5helper.so
blib/resources != resources 06:56
06:58 domidumont left
[Tux] it comes and goes. Now I see no p5helper.so anywhere anymore 06:59
These two panda's are in my $PATH: 07:01
59245225 100775 -rwx 27 merijn 26807 10 Dec 2015 07:31 /pro/3gl/CPAN/rakudobrew/bin/panda
59904122 100755 -rwx 1 merijn 1435 10 Dec 2015 07:36 /pro/3gl/CPAN/rakudobrew/moar-nom/install/share/perl6/site/bin/panda
panda creates recursive folder structures. I now have rakudobrew/moar-nom/install/share/perl6/site/.panda-work/1449730934_1/.panda-work/1449731022_1 07:05
that doesn't look right to ,e
07:05 karim joined
karim Could anyone help? pastebin.com/A5gwvW7k 07:06
[Tux] $ perl6 bootstrap.pl 07:07
==> Bootstrapping Panda
Use of uninitialized value %ENV of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in sub MAIN at bootstrap.pl:64
in the panda git folder
shell "$*EXECUTABLE --ll-exception bin/panda --force $prefix_str install $*CWD";
07:08 domidumont joined
[Tux] $ echo $CWD 07:08
CWD: Undefined variable.
HAH!
CQ [Tux]: this channel tends to wake up later in the day...
[Tux] I am running a tcsh, not a bash
07:08 ChoHag joined
[Tux] CQ, I know, but I also know others scollback (and lizmat will be awake :) 07:09
karim Could anyone help? pastebin.com/A5gwvW7k 07:11
07:12 pierre-vigier joined 07:13 geraud left
psch karim: you're putting Pairs into the slots of the Array. 07:17
m: my @a = [a => 1, b => 2]; say @a[0] # like this
camelia rakudo-moar 2d337f: OUTPUT«a => 1␤»
psch m: my @a = [a => 1, b => 2]; say @a[0]; say @a[1] # like this
camelia rakudo-moar 2d337f: OUTPUT«a => 1␤b => 2␤»
karim what do you mean? 07:18
psch karim: as in, @jres[0] contains < file_id => ... >, @jres[1] contains < file_size => ... > etc
07:18 karim left
psch ...okay 07:18
vOv
07:22 _nadim joined
[Tux] gives up 07:22
07:24 karim joined
psch [Tux]: i don't think $*CWD is related to %*ENV<CWD> 07:25
[Tux] I came to the same conclusing after some debugging
07:25 snarkyboojum left
psch as in, locally without a set $CWD (in bash) i still get something useful from -e'say $*CWD' 07:25
karim Could anyone help? pastebin.com/A5gwvW7k
[Tux] and panda *does* work for other modules 07:26
karim, I looked, but cannot help
psch karim: what i told you before still applies
m: my @a = [a => 1, b => 2]; say @a[0]; say @a[1] #
camelia rakudo-moar 2d337f: OUTPUT«a => 1␤b => 2␤»
psch karim: that's what you're doing, albeit with different keys for the Pairs 07:27
m: my @a = [a => 1, b => 2]; say @a[0]<a>; say @a[0]<b>; say @a[1]<a>; say @a[1]<b> # maybe more helpful
camelia rakudo-moar 2d337f: OUTPUT«1␤(Mu)␤(Mu)␤2␤»
karim but is it an array? as you can see, my json consists of only one element 07:33
{ 07:34
"file_id":"fdsfdsfdsfdsfd",
"file_size":1028,
"file_path":"photo\/file_0.jpg"
}
07:34 adhoc left
dalek kudo/thunkyreduce: 2d337f1 | peschwa++ | src/core/Signature.pm:
Fix slurpy hashes in Signature ACCEPTS.

For some reason or other, the previous fix (62a029b44) worked when commited, but doesn't anymore. Constraining the RHS Block of the infix:<~~> to Any helps, and having to constrain it is specification-compliant.
07:34
karim and can I parse it so that @json contains a single element?
dalek kudo/thunkyreduce: ee0933a | TimToady++ | src/core/Signature.pm:
Merge branch 'nom' into thunkyreduce
kudo/thunkyreduce: 4a4ae62 | TimToady++ | src/Perl6/Actions.nqp:
allow thunking reduced list infixes too
psch karim: no, the json is an object (or a map, maybe), which maps to a Hash in Perl 6 07:35
dalek ast: 52e3715 | TimToady++ | S03-metaops/reduce.t:
tests for thunky reduce ops
psch m: my %h = a => 1, b => 2; say %h<a>; say %h<b>
camelia rakudo-moar 2d337f: OUTPUT«1␤2␤»
07:35 adhoc joined, n0tjack joined
psch karim: ^^^ use the %-sigil instead of @ and drop the [0] index and you can get the keys directly 07:36
m: my %h = from-json '{ "foo": "bar", "baz": "quux" }'; say %h<foo> # like this
camelia rakudo-moar 2d337f: OUTPUT«bar␤»
karim psch: how can I parse it so that @json contains a single element? So I can access its keys as @json[0]{"key1"}, @json[0]{"key2"}, etc? 07:37
this does work 07:38
say @json[0]{"file_id"};
say @json[1]{"file_path"};
say @json[2]{"file_size"};
but I'd like to be able to access all the keys as @json[0] but it contains only a single json object element 07:39
psch: let me check your code 07:40
07:40 n0tjack left 07:42 brrt joined
karim psch: thanks, it's working. 07:43
07:43 karim left
cxreg an interesting critique of Go: yager.io/programming/go.html 07:44
it's interesting to note that perl 6 holds up fairly well on their points of criticism
seems like the author likes Rust quite a bit 07:45
psch cxreg: i'm unsure how exactly we'd do the constrained generic bit 07:46
08:15 ilogger2 joined, ChanServ sets mode: +v ilogger2
psch it's a bit of a hiccup, in my (and others) opinion, but it's probably better than the alternatives 08:15
hahainternet i guess i have become accustomed to thinking from the perspective of the programmer rather than the 'programmer user' if that makes sense 08:16
because i really didn't think of friendliness to anyone else, just elegance and expressiveness
psch right, but declaring a sub that's used throughout a project that has a typed list-y container as parameter forces everyone to type the container 08:17
which might be bad for elegance and expressiveness
'cause it'd turn e.g. < f [1,2,3] > into < f my Int @ = 1,2,3 >
or worse if there's more than one array parameter to &f 08:18
hahainternet yeah, is there an elegant way to do the 'depth' checking inside the sub?
nine m: multi f(@a) { say "array"; }; multi f(@a where @a[0] ~~ Positional) { say "array of arrays"; }; f([1, 2]); f([[1,2], [3,4]]);
camelia rakudo-moar 2d337f: OUTPUT«array␤array of arrays␤»
nine hahainternet: ^^^
hahainternet oh wow
i knew about 'where'
i didn't realise you could smartmatch against a type
crikey
psch that's a gotcha :P
better make that < where any(@a) ~~ Positional > 08:19
nine m: multi f(@a) { say "array"; }; multi f(@a where all(@a.list) ~~ Positional) { say "array of arrays"; }; f([1, 2]); f([[1,2], 3]); f([[1,2], [3,4]]);
camelia rakudo-moar 2d337f: OUTPUT«array␤array␤array of arrays␤»
psch yeah, or all()
hahainternet either would be fine in my case to be fair, i wish i could be more type rigorous in python
it's driving me mad that i have to keep it all in my head
thanks to both of you though, every time i find a weirdness or annoyance in python it proves the quality of perl 6's design by the number of effective ways to deal with it 08:20
i really should start blogging somewhere notable
nine hahainternet: github.com/niner/Apache-To-Nginx/b...inx.pm#L23 for where I make extensive use of this
psch mhm, blogging 08:21
hahainternet nine: yeah that really makes a lot of sense and i can already think of a number of areas that would have helped me in p5/python/golang 08:22
it's also beautifully expressed too :D
also psch there's just not enough people talking about perl6 on the web, whenever i show programmers what it can do they're impressed, but they don't seem to spread it much
psch where clauses are kind of cheating to me vOv
hahainternet i doubt it's something i can help with much but might be worth it
psch like, it gives you turing-completeness in the type constraint for any parameter
that *is* cheating :P
m: sub f($ where rand < .5) { say "yay" }; (f 1) xx 10 # ... 08:24
camelia rakudo-moar 2d337f: OUTPUT«Constraint type check failed for parameter '<anon>'␤ in sub f at /tmp/11umCovTbY:1␤ in block <unit> at /tmp/11umCovTbY:1␤␤»
psch m: sub f($ where rand < .1) { say "yay" }; (f 1) xx 10 # better odds?
camelia rakudo-moar 2d337f: OUTPUT«Internal error: inconsistent bind result␤ in sub f at /tmp/72D84kDPvb:1␤ in block <unit> at /tmp/72D84kDPvb:1␤␤»
psch oh
neat
m: sub f($ where rand < .2) { say "yay" }; (f 1) xx 10 # better odds?
camelia rakudo-moar 2d337f: OUTPUT«yay␤Internal error: inconsistent bind result␤ in sub f at /tmp/k0upk0xQMF:1␤ in block <unit> at /tmp/k0upk0xQMF:1␤␤»
psch anyway, there's one "yay" :P
grondilu m: say "1".subst(/(.)$0*/, { $().chars ~ $0 }, :g) 08:25
camelia rakudo-moar 2d337f: OUTPUT«11␤»
grondilu m: say ("1", *.subst(/(.)$0*/, { $().chars ~ $0 }, :g) ... *)[^3]; # not sure what's wrong here
camelia rakudo-moar 2d337f: OUTPUT«Use of Nil in string context in block at /tmp/nEcZx4WKfK:1␤Use of Nil in string context in block at /tmp/nEcZx4WKfK:1␤Use of Nil in string context in block at /tmp/nEcZx4WKfK:1␤Use of Nil in string context in block at /tmp/nEcZx4WKfK:1␤(1 0…»
psch grondilu: probably $/-scoping
grondilu: well, it looks like that from here at least
grondilu m: say ("1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *)[^3]; 08:26
camelia rakudo-moar 2d337f: OUTPUT«(1 11 21)␤»
grondilu I c
m: say ("1", *.subst(/(.)$0*/, { .chars ~ .[0] }, :g) ... *)[^3]; 08:27
camelia rakudo-moar 2d337f: OUTPUT«(1 11 21)␤»
RabidGravy regarding this "Serialization Error: Unimplemented case of read_ref" I think it would be much nicer if it crapped out before it put something it wouldn't understand in the bytecode
psch RabidGravy: well... volunteered? :)
08:29 pdcawley joined
grondilu m: my @ = ("1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *); 08:31
camelia ( no output )
grondilu ^I'm a bit surprised that this is ok
08:32 Ven joined
grondilu m: my @ = "1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *; 08:32
camelia ( no output )
grondilu oh wait, I thought this would hang^
nine grondilu: why shouldn't it be ok?
grondilu I thought this was hanging, but I was just not waiting long enough :) 08:33
RabidGravy psch, I can find the bit where it fails to understand it in nqp/MoarVM/src/6model/serialization.c but still haven't found how it gets in there 08:34
psch m: my @a = "1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *; say eager @a 08:35
that hangs, i think
_nadim little OT but, is there a no_paste like service where one can put binary files? GDrive, .... I know but something that vanishes away after some timeout
camelia rakudo-moar 2d337f: OUTPUT«(timeout)»
psch RabidGravy: i'd guess it's a mismatch between the serialization reader and the serialization writer, but i'm not too familiar with serialization nor moar 08:36
RabidGravy: although, if you're using the same executable for writing *and* reading the serialization my guess is probably wrong... :) 08:37
08:37 snarkyboojum joined
timotimo very backlog 08:37
psch RabidGravy: if it happens with the same executable i'm pretty sure #moarvm would appreciate a (golfed) gist 08:38
timotimo m: my %foo; for ^10 { %foo{$_} = 1 }; say %foo
camelia rakudo-moar 2d337f: OUTPUT«0 => 1, 1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 1, 9 => 1␤»
psch m: my %h; nqp::atkey(%h, 'foo') # ooc
camelia rakudo-moar 2d337f: OUTPUT«(signal SEGV)»
dalek ast: 4b0efdd | usev6++ | S06-macros/errors.t:
Fix test where eval-lives-ok didn't get right context

previously failed with:
   Error: Use of macros is experimental; please 'use experimental :macros'
08:39
RabidGravy psch, it comes from loading one of several largish modules, so difficult to golf 08:40
08:41 xfix joined, xfix left
psch RabidGravy: no old precomp files around? 08:43
08:45 pistacchio joined
RabidGravy entirely possible 08:45
psch RabidGravy: fwiw, the bit where that error gets thrown is rather old, which hints at it not being related to precomp vOv 08:47
as in, in that switch statement there's no case that's younger than a year, from what i can see 08:48
RabidGravy yeah, it's odd
timotimo m: my %seen; say permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; True } }).hyper.map({ .perl.say }); 08:49
camelia rakudo-moar 2d337f: OUTPUT«HyperSeq.new␤»
timotimo m: my %seen; say hash permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; True } }).hyper.map({ .perl.say; a => 1 }); 08:50
camelia rakudo-moar 2d337f: OUTPUT«␤»
timotimo m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; True } }).hyper.map({ .perl.say; a => 1 });
camelia ( no output )
timotimo m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; True } }).hyper.map({ .perl.say; a => 1 }); say %@result
camelia rakudo-moar 2d337f: OUTPUT«␤»
timotimo whyyyy
m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; True } }).hyper.map({ .perl.say; a => 1 }); say @result.list
camelia rakudo-moar 2d337f: OUTPUT«[]␤»
timotimo m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; print "."; True } }).hyper.map({ .perl.say; a => 1 }); say @result.list 08:51
camelia rakudo-moar 2d337f: OUTPUT«............................................................[]␤»
timotimo whhhhyyyyyyyy
m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; print "."; True } }).map({ .perl.say; a => 1 }); say @result.list 08:52
camelia rakudo-moar 2d337f: OUTPUT«.(0, 1, 2, 3, 4)␤.(0, 1, 2, 4, 3)␤.(0, 1, 3, 2, 4)␤.(0, 1, 3, 4, 2)␤.(0, 1, 4, 2, 3)␤.(0, 1, 4, 3, 2)␤.(0, 2, 1, 3, 4)␤.(0, 2, 1, 4, 3)␤.(0, 2, 3, 1, 4)␤.(0, 2, 3, 4, 1)␤.(0, 2, 4, 1, 3)␤.(0, 2, 4, 3, 1)␤.(0, 3, 1, 2, 4)␤.(0, 3, 1…»
08:52 brrt joined, zakharyas joined
timotimo seems like that's b0rken :( 08:54
RabidGravy bad software 08:55
timotimo i mean .hyper and .race don't seem too worky? 08:58
09:00 znpy joined 09:02 dakkar joined, rindolf joined
pistacchio hi, i'm trying to learn "grammar" and actions. in this code pastebin.com/AdSuGJ0F i want to translate "("s in "1"s in order to add them later on. it works if the string contains a single bracket, but i get the error "ethod 'made' not found for invocant of class 'Any'" if i try a string like "(((". Any help? 09:08
DrForr Tokens and rules search an existing string, I'd offhand lose the ^ $ anchors because they'll just cause you grief. 09:09
grondilu you need to put the make in the grammar 09:10
m: "foo" ~~ /o { make 1 }/; say $/.made;
camelia rakudo-moar 2d337f: OUTPUT«1␤»
DrForr No, the 'make' is fine where it is, though I'd write it like so:
method TOP($/) { make @<down>>>.ast } method down($/) { make 1 }
09:11 yakudza joined
DrForr (I've been fixing github.com/drforr/perl6-ANTLR4/ these last few days.) 09:11
masak good antenoon, #perl6 09:12
yoleaux 05:54Z <TimToady> masak: try the thunkyreduce branch on 007 now
masak TimToady: will do.
09:13 leont joined
hahainternet in the repl, can you redefine a multi sub? 09:13
pistacchio @DrForr hmm, I made as you suggested, but the result doesn't change 09:14
moritz hahainternet: I think only by writing a new proto first
hahainternet i've been messing around, and if i specify another with the same name and signature, it won't overwrite it, so it intrinsically conflicts
DrForr pistacchio: Repost please?
pistacchio pastebin.com/DC9HNiHy 09:15
@DrForr also, what is the '>>>' operator?
DrForr The problem probably still is your grammar. And it's the '>>' operator on @<down>. 09:16
Hyperoperator, kind of like map().
hahainternet moritz: can't find much on google, any place i should look specifically?
_nadim I everything derived from really Any? I encountered a an error message error, it will be easier to share code when I upload the module in the meantime ..., I have a Match object when it is handled via the Any dump handler I get an X::Multi::Match which I believe meanst that there is no .^attributes for the Match class. 09:17
DrForr Drop the '^' and '$' as I suggested and it works just fine.
_nadim Arff, Is everything really derived from Any.
moritz Junction and Mu aren't 09:18
09:18 rurban joined
moritz but .^attributes is a class on the meta object anyway, so it doesn't really matter if the type itself is derived from any 09:19
m: say ('a' ~~ /./).^attributes
camelia rakudo-moar 2d337f: OUTPUT«Method 'gist' not found for invocant of class 'BOOTSTRAPATTR'␤ in block <unit> at /tmp/Rwl6Ml9sYc:1␤␤»
moritz m: say ('a' ~~ /./).^attributes>>.name
camelia rakudo-moar 2d337f: OUTPUT«($!orig $!from $!to $!CURSOR $!made $!list $!hash)␤»
masak .tell TimToady 007 passes all tests on thunkyreduce.
yoleaux masak: I'll pass your message to TimToady.
masak .oO( thunks a lot! )
pistacchio @DrForr ideone.com/2CjRTL same thing :/ 09:21
hahainternet also, i noticed that trying to do weird arrays like [["foo"]] doesn't nest as you might expect, but i'm not quite clear about why this is the case, i know adding a comma seems to 'fix' it 09:22
_nadim moritz: thanks for the explanation. it seems that my theory about Match not having âttributes is flawed, something else is generating an exception. I'll work on it.
hahainternet: en.wikipedia.org/wiki/Special:Searc...p;search=a doesn't work like you expect it indeed
hahainternet: [[a] , (yes a comma) ] 09:23
DrForr pistacchio: May I make a suggestion? Try testing the grammar on its own before adding actions.
pistacchio will do
DrForr You'll see that it doesn't parse,in that case.
lizmat good *, #perl6! 09:24
DrForr You're repeating the mistake people make with regular expressions. Tokens don't have (and can't actually) match the entire token text from start to end.
hahainternet _nadim: oh no, i do get that, but i guess it's because it's a list and the docs say any list like element can be treated as a single item, i'm just gonna keep reading 09:25
DrForr token { '(' } # is all you need to match an open-paren. Using ^\($ tells the parser that the single '(' token takes up the entire line, which isn't the case.
El_Che I have this weird behaviour while writing to the same file (open :w) on *different* runs of the program: Failed to write bytes to filehandle: bad file descriptor
it's like moar keeps state, weird
_nadim hahainternet: keep your head cool, it really doesn work as you expect it at first. After a week of it I am almost not making any more mistakes anymore, almost ;) 09:26
hahainternet _nadim: yeah, i understand most of it, but i don't get that weirdness with it flattening the structure, ah well more reading 09:27
El_Che I recently discovered IO::Handle.flush (it was undocumented). It there something similar like autoflush of perl5 09:28
timotimo star-m: my %seen; my @result = permutations(5).grep(-> $p { if %seen{ $p.reverse.join('->') } { False } else { %seen{ $p.join('->')} = 1; print "."; True } }).hyper.map({ .perl.say; a => 1 }); say @result.list;
camelia star-m 2015.09: OUTPUT«............................................................(0, 1, 2, 3, 4)␤(0, 1, 2, 4, 3)␤(0, 1, 3, 2, 4)␤(0, 1, 3, 4, 2)␤(0, 1, 4, 2, 3)␤(0, 1, 4, 3, 2)␤(0, 2, 1, 3, 4)␤(0, 2, 1, 4, 3)␤(0, 2, 3, 1, 4)␤(0, 2, 3, 4, 1)␤(0, 2, 4, 1, 3)␤(0…»
09:28 [Sno] joined
timotimo so .hyper died somewhere between now and the last star 09:29
which ... well ... 09:30
DrForr pistacchio: paste.scsys.co.uk/502592
hahainternet also yet another question, in 'where' clauses, why doesn't the whatever * work as a substitute for the parameter? 09:32
or does it, and i've done it wrong? :D
timotimo i don't see a lot of hyper spec tests
pistacchio @DrForr hey, thanks :) 09:33
timotimo all i see are tests for the listop, none for the method kind
grondilu hahainternet: it's supposed to.
m: subset oo of Str where * ~~ /oo/; say "foo" ~~ oo
camelia rakudo-moar 2d337f: OUTPUT«True␤»
grondilu though the semantics is currying here 09:34
hahainternet well with the positional example above, @a where all(@a) ~~ Positional
didn't seem to work when i tested
i'm gonna get back to it though and stop bothering here, thanks for the help
grondilu junctions don't work on Type searches, IIRC
or smartmatches 09:35
timotimo "type searches"?
grondilu I mean a junction will only ever smartmatch "Junction"
timotimo m: say any(1, 2, 3) ~~ Junction
camelia rakudo-moar 2d337f: OUTPUT«True␤»
timotimo m: say any(1, 2, 3) ~~ Int
camelia rakudo-moar 2d337f: OUTPUT«any(True, True, True)␤»
grondilu hum
I thought that did not work
hahainternet grondilu: yeah that was a working example above, but it didn't seem to work when i substituted * 09:36
grondilu m: subset Vector of Array where all(*) ~~ Real; say [ rand xx 5 ] ~~ Vector 09:37
camelia rakudo-moar 2d337f: OUTPUT«False␤»
grondilu ^like this?
hahainternet i guess, but don't worry about it
i'll figure out what i did wrong, you don't learn by being shown everything :D
grondilu yeah but now I'm curious how to do it 09:38
timotimo hahainternet: a whatever star inside function parameters will never cause the function call to be curried
grondilu m: subset Vector of Array where { all($_) ~~ Real }; say [ rand xx 5 ] ~~ Vector
camelia rakudo-moar 2d337f: OUTPUT«False␤»
timotimo in that case you'd need to put a { } around and use $_
grondilu m: subset Vector of Array where { all(@$_) ~~ Real }; say [ rand xx 5 ] ~~ Vector
camelia rakudo-moar 2d337f: OUTPUT«True␤»
grondilu oh that's cool. I swear I had tried that and fail some time ago.
timotimo ah, all and friends don't do single-argument type of stuff?
hahainternet yeah in my playing about @$_ works too 09:39
but * does not
timotimo yeah, you shouldn't expect * to work there
grondilu ~~ does stop currification, I think
timotimo yes, i think it does 09:40
hahainternet it's a shame but no real hassle to use the name i typed about 8 characters before that :D
grondilu you can always use a block 09:41
09:42 espadrine joined
_nadim m: sub g (Any $a){ $a.^attributes.sort.map: { }} ; g 'a' ~~ m:g/(a)/[0] 09:42
camelia rakudo-moar 2d337f: OUTPUT«X::Multi::NoMatch exception produced no message␤ in sub g at /tmp/UD_BNNk9I_:1␤ in block <unit> at /tmp/UD_BNNk9I_:1␤␤»
_nadim moritz: ^^
09:44 Sqirrel joined
timotimo m: (^20).hyper.map(True).list.perl.say 09:44
camelia rakudo-moar 2d337f: OUTPUT«Cannot call map(HyperSeq: Bool); none of these signatures match:␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/xKz5i0txFv:1␤␤»
moritz m: sub g (Any $a){ $a.^attributes.sort.map: { }}; g ('a' ~~ m:g/(a)/)[0]
camelia rakudo-moar 2d337f: OUTPUT«X::Multi::NoMatch exception produced no message␤ in sub g at /tmp/GcoXW4W_hv:1␤ in block <unit> at /tmp/GcoXW4W_hv:1␤␤»
timotimo m: (^20).hyper.map({True}).list.perl.say
camelia rakudo-moar 2d337f: OUTPUT«()␤»
moritz m: sub g (Any $a) { say $a.perl }; g ('a' ~~ m:g/(a)/)[0]
camelia rakudo-moar 2d337f: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "a", to => 1, from => 0),), hash => Map.new(()), orig => "a", to => 1, from => 0)␤»
moritz m: sub g (Any $a) { say $a.^attributes }; g ('a' ~~ m:g/(a)/)[0]
camelia rakudo-moar 2d337f: OUTPUT«Method 'gist' not found for invocant of class 'BOOTSTRAPATTR'␤ in sub g at /tmp/iAWOOYBKgf:1␤ in block <unit> at /tmp/iAWOOYBKgf:1␤␤»
moritz m: sub g (Any $a) { say $a.^attributes.map({;}) }; g ('a' ~~ m:g/(a)/)[0] 09:45
camelia rakudo-moar 2d337f: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil)␤»
moritz _nadim: the problem is that {} is a hash literal, not a block
_nadim: but it's a bug that "X::Multi::NoMatch exception produced no message"
_nadim Yoohoo bug #2 ;) 09:46
moritz: I have code in the {}, same thing happens 09:47
09:47 brrt left
timotimo i'm tired and map on hyper doesn't work :( 09:49
moritz _nadim: what code? 09:51
m: say (1, 2).map({}) 09:53
camelia rakudo-moar 2d337f: OUTPUT«Cannot call map(List: Hash); none of these signatures match:␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/RXMq4y8b8H:1␤␤»
09:57 Skarsnik joined
dalek c: f30444e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod:
add Any::sort
10:00
c: ab6c33a | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod:
add trap of interating Str
c: fb993b8 | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files):
Merge pull request #234 from gfldex/master

add Any::sort, add trap of one element Str iteration
10:01 vytas joined 10:02 PotatoGim joined
dalek kudo/nom: 99218aa | lizmat++ | src/core/Any-iterable-methods.pm:
Add a less LTA error for (1,2).map({})
10:02
timotimo yo 10:03
HTTP::UserAgent is unhappy in its tests
P6M Merging GLOBAL symbols failed: duplicate definition of symbol Response 10:04
RabidGravy yes it's since a rakudo of some point yesterday
Skarsnik *blame precomp*
And hello ^^ 10:05
gfldex i officially complain about rt.perl.org/Public/Bug/Display.html?id=126860 to be DWIMy. The whole point of having overloadable methods is to make a method work with the class at hand.
timotimo i have no experience with that piece of the code :\
RabidGravy JSON::Infer stopped working at the same time
timotimo gfldex: so will Str.elems also give you the number of characters? 10:06
gfldex timotimo: pleas don't play that game with me. Strings are unicode and therefor need more then one method to talk about length.
Skarsnik The issue is why it work at all? x) 10:07
gfldex timotimo: sorting a string is sorting a string
Skarsnik hm, C-enum start a 0 or 1?
10:08 leont left
Skarsnik nvm, yes it's 10:08
gfldex timotimo: besides, "bca".elems silently fails and therefor is a source of bugs and that's a design smell
BooK gfldex: well sorting a string in perl 5 gives the same result
gfldex that perl 5 does it wrong is not a good argument 10:09
BooK consistency might be one
timotimo it doesn't silently fail; it's consistent with how the whole "a single item can stand in for a list" thing works
10:09 znpy left
timotimo so ... if strings need more than one method to talk about length, wouldn't you also need more than one method to sort a string's elements? 10:10
Skarsnik *wonder if he should bother returning Date object in DBIish when a DB give a date field*
gfldex no, because sort that a code ref as it's only argument
DrForr pistacchio: Did what I said make any sense?
RabidGravy Skarsnik, nah that's the job of a higher level abstraction 10:11
Skarsnik Str.sort-ascii() Str.sort-unicode
RabidGravy, Why?
masak I keep needing to remember that `.comb` in Perl 5 is spelled `=~ //g` 10:12
timotimo gfldex: huh?
BooK Skarsnik: what's the difference?
Zoffix I keep needing to remember that Perl 6 has .comb :)
gfldex timotimo: you are defending a Decision Made In The Past, instead of providing good reason why the verb sort, that carries meaning, should not have that meaning on the noun Str.
BooK masak: remember the perl 5 comb only has two teeth
and a large handle
masak :) 10:13
grondilu totally off topic, but I laughed so hard at this I want to share: i.imgur.com/saCPaJa.webm
BooK I'd say the meaning of the verb sort applies to a list, and the noun Str describes an item 10:14
Skarsnik BooK, well it etheir I provide a complete value holding type formation by trying to type thing the most I can. Or add a method to get the field type
s/formation/information/
timotimo grondilu: well trained dog :) 10:15
BooK Skarsnik: I was asking about your two sort methods
DrForr grondilu: I was actually a bit worried about doing something similar when potty-training Percy.
ChoHag Is there any way I can get an adverb into the pull-one method of an Iterator?
BooK timotimo: or a history of very clean windows and pain
timotimo mhm :(
Skarsnik oh nvm x)
ChoHag And does an Iterator class (as returned by the iterator method of an Iteratable) need a particular base class or role?
DrForr BooK: Yet another problem when raising birds. Luckily Percy's got a fairly strong noggin. 10:16
Skarsnik RabidGravy, I think I will still try returning Int/Num/Str when possible and open an issue to discuss date 10:17
timotimo gfldex: all i can say is it's quite a bit too late to make that decision go any other way
moritz m: my @a = gather { take 1; take 2; LEAVE take 3 }; say @a
camelia rakudo-moar 99218a: OUTPUT«[1 2 3]␤»
10:19 pippo joined, siriu5b joined
timotimo moritz: take it or leave it, i guess 10:19
10:20 literal left, literal joined
gfldex timotimo: i just documented it the way it is, because i know very well that it wont change any time soon. I did not add it to the FAQ, but wont wonder if it shows up there in the next 6 month. The FAQ of a language should be short, what is entirely my opinion and the reason it complained about sort. 10:21
Skarsnik duh mysql does not have Boolean type? 10:23
timotimo even if it did, it'd probably still allow all integers :P 10:24
Skarsnik Boolean : These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true. (╯°□°)╯︵ ┻━┻ 10:26
arnsholt Aaah, MySQL. How I donæt miss you 10:27
But that's not too insane though. Booleans are stored as bytes, basically
Skarsnik Yes but that mean you don't know if you deal with a Bool field or a int value
10:29 znpy joined
DrForr Yeah. Probably best to limit the types to what's in the ANSI spec and let another layer map as needed. Or possibly create some sort of conversion role. 10:29
gfldex m: use MONKEY-TYPING; augment class Str { method sort(&by = &infix:<cmp>) { self.comb.sort(&by).join } }; say "bca".sort; 10:30
camelia rakudo-moar 99218a: OUTPUT«abc␤»
gfldex timotimo: i'm not sure if it's really a bit late as this change wont break existing code 10:31
arnsholt Skarsnik: Details, details! =) 10:32
Skarsnik What does given do when the value is undef? 10:35
10:36 brrt joined, Ven left 10:38 donaldh joined
lizmat gfldex: it would make the Str case special from any other scalar case 10:39
arnsholt Remember, there isn't an undef value in Perl 6
lizmat m: say 198873657652656.sort
camelia rakudo-moar 99218a: OUTPUT«(198873657652656)␤»
lizmat why wouldn't that sort the digits as well ?
masak what's the Perl 5 regex equivalent of ?{} (code assertion) ?
moritz masak: <?{ ... }> iirc
arnsholt <?{ }> I think 10:40
masak thank you
lizmat in all of Perl 6 we assume that a scalar is identical in behaviour to a single element list
a single element list sorts as itself
arnsholt Yeah, it's <?{ }>. Or at least that's the construct I've used in Snake's grammar (which is NQP, admittedly) 10:41
gfldex so your argument is that sorting a single string doesn't make sense because sorting a single number doesn't make sense
arnsholt Skarsnik: Anyways, given $foo will just set $_ to whatever value you have, and when just smartmatches. So the behaviour is pretty predictable from that point on 10:42
moritz a string isn't even sortable
BooK gfldex: your argument is that a single string is actually a list 10:43
gfldex m: "bca".comb.sort.join; # why does that work if it isn't sortable? 10:44
camelia ( no output )
Zoffix m: say "bca".comb.sort.join;
camelia rakudo-moar 99218a: OUTPUT«abc␤»
Zoffix m: say "bca".comb.sort.join; 10:45
camelia rakudo-moar 99218a: OUTPUT«abc␤»
Zoffix m: say "bca".comb;
camelia rakudo-moar 99218a: OUTPUT«(b c a)␤»
gfldex m: dd "bca".comb # it ain't a list, it's a Seq
camelia rakudo-moar 99218a: OUTPUT«Seq $var = ("b", "c", "a").Seq␤»
gfldex BooK: it's not a list but it is iterable, as many other programming languages show 10:46
lizmat m: say "bca".comb.sort.WHAT
camelia rakudo-moar 99218a: OUTPUT«(List)␤»
masak gfldex: having .sort work by default on characters-of-a-Str is now an extra reason on my list why I don't like the thought of Str being a List type
lizmat the sort turns the Seq into a List
arnsholt Yeah, strings should not have listy behaviour 10:47
Especially since each element tends to also be a string, which means that in that case string is a list of itself, which doesn't make a whole lot of sense 10:48
masak arnsholt: well, you'd need a Character type 10:49
arnsholt Yeah, that'd help a bit. Extrapolating from Python a bit on that last
10:50 pierre-v_ joined
gfldex python is slightly less bad then perl6 on that matter, see: stackoverflow.com/questions/1504624...-in-python 10:50
BooK well, if something is iterable, it has a default sort order
Skarsnik I think mysql does not let me not have root without a pass ><
donaldh is perplexed by the listy behaviour of strings in python
BooK the order in which things show up
arnsholt Yeah, I hate that strings are iterable in Python 10:51
BooK and then "cba".sort is,er, "cba"
lizmat there's a reason we now have x and xx in Perl 6, like we now have .reverse and .flip
perhaps an .order for strings ? 10:52
10:52 pierre-v_ left
donaldh which does .comb.sort.join ? 10:52
RabidGravy :) 10:53
lizmat yeah, pretty much 10:55
not sure if that's worth it
but then, you could argue the same for .reverse
Zoffix not worth it
lizmat .flip
10:55 pierre-vigier joined
lizmat because .flip is nothing else then .comb.reverse.join 10:55
gfldex lizmat: i would not be happy with that solution either. My main problem is that "bca".sort silently fails. It should at least tell the language user that he is doing something silly.
donaldh m: say "bca".sort 10:56
camelia rakudo-moar 99218a: OUTPUT«(bca)␤»
donaldh it silently succeeds at doing exactly what you asked it to
lizmat m: 42.sort # also silly, also wanrn ?
camelia ( no output )
El_Che morning
Zoffix \o
gfldex donaldh: if you ask a morron in a hurry how to sort "bca", what would be the answer? 10:57
donaldh sort one thing. Get the same thing back
10:57 pierre-vigier left
gfldex that a Str is one thing is a definition. There is no natural way to decide if it is or not. 10:57
El_Che let's-rewrite-something-to-use-grammars-day!
donaldh :)
RabidGravy gfldex, that would be an argument for *not* sorting the characters then wouldn't it? What the "bits" are and how they should be ordered differs from string to string 10:59
11:00 pierre-vigier joined
gfldex RabidGravy: why can we order Str then by splitting it up into a list and then joining it again? It's all just bits! 11:00
RabidGravy sorting characters lexically is going to be wrong for a lot of strings
donaldh gdflex: what's the use case? 11:01
gfldex:^
RabidGravy gfldex, because you can choose how to split and choose how to sort
11:01 lucs joined
gfldex donaldh: see: www.google.de/search?q=sort+string...swGIpp7wBg 11:01
RabidGravy if you *choose* to split into characters and then sort lexically that's fine
gfldex donaldh: there seam to be load of folk who ask that question 11:02
11:04 pierre-vigier left 11:05 pierre-vigier joined
gfldex if you ask a 12 year old child to order "bca" it will assume that you ment alphabetical order. Any 12 years old that fails that test is send to special needs class. conclusion: Perl 6 is a moron. 11:05
ShimmerFairy [citation needed] :) 11:06
RabidGravy it's a programming language, it assumes that the person using it knows what they are doing
donaldh Well Perl 6 goes to a lot of effort to only DWIM things that are intuitively DWIMmable 11:07
DrForr m: say <b c a>.sort
camelia rakudo-moar 99218a: OUTPUT«(a b c)␤»
11:07 pierre-vigier left
donaldh And knowing which particular Str splitting and sorting seems to fail that test 11:07
RabidGravy "MMXV" 11:08
Zoffix gfldex, in that link I see like one person asking to sort a single string. The rest are all about sorting a bunch of strings...
"sort a single string" doesn't even make sense
You sort characters
donaldh Ask me to sort characters in a string and I'll split the string into characters. 11:09
That's implicit in the "Ask a 12 year old" question
gfldex so if a 12 year old can infer that, why can't Perl 6? "Because we decided that it doens't." I don't like the authority prove. 11:11
11:13 pierre-vigier joined
arnsholt Strings being sortable implies that strings are indexable (which isn't ever happening) and iterable as well though 11:14
ShimmerFairy gfldex: I suppose it's for the same reason "foo"[1] doesn't work; we don't treat strings as a funny kind of array
arnsholt And "for $str { ... }" iterating over the characters of the string is another thing I hate
lizmat creating a module / slang for that, would be pretty easy, though 11:15
gfldex ShimmerFairy: for very good reason. That's why i believe that Str::sort should fail. Instead it does nothing. 11:16
donaldh The fundamental reason is the macro DWIMmery we expect from "for $thing { }" working when passed either a scalar or a Seq
RabidGravy I actually think that if you asked a 12 year old to sort a string that was already ordered in a clearly non-lexical manner you might have to specify "sort by character"
11:16 Ven joined
ShimmerFairy gfldex: well, like all array methods, it treats scalars as 1-item lists, and I'm confident that's not changing or getting special-cased any time soon. 11:17
lizmat m: use MONKEY-TYPING; augment class Str { method AT-POS($n) { self.substr($n,1) } }; say "foobar"[5] 11:18
camelia rakudo-moar 99218a: OUTPUT«r␤»
donaldh It's very useful to be able to write code that can sink a list or a scalar without having to care which was passed in
11:19 pierre-vigier left
donaldh In python, for example, I have to test for iterable, but not string 11:20
11:21 pierre-vigier joined
donaldh m: say 'foobar'[5] 11:22
camelia rakudo-moar 99218a: OUTPUT«Index out of range. Is: 5, should be in 0..0␤ in block <unit> at /tmp/9RtT9HuWZ6:1␤␤Actually thrown at:␤ in block <unit> at /tmp/9RtT9HuWZ6:1␤␤»
arnsholt Yeah, I hate those bugs where I inadvertently pass a string to something expecting a list. The code usually works fine, but with completely insane results
Ven m: say 'perl6 is '[+'meta']
camelia rakudo-moar 99218a: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5meta' (indicated by ⏏)␤ in block <unit> at /tmp/L2jpvVmYj4:1␤␤Actually thrown at:␤ in block <unit> at /tmp/L2jpvVmYj4:1␤␤»
Ven m: say 'perl6 is '['really' eq 'meta'] 11:23
camelia rakudo-moar 99218a: OUTPUT«perl6 is ␤»
donaldh just wrote a python function that needs to cope with strings or lists. It's hard to get right in python.
gfldex arnsholt: that's why i complained after writing the doc for Any::sort. You will have to look that up in the docs and that means lower productivity of the programmer and less -Ofun.
donaldh Hmmm, sort will sort items.
Str and Num et al are items 11:24
11:24 pierre-vigier left, rurban left
donaldh DWIMming a list of 1 item seems generally more useful than DWIMming an item into a list of parts of the item. 11:25
Zoffix choses to go with the red bikeshed colour and leaves 11:26
donaldh :) 11:28
11:28 kaare_ joined
Ven donaldh: dwimming an item to be a list of one item is certainly one of the things in perl6 I dislike. but then, I guess I'm missing the perl5 inspiration 11:28
donaldh Ven: as I said, it's extremely useful if you want to write functions that don't need to care whether they're passed a scalar or a list. 11:29
Ven donaldh: I very very very much don't want to write such function :P
ShimmerFairy Ven: it's probably more important now with the single arg rule (that is, [1] -> 1 and all of a sudden scalar!) 11:31
Ven ShimmerFairy: well, I really dislike flattening, so I dislike the one-arg-rule as well.. I just don't see the point of such "sacrifices" in terms of complexity, where pretty much every other language gets by, and doesn't lose anything (or at least I don't) from it. 11:32
11:32 pierre-vigier joined
Ven but it's pointless to beat a dead horse like that, so I'll just stop talking about flattening etc. That ship sailed some decades ago 11:32
11:33 brrt left
ShimmerFairy in my view, lists in perl 6 were nothing but frustration before the GLR (as in, they always got in my way), and now they aren't :) 11:34
grondilu agrees^ 11:35
11:37 kid51 joined
gfldex Zoffix: is building doc.perl6.org triggered by commits or by cron/hand? 11:37
stmuk I didn't like flattening when I first came across it in perl 5 (mainly since it involved loss of information) but got used to it and I can get unused to it as well
Zoffix gfldex, no idea. cronjob that looks for commits would be my guess 11:39
11:40 pierre-vigier left
ShimmerFairy stmuk: if nothing else, we at least have .rotor to "un-flatten" a list :) 11:40
stmuk gfldex: github.com/perl6/doc/blob/master/u...e-and-sync 11:41
Heap corruption detected: pointer 0x7f65ea2f1f18 to past fromspace 11:44
which, of course, I can't reproduce :/ 11:46
timotimo urgh
masak .oO( now they aren't nothing but frustration? ) :P 11:47
Zoffix :) 11:48
11:51 pistacchio left 11:52 _nadim joined 11:55 n0tjack joined
El_Che in the grammar doc (doc.perl6.org/language/grammars) I find this line in a Action class: method TOP ($/) { $/.make: $<pair>».made }. Can someone point me to the doc for » ? 11:58
12:00 n0tjack left
masak finds no "hyper" in all of docs.perl6.org/language/operators 12:00
mrf El_Che: its the unicode operator form of doc.perl6.org/routine/hyper
12:01 anaeem1 joined
El_Che thx 12:01
masak I found a bit about it here: docs.perl6.org/language/syntax#Meta_Operators 12:02
El_Che I don't think that the Grammar intro is very clear. Too much magic. The TOP token/method should be more clearly explained (it it a default, a convention, etc) 12:03
and the hyper thing introduces somewhat related concepts
12:03 anaeem1 left
El_Che if hyper is unavoidable (it isn't) we should at least link to the doc 12:03
llfourn yes hyper is in desperate need of docs 12:04
El_Che I am trying to document stuff as I they come along in my program. 12:05
all the utf8 first citizen is cool, but should be the only syntax in tutorial as many people haven't configured their setup to write them 12:08
-> should not be
mrf Yeah I would certainly try and avoid introducing to many things in a tutorial. 12:09
12:10 xjrK_ joined
masak perl6 -pe'.=indent: 4' somefile # love this one-liner :) 12:12
El_Che what would be a good alternative for the hyper in the grammar tutorial?
i don't mind making the changes, but I must be sure they make sense 12:13
12:13 Actualeyes joined
masak the same thing can be done with a .map 12:18
$/.make: $<pair>.map(*.made)
12:18 PotatoGim left, PotatoGim joined 12:21 anaeem1 joined 12:22 anaeem1 left
_nadim moritz: A propos sub g (Any $a) { say $a.^attributes.map({;}) }; g ('a' ~~ m:g/(a)/)[0] the code in this one and I gives the same error . nopaste.linux-dev.org/?879024 12:22
gfldex m: my @a = <a b c>; @a>>.say; my @b = @a>>.ord; dd @b; sub foo(Str:D $c){ $c.ord * 2 }; say @a>>.&foo; say @a>>.({ $_.ord * 2 }) 12:23
camelia rakudo-moar 99218a: OUTPUT«a␤b␤c␤Array $var = $[97, 98, 99]␤[194 196 198]␤Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/gj3XnvX_X8:1␤␤»
gfldex is there a way to make the last part work?
masak don't think so. 12:25
you need to put it in a variable, like with &foo
it fails partly because the operator becomes .(), not . like you intended
DrForr scratches his head over how to add a method to Perl6::Actions. I gather I have to get the nqp:: object and bind a role in... 12:30
12:31 Gabriel_Hu joined
gfldex m: my $a = 'a'; say $a.&({ .ord }) 12:33
camelia rakudo-moar 99218a: OUTPUT«97␤»
gfldex m: my @a = <a b c>; @a>>.say; my @b = @a>>.ord; dd @b; sub foo(Str:D $c){ $c.ord * 2 }; say @a>>.&foo; say @a>>.&({ $_.ord * 2 })
camelia rakudo-moar 99218a: OUTPUT«a␤b␤c␤Array $var = $[97, 98, 99]␤[194 196 198]␤[194 196 198]␤»
gfldex i'm pleased
12:34 kid51 left, znpy left, Gabriel_Hu left
gfldex m: say { Nil }.WHAT, &({ Nil }).WHAT; 12:35
camelia rakudo-moar 99218a: OUTPUT«(Block)(Block)␤»
Skarsnik dbiish still does pass its tests :( 12:36
12:38 sufrostico joined
Skarsnik I am not sure to get the diff between Num and Real, should a numeric in a DB be Num or Real? 12:41
12:42 pierre-vigier joined 12:43 Ven left
moritz Num includes Complex, Real doesn't 12:44
erm, wrong 12:45
I meant Numeric
Skarsnik: Num is a floating-point number
Skarsnik: Real is a role that non-complex numbers do (Rat, Num, Int)
12:46 Actualeyes left
Skarsnik ok, so I can change the 1700 => 'Real', # numeric in Pg to Num? since it's not a real (haha) type 12:46
ilmari no, numeric in pg is arbitrary-precision, not floating point 12:47
moritz Skarsnik: what is the type used for?
as a constraint? then Real is good 12:48
12:48 zakharyas left
Skarsnik *confused* 12:48
12:48 Ven joined
Skarsnik I don't really get the difference x) 12:49
ilmari numeric in postgres is exact, with «up to 131072 digits before the decimal point; up to 16383 digits after the decimal point» 12:50
Skarsnik m:say Num ~~ Real 12:51
m: say Num ~~ Real
camelia rakudo-moar 99218a: OUTPUT«True␤»
timotimo ilmari: so really it wants to just be Str :)
ilmari or FatRat 12:52
Skarsnik can't be Real then?
dalek c: 2490324 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
add postfix C<».>
c: c68ee34 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
Merge pull request #235 from gfldex/master

add postfix C<».>
gfldex El_Che: you may find the examples useful github.com/perl6/doc/commit/249032...c7dfcdd76b
12:54 kst` joined 12:55 emdashcomma_ joined, emdashcomma left, kst left 12:56 pyrimidi_ joined 12:57 jevin joined
Skarsnik wtf, t/40-sqlite-common.t ...... Failed 55/58 subtests when running with prove. And running the test itself : none fail (execpt 2 that as marked as todo) 12:58
13:00 jevin_ left
Skarsnik (╯°□°)╯︵ ┻━┻ 13:08
BooK Skarsnik: I saw you talk about dbiish, what is it exactly? the DBI for Perl 6 ? 13:09
Skarsnik Yes
ilmari BooK: ish
BooK how ish is the ish?
-ier would have been better than -ish :-) 13:10
Skarsnik it look like DBI but it's not as stronly tested. And there is probaly lot of feature that are missing (like pg array)
13:10 rurban joined
timotimo BBL 13:11
BooK well, DBI has a test suite, and there's been some work on Test::DBI
13:11 jkva joined 13:12 znpy joined
Skarsnik I don't get why only the mysql fail with the find_symbol error with a recent rakudo 13:14
dalek kudo/nom: 8e8fb47 | grondilu++ | src/core/native_array.pm:
adding a constraint to permutations

permutations($n) does not make sense if $n <= 0
kudo/nom: 7f63896 | lizmat++ | src/core/native_array.pm:
Merge pull request #629 from grondilu/patch-7

adding a constraint to permutations
gfldex m: sub foo () is cached {}; 13:17
camelia rakudo-moar 99218a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DQ0cOv1Huw␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/DQ0cOv1Huw:1␤ expecting any of:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED i…»
gfldex will is cached come back?
lizmat m: use experimental :cached 13:18
camelia ( no output )
lizmat m: use experimental :cached; sub a is cached ($a) { ... }
camelia rakudo-moar 99218a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98jiiMScPu␤Missing block␤at /tmp/98jiiMScPu:1␤------> 3se experimental :cached; sub a is cached7⏏5 ($a) { ... }␤ expecting any of:␤ new name to be defined␤»
lizmat m: use experimental :cached; sub a($a) is cached) { ... }
camelia rakudo-moar 99218a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h_ZGJ4SAQG␤Missing block␤at /tmp/h_ZGJ4SAQG:1␤------> 3xperimental :cached; sub a($a) is cached7⏏5) { ... }␤ expecting any of:␤ new name to be defined␤»
lizmat m: use experimental :cached; sub a($a) is cached { ... } 13:20
camelia ( no output )
lizmat gfldex: ^^^
the current implementation was not considered to be 6.c worthy really
so jnthn turned it into an experimental feature, just like macro's, btw 13:21
gfldex that breaks htmlify.p6 in the docs, what is no biggy because it doesn't work with current rakudo anyway 13:23
13:28 rindolf left 13:30 Actualeyes joined 13:32 sufrostico left
dalek c: 70cc088 | lizmat++ | htmlify.p6:
Make sure "is cached" works
13:33
13:36 zakharyas joined
|Tux| m: my$b=Buf.new(^2048 .map({256.rand.Int}));my Str$u=$b.decode("utf8-c8"); 13:38
camelia ( no output )
|Tux| m: my$b=Buf.new(^2048 .map({256.rand.Int}));my Str$u=$b.decode("utf8-c8");
camelia rakudo-moar 7f6389: OUTPUT«(signal SEGV)»
13:42 lucasb joined
Juerd TimToady: Thanks for the variable name $side-effect in the thunking tests. Made what you're testing very clear, and I think I finally understand what thunking is now :) 13:45
13:46 _nadim left, _nadim joined 13:49 ggoebel8 joined
Skarsnik I hope it's not what I just change that make DBIish mysql/sqlite fail 13:50
13:52 zengargoyle joined 13:56 abraxxa joined, RabidGravy joined 13:57 aindilis` joined 13:58 BuildTheRobots joined
Juerd roast/S32-temporal/DateTime-Instant-Duration.t says "DateTime is the only means of constructing arbitrary Instants", but: 13:59
m: Instant.new(1e9).DateTime.say
camelia rakudo-moar 7f6389: OUTPUT«2001-09-09T01:46:08Z␤»
Juerd That's using Instant.new, not DateTime, to create an arbitrary Instant. 14:00
14:00 luis` joined
Juerd Also, doc.perl6.org/type/Instant says "It is not tied to or aware of any epoch" but it does seem to consistently do so. 14:00
[Coke] by making the avent post for day 11 posted but protected, it's been released to the wild already. Was in my RSS feed 2 days ago. 14:01
lucs How do you set up tests (using module Test) for a private method? (method !foo ...)
Skarsnik try with introspection 14:02
lizmat Juerd: but you're coercing it to a DateTime without :timezone, that assumes GMT
Skarsnik I think nothing is really private
lucs Skarsnik: Not sure how introspection works; can you point me to some docs please? 14:03
(I'll ack the specs too)
Skarsnik doc.perl6.org/language/mop
lucs Thanks 14:04
Skarsnik I think $object.^find_method('private') could work?
gfldex lucs: these spectests may be helpful github.com/perl6/roast/blob/master...e.t#L6-L44
lucs gfldex: Nice, thanks. 14:05
14:05 kolikov joined
El_Che ok, without stepping on toes, the Grammar howto needs a lot of work 14:05
kolikov hi #perl6 ! 14:06
Juerd lizmat: I don't see the relevance of timezones for either of my questions. Can you explain?
14:07 regreg joined
DrForr El_Che: I might be tempted to rewrite after I get done with the talk on it. 14:07
El_Che DrForr: please do and keep me in the loop. I wanted to do it, but I am not yet the right person for the job (still trying stuff and figuring it out) 14:09
The link grammar-actions feels like a lot of black magic ("oh you forgot a rat's liver? it won't work) 14:10
Skarsnik *wish travis did not rebuild rakudo/moar evertime* 14:11
RabidGravy you can cache it I believe 14:12
14:12 Sgeo joined
RabidGravy docs.travis-ci.com/user/caching/ 14:12
Skarsnik I hope my "fix" is not a fix, otherwise it's pretty weird (I swaped some use) 14:13
14:15 pippo left
lizmat Juerd: maybe I misunderstood by what you meant with "not tied to any epoch) 14:21
"
14:21 pierre-vigier left
lizmat what *do* you mean by that? That its zero point is at some point in the past, and thus connected to an epoch ? 14:21
14:21 pierre-vigier joined
Juerd lizmat: Unix times are based on an epoch, which is 1970-01-01 00:00:00 UTC (so the timezone's already in the definition), and Instant seems to be based off that same epoch. 14:22
I can imagine that this is platform dependent, but in that case it should imho be worded as such.
Basically I'm asking whether the implementation and the documentation agree. The other question is about whether the comment in the tests is still accurate, since Instant.new does create arbitrary instants. 14:23
lizmat m: say Instant.new(-3000000).DateTime # maybe it's because we can go before 0 ?
camelia rakudo-moar 7f6389: OUTPUT«1969-11-27T06:39:50Z␤»
Juerd Still epoch bound :)
lizmat so that it's origin doesn't really matter ?
you could put it at any location 14:24
Juerd So I wonder what was meant by that documentation, and that comment. I may be misinterpreting it.
zengargoyle Skarsnik: are you testing sqlite stuff?
kolikov m: my %b = a=>1 , b => 2;
camelia ( no output )
lizmat and since internally, we're using BigInts there, it can go back to the Big Bang, and until the heat death of the Universe ?
Juerd If the current text is correct and my interpretation is off, then I'd like to learn what was actually meant, and update the texts :)
lizmat perhaps TimToady can elaborate 14:25
Juerd lizmat: It's still clearly bound to that epoch, though.
Perhaps he can. :)
kolikov m: say my %b = a=>1 , b => 2;
camelia rakudo-moar 7f6389: OUTPUT«a => 1, b => 2␤»
lizmat Juerd: you need to fix it to somewhere
Juerd The tests were written by Blame
lizmat or somewhen
Juerd Argh
lizmat :-)
Juerd The tests were written by Kodi
kolikov m: my %b = a=>1 , b => 2; say %b.invert;
camelia rakudo-moar 7f6389: OUTPUT«(1 => a 2 => b)␤»
Juerd Corrected 'git balme' in the wrong window :)
I don't know who Kodi is. Are they on IRC? :) 14:26
ilmari 'git balm' for when your commits need soothing
kolikov m: my %b = a=>1 , b => 2; say %b.invert{2}
camelia rakudo-moar 7f6389: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at /tmp/XDSRM2JAw5:1␤␤Actually thrown at:␤ in block <unit> at /tmp/XDSRM2JAw5:1␤␤»
kolikov m: my %b = a=>1 , b => 2; say %b.invert.WHAT; 14:27
camelia rakudo-moar 7f6389: OUTPUT«(Seq)␤»
kolikov Arrgg Seq !
zengargoyle m: my %b = a=>1 , b => 2; say %b.invert.hash{2} 14:28
camelia rakudo-moar 7f6389: OUTPUT«b␤»
kolikov @zengargoyle ... Thanks !
zengargoyle m: my %b = a=>1 , b => 2; say %b.invert.Hash{2} 14:29
camelia rakudo-moar 7f6389: OUTPUT«b␤»
zengargoyle not sure what the difference between .hash and .Hash is. :)
Juerd Wow, the word 'now' is used a lot in test comments and descriptions :)
kolikov Just wished 'invert' would be context sensitive ...
14:31 skids joined
lizmat kolikov: how do you mean? 14:31
kolikov @lizmat : invert -> hash returns hash ... invert list returns list . 14:32
lizmat kolikov: fwiw, it *is* context sensitive in a way, as Hash.inverts returns a List of Pairs 14:33
ilmari kolikov: if Hash.invert returned a hash it would be lossy 14:35
if you have multiple keys with the same value, which should win?
lizmat that's why it returns a list of Pairs
ilmari exactly
lizmat so you can decide how to handle that
kolikov @lizmat : lossy ?
ilmari m: { a => 42, b => 42}.invert.hash.say
camelia rakudo-moar 7f6389: OUTPUT«42 => b␤»
lizmat like ilmari said: what if 2 keys have the same value?
kolikov @ilmari & lizmat : I see, it is logical ! 14:36
zengargoyle i'd expect that to sometimes give 'a', but seems to be always 'b'... is the {}.invert not randomish? 14:37
lizmat zengargoyle: Hash.list is not randomish 14:38
(well, it is on JVM, I think)
anyway, one should not depend on order with anything hash related, as in Perl 5
mrf Hmm. I expected %hash.invert to give and inverted index so {a => 42, b => 42}.invert => {42 => ["a", "b"]} 14:39
kolikov @ilmari & lizmat : anyway I use WHAT a lot when i can't figure the routine/method output, then coerce with the apropriate routine/method (in my case, my hash is k an v unique).
zengargoyle yeah, .keys seems to be stable as well... i'm so used to hash stuff being random that it's weird when it isn't. :)
moritz m: say (my %h).push: {a => 42, b => 42} 14:40
camelia rakudo-moar 7f6389: OUTPUT«a => 42, b => 42␤»
moritz m: say (my %h).push: {a => 42, b => 42}.invert
camelia rakudo-moar 7f6389: OUTPUT«42 => [a b]␤»
moritz mrf: ^^ that's how you get that
mrf moritz: is that rewriting %h inline?
moritz mrf: yes
mrf ahh. No its creating %h from a anon hash 14:41
moritz well, it's creating %h, and then mutating it
mrf is still getting used to the "function: do" syntax
moritz m: (my %h).push: {a => 42, b => 42}.invert; say %h.perl
camelia rakudo-moar 7f6389: OUTPUT«{"42" => $["a", "b"]}␤»
moritz m: (my %h).push({a => 42, b => 42}.invert); say %h.perl 14:42
camelia rakudo-moar 7f6389: OUTPUT«{"42" => $["a", "b"]}␤»
dalek kudo/nom: 61baf0f | hoelzro++ | src/core/JSON/Pretty.pm:
Add JSONException and throw it on invalid JSON

This way, instead getting a red herring "Method ast not found" error, users of JSON::Pretty can know what the underlying error actually is
14:44
kudo/nom: e0c7590 | hoelzro++ | src/core/CompUnit/Repository/FileSystem.pm:
Fail with friendly error message when failing to load META6.json

The filesystem compunit repository loader consults META6.json (if available) for module metadata, but the error message includes JSON which the user may not immediately understand the source of. This change points them to the source of the JSON so they can understand and fix what's going wrong
mrf m: (my %h).push({a => 42, b => 42}).invert.say;
camelia rakudo-moar 7f6389: OUTPUT«(42 => a 42 => b)␤»
mrf ahhh right now I think I understand
moritz: is the end of the push: defined by the ; ? 14:45
m: a..z.map: {.uc}.say; 14:46
camelia rakudo-moar 7f6389: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LEzddAgTYb␤Undeclared routines:␤ a used at line 1␤ z used at line 1␤␤»
mrf m: a..z.map: {.uc.say};
camelia rakudo-moar 7f6389: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cwWo17_CnC␤Undeclared routines:␤ a used at line 1␤ z used at line 1␤␤»
mrf :(
oh well.
ilmari mrf: use more quotess
mrf m: "a".."z".map: {.uc.say}; 14:47
camelia rakudo-moar 7f6389: OUTPUT«WARNINGS:␤Useless use of ".." in expression "\"a\"..\"z\".map: {.uc.say}" in sink context (line 1)␤Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/9m6YcSlfXT:1␤␤»
ilmari ("a".."z").map: { .uc.say }
m: ("a".."z").map: { .uc.say }
camelia rakudo-moar 7f6389: 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␤»
mrf ilmari++
moritz++ 14:48
14:48 pierre-vigier left
mrf m: ("a".."z")>>.map: {.uc.say}; 14:48
camelia ( no output )
mrf goes and experiments in a repl and stops spamming people 14:49
lizmat m: "a".."z" .map: {.uc.say}; # note whitespace after "z"
camelia rakudo-moar 7f6389: OUTPUT«WARNINGS:␤Useless use of ".." in expression "\"a\"..\"z\" ." in sink context (line 1)␤Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/XImhs3zb9M:1␤␤»
lizmat huh?
m: 1..10 .map: {.uc.say}; # note whitespace after "z"
camelia rakudo-moar 7f6389: OUTPUT«WARNINGS:␤Useless use of ".." in expression "1..10 ." in sink context (line 1)␤Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/kPnZNo3PEH:1␤␤»
lizmat weird
14:50 pierre-vigier joined 14:53 pierre-vigier left 14:54 pierre-vigier joined
TimToady .. is still looser 14:54
yoleaux 09:19Z <masak> TimToady: 007 passes all tests on thunkyreduce.
TimToady .. does not have the same precedence as ^ 14:55
14:55 pierre-vigier left
TimToady so you still need parens there 14:55
lizmat m: ^10 .map: {.uc.say}; # aaahhh 15:00
camelia rakudo-moar e0c759: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
ilmari m: ^"z".map: { .uc.say };
camelia rakudo-moar e0c759: OUTPUT«WARNINGS:␤Useless use of "^" in expression "^\"z\".map: { .uc.say }" in sink context (line 1)␤Z␤»
ilmari m: ^"z" .map: { .uc.say };
camelia rakudo-moar e0c759: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5z' (indicated by ⏏)␤ in block <unit> at /tmp/GqEHUjhodd:1␤␤Actually thrown at:␤ in block <unit> at /tmp/GqEHUjhodd:1␤␤»
15:02 lucasb left
TimToady please don't anyone make that dwim an "a" there 15:04
15:07 hankache joined
moritz but don't all alphabets start with "a"? :-) 15:07
TimToady yeah, and end with 'y' 15:08
Juerd TimToady: Is DateTime "the only means of constructing arbitrary Instants", like roast/S32-temporal/DateTime-Instant-Duration.t says, or is Instant.new(123) also a way to do that? 15:09
hankache m: say ا..ي;
camelia rakudo-moar e0c759: OUTPUT«5===SORRY!5=== Error while compiling /tmp/togKRq71mh␤Undeclared routines:␤ ا used at line 1␤ ي used at line 1␤␤»
hankache m: say |(ا...ي); 15:10
camelia rakudo-moar e0c759: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eiF7kUtB7a␤Undeclared routines:␤ ا used at line 1␤ ي used at line 1␤␤»
hankache :(
Juerd m: say "ا".."ي"
camelia rakudo-moar e0c759: OUTPUT«"ا".."ي"␤»
Juerd m: say ("ا".."ي")[14] 15:11
dalek kudo/nom: a1bed15 | TimToady++ | src/ (5 files):
Revert "Revert "get reductions thunking for left/list assoc""

This reverts commit c5f81ae6086a5b1aa80d47f3251d495a1c02fea0.
camelia rakudo-moar e0c759: OUTPUT«ص␤»
dalek kudo/nom: 6516930 | TimToady++ | src/ (3 files):
redo reduce thunking, ignoring slip args now
kudo/nom: ee0933a | TimToady++ | src/core/Signature.pm:
Merge branch 'nom' into thunkyreduce
kudo/nom: 4a4ae62 | TimToady++ | src/Perl6/Actions.nqp:
allow thunking reduced list infixes too
kudo/nom: 7df9978 | TimToady++ | src/core/ (4 files):
Merge branch 'nom' into thunkyreduce
ast: d486092 | TimToady++ | S03-metaops/reduce.t:
unfudge thunkyreduce tests
Juerd hankache: You still have to quote strings :)
15:12 andreoss joined
TimToady there should be no epoch on Instant 15:12
Juerd TimToady: I don't understand what that means, and if that means that the current implementation is wrong
hankache m: say |("ا".."ي");
camelia rakudo-moar e0c759: OUTPUT«ابةتثجحخدذرزسشصضطظعغػؼؽؾؿـفقكلمنهوىي␤»
TimToady Instant.new(123) is bogus
hankache Juerd++ 15:13
mst TimToady: error: attempt to cross same river twice?
Juerd m: Instant.new(1449755609).DateTime.say
camelia rakudo-moar e0c759: OUTPUT«2015-12-10T13:52:53Z␤»
Juerd Should be disallowed?
TimToady yes
1970 is not special to Instants 15:14
Juerd Since it's currently supported, deprecate or just remove?
15:14 AlexDaniel joined
RabidGravy "Invalid dependencies table index encountered (index 272)" - this gets more fun all the time 15:15
AlexDaniel bleh, spam in RT :(
TimToady given it's very contrary to spec, I'm inclined to rip it out and see who screams :)
ilmari m: Instant.from-posix(1449755609).DateTime.say
camelia rakudo-moar e0c759: OUTPUT«2015-12-10T13:53:29Z␤»
Juerd That leaves .from-posix, indeed. So is that one wrong too?
ilmari m: now.to-posix.say 15:16
camelia rakudo-moar e0c759: OUTPUT«(1449760573.968504 False)␤»
Juerd False?
andreoss can rakudobrew do not use current installation dir of rakudo as working directory? anytime rakudobrew build is started the current perl6 installation becomes unusable (missing files)? 15:17
TimToady that one is okay, since posix has an epoch
[Coke] waves.
Juerd TimToady: Okay, will remove the false comment then :)
TimToady the spec currently says "A small number of C<Instant> values that represent common epoch instant values are also available." which I don't think is true, but could be 15:19
so we could have Instant1970 for instance
[Coke] pmichauds, "that's not the spec"
TimToady spec is short for speculation :P 15:20
[Coke] waves his hand like ob-wan
*obi-wan
AlexDaniel By the way. Often people submit pull requests and merge them immediately, why? Is there any reason to do so? Why not commit directly?
mst 'immediately' can include time for e.g. a travis run 15:21
[Coke] dunno - I could see value in not immediate.^H merging.
andreoss m: say |("\c[CYRILLIC CAPITAL LETTER A]" .. "\c[CYRILLIC CAPITAL LETTER TSHE]")
camelia rakudo-moar e0c759: OUTPUT«␤»
ShimmerFairy still disagrees with the idea that roast is ~the~ spec; it's really a poor choice of format for human implementors to read :)
ilmari Juerd: the second value in .to-posix indicates whether we're currently in a leap second (since posix seconds don't include them) 15:22
TimToady ShimmerFairy: au contraire, it forces those stupid humans to be precise
AlexDaniel mst: so it's just to see if tests are passing? Why not run them yourself?
Juerd TimToady: Since Instant is epoch based in practice, should the documentation mention that although it may be implemented as epoch based, this aspect must not be depended upon? Currently it says "It is not tied to or aware of any epoch." 15:23
ShimmerFairy TimToady: the way I see it, 'roast' is The Spec for Compilers, 'spec' is The Spec for Humans :) (like how that Creative Commons thing does the overview/legalese/metadata thing)
15:23 hankache left
TimToady maybe we should pick a random epoch when we start up :) 15:23
mst AlexDaniel: on a dozen different operating systems? 15:24
AlexDaniel: even setting up the VMs for that is hardly 'just'
Juerd ilmari: Wow, that seems like a rather useless feature to require [0] everywhere :(
TimToady
.oO(Highlander Specs)
ilmari mst: I thought travis was just ubuntu and osx(?)
AlexDaniel mst: mm okay
ilmari AlexDaniel: it tests a bunch of different configurations in parallell 15:25
mst ilmari: I'm handwaving here
ilmari github.com/rakudo/rakudo/blob/nom/...is.yml#L26
mst the obvious insanity of the question didn't require a detailed answer
zengargoyle andreoss: rakudobrew tracks installations by a backend-tag name, if you build moar-nom it will overwrite old moar-nom. but you could build moar-2015.11 and moar-nom and then switch between them. 15:26
Juerd TimToady: Will you block Instant.new or would you like me to submit a PR for it?
mst honestly, anybody who thinks more testing is ever 'just' may be missing how much sofwtare hates us all ;)
zengargoyle or before rebuilding, move .rakudobrew/moar-nom to .rakudobrew/moar-old and then switch between moar-old and moar-nom.
lizmat [Coke] AlexDaniel : I usually wait until Travis is finished 15:27
AlexDaniel mst: hm, what about commiting it to another branch and then merging it?
15:28 mspo left
mst AlexDaniel: is basically all a PR is 15:28
ShimmerFairy TimToady: I'd actually be interested in seeing the Synopses cleaned up sometime, so that it's a more accurate, up-to-date guide to what is apparently the real spec? (maybe someday I'll actually get to that idea...)
mst AlexDaniel: I'm really not sure what problem you're seeing here
TimToady Juerd: feel free, but note that the internals are using .new where they should be using .from-posix
AlexDaniel yeah, except that it does not create unnecessary pull request
mst unnecessary according to whom?
Juerd TimToady: Seems like a fun thing to kill then :)
mst everybody else seems to be fine with this workflow 15:29
AlexDaniel mst: I have no problem, I'm just trying to figure out what would be the right way to do stuff
TimToady ShimmerFairy: sure, but we intentionally sacrificed that to get to xmas
ShimmerFairy AlexDaniel: if you're thinking of rakudo in particular, you have to fill out a CLA with the TPF, so I imagine it gets a lot of pull requests from people who don't find it worth the time.
mst really. then calling other people's workflow unnnecessary is not a good way to figure that out
AlexDaniel ShimmerFairy: sure, I understand that
mst maybe you could try again without the contempt for people who work differently to you?
AlexDaniel mst: sorry if it sounded like that
ShimmerFairy TimToady: I don't blame that at all. It's just my suspicion that I would not have learned P6 as well if I had to sift through a bunch of test files as "the specification" :P 15:30
15:30 khw joined
mst AlexDaniel: I suspect part of it is that PRs are announced here, so people can see them go past as well as the individual commits 15:30
and part of it is that if something does go wrong you now have the PR there to re-use later
and part of it may just be that people who've been doing github-centric workflows for a while are used to that being the correct way to work
AlexDaniel mst: Okay! Thanks 15:31
mst but, really, so long as it's working out, I've given up on 'correct' or 'necessary' about workflows
I'm basically convinced that the correct workflow is "whatever the team involved have found works for them"
moritz and that depends a lot on the people, the project, and the tooling 15:32
andreoss zengargoyle: i want old moar-nom to keep working until the build of new one is done 15:33
is it possible?
moritz andreoss: camelia uses a setup that allows this
andreoss: with two separate build directories, and a symlink that's switched over when the build is successful
andreoss what's camelia? 15:34
zengargoyle andreoss: i'd try...: mv .rakudobrew/moar-nom ./rakudobrew/moar-old; rakudobrew switch moar-old; rakudobrew build moar; rakudobrew switch moar-nom;
moritz m: say "Hi, I'm a bot that runs Perl 6 code"
camelia rakudo-moar 7df997: OUTPUT«Hi, I'm a bot that runs Perl 6 code␤»
moritz andreoss: ^^
andreoss oh. i thought it could be some alternative build script for rakudo
zengargoyle andreoss: nevermind, won't work. :( 15:35
too many hard-coded non-relative paths floating about.. /opt/rakudobrew/bin/../moar-old/install/bin/perl6: 2: exec: /opt/rakudobrew/moar-nom/install/bin/moar: not found 15:37
MadcapJake how would I wrap this with NativeCall: int (*atexit_ptr)(void (*)(void))
zengargoyle guess you'd have to go with building a specific commit sha1 instead of building a tag 15:38
[Coke] PRs are not automatically announced here, btw. 15:40
15:41 tadzik is now known as me, me is now known as tadzik
diakopter [Coke]: seems like a sensible thing to add 15:41
zengargoyle really dislikes installations that aren't relocatable. 15:42
15:42 Ven left
tadzik heh, I wrote a Perl 5 module, but it's so much of a bother to publish it on CPAN compared to with our ecosystem :) 15:42
diakopter [Coke]: [for someone to add], I mean
tadzik: github-backed++ 15:43
retupmoca MadcapJake: I'm not sure if there are newer docs somewhere, but see github.com/jnthn/zavolaj#function-arguments
andreoss zengargoyle: i see no obvious way to change working directory, seems the code relies on the fact that building directory and instalation directory are the same
tadzik diakopter: well, I mostly mean firing up dzilla, adding all the files, building, talking to pause, yada yada
the actual pushing the archive to a place is not that bad
yes, I know dzilla does it for me
MadcapJake retupmoca: yeah I see that but I can't figure out how to properly capture the void --> void function argument to the function argument &atexit_ptr 15:44
andreoss also I've realized that rakudobrew written in perl 5
diakopter tadzik: but what happens when someone else publishes one with the same name? with an "earlier" version number, or gah, "later", or gah, "same"
MadcapJake you can't use void bare, and those aren't void pointers
andreoss is there any perl6 clones?
tadzik yeah, there's a bit of a bootstrapping problem with writing it in perl 6 :)
diakopter: I don't even wanna know
zengargoyle heh, yeah, let's make all of those wrapper script redirections include a perl6 startup delay. :P 15:45
tadzik I think they're in bash :P
but having to build your very first perl 6 compiler with a perl 6 program may prove a bit tricky
mst tadzik: Dist::Zilla is the super-complicated fine control tool 15:46
tadzik: if you want easy, you're using something designed for the opposite, and it's unfair to complain that the thing designed for maximum manipulexity isn't completely trivial
tadzik mst: oh, but it's still relatively hassle-free compared to the alternatives, innit?
mst tadzik: no
tadzik heck, I remember teaching it on a Perl course once, didn't take that much time
mst tadzik: it's the most complicated choice
tadzik mst: what would you go with instead? 15:47
nine Oh how I hate file locking issues
mst tadzik: shadow.cat/blog/matt-s-trout/mstpan-11/
*I* just use Distar, which is a tiny EUMM wrapper, but that requires you to actually like Makefiles and not mind understanding the MakeMaker internals 15:48
however there are four suggestions on that mstpan entry
dzil is the complicated one, the other three are various forms of simpler
_nadim moritz: did you see the link I send about the code that generted the exception we talked about earlier this morning?
tadzik mst: ooh, that looks useful. Thanks 15:49
zengargoyle might not be a bad idea to have a rakudobrew option that builds latest and tags it like: moar-YYMMDDHHMMSS
andreoss mst: what's the point of these distro builders if I can a full mirror of CPAN in minutes?
mst andreoss: what? 15:50
how are those things even related?
andreoss may be not, never used those
tadzik zengargoyle: I worry that people will default to using it and then wonder why is .rakudobrew taking 99% of their disk space
masak .oO( what's the point of these pots and pans if I can be at a restaurant in minutes? )
tadzik masak: yeah, I still don't know :D 15:51
mst andreoss: these are tools for taking a repository and producing and uploading a release tarball
masak tadzik: remind me to show you sometime :P
mst andreoss: a full mirror of CPAN is only helpful if the tarball you want is already on CPAN. this is how it gets there :)
zengargoyle tadzik: i don't have much pity for folks using a timestamp every new build option and then getting irate. :) 15:54
think they'd also have to remember to do the rakudobrew switch part as well.
tadzik zengargoyle: well, if they specify the timestamps themselves, no :)
but if they have an option like 'rakudobrew build latest' which creates a new thing each time, they're bound to be confused 15:55
(when their disks fill up :P)
mst I think you'd need auto-expiry
I'd been thinking about this for Object::Remote
basically "sha1 the bootstrap back and drop it into a dotdir, re-use that if present" 15:56
15:57 rindolf joined 15:58 molaf joined
andreoss I've read Dist::Zilla description, and it's purpose still obscure for me 15:59
hope a need for such tools is gone is Perl 6
zengargoyle tadzik: that could probably be covered with a reminder after the build, give a list of the timestamped builds, say you have to do the switch to the new one, recomment nuking some old ones.
andreoss *in
rjbs There's no need for such tools at all, they're just automation of things you can do without them. By that measure, they'll be around forever. 16:00
yoleaux 1 Dec 2015 10:56Z <brrt> rjbs: i'm trying to get a solaris/illumos vm running, so far without success, because smartos etc. expect weird things from me, like a dns search host, and i have no idea what that all means
mst andreoss: Dist::Zilla is, by and large, for people who already know why it's useful to them 16:01
tadzik zengargoyle: or before the build, like "you already built 17 of these, do you need help cleaning it up?" :)
mst hence my recommending tadzik tried one of the simpler but less configurable ones
rjbs The purpose of Dist::Zilla is to automate the boring parts of building and releasing a CPAN distribution, so that most of the coder's work is writing the code, tests, and documentation.
dj_goku .messages 16:02
hi
moritz \o 16:03
tadzik o/ 16:05
16:05 marchelzo joined
gfldex is the threadpool global or does it apply a pool to each start? 16:07
moritz it's per OS process, afaict 16:08
dunno how it's on the JVM
gfldex per process is what i ment with global 16:09
Juerd Why is $!tai in Instant a Rat, not a Num?
andreoss gfldex: i guess you can localize $*SCHEDULER and have several threadpools 16:10
16:13 ZoffixW joined
TimToady Juerd: see S02:1447 16:13
lucs I'm really tempted to use dashes instead of underscores in my identifiers now. 16:14
Juerd TimToady: Thanks :)
lucs Any positive or negative experiences to share regarding that?
Juerd Also, changing this is proving to be harder than I thought, especially because apparently errors in core don't get file names or line numbers :( 16:15
ZoffixW Wanna play a game? Take a large chunk of code and stick this string into it: "$u<plural"
16:15 Ven joined
lizmat TimToady: isn't S02:1436 a fossil now? "LoL Arguments in a semicolon list" 16:15
El_Che got a pointy head from grammars
ZoffixW I was getting an error like 100 lines below that line that a variable was undefined lol. Only when I started commenting out all the new lines I added did I notice the missing ">"
dj_goku lucs: I would like that option in python. I am for it, but more a preference than anything.
lizmat El_Che: with great power comes great responsibility :-) 16:16
lucs dj_goku: They're marginally easier to type, and readability appears about the same, eh.
El_Che It looks so simple, but I feel I am doing the cargo cult thing and the cargo are explosives 16:17
:)
dj_goku lucs: right. so why not. :D
16:17 havenn joined, havenn left, havenn joined
lucs dj_goku: Right :) 16:17
16:17 Actualeyes left, emdashcomma_ left
El_Che DrForr: I count on your rewrite of the doc :) 16:17
16:18 telex joined, andreoss left
dj_goku I need to learn about grammars, because I think it could be useful for something I am writing. But not sure if a grammar is the right thing to describe it. 16:18
16:18 havenn is now known as havenwood
TimToady lizmat: yes, specs are full of fossils at the moment 16:18
lizmat cleanup post 6.c I guess :-) 16:19
El_Che how to create an infinite loop for dummies: method TOP($/) { $/.make: $/ }
:)
lucs What is "6.c" exactly?
16:19 emdashcomma joined
dj_goku Christmas I presume. 16:19
El_Che alfa, beta, california :)
dj_goku m: say Date.new() 16:20
camelia rakudo-moar 7df997: OUTPUT«2015-12-24␤»
dj_goku m: say Date.new
camelia rakudo-moar 7df997: OUTPUT«2015-12-24␤»
marchelzo El_Che: wouldn't it have to be "$./make: $./.made" to be an infinite loop?
JimmyZ so 03 Dec 2015 PHP 7.0.0 Released, and now Perl 6 :P
Juerd Hm, I thought that was deprecated? (Date.new returning non-today)
marchelzo oops $/.made
16:20 Actualeyes joined
marchelzo ignore all of those typos 16:21
lizmat moritz: re Date.new, did you intend the DEPRECATED message to appear now? or with 2015.12 ?
El_Che marchelzo: my example get 1 core at 100%
marchelzo hmm. then I don't understand grammar actions as well as I thought I did 16:22
16:22 ZoffixW left
diakopter tadzik: actually you could make it one step more meta 16:25
well, automated anyway
16:28 psy joined
diakopter tadzik: (reading your advent post) 16:29
16:29 psy left, Ven left
dalek ast: 9767181 | TimToady++ | S03-metaops/reduce.t:
put in promised test for [&&] |0
16:29
ast: 61eb3e6 | TimToady++ | S03-metaops/reverse.t:
unfudge passing test
ast: 498e542 | TimToady++ | S03-metaops/ (2 files):
tests for thunking X and Z lists
16:29 psy joined
tadzik diakopter: oh? 16:30
stmuk revises LPW perl6 talk slides in a state of impending panic 16:35
16:35 moei joined
lizmat stmuk: know the feeling 16:35
diakopter tadzik: well for instance here's a ton of grammars in antlr format: github.com/antlr/grammars-v4 that you could make a parser generator generator for
dalek ast: 9c76381 | TimToady++ | S03-metaops/ (2 files):
also test non-thunking of non-list on X and Z

Otherwise someone might be tempted to implemente it accidentally.
16:36
tadzik diakopter: I think someone did that 16:37
diakopter like, here's the Csharp one github.com/antlr/grammars-v4/blob/...CSharp4.g4
tadzik: oh?
tadzik github.com/drforr/perl6-ANTLR4
yep, that'd be DrForr++
diakopter gah
.oO( surely I read about it months ago.. but I can't seem to recall it at all.. )
16:39
hm, maybe I saw it in the modules list
subconscious 16:40
well, Perl 6 is holding steady at 1 module/day on modulecounts.com
come on, people, we need 10,000/month to match Node! 16:42
TimToady we'll try to work harder :)
nine will miss the excuse that Perl 6 isn't even stable yet 16:43
Skarsnik zengargoyle, I was just running the test for sqlite, why?
TimToady well, it might still be unstable in the other sense, but I hope not 16:44
in that vein, does anyone else regularly get a hang on t/spec/integration/advent2013-day14.t? 16:45
16:46 donaldh left
TimToady (under TEST_JOBS) 16:46
would be nice to have a signal to hit it with and make a stacktrace of where it's at
masak TimToady: couldn't the source code be changed to enable that? 16:47
TimToady and t/spec/S17-supply/throttle.t hangs about half the time for me 16:48
masak: yes, it could!
nine throttle.t hangs pretty much all the time here 16:49
16:50 zakharyas left
diakopter this line of Perl 6 code is scary: my LacunaCookbuk::Logic::Chairman::BuildGoal $arch .= new(building => LacunaCookbuk::Logic::Chairman::BuildingEnum::archaeology, level=>30); 16:50
TimToady and the 2 adverbs.t tests always fail, but not when run directly
diakopter what even is Logic::Chairman 16:51
timotimo who's making all this damn backlog? :P
16:51 abraxxa left
masak diakopter: I've been told it's isomorphic to Program::Chairman 16:52
TimToady timotimo: I was almost caught up till you said that!
Juerd m: say <1480211362058/1021>
camelia rakudo-moar 7df997: OUTPUT«===SORRY!===␤Cannot find method 'compile_time_value'␤»
Juerd ^ Is that a bug?
diakopter masak: is that the Hurry::Coward correspondence?
TimToady Juerd: yup
masak diakopter: I would say yes, but I don't have a constructive proof of it. 16:53
16:53 jkva left
Juerd TimToady: I made Instant.perl return its Rat.perl, and now the round-trip test fails because of this bug. Keep the test? Change the implementation? 16:53
(That is, it returns "Instant.from-posix({ $.to-posix().perl })") 16:54
16:55 psy left, psy_ joined
Skarsnik interesting perl6 -I stuff script.p6 -I optherstuff does not work (the second I is ignored) 16:56
diakopter well, I upgraded to Xcode 7.2; I suppose I should try the new clang on rakudo-moar
timotimo Skarsnik: um, that's totally obvious 16:59
diakopter timotimo: maybe p5 allows it?
timotimo Skarsnik: all parameters after the script name go to the scripts parameters
diakopter oh
nine diakopter: I'm sure it doesn't
Skarsnik oh yeah make sense x)
16:59 znpy left
ugexe wishes there was a -M that worked like a -e for using an anonymous module 17:00
timotimo interesting thought
17:01 lucasb joined
Skarsnik hm interesting travis-ci.org/perl6/DBIish/builds/96072086 17:01
17:01 kolikov left
TimToady Juerd: well, you can't round-trip fractions of a second through posix 17:02
Skarsnik 10 and 25 was failing with the same mistake. I added use DBIish::mysql in 10
Juerd TimToady: Test preexisted
m: now.to-posix[0].say 17:03
camelia rakudo-moar 7df997: OUTPUT«1449767032.010601␤»
ugexe something that would allow things like -M"augment class IO::Path { method mkdir(|) { $do-something-different };"
Juerd m: my @a = now.to-posix; Instant.from-posix(|@a).say' 17:04
camelia rakudo-moar 7df997: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eJ89tLHlIT␤Two terms in a row␤at /tmp/eJ89tLHlIT:1␤------> 3ow.to-posix; Instant.from-posix(|@a).say7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ …»
Juerd m: my @a = now.to-posix; Instant.from-posix(|@a).say 17:05
camelia rakudo-moar 7df997: OUTPUT«Instant:1449767136.298782␤»
Juerd It round-tripped before. Don't know if it was supposed to :)
17:05 |Sno| joined
Skarsnik How I get a file in his pevious state with git? 17:05
timotimo we should be able to support stuff like that with the new CURLI code (anonymous modules on the commandline)
other than that you can already write modules inside the -e, too
ugexe but you cant use that code from -e with a script 17:06
perl6 -e "augment blah blah { };" script.pl
TimToady Juerd: I think in only makes sense to test posix->instant->posix round-tripping, not the other way around 17:07
Juerd TimToady: Okay, will remove the test
17:08 [Sno] left
TimToady we don't want a spectest that fails every time the turkeys in charge of civil time install a leap second 17:09
'course, if *more* things failed when they do that, maybe they'd reconsider...
timotimo so, how do i spend my time 17:10
tests for .hyper and .race perhaps?
because they don't work well right now
TimToady sounds good
Skarsnik someone can try the current DBIish with adding use DBIish::mysql; on the t/10-mysql.t (after use DBIish)? 17:11
17:13 cdg joined 17:14 hankache joined 17:15 domidumont joined 17:16 Odud joined, domidumont left
Odud Hi folks - does anyone know if there are plans to make Windows .msi installer packages for Rakudo 2015.11? 17:17
Skarsnik Probably not, someone was working on trying to have it for msys2 17:18
17:19 lichtkind joined
Odud OK - I currently use the binaries for 2015.09 and wanted to be on the latest and greatest 17:19
Skarsnik Well, latest is kinda broken in some way x) 17:20
Odud presumably the official Christmas release will have .msi installers?
lichtkind does anyone know why words return strings but chars an int
Skarsnik m: say "il fait beau".words.WHAT;
camelia rakudo-moar 7df997: OUTPUT«(Seq)␤»
Skarsnik m: say "il fait beau".words.elems; 17:21
camelia rakudo-moar 7df997: OUTPUT«3␤»
Skarsnik probably what you want?
ugexe i think hes asking about the naming convention not being the same
17:21 znpy joined
ugexe at least im wondering about it now 17:22
Odud perhaps he thought it should return the count of words?
without having to use .elems 17:23
TimToady + is sufficient
ugexe now thats it been brought up i would intuiitively expect .chars and .words to both return the same thing (be it the count or the actual elements)
Skarsnik Odud, probably not, Christmas is not really a release "ready to use" it's more "The language is kinda fixed, you can play with it 'safetly'"
Odud Skarsnik, ok I will wait patiently - I don't want to try building fro the tar ball if I can avoid it 17:24
moritz lizmat: with 2015.12; dunno if that's a good choice
17:25 joeschmoe joined
Skarsnik ugexe, Oh yes, I can see that, chars was confusing for me actually, should it be .graphems? 17:25
moritz Skarsnik: we have .graphs 17:26
Juerd TimToady: Pull requests created for roast and rakudo, regarding Instant.new
lizmat: ^ PR also includes something that exercises Instant.DateTime 17:27
Skarsnik pff Pg tests y u work but Pg/mysql not (╯°□°)╯︵ ┻━┻
Does has $.Version = 0.01; have a special meaning? 17:29
TimToady m: my $x = 42; say "${x}s"
camelia rakudo-moar 7df997: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jLZOwv463_␤Unsupported use of ${x}; in Perl 6 please use {$x}␤at /tmp/jLZOwv463_:1␤------> 3my $x = 42; say "${x}7⏏5s"␤»
dalek c: 1244ecc | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Path.pod:
add lazy example for sub dir
17:30
c: b894ae7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Path.pod:
Merge pull request #236 from gfldex/master

add lazy example for sub dir
17:31 hankache left 17:32 hankache joined 17:33 Odud left
timotimo Skarsnik: it does not 17:33
hankache hello everyone 17:35
timotimo ohai 17:37
hankache hola timotimo 17:38
Skarsnik Well I will leave someone else to figure DBIish error x)
hankache m: say 1..9;
camelia rakudo-moar 7df997: OUTPUT«1..9␤»
hankache m: say 1...9; 17:39
camelia rakudo-moar 7df997: OUTPUT«(1 2 3 4 5 6 7 8 9)␤»
hankache what is the rationale behind the difference in those 2 ^^
?
timotimo well, the ... operator is specifically for creating lists of items
gfldex a Range is a thing with a lower and upper bound
Skarsnik :m 1..9.WHAT
m: say 1..9.WHAT
camelia rakudo-moar 7df997: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/6fbY4mfnax:1␤␤»
moritz m: say 4.5 ~~ (1..9) 17:40
camelia rakudo-moar 7df997: OUTPUT«True␤»
timotimo m: say 1, 4, 9 ... * > 100
camelia rakudo-moar 7df997: OUTPUT«Unable to deduce arithmetic or geometric sequence from 1,4,9 (or did you really mean '..'?)␤ in block <unit> at /tmp/AzoVXQThPH:1␤␤»
hankache I know ... is lazy list and .. is range constructor but why does oone flatten and the other not?
timotimo m: say 1, 4, 9, 16 ... * > 100
camelia rakudo-moar 7df997: OUTPUT«===SORRY!===␤Unable to deduce arithmetic or geometric sequence from 4,9,16 (or did you really mean '..'?)␤»
timotimo what are those sequences called again?
moritz hankache: because ranges are useful not only for iteration, but also for matching against
m: 1, 4, * ** 2 .. * > 100 17:41
camelia rakudo-moar 7df997: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 4 in sink context (line 1)␤»
moritz m: say 1, 4, * ** 2 .. * > 100
camelia rakudo-moar 7df997: OUTPUT«14WhateverCode.new␤»
moritz m: say 1, 4, * ** 2 ... * > 100
camelia rakudo-moar 7df997: OUTPUT«(1 4 16 256)␤»
moritz m: say 1, 2, * ** 2 ... * > 100
camelia rakudo-moar 7df997: OUTPUT«(1 2 4 16 256)␤»
gfldex there is an infinite amount of values between the upper and lower boundery of a Range. Bit tricky to serialise that.
hankache thank you 17:43
TimToady m: say (1..*)»²
grondilu that will definitely hang
camelia rakudo-moar 7df997: OUTPUT«(timeout)» 17:44
hankache TimToady: Camelia gave up :)
TimToady m: .say for (1..*)»²
grondilu that will also hang
TimToady I guess the hyper is eager
camelia rakudo-moar 7df997: OUTPUT«(timeout)»
17:44 ab6tract joined
grondilu yes it is, didn't you specced it such? 17:44
hankache just spoke to Camelia she's not getting back 17:45
gfldex IIRC >>. will randomise it's values to simulate out of order execution. Sort must be eager.
hankache Do we have a specific date for the release of 6.c? 17:46
Juerd m: ("a".."z")>>.say
camelia rakudo-moar 7df997: 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␤»
Juerd gfldex: Not randomised :(
gfldex it used to be 17:47
hankache: yes, in 7 days
hankache yahoooooo
gfldex don't bet on it :)
grondilu I'm not sure it randomizes. I thought it was supposed to do all in parallel yet still return in order.
hankache I am ready to troll everyone on the net 17:48
gfldex it's supposed to autothread, what may (likely) lead to out of order execution
ugexe i thought it used to forcefully randomize the values so in the future people would not expect it to happen in order
flussence m: say -0x00FF .fmt('%04X') # am I expecting too much from fmt here?
camelia rakudo-moar 7df997: OUTPUT«0-FF␤»
lichtkind thanks Skarsnik but yes i worried more about consistency
sure i can put +() around it 17:49
grondilu oh yeah *execution* is randomized, but the returned values must stay in order.
(I suppose)
it'd be pretty confusing if it was returning in a different order. 17:50
TimToady that's what .race is for
grondilu never used that
I guess I still have to read about it. It's in S03? 17:51
flussence «say sprintf("%04X", -0x00FF)» gives a slightly less helpful return value in perl5, so I'll just accept what rakudo's doing for now...
grondilu finds it in S02
TimToady m: .say for (1..100).race # still busted, seems 17:52
camelia ( no output )
TimToady m: .say for (1..100.grep: *.is-prime).race
camelia rakudo-moar 7df997: OUTPUT«Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/_WzQNflZrZ:1␤␤»
TimToady m: .say for ((1..100).grep: *.is-prime).race
camelia ( no output )
grondilu no prime in 1..100 :P? 17:53
TimToady no racey ones, anyway
grondilu m: say my @ = (^3).map({ sleep rand; $_ }).race 17:57
camelia rakudo-moar 7df997: OUTPUT«[]␤»
grondilu ^not sure this should work
17:57 vendethiel joined
flussence m: printf('%+#012x', -12345); # now I'm fairly convinced this is wrong 17:58
camelia rakudo-moar 7df997: OUTPUT«000000x-3039»
flussence as in, the <+ # 0 12 x> don't correspond at all to those parts of the output, and they should 17:59
grondilu bash gives me 0xffffffffffffcfc7
geekosaur yeh, that's more like what I would expect
flussence (now that I've noticed they're in that order, printf syntax just became a million times less cryptic to me...) 18:00
TimToady I think this is a reported bug, but not on xmas list due to the obvious fact that it's not a feature :) 18:01
18:02 marchelzo left
flussence I'm aware I'm trying to do weird and obscure stuff here, so I don't mind if it stays broken :) 18:02
TimToady yes, this is a variant of RT #123979 I think 18:03
gfldex for interested parties, parsing many .pod-files in parallel: gist.github.com/gfldex/d31705b4478c87eb3467 18:04
18:07 dakkar left 18:10 lucasb left, leont joined
RabidGravy Something very weird going on here, all this read_ref and other breakage in JSON::Infer was fixed by requiring HTTP::UserAgent as late as possible rather than "use HTTP::UserAgent" 18:11
something weird going on there
18:11 adhoc joined 18:12 xfix joined 18:24 kyclark joined, ab6tract left
dalek osystem: 49e9466 | (Zoffix Znet)++ | META.list:
Add Number::Denominate to ecosystem

Break up numbers into preset or arbitrary denominations: github.com/zoffixznet/perl6-Number-Denominate
18:27
kudo/nom: 67f9259 | (Stefan Seifert)++ | src/core/CompUnit/ (3 files):
Fix spurious file locking problems with precomp store

File locking is a mess. Because it's racy, we cannot rely on upgrading a shared lock to an exclusive lock, so we have to take an exclusive lock even for reading precomp files.
We also now only lock a file once and count how often we tried locking the same file, so we only unlock after the last locker set it free.
Lastly we re-check the existence of a precomp file after loading failed and we locked the store again for precompilation, because in between, someone else may have precompiled and we could only make matters worse if we precompile again.
nine It's impossible to feel my hate for file locking if you haven't tried using it yet...
flussence nine: I have, you're not alone :) 18:29
kyclark I'd like some help on translating some of my P5 idioms. I typically like to evaluate a given ARGV for string/file. What's the most idiomatic P6 way to do this. Python and Haskell have "if" as an expression not a statement so I can get a return value. I thought maybe "given" would give me this, but it doesn't. Any other pointers on my P6? lpaste.net/146871
flussence kyclark: why not use «multi MAIN($in where *.IO.e) {...}; multi MAIN($in) {...}»? 18:31
lucs kyclark: foo = bar ?? baz !! baq # Ternary conditional 18:32
dalek osystem: 9f347e3 | (Zoffix Znet)++ | META.list:
stmuk/p6-app-p6tags/master/META.info is now at stmuk/p6-app-p6tags/master/META6.json
18:33
kyclark lucs, the ternary works for this simple case, but what about something more involved?
lucs kyclark: The baz and baq can be as involved as you wish: foo = bar ?? do {...} !! do {...} 18:35
kyclark OK, that's nice. 18:36
lucs Be generous with newlines in code like that :)
RabidGravy kyclark, you can have a return value for given: 18:38
dalek rakudo/repository_registry: a5ced67 | (Stefan Seifert)++ | / (9 files):
rakudo/repository_registry: Rename CompUnitRepo to CompUnit::RepositoryRegistry
rakudo/repository_registry:
rakudo/repository_registry: Its job will be to manage the mapping of repository spec strings to
rakudo/repository_registry: repositories.
RabidGravy my $foo = do given Bool.pick { when True { "true" }; default { "false" }}; say $foo;
timotimo after having dinner, i may now actually be ready to tackle spec tests for .hyper and .race 18:39
RabidGravy m: my $foo = do given Bool.pick { when True { "true" }; default { "false" }}; say $foo;
camelia rakudo-moar 67f925: OUTPUT«Potential difficulties:␤ Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤ at /tmp/TGRwuoz51c:1␤ ------> 3my $foo = do given Bool.pick { when 7⏏5True { "true" }; default…»
18:39 dalek joined, ChanServ sets mode: +v dalek
RabidGravy or something like that 18:39
m: my $foo = do given <1 2>.pick { when 1 { "1" }; default { "2" }}; say $foo; 18:40
camelia rakudo-moar 67f925: OUTPUT«2␤»
lucs The ternary conditional factors out the assignment, and the given, the "do" also (so, better in this case). 18:41
18:41 hankache left
timotimo hm. it's just that S07 doesn't say much of anything about .hyper and .race yet 18:43
[Coke] lizmat, moritz: there should be no deprecated stuff in the christmas release, as a rule. 18:44
(re Christmas) 18:45
TimToady: (hang on advent) yes, for a week now
18:46 dwarring joined, hankache joined
[Coke] just found a hang on the jvm spectest suite also. bah. 18:46
kyclark What is "the thing" inside a "given"? $_, *
timotimo "context variable" 18:47
$_
18:50 joeschmoe left
hankache m: my $x = 1; say $x.WHERE; $x++; say $x.WHERE; 18:51
camelia rakudo-moar 67f925: OUTPUT«139669833703664␤139669833703704␤»
[Coke] (date for release) see docs/release* and the last announcement email. It'll be between next thursday and the 25th.
hankache how do you explain this ^^
[Coke] Probably the 25th for a) maximal testing time, and b) style.
hankache why incrementation changed the address of $x? 18:52
b2gills It's a new Int
18:54 WizJin joined
hankache indeed 18:54
i am trying to see if this is related to immutability 18:55
hankache still doesn't fully understand immutability/mutability
b2gills I think I would like the release announcement to have 「Brad Gilbert (b2gills)」 instead of 「Brad "b2gills" Gilbert」 18:56
18:56 znpy left, xinming joined
b2gills m: for $=1,$=2,$=3 { say ++$_ } 18:56
camelia rakudo-moar 67f925: OUTPUT«2␤3␤4␤»
b2gills m: for 1,2,3 { say ++$_ } 18:57
camelia rakudo-moar 67f925: OUTPUT«Cannot call prefix:<++>(Int); none of these signatures match:␤ (Mu:D $a is rw)␤ (Mu:U $a is rw)␤ (Int:D $a is rw)␤ (int $a is rw)␤ (Bool $a is rw)␤ (Num:D $a is rw)␤ (Num:U $a is rw)␤ (num $a is rw)␤ in block <uni…»
nine hankache: it makes sense once you dustinguish between the container ($x) and its content (the Int 1) 18:58
hankache nine I am reading doc.perl6.org/language/containers i think it might help
nine hankache: you cannot change the 1, but you can ffill $x with a different object
gfldex hankache: reading this years 2 advent calender entry might help too 18:59
that's a small might tho :) 19:00
hankache nine gfldex b2gills thanks
19:00 molaf left
[Coke] b2gills: done. 19:00
dalek kudo/nom: 6aa4bfa | coke++ | docs/announce/2015.12.md:
conform to b2gills name prefs.
19:01
retupmoca nine++ # file locking bits 19:02
nine: my panda bootstrap on windows is happy again!
flussence `panda smoke` still hangs in the same places, it seems :(
El_Che for who's interested, I sent a PR to add Documentation and tutorial to most-wanted: github.com/perl6/perl6-most-wanted/pull/10 19:05
19:06 luis` is now known as luis, lostinfog joined
dalek rl6-most-wanted: ea0de4d | (Claudio Ramirez)++ | / (3 files):
Add documentation and tutorials to most wanted
19:07
rl6-most-wanted: e7e0465 | (Wenzel P. P. Peppmeyer)++ | / (3 files):
Merge pull request #10 from nxadm/master

Add documentation and tutorials to most wanted
gfldex El_Che: there are quite a few bits in the docs that only show up in the search index 19:08
flussence the following modules appear to need simple one-word compilation/test fixes, if anyone wants to pick some LHF -- Acme::Meow, Druid, GGE, Lingua::EN::Numbers::Ordinal, Algorithm::Viterbi
El_Che gfldex: yeah, I haven been browsing the docs and making small changes when needed. 19:09
19:10 leont left
grondilu day 7 of the advent of code could be a nice show-case for S17. gist.github.com/grondilu/352d2b3d5b8566d9b9ad Me I don't understand S17 well enough so I could not write it but I'd love to see someone do it. 19:14
19:14 prammer joined
grondilu this remined me of VHDL btw. 19:15
dalek kudo/nom: 14b378f | lizmat++ | src/core/Temporal.pm:
Deprecate Date.new now!
19:16
grondilu (it'd be nice to have a VHDL slang/interpretor)
19:16 uruwi joined, st_iron joined
st_iron good afternoon my friends 19:16
grondilu hello 19:17
dalek kudo/nom: 561ed95 | (Juerd Waalboer)++ | src/core/I (2 files):
Forbid Instant.new

16:12 < TimToady> Instant.new(123) is bogus 16:14 < TimToady> 1970 is not special to Instants 16:15 < TimToady> given it's very contrary to spec, I'm inclined to rip it out and see who screams :)
19:18
kudo/nom: 8287aad | lizmat++ | src/core/I (2 files):
Merge pull request #630 from Juerd/nom

Forbid Instant.new
roast: af258c3 | (Juerd Waalboer)++ | S32-temporal/DateTime-Instant-Duration.t: 19:19
roast: Add round-tripping tests for Instant.DateTime
roast:
roast: And remove false statement about DateTime being the only means of
roast: creating an arbitrary Instant. There's also .from-posix().
19:19 dalek left, dalek joined, ChanServ sets mode: +v dalek
st_iron compiling moar again... 19:21
TimToady probably a good day for rainbows, and here I am making ~~ chain correctly...
vendethiel TimToady++ #rainbow-flavored perl 6 :P 19:23
uruwi Hey, I would have found it useful to have a method like squish on lists, but returning the counts as well
nine retupmoca: great! I have hoped that it would make things at least a bit more platform independent 19:24
19:26 espadrine left
vendethiel uruwi: +@foo - @foo.squish :P 19:28
I guess the first "+" is even optional
flussence wonders if the ecosystem repo should be versioned like roast, or at least not carry so many abandoned and broken modules in the main list... 19:29
Skarsnik ++ to remove stuff x) 19:30
How roas is versioned?
timotimo TimToady: do you think S07-hyperrace/ would be a good place to put some hyper/race related tests?
lizmat flussence: perhaps we need to implement a recommendation manager (S22:114) 19:31
flussence Skarsnik: IIRC after christmas it's going to have one subdirectory per version for 6.c, 6.d etc
19:31 psy_ left
uruwi vendethiel, no, that's not what I meant 19:32
I meant that <a b b c c c b a a>.bar() === (a => 1, b => 2, c => 3, b => 1, a => 2) 19:33
TimToady timotimo: why not?
vendethiel uruwi: bag? 19:34
m: say bag <a a a b b c>
camelia rakudo-moar 8287aa: OUTPUT«bag(a(3), c, b(2))␤»
ugexe loks like he wants a mix of bag and squish
vendethiel uh? 19:35
ah, indeed
"fold" :P
19:36 znpy joined
dalek kudo/repository_registry: 3fe70a9 | (Stefan Seifert)++ | / (13 files):
Replace language module loaders by CompUnit::Repositorys

We now have CompUnit::Repository::NQP and CompUnit::Repository::Perl5 for loading modules from these languages. By unifying module loaders to CompUnit::Repository based classes and a single $*REPO chain we may in the future have mixed language repositories.
19:36
Skarsnik ooohh 19:37
dalek ast/repository_registry: c52919d | (Stefan Seifert)++ | S (2 files):
CompUnitRepo is now CompUnit::RepositoryRegistry
19:39
ast/repository_registry: 4ef98f2 | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
method load is now provided by CompUnit::Repository
19:39 leont joined
timotimo TimToady: because i'm indecisive and procrastinatorily engaged right now 19:41
19:41 yqt joined 19:42 Actualeyes left, st_iron left
kyclark In P5 I would do "say join ' ', map { $base{$_} } qw[ A C G T];" to extract values from a hash. What's the P6 equivalent? 19:45
I've tried several ways but can't make "map" or the list happy.
mst err, in perl5 you'd write 19:46
lizmat kyclark: "%base<A C G T>"
19:46 Actualeyes joined, joeschmoe joined
joeschmoe m: my regex number { \d+ [ \. \d+ ]? }; say "32.51" ~~ &number; 19:46
camelia rakudo-moar 8287aa: OUTPUT«「32.51」␤»
mst say join ' ', @hash{qw[A C G T]};
which maps directly to the form lizmat just gave in perl6
lizmat mst: that would be %hash
RabidGravy not in Perl 5
mst lizmat: um. I said "in perl5 you'd write"
lizmat: so, no, it wouldn't 19:47
RabidGravy :)
lizmat yeah, sorry :-)
mst kyclark: so, yeah, do it right in perl5, and then use lizmat's translation of the right way to perl6
and all will be awesomer
also 20% cooler :D
joeschmoe m: my regex number { \d+ [ \. \d+ ]? }; say "15 + 4.5" ~~ / <number> \s* '+' \s* <number> /
camelia rakudo-moar 8287aa: OUTPUT«「15 + 4.5」␤ number => 「15」␤ number => 「4.5」␤»
lizmat kyclark: since you're joining by " ", you don't need to do that yourself, as the stringification of the slice out of the hash, will do that for you 19:48
kyclark say ~%count<A C T G>;
It relies on a lot of implied stuff. 19:49
E.g., is there an $OFS kind of thing at play?
lizmat $OFS ?? 19:50
RabidGravy output field separator
geekosaur they're speaking per;5 still although I think they meant $"
(or didn't because they don't know that much p5?)
basically, when perl5 expands an array in a string, it puts the value of $" between the elements 19:51
RabidGravy I don't think I have used that more than a couple of times in twenty years 19:52
moritz join exists
geekosaur actually uses it fairly often for debugging
moritz "explicit is better than implicit" # you can tell I've been doing some python lately 19:53
geekosaur {local($") = '><'; print STDERR (caller(0))[3], " <@_>\n";} 19:54
(sorry for polluting #perl6 with ugly p5 :p )
mst basically always uses join in perl5
since then I can see exactly what's happening
flussence kyclark: perl6 lists are hardcoded to stringify with a single \c[SPACE] between items (src/core/List.pm:581), if you need more control then just add «.join(' ')» on the end instead of «~» 19:55
moritz a say STDERR map "<$_>", ...; would be clearer, IMHO
flussence (also, I do what mst said)
I know it's all covered by spectests but... I just don't trust it sometimes :)
geekosaur mostly that's habit from $formerjob which was stuck for yeeeeears on perl5.8 :/
dalek kudo/repository_registry: 5a0cded | (Stefan Seifert)++ | src/ (2 files):
Make CompUnit objects available to higher level loading code

Perl6::World's self.do_pragma_or_load_module now has access to the CompUnit object instead of just the low level CompUnit::Handle.
19:56
19:58 n0tjack joined
hankache what is immutable in Perl 6? 19:58
values like 1 "hello" 19:59
lists, ranges?
Juerd hankache: It's hard to make a complete list.
flussence anything that's not explicitly mutable
hankache ok what is explicitly mutable? 20:00
moritz hankache: containers!
Skarsnik everything that not immutable
TimToady containers, natives
moritz arrays, hashes, scalars
20:00 vendethiel- joined, vendethiel left
moritz hankache: lists are immutable, but they can contain mutable elements like scalar containers 20:00
nine lizmat: if you have a couple of minutes, I'd appreciate your thoughts on the direction I'm taking with the repository_registry branch 20:01
hankache thanks everyone
ugexe glad to see repository registry mightmake it before xmas
nine Actually I'd appreciate everyone's thoughts ;) 20:04
hankache since arrays are mutable, why does .sort not mutate the array while .pop does?
TimToady because we are not Python
Skarsnik fix broken comp stuff so module can work again! 20:05
TimToady use .=sort for in-place
Skarsnik .sort return a sorted version but does not sort the array itself?
lizmat nine: I'm here
(now)
TimToady from P5 experience, sorting en passant is much more common than sorting in place
so the default is to return a new list, sorted 20:06
hankache TimToady yes indeed, but my question is what is the rationale behind it?
TimToady from P5 experience, sorting en passant is much more common than sorting in place
so that's what .sort should do by default 20:07
and .sort isn't just for arrays
m: say (1,3,2).sort 20:08
camelia rakudo-moar 8287aa: OUTPUT«(1 2 3)␤»
TimToady m: say (1,3,2).pop
camelia rakudo-moar 8287aa: OUTPUT«Cannot call 'pop' on an immutable 'List'␤ in block <unit> at /tmp/3gfUZ_GEH9:1␤␤»
TimToady and we are not Python :)
Skarsnik y no last? :(
El_Che TimToady: it could work as a tagline :) 20:09
TimToady why no last what?
nine TimToady: Python has .sort for in-place sorting and .sorted which returns a sorted list
TimToady yes, I know, and we don't need it because we have .=
obviously I'm not answering some implicit question here... 20:10
hankache actually it makes sense. If you want to sort in place use .=
El_Che (Just for the record, ruby went the sort and sort! way)
nine OMG
Skarsnik nine, what? .sorted for me mean "is this sorted?"
TimToady yes, ruby's ! is our .=
that's by design
El_Che that a second tagline
TimToady is on fire :) 20:11
hankache but if .sort did sort in place and you just wanted to return a sorted array without modifying the initial one that would be a bit of a workaround
El_Che I like the .= syntax (operator vs method) 20:12
vendethiel- TimToady: well, no, ours is clearly better: you can't cheat :P 20:15
timotimo so, the hyper tests currently fail. that means i fudge them to become Todo?
i haven't written roasty tests in so long, it feels like
20:16 ZoffixW joined
ZoffixW Done what I could: <flussence> the following modules appear to need simple one-word ... fixes 20:17
flussence m: sub bytes-until(Blob $_, &cond) { .subbuf(0..(.contents.first(&cond):k)) } # I had to write this thing today, any ideas on how to make it less ugly? :)
camelia ( no output )
flussence ooh, thanks. ZoffixW++
ZoffixW Druid and GGE seem to be bit-rotten beyond my skills tho :P
timotimo GGE for sure, yeah
i've given Druid a shred of attention again and again over the years
flussence
.oO( in hindsight, telling people that "fixing GGE" is lhf is kinda evil... :)
20:18
timotimo ugh
yeah
dalek kudo/nom: 06ed575 | lizmat++ | src/core/IO/ArgFiles.pm:
Remove IO::ArgFiles.nl
20:19
ZoffixW Brace yourselves!
.tell tadzik You have one PR waiting for a module fix: github.com/tadzik/perl6-Acme-Meow/pulls
.tell masak you have a few PRs for panda/module fixes: github.com/masak/druid/pulls github.com/masak/gge/pulls
.tell ShimmerFairy you've got a PR: github.com/ShimmerFairy/Lingua--EN...inal/pulls
.tell arnsholt you have some PRs waiting, some since March: github.com/arnsholt/Algorithm-Viterbi/pulls
yoleaux ZoffixW: I'll pass your message to tadzik.
ZoffixW: I'll pass your message to masak.
ZoffixW: I'll pass your message to ShimmerFairy.
ZoffixW: I'll pass your message to arnsholt.
TimToady so, why doesn't it recompile my Test when I change the setting? 20:20
timotimo there's also a file named "S07-iterators/range-iterators.t" that explodes because EMPTY used, RangeIter used. neither declared.
RabidGravy If anyones feeling bored they could look at why H::UA is occassionally causing bad byte code
20:21 ZoffixW left
Skarsnik still http::message? 20:21
tadzik Zoffix: thanks :) 20:22
yoleaux 20:19Z <ZoffixW> tadzik: You have one PR waiting for a module fix: github.com/tadzik/perl6-Acme-Meow/pulls
timotimo bad bytecode?!
bwuh?
Skarsnik Zoffix, Config::Simple worked btw? I use the same kind of stuff that DBIish 20:26
RabidGravy All the errors I have been baffled by in the last few days have been centred in H::UA 20:28
Skarsnik *pick a random piece of code* I blame use Encode; 20:32
ugexe RabidGravy: if you just need a hack for now try adding `no precompilation` to every file 20:35
joeschmoe m: 'www.washingtonpost.com/news/checkp...capture//' ~~ %..|.*url=http|&ei.*/
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y9LX2gAxYp␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/Y9LX2gAxYp:1␤------> 3efore-capture//' ~~ %..|.*url=http|&ei.*7⏏5/␤»
20:36 rindolf left
RabidGravy :) 20:36
flussence tries to use Term::ColorText for something then realises it's still broken...
joeschmoe Hello im trying to us this regex (%..|.*url=http|&ei.*) in a perl6 onliner to strip the google tracking and replace it with literal / charicter 20:40
Skarsnik m: 'www.washingtonpost.com/news/checkp...capture//' ~~ /%..|.*url=http|&ei.*/ 20:41
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a4t53j5hSQ␤Missing quantifier on the left argument of %␤at /tmp/a4t53j5hSQ:1␤------> 3-to-jason-bourne-before-capture//' ~~ /%7⏏5..|.*url=http|&ei.*/␤»
joeschmoe in pcre it looks like this %..|.*url=http|&ei.*/mgx
that link is a bad example 20:42
iv tested this one www.google.com/url?sa=t&rct=j&...0726,d.cGU
Skarsnik %.. is what? x)
joeschmoe % matches the character % literally 20:44
. matches any character (except newline)
then
. matches any character (except newline) again 20:45
Skarsnik m: '%AA' ~~ /\%..|.*url=http|&ei.*/
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/qQKutDBEO4:1␤------> 3'%AA' ~~ /\%..|.*url7⏏5=http|&ei.*/␤Unable to parse regex; couldn't find final '/'␤at /tmp/qQKutDBEO4:1␤------> 3'%AA…»
joeschmoe I use this cool sit regex101.com/ to test it 20:46
Skarsnik m: '%AA' ~~ /'%'..|.*url=http|&ei.*/
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/6OCHHZLtde:1␤------> 3'%AA' ~~ /'%'..|.*url7⏏5=http|&ei.*/␤Unable to parse regex; couldn't find final '/'␤at /tmp/6OCHHZLtde:1␤------> 3'%A…»
joeschmoe here is the explinations it give me %..|.*url=http|&ei.*/mgx 1st Alternative: %.. % matches the character % literally . matches any character (except newline) . matches any character (except newline) 2nd Alternative: .*url=http .* matches any character (except newline) Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy] url=http matches the characters url=http literally (case sens 20:47
Skarsnik I think pcre and perl6 are quit different
grondilu they are 20:48
joeschmoe I will have to do some work to translate it then. thanks
regex101.com/ is realy great for PCRE.
grondilu well you can use m:P5
joeschmoe thanks for the tip 20:49
grondilu m: '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/ 20:51
camelia ( no output )
grondilu m: say '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/
camelia rakudo-moar 06ed57: OUTPUT«「%AA」␤»
grondilu m: '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/; say $/.perl
camelia rakudo-moar 06ed57: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "\%AA", to => 3, from => 0)␤»
joeschmoe m:p5 -pe s/www.google.com/url?sa=t&rct=j&...mp;ei.*/mg 20:55
m:p5 -pe s/www.google.com/url?sa=t&rct=j&...p;ei.*/mg'
Skarsnik that does not call perl5 with camelia x) 20:56
RabidGravy that ain't going to work,
[Coke] multiple hangs in jvm test run today. Need to consider giving up the eval server so I can more easily call time on something that's hung. 20:57
hankache if you were to categorize things in Perl 6: scalars, arrays and hashes would be variables. What would you use for lists, ranges, Ints, Strings, etc.? 20:58
20:59 _nadim left
joeschmoe ill hack on it somemore thanks 20:59
RabidGravy of course by far the best way to do this would be 21:00
perl6 -MURI -e 'say URI.new("www.google.com/url?sa=t&rct=j&...t;url>'
Skarsnik oh it's how you use than?
RabidGravy, can you patch http::cookies to handle path/domain with URI? I wanted to do it, but I had no idea how to use uri x) 21:01
bartolin_ [Coke]: fwiw, I've seen those hangs as well (since today) 21:02
joeschmoe m: -MURI -e 'say URI.new("www.google.com/url?sa=t&rct=j&...t;url>'
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fPywa_knSQ␤Two terms in a row␤at /tmp/fPywa_knSQ:1␤------> 3-MURI -e7⏏5 'say URI.new("www.google.com/ur␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
21:03 _nadim joined
RabidGravy joeschmoe, that doesn't work 21:03
m: use URI
camelia rakudo-moar 06ed57: OUTPUT«===SORRY!===␤Could not find URI:ver<True>:auth<True>:api<True> in:␤ /home/camelia/.perl6/2015.11-473-g06ed575␤ /home/camelia/rakudo-m-inst-2/share/perl6/site␤ /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤ /home/camelia/rakudo-m-in…»
Skarsnik m-star: use URI; 21:04
r-star: use URI;
moritz star-m: use URI;
camelia ( no output )
Skarsnik I was close x)
moritz camelia: help
camelia moritz: Usage: <(nqp-js|star-j|rakudo-MOAR|niecza|nqp-parrot|rakudo-moar|p5-to-p6|debug-cat|pugs|nqp-jvm|nqp-moarvm|star-m|prof-m|std|rakudo-jvm|rPn|nPr|r-jvm|rj|rn|nrP|r-j|nqp|perl6|rakudo|Prn|star|n|nqp-m|nr|sm|nom|rnP|nqp-mvm|P|M|p56|Pnr|m|r|rm|sj|p6|nqp-q|r-m|nqp-p|nqp-j|j)(?^::\s(?!OUTPUT))
..$perl6_program>
RabidGravy so 21:05
kyclark How could I initialize a hash with key => 0 for a given set, e.g., my %count = map * => 0 <A C T G> (but that doesn't work obv)
RabidGravy star-m: use URI; say URI.new("www.google.com/url?sa=t&rct=j&...lt;url> 21:06
camelia star-m 2015.09: OUTPUT«Method 'query-form' not found for invocant of class 'URI'␤ in block <unit> at /tmp/pGFODLhfD3:1␤␤»
RabidGravy star-m: use URI; say URI.new("www.google.com/url?sa=t&rct=j&...lt;url>
camelia star-m 2015.09: OUTPUT«undiscoveredfeatures.com/elixir-tas...futures/␤»
RabidGravy boo
Skarsnik kyclark, probably with one of the hyperoperator Z=>? 21:07
hm should patch that for kebab case maybe?
joeschmoe Thats amazing
RabidGravy Skarsnik, it is kebabed in the github 21:08
Skarsnik star-m: say $*VERSION 21:09
camelia star-m 2015.09: OUTPUT«Dynamic variable $*VERSION not found␤ in block <unit> at /tmp/sIHTH1t4zM:1␤␤Actually thrown at:␤ in block <unit> at /tmp/sIHTH1t4zM:1␤␤»
Skarsnik It was too easy x)
2015.09 x)
joeschmoe RabidGravy: If you try to copy and paste a google link into instapaper it wont work unless you remove the google trackinging. So you realy helped me 21:10
21:10 kaare_ left, n0tjack left, geraud joined
hankache is there a way to name a block? 21:11
ugexe m: my %x = <A B C D> >>=>>> 0; say %x
camelia rakudo-moar 06ed57: OUTPUT«A => 0, B => 0, C => 0, D => 0␤»
Skarsnik m: MYBLOCK { say "Hello"}
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lx87xxdFbR␤Undeclared name:␤ MYBLOCK used at line 1. Did you mean 'Block'?␤␤»
hankache and by block I mean code surrounded by { }
Skarsnik m: MYBLOCK: { say "Hello"}
camelia rakudo-moar 06ed57: OUTPUT«Hello␤»
hankache thanks Skarsnik 21:12
RabidGravy that's a label rather than a name of the block
ugexe if you're trying to reference the block from inside the block itself, you can use &?BLOCK 21:13
21:13 n0tjack joined
hankache what i want to do is reference a variable declared with "our" 21:14
how can i do it?
Skarsnik := ?
21:15 TEttinger joined
RabidGravy m; module Foo { { our $foo = "bar"; }}; say $Foo::foo; 21:15
m: module Foo { { our $foo = "bar"; }}; say $Foo::foo; 21:16
camelia rakudo-moar 06ed57: OUTPUT«bar␤»
joeschmoe star-m: use URI; say URI.new("www.google.com/url?sa=t&rct=j&...lt;url>
camelia star-m 2015.09: OUTPUT«www.businessinsider.com/cia-predict...0-2015-7␤»
joeschmoe Thats soo cool!!!
21:16 uruwi left
joeschmoe what is URI cus i love it now 21:16
hankache joeschmoe we're glad you like Perl 6
RabidGravy the block there is not an additional package 21:17
masak joeschmoe: you can find it in this list: modules.perl6.org/
yoleaux 20:19Z <ZoffixW> masak: you have a few PRs for panda/module fixes: github.com/masak/druid/pulls github.com/masak/gge/pulls
joeschmoe So its a perl6 module
RabidGravy yeah
masak Zoffix: merged xx 4 -- thanks! 21:18
21:18 n0tjack left
joeschmoe my goodness i was going to do a lot of work that was already done 21:18
kyclark Given "my %foo = A => 1, B => 2;" I would like to do something like "say map { %foo{*} || 0 } <A C>" but that doesn't work
So guarding against a missing value in the hash
hankache RabidGravy yes but what if i do not want to create a module just a block? 21:19
RabidGravy then you don't need to worry at all 21:20
hankache how's that?
RabidGravy m: { our $foo = "bar"; }; say $foo;
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hY1f7KMGcO␤Variable '$foo' is not declared␤at /tmp/hY1f7KMGcO:1␤------> 3{ our $foo = "bar"; }; say 7⏏5$foo;␤»
RabidGravy m: { our $foo = "bar"; }; say $::foo; 21:21
Skarsnik it stay in the block
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q7sCPOvcCL␤Variable '$foo' is not declared␤at /tmp/q7sCPOvcCL:1␤------> 3{ our $foo = "bar"; }; say 7⏏5$::foo;␤»
b2gills kyclark: how about 「%foo<A C> >>//>> 0」
RabidGravy hah
Skarsnik I am pretty sure you can't use it oustide the block
that pretty weird actually
hankache there must be a way 21:22
or another declarator?
b2gills You would need it's full name, which it doesn't even have
Skarsnik the question is: why would you want to do that? x)
joeschmoe Rabidgravy: i get most of it but is the ".new:" part of URI that strips tracking
hankache Skarsnik: why not? ;) 21:23
joeschmoe or the .query_form<url>
kyclark OK, would appreciate any improvements to this code: lpaste.net/146871
joeschmoe Ravbidgravy: or the .query_form<url> part 21:24
RabidGravy er, it parses the URI, picks the bits out and you get the url from the query parameters
hankache joeschmoe query_form<url>
Skarsnik joeschmoe, ? the .new create a new URI object and .query_form must be hash of URI so you can access the key url x)
RabidGravy it's a hash of the query parameters 21:25
joeschmoe so the .query_form<url> is the part that make sure it matches . RFC 3986
hankache wonder what is RFC 3986 21:26
RabidGravy star-m: use URI; say URI.new("www.google.com/url?sa=t&rct=j&..._form.perl
camelia star-m 2015.09: OUTPUT«{:bvm("bv.87920726,d.cGU"), :cad("rja"), :cd("3"), :ei("jyz_VLuQCtKuogTX-oC4DQ"), :esrc("s"), :q(""), :rct("j"), :sa("t"), :source("web"), :uact("8"), :url("undiscoveredfeatures.com/elixir-tas...utures/"), :usg("AFQjCNFBXcYnknaDPt3Mjaxca6k8TxO…»
Skarsnik kyclark, replace split('') with comb? but it look good enought 21:27
joeschmoe www.google.com/url?sa=t&rct=j&...Jzr8b8WcZQ 21:28
woops
star-m: use URI; say URI.new("www.google.com/url?sa=t&rct=j&...lt;url>
camelia star-m 2015.09: OUTPUT«tools.ietf.org/html/rfc3986␤»
hankache block1: { our $var = 'Text'; say $var; } say $block1::var;
joeschmoe see thats why you need to strip all the google junk
hankache m: block1: { our $var = 'Text'; say $var; } say $block1::var; 21:29
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xfI_0k4jmW␤Strange text after block (missing semicolon or comma?)␤at /tmp/xfI_0k4jmW:1␤------> 3block1: { our $var = 'Text'; say $var; }7⏏5 say $block1::var;␤ expecting any of:␤ infix…»
hankache m: block1: { our $var = 'Text'; say $var; }; say $block1::var;
camelia rakudo-moar 06ed57: OUTPUT«Text␤(Any)␤»
hankache ^^
joeschmoe rfc 3986 is the standard Uniform Resource Identifier (URI): Generic Syntax "web links" 21:30
kyclark Skarsnik: thanks and tah!
21:30 kyclark left 21:31 ab6tract joined
Skarsnik Good night here x) 21:32
diakopter m: say &VAR
camelia rakudo-moar 06ed57: OUTPUT«sub VAR (Mu \x) { #`(Sub|80350208) ... }␤»
21:33 Skarsnik left
masak with precompilation, the 007 tests run in ~55 seconds :> 21:33
(~75 seconds cold) 21:34
lizmat m: say "🇬 🇧".subst(" ","")
camelia rakudo-moar 06ed57: OUTPUT«🇬🇧␤»
diakopter masak: I wonder.. if you precompile the spectest suite...
masak I don't remember what it used to be, but somewhere around 180 seconds, thereabouts
gfldex m: my %hash of Int is default(0); dd %hash<c>
camelia rakudo-moar 06ed57: OUTPUT«Int $var = 0␤»
gfldex he is gone already :(
diakopter dd? 21:35
lichtkind should be there also a perl.com article when p6 comes out
masak diakopter: it stands for "Dudley Dursley"
gfldex anyway, if you want to default to 0 you can have it default to 0
diakopter gfldex: can you have a default key? 21:36
masak: I'm not sure that's right
gfldex don't think so. Shaped hashes are not completely implemented.
masak diakopter: yeah, something feels off. I could be mixing it up with something else... 21:37
ugexe i thought it was Data Dump
21:39 joeschmoe left
colomon masak: it’s probably Daredevil 21:45
21:46 regreg left 21:47 nanis joined
RabidGravy :) 21:47
nanis Where can I find the source code for P6 IO::Spec? I am curious because I get `Method 'devnull' not found for invocant of class 'IO::Spec' 21:49
in block <unit> at t\spec\S32-io\io-spec-win.t:299` when building on Windows 10 using VS2013.
TEttinger diddly doodly
lizmat dd is the tiny data dumper, so tiny, we left off the tiny
src/core/IO/Spec.pm and src/core/IO/Spec/*.pm 21:50
nanis: ^^
21:51 n0tjack joined
nanis Thank you! 21:51
21:53 prammer left, hankache left 21:54 hankache joined, nanis left 21:55 n0tjack left, ab6tract left
lucs Given Foo.pm having "unit class Foo; class Bar { $whatever } ...", when in another file I do "use Foo", should Bar be available? 21:56
Zoffix I believe that will throw an error "can't have class after unit" 21:57
21:57 n0tjack joined
lucs It appears to compile correctly, but Bar.new fails. 21:57
Zoffix hm weird
Zoffix tries
lucs, seems the error message vanished 21:58
lucs, if you do it as class Foo {}; class Bar {}; then Bar.new works 21:59
lucs It makes sense, but Bar appears to be visible only from Foo.pm.
Zoffix Oh
Then maybe I'm thinking of something else not liking class/role/grammar after unit ; stuff
RabidGravy Foo::Bar
lucs RabidGravy: Oh, is that how it ends up? Cool.
Zoffix RabidGravy++ thanks 22:00
RabidGravy but not ideal mixing the styles
22:00 grondilu joined, AlexDaniel left
lizmat lucs: if you define a class B within another class A, it is only visibile in class A 22:01
lucs lizmat: Makes sense.
22:01 hankache left
lizmat unless you mark it "our" 22:02
m: class Foo { our class Bar { } }; say Foo::Bar.new
camelia rakudo-moar 06ed57: OUTPUT«Foo::Bar.new␤»
RabidGravy m: class A { class B {} }; A::B.new
camelia ( no output )
lucs Aha.
RabidGravy m: class A { my class B {} }; A::B.new
camelia rakudo-moar 06ed57: OUTPUT«Could not find symbol '&B'␤ in block <unit> at /tmp/vv2bIuBjcf:1␤␤Actually thrown at:␤ in block <unit> at /tmp/vv2bIuBjcf:1␤␤»
22:02 skids left
RabidGravy lizmat the other way round 22:02
lizmat hmmm... RabidGravy: not sure whether that isn't a bug ?
RabidGravy: the default is "my" 22:03
RabidGravy I've seen it documented
masak colomon: now I think I remember it was actually "dubic dentiliter"
RabidGravy as our
lizmat ah, indeed... yes
duh
lizmat--
RabidGravy :)
22:03 hankache joined
lucs RabidGravy, lizmat: Thanks all the same :) 22:03
lichtkind good night 22:05
Zoffix night
22:05 n0tjack left
RabidGravy I'd be stuffed it that was fixed as a bug as I have lots of code that does that 22:07
jdv79 as in taxidermy? 22:08
masak .oO( is this taxi bothering you? shall I remove it? )
hankache doc.perl6.org/language/containers#Binding 22:09
the lexpad entry for $x directly points to the Int 42. Which means that you cannot assign to it anymore:
but you can bind again!! 22:10
masak lizmat: you probably know this already, but -- the general rule is variables and subs are 'my' by default, and classes/roles/grammars are 'our' by default
22:10 lmmx joined
hankache m: my Int $var := 123; say $var; $var := 999; say $var; 22:10
camelia rakudo-moar 06ed57: OUTPUT«123␤999␤»
lizmat masak: I do know (again) :-) 22:11
gfldex the conatant stuff is the value, not the container
masak (and methods/rules are 'has' by default) ;) 22:12
RabidGravy my Int $v := 67; $v =9;
masak .oO( and radioactive slangs are hazmat by default )
RabidGravy m: my Int $v := 67; $v =9;
camelia rakudo-moar 06ed57: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/gCA6K3oyAd:1␤␤»
dalek kudo/nom: f457007 | TimToady++ | src/ (2 files):
allow ~~ to chain where practical

  (A regex or closure must be at the end of the chain, however.)
22:13
jdv79 anyone know if we'lll have, or can do now, immutble aggregate attrs? as in a ro pos or assoc attr?
Zoffix Is there a nicer way of writing $_ ~~ Int ?
or $_ ~~ List
22:14 n0tjack joined
Juerd Depends on what you think is nicer :) 22:14
Zoffix Like I can write $_ ~~ /foo/ as simply /foo/ 22:15
dalek ast: cf080c9 | TimToady++ | S0 (3 files):
tests for new ~~ chaining semantics

  (Note that $foo ~~ $bar no longer automatically topicalizes $bar if it happens
to contain a regex; you need $foo ~~ /$bar/ or a closure to get topicalization now.)
RabidGravy m: my @a; @a[0] := 1; @a[0] =99;
camelia rakudo-moar 06ed57: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/KeO4dqwVKM:1␤␤»
jdv79 when?
Juerd Zoffix: Oh, you don't like the $_ there. I had the same dilemma but solved it by giving my for an explicit variable
22:16 captain-adequate joined
gfldex m: given 10 { say so .&infix:<~~>(Int) } 22:16
camelia rakudo-moar 06ed57: OUTPUT«True␤»
gfldex no $_ anymore
i would not call that nicer tho
Zoffix m: my Str $x = '42'; given $x { when Str { say "TIS A STRING!" }; when Int { say "TISANINT!" } };
camelia rakudo-moar 06ed57: OUTPUT«TIS A STRING!␤»
jdv79 m: m: $_ = Array.new; say "woohoo" when Array
camelia rakudo-moar 06ed57: OUTPUT«woohoo␤»
jdv79 m: m: $_ = Array.new; say "woohoo" when Hash
camelia ( no output )
Zoffix m: my Int $x = '42'; given $x { when Str { say "TIS A STRING!" }; when Int { say "TISANINT!" } }; 22:17
camelia rakudo-moar 06ed57: OUTPUT«Type check failed in assignment to $x; expected Int but got Str␤ in block <unit> at /tmp/AhaPvAYewF:1␤␤»
22:17 lichtkind left
Zoffix m: my Int $x = 42; given $x { when Str { say "TIS A STRING!" }; when Int { say "TISANINT!" } }; 22:17
camelia rakudo-moar 06ed57: OUTPUT«TISANINT!␤»
Juerd TimToady: IMHO it's pretty annoying when /foo/ and a variable containing a regex don't behave the same way... I wonder why this was necessary.
Zoffix m: my Int $x = 42; given $x { when Str say "TIS A STRING!"; when Int say "TISANINT!" };
camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0pGwqMEkmQ␤Missing block␤at /tmp/0pGwqMEkmQ:1␤------> 3my Int $x = 42; given $x { when Str7⏏5 say "TIS A STRING!"; when Int say "TIS␤ expecting any of:␤ block or pointy block␤ …»
Zoffix :(
m: my Str $x = '42'; given $x { say "TIS A STRING!" if Str; }; 22:18
camelia ( no output )
Juerd Zoffix: .isa(Int)
Zoffix m: my Str $x = '42'; given $x { say "TIS A STRING!" when Str; };
camelia rakudo-moar 06ed57: OUTPUT«TIS A STRING!␤»
Zoffix :o
jdv79 what's what i said ^^ 22:19
Zoffix postfix when is nice
22:19 n0tjack left
Zoffix jdv79++ 22:19
gfldex m: for 1,'a' { .say when Str }
camelia rakudo-moar 06ed57: OUTPUT«a␤»
22:23 n0tjack joined
ugexe i dont use postfix when inside a given because it looks funny next to a default { } 22:25
jdv79 why can't panda install non-eco dists? 22:35
Zoffix Sure it can. 22:36
panda install .
RabidGravy I'm sure it would me fairly easy to do the same from a URI as well 22:38
jdv79 gist.github.com/anonymous/c87ad438a09a883ddccb
RabidGravy no META.info? 22:39
22:41 xfix left
Zoffix That's a weird error message tho. 22:41
jdv79 huh. it is missing a meta file
the error is wrong nontheless
RabidGravy I'm sure that could be fixed 22:42
jdv79 thanks 22:44
bugged
22:44 vendethiel- left 22:47 snarkyboojum left
lizmat good night, #perl6! 22:47
22:47 grondilu left
Zoffix MadcapJake, bruh 22:47
MadcapJake, oh, never mind me. You *did* notice description was spelled incorrectly 22:48
(sarcasm doesn't translate well over GitHub issues after you had a few brews :) )
RabidGravy I think the reason it does that is that it checks whether the argument can be used as a path to where a META.info can be found, if no META.info it tries to use it as a module name in the ecosystem
22:50 znpy left
jdv79 could we have a dist named .? 22:52
that would be f'ed up 22:53
22:53 snarkyboojum joined
RabidGravy yeah I think it needs to be a valid idebtifier 22:53
22:54 louis__ joined, louis__ left
RabidGravy probably could fix that up 22:54
I'll take a look in the morning 22:55
masak 'night, #perl6 22:56
jdv79 yeah, its time.
nite
22:56 znpy joined 22:57 zengargoyle left 22:59 zengargoyle joined
Zoffix If anyone cares, made me a little tool to generate spiffy Table of Contents for my docs from README.md: github.com/zoffixznet/github-toc-maker 23:06
Here's an example of the generated TOC: github.com/zoffixznet/perl6-Number...f-contents
23:07 grondilu joined 23:09 lmmx left
n0tjack hmm, brew rm rakudo-star ; brew install rakudo-star still installs 2015.09 23:17
I want 2015.11 so I can get shaped arrays which I need for a project
23:17 hankache left 23:20 Psyche^ joined
n0tjack maybe I'll just wait for 6.Christmas 23:27
RabidGravy is this windows? 23:28
geekosaur os x, homebrew
23:32 uruwi joined, leont left 23:33 znpy left
n0tjack correct, OSX, homebrew 23:34
23:34 znpy joined
n0tjack I'm trying to stay high level (i.e. a "user"), so I'd rather avoid rakudobrew or building from source in general 23:35
23:35 Psyche^ left 23:38 skids joined 23:39 cognominal joined 23:41 Psyche^ joined 23:52 lostinfog left 23:54 xjrK_ left, Psyche^ left 23:59 rurban left