Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 Zoffix joined #perl6
00:01 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 camelia rakudo-moar eb275d: ( no output )
00:01 Zoffix 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>;
00:01 camelia 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␤␤»
00:01 Zoffix Is that a bug?
00:01 Zoffix The only difference that I see is the failing version is an 'is export' sub inside a package
00:02 Zoffix 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␤»
00:02 Zoffix Hm.
00:02 Zoffix Seems to not like the any %Units.keys; thing
00:05 skids joined #perl6
00:08 khw joined #perl6
00:14 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␤␤»
00:14 Zoffix m: my $x = 42; say "{$x}s"
00:14 camelia rakudo-moar eb275d: OUTPUT«42s␤»
00:15 Zoffix .oO( probably something to add to 5to6-nutshell
00:15 Zoffix )
00:19 dalek rakudo-star-daily: a3316e2 | coke++ | log/ (2 files):
00:19 dalek rakudo-star-daily: today (automated commit)
00:19 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a3316e2546
00:25 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:27 dalek doc: ef45a6a | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
00:27 dalek doc: Variable next to text inclusion
00:27 dalek doc: review: https://github.com/perl6/doc/commit/ef45a6a98e
00:30 Psyche^_ joined #perl6
00:31 MadcapJake m: use nqp; my Mu $env := nqp::getenvhash();
00:31 camelia rakudo-moar eb275d: ( no output )
00:31 MadcapJake m: use nqp; my Mu $env := nqp::getenvhash(); say $env;
00:31 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:/…»
00:32 MadcapJake why does that work in camelia but not on my own machine :(
00:32 Zoffix works on my box too
00:32 jdv79 m: my %h; say !%h{"k"}:exists
00:32 camelia rakudo-moar eb275d: OUTPUT«Unexpected named parameter 'exists' passed␤  in block <unit> at /tmp/EVyujN9uP9:1␤␤»
00:33 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?
00:33 Zoffix jdv79, wasn't that stuff added to the docs today?
00:33 Zoffix m: my %h; say !(%h{"k"}:exists)
00:33 camelia rakudo-moar eb275d: OUTPUT«True␤»
00:33 Zoffix jdv79, https://github.com/perl6/doc/commit/606d556060824d60d4df869cd02edda1205f2519
00:34 Zoffix m: my %h; say not %h{"k"}:exists
00:34 camelia rakudo-moar eb275d: OUTPUT«True␤»
00:34 ugexe m: my %h; say %h{"k"}:!exists
00:34 camelia rakudo-moar eb275d: OUTPUT«True␤»
00:34 Zoffix ah
00:34 * MadcapJake loves that `put` splits hash pairs by newlines
00:34 jdv79 oh, unintuitive but ok
00:34 jdv79 i didn't know it was discussed recently.  just ran into it
00:35 dalek doc: fedd922 | (Zoffix Znet)++ | doc/Language/traps.pod:
00:35 dalek doc: Add another example ugexe++
00:35 dalek doc: review: https://github.com/perl6/doc/commit/fedd92283d
00:36 dalek roast: 2113310 | skids++ | S12-class/magical-vars.t:
00:36 dalek roast: Add test for RT#126754
00:36 dalek roast: review: https://github.com/perl6/roast/commit/2113310307
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
00:36 jdv79 ugexe++
00:37 MadcapJake Oh, I didn't realize that getenvhash was just a call to my machine's env.
00:52 MadcapJake Zoffix: I fixed that regex string bug and a couple others in the latest language-perl6fe patch
00:53 Zoffix MadcapJake++
00:58 dj_goku hi
00:58 pecastro_ joined #perl6
00:58 Zoffix \o
01:01 xjrK_ joined #perl6
01:07 xjrK_ http://pastebin.com/ZTuTmrXU -- can someone tell me why im getting "===SORRY!=== Could not find House in any of"?
01:08 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 #perl6
01:13 xjrK_ timotimo: cheers
01:14 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>…»
01:14 Zoffix m: my %h = foo => 1, bar => 0; %h{ %h.keys.grep( %h{*} == 0) }:delete; say %h
01:14 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␤␤»
01:14 Zoffix :/\
01:15 Zoffix How can I toss all keys whose values are zero ?
01:16 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␤»
01:16 Zoffix ah
01:16 Zoffix ShimmerFairy++
01:27 n0tjack joined #perl6
01:28 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 Zoffix s/30 lines/30 lines of perfectly readable/;
01:29 Zoffix Comparison isn't exactly apples to apples, but still...
01:29 timotimo surely you must be lying! after all, perl6 wants to be like the english language, an ambiguous thing with a backwards grammar!
01:33 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
01:33 timotimo anyway
01:33 timotimo off to bed i go!
01:33 timotimo gnite folks
01:33 Zoffix night
01:35 edehont joined #perl6
01:40 kaare_ joined #perl6
01:42 n0tjack joined #perl6
01:43 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:45 lustlife joined #perl6
01:45 Zoffix Does it matter? Both reference a single item, don't they?
01:46 ugexe well, i literally asked if it mattered
01:47 Zoffix sorry
01:50 flussence doesn't matter, cause afaik most stuff seems to ignore it anyway :/
02:02 snarkyboojum joined #perl6
02:09 khw joined #perl6
02:09 ChristopherBotto joined #perl6
02:15 km3 joined #perl6
02:15 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:27 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:35 skids m: sub foo($ (uint16 $)) { 42.say }; foo((1,))
02:35 camelia rakudo-moar eb275d: OUTPUT«42␤»
02:36 skids m: sub foo($ (uint16 $ where { .say })) { 42.say }; foo((3,))
02:36 camelia rakudo-moar eb275d: OUTPUT«3␤42␤»
02:38 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
02:39 flussence $?FILE.IO.dirname
02:39 lucs flussence: Aha, already better.
02:40 skids $*SPEC.catdir($*PROGRAM-NAME.IO.dirname, "foo") is what I've been using
02:40 lucs Yow!
02:41 lucs I like mine better, and flussence's even more :)
02:41 skids Well, you need the $*SPEC.catdir to choose the right slashes
02:42 lucs Really? Hmm...
02:45 skids Though I guess you don't need to catdor if you just want the dir.
02:45 zengargoyle doesn't Perl 6 magically treat /path/foo and \path\foo the same...
02:45 skids hrm good question
02:45 konobi maybe \\?UNC\:
02:45 * konobi ducks
02:45 lucs I'm not sure I understand the problem with the slash/backslashes.
02:45 skids m: "\\tmp\\foo.txt".IO.slurp.say
02:45 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…»
02:45 lucs If the expression evaluates to something with backslashes, I'd suppose that's what the environment it's in uses, no?
02:45 skids lucs: yeah, my solution is more if you need to find "the file named X in the same directory as the script"
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:47 lucs skids: Ah, rereading it carefully, I think I see now, yeah.
02:52 BenGoldberg joined #perl6
02:59 zengargoyle m: say $?FILE
02:59 camelia rakudo-moar eb275d: OUTPUT«/tmp/hKPj5xX1Yh␤»
02:59 zengargoyle m: say $?FILE.IO.parent.child('lib').path
02:59 camelia rakudo-moar eb275d: OUTPUT«/tmp/lib␤»
03:00 zengargoyle ^^ avoid $*SPEC and probably get things right.
03:01 skids zengargoyle++
03:01 zengargoyle now i wonder if 'use' will take an IO object and do the right thing...
03:02 zengargoyle nope. :)
03:04 dalek rakudo/nom: 978ee76 | TimToady++ | src/Perl6/Grammar.nqp:
03:04 dalek rakudo/nom: Un-disable ${x} P5ism warning inside strings
03:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/978ee7630e
03:07 Actualeyes joined #perl6
03:08 dalek roast: 1de7ffd | TimToady++ | S03-operators/context.t:
03:08 dalek roast: catch ${} P5isms in strings again
03:08 dalek roast: review: https://github.com/perl6/roast/commit/1de7ffd00b
03:17 ugexe fwiw "{$?FILE}/../lib" works on windows
03:19 snarkyboojum joined #perl6
03:21 MadcapJake are .pod6 and .t6 supported extensions?
03:22 psch supported by what?
03:23 psch afaik, the only thing that rakudo cares about is your modules having a pm or pm6 extension
03:23 MadcapJake perl6 tools/editors
03:24 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:26 MadcapJake there was some discussion of how to detect perl 6 pod files but it looks unresolved yet
03:31 psch that'd seem useful for e.g. github
03:31 psch although they probably work on a file ext basis
03:31 MadcapJake https://github.com/perl6/doc/issues/167
03:31 MadcapJake they do, but they also support using gitattributes
03:32 psch ah, that's neat
03:33 psch i suspect we'd still want .pod6 as best-practice (for e.g. vim) though
03:33 psch i don't know how feasible it is to decide between POD(5) and POD6 in the general case though
03:34 psch as in, i strongly suspect that similar to the underlying language there's an input string that can be parsed as either
03:34 psch s/an/at least one/
03:35 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 psch ('cause pod5 is still a superset of pod5, if not a strict one... :P )
03:36 MadcapJake lol xD; i mean pod6 is a superset of pod5, i botched that sentence
03:37 psch i don't know if pod6 is a superset of pod5, i know too little pod5 to make that call
03:38 psch 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
03:38 psch m: say :(:$a, *%) ~~ :(:$a, *%_)
03:38 camelia rakudo-moar 978ee7: OUTPUT«False␤»
03:38 psch that *should* be True
03:39 psch and it *was* True when i commited 62a029b44
03:39 psch but now it's False, even on 62a029b44
03:39 psch which is a bit spo0ky
03:39 psch *o
03:39 zengargoyle seeing «=over» or «=pod» or «=cut» is pretty much pod5
03:40 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 psch ...again, unless my knowledge of pod5 is too little :)
03:42 psch well, of course that doesn't mean heuristics are useless, it just means that they might break on minimal input vOv
03:42 psch i don't want to sound like too much of a downer here, sorry :S
03:42 zengargoyle =item# is pod6, any form of =code is pod6
03:43 zengargoyle really, i *think* the pod5 usage of =begin/=for is distinct enough from pod6 to tell the difference.
03:44 zengargoyle in pod5 those were for external processing type stuff. «=for html» like...  i don't think say «=for head1» is workable pod5
03:45 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.
03:45 psch MadcapJake: supporting .pod6 explicitly seems like a sensible start, yeah
03:46 MadcapJake ok cool, adding now
03:46 psch MadcapJake: and heuristics are mostly a github thing, afaict
03:46 psch well, at least i'm not aware of any editors guessing file type by content
03:46 psch ...probably because i'm not using emacs :P
03:46 MadcapJake atom supports it
03:47 MadcapJake psch: https://github.com/atom/language-perl/blob/master/grammars/perl.cson#L12
03:47 * zengargoyle settles for «=comment vim: ft=perl6» :P
03:48 MadcapJake language-shellscript has a much larger regex: https://github.com/atom/language-shellscript/blob/master/grammars/shell-unix-bash.cson#L23
03:48 MadcapJake but alas, you can only access the first line
03:48 psch that is slightly terrifying
03:48 psch it kind of reminds me of the www
03:49 psch oh
03:49 psch only the first line is a bit better, 'cause shebangs are pretty established vOv
03:50 * 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... )
03:51 psch 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 :( )
03:52 psch m: say (1|2) ~~ { say .isa(Int) } # ..?
03:52 camelia rakudo-moar 978ee7: OUTPUT«False␤True␤»
03:52 psch m: (1|2) ~~ { say .isa(Int) } # ..?
03:52 camelia rakudo-moar 978ee7: OUTPUT«False␤»
03:52 psch TimToady: can i get an opinion on that from you?
03:52 psch m: (1|2) ~~ -> Any $_ { say .isa(Int) } # vs. this one
03:52 camelia rakudo-moar 978ee7: OUTPUT«True␤True␤»
03:53 psch TimToady: as in, i'm wondering if Blocks with an implicit $_ as parameter constraining that $_ as Mu is correct
03:55 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 jdong joined #perl6
03:56 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 jdong joined #perl6
03:56 psch m: (1|2) ~~ { .WHAT.say }
03:56 camelia rakudo-moar 978ee7: OUTPUT«(Junction)␤»
03:56 psch m: (1|2) ~~ -> Any $_ { .WHAT.say }
03:56 camelia rakudo-moar 978ee7: OUTPUT«(Int)␤(Int)␤»
03:56 psch zengargoyle: ^^^ as seen there
03:56 zengargoyle ah
03:57 psch hrm, afk for a ~15 min or so
03:59 noganex_ joined #perl6
04:12 pierre-vigier joined #perl6
04:17 TimToady psch: blocks default to Mu parameters by spec, S02:1351
04:20 psch TimToady: alright, thanks.
04:20 psch it seems unintuitive to me, but i suspect there's been enough thought behind it to justify the decision :)
04:21 llfourn joined #perl6
04:22 dalek rakudo/nom: 2d337f1 | peschwa++ | src/core/Signature.pm:
04:22 dalek rakudo/nom: Fix slurpy hashes in Signature ACCEPTS.
04:22 dalek rakudo/nom:
04:22 dalek rakudo/nom: For some reason or other, the previous fix (62a029b44) worked when commited,
04:22 dalek rakudo/nom: but doesn't anymore. Constraining the RHS Block of the infix:<~~> to Any helps,
04:22 dalek rakudo/nom: and having to constrain it is specification-compliant.
04:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2d337f1848
04:23 psch s/unintuitive/counter-intuitive/ (fwiw)
04:24 psch 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
04:24 psch yeah, that's probably waterbedding again
04:25 psch putting a Block on the RHS of infix:<~~> probably doesn't happen as often as having a Junction somewhere in an iterating construct
04:25 psch ...with the LHS of the infix:<~~> being a Junction
04:26 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 TimToady you only notice when you use a very primitive construct like .WHAT
04:27 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
04:28 TimToady 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
04:29 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 TimToady it's starting to get into the realm of "do these patterns match each other", which is a world of hurt
04:31 molaf joined #perl6
04:31 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 :)
04:32 psch oh, yeah, i agree.  infix:<~~> is weird enough to want Mu for the LHS, and Blocks always autothreading is bad for iterations
04:34 CQ2 joined #perl6
04:34 lucs left #perl6
04:35 psch m: say :(:$a, *%_) ~~ :(:$a, *%_) # at least it does work now :P
04:35 camelia rakudo-moar 2d337f: OUTPUT«True␤»
04:36 TimToady m: say :(:$a, *%_) ~~ :(:$a, :$b, *%_)
04:36 camelia rakudo-moar 2d337f: OUTPUT«True␤»
04:37 TimToady m: say :(:$a, :$b, *%_) ~~ :(:$a, *%_)
04:37 camelia rakudo-moar 2d337f: OUTPUT«True␤»
04:37 TimToady seems like one or the other of those should be false
04:39 psch hm, yes
04:39 psch the first one, if i'm not misthinking this
04:40 psch that is a hard thing to nail down correctly, apparently :/
04:40 psch hm, actually
04:40 vendethiel joined #perl6
04:41 psch m: my \cap = \(:1a, :1b, :1c, :1d); sub f (:$a, :$b, *%_) { }; sub g (:$a, :$b, :$c, *%_) { }; f |cap; g |cap
04:41 camelia rakudo-moar 2d337f: ( no output )
04:42 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 psch right
04:42 psch which means the *second* one is wrong, 'cause the LHS needs :b, the RHS doesn't
04:44 psch sheesh, those generative test files are hard to fudge :/
04:46 psch ...i guess i'll have to revisit Signature.ACCEPTS soonish :l
04:47 psch but that test case is noted, TimToady++
05:05 pierre-vigier joined #perl6
05:05 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)␤»
05:06 pierre-vigier m: say <1 2> == <3 4>
05:06 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:06 pierre-vigier m: say <1 2> eq <3 4>
05:06 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:06 pierre-vigier Is eq a good way to compare list ...
05:08 psch m: say <1 2> eqv <3 4>;
05:08 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:08 psch pierre-vigier: note that < ... > gives you a List
05:09 psch m: say <1 2>.Str; say <3 4>.Str;
05:09 camelia rakudo-moar 2d337f: OUTPUT«1 2␤3 4␤»
05:09 pierre-vigier m: say <1 2> eqv <1 2>
05:09 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:09 psch pierre-vigier: further, infix:<eq> does Str comparison, while infix:<==> does .Numeric comparison
05:10 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
05:10 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:10 psch m: say ^5 eqv eager 0..4
05:10 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:10 psch m: say eager ^5 eqv eager 0..4
05:10 camelia rakudo-moar 2d337f: OUTPUT«(False)␤»
05:10 psch vOv
05:10 psch Ranges are weird is the take-away from that i guess..?
05:10 psch m: say (eager ^5) eqv (eager 0..4)
05:10 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:11 psch pierre-vigier: in general, comparing Lists with eqv seems better than eq or ==
05:11 pierre-vigier seems better indeed
05:12 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...
05:12 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:12 psch m: say <1 2> eqv ('1', '2') # *here* actually
05:12 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:12 TimToady m: say <1 2>.perl
05:12 camelia rakudo-moar 2d337f: OUTPUT«(IntStr.new(1, "1"), IntStr.new(2, "2"))␤»
05:12 TimToady those aren't just strings
05:12 psch but that's 'cause <> quoting isn't '' quoting...
05:12 psy_ joined #perl6
05:13 psch as TimToady showed.. :)
05:13 pierre-vigier m: say [ [ 1,2 ], [2,3] ] eqv [ [ 1,2 ], [2,3] ];
05:13 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:13 pierre-vigier m: say [ [ 1,2 ], [2,3] ] eqv [ [ 1,2 ], [2,4] ];
05:13 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:13 pierre-vigier works for array of array, nice :)
05:15 TimToady m: say [ [ 1,2 ], [2,3] ] ~~ [ [ 1,2 ], [2,*] ];
05:15 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:16 TimToady that also works recursively
05:16 TimToady m: say [ [ 1,2 ], [2,3,4] ] ~~ [ [ 1,2 ], [2,*] ];
05:16 camelia rakudo-moar 2d337f: OUTPUT«False␤»
05:16 TimToady m: say [ [ 1,2 ], [2,3,4] ] ~~ [ [ 1,2 ], [2,**] ];
05:16 camelia rakudo-moar 2d337f: OUTPUT«True␤»
05:21 pierre-vigier Let's say i write an object, and i want to test if two object are equal,
05:23 TimToady what do you mean by "equal"?
05:24 pierre-vigier the exact case is
05:24 TimToady usually you only care if they're the same object
05:24 pierre-vigier i define 2 matrices
05:24 pierre-vigier i want to check if they are equal
05:25 pierre-vigier https://github.com/pierre-vigier/Perl6-Math-Matrix
05:25 pierre-vigier my $matrix = Math::Matrix.new([[1,2],[3,4]]); my $matrix2 = Math::Matrix.new([[1,2],[3,4]]);
05:25 TimToady if you provide a .perl, you get eqv automatically
05:25 pierre-vigier i want to check the equality
05:26 pierre-vigier so using eqv should be the way
05:26 TimToady or you can provide your own eqv multies
05:26 pierre-vigier for now i redifined == and eq  but it feels wrong
05:27 pierre-vigier it is more, what operator should be used to compare "custom" object
05:27 TimToady you know we have matrices kinda built-in, now?
05:27 pierre-vigier with [ [] [] ]
05:27 pierre-vigier missing some part,
05:27 pierre-vigier like to calculate a dotProduct of 2 matrices
05:28 pierre-vigier 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]
05:28 camelia rakudo-moar 2d337f: OUTPUT«9␤»
05:28 TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix[1;1]
05:28 camelia rakudo-moar 2d337f: OUTPUT«5␤»
05:28 TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix.shape
05:28 camelia rakudo-moar 2d337f: OUTPUT«(3 3)␤»
05:29 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] ] # ?
05:29 camelia rakudo-moar 2d337f: OUTPUT«16␤»
05:29 TimToady you can probably overload most of the rest on multis, since the dimensionality is part of the type
05:29 psch my vector math isn't quite up to share i think...
05:30 TimToady arrays of arrays aren't quite the same
05:30 psch yeah, it really isn't...
05:30 TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix.perl
05:30 camelia rakudo-moar 2d337f: OUTPUT«Array.new(:shape(3, 3), [1, 2, 3], [4, 5, 6], [7, 8, 9])␤»
05:31 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␤␤»
05:31 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;
05:31 camelia rakudo-moar 2d337f: OUTPUT«6␤»
05:31 TimToady I guess hypers aren't really up on multidims yet
05:31 TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say (@matrix »+» 1).perl
05:31 camelia rakudo-moar 2d337f: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤  in block <unit> at /tmp/WfeLtcNN6p:1␤␤»
05:31 TimToady yeah, that bit is still NYI
05:32 psch huh
05:32 pierre-vigier anyway, i should refactor my "lib" to use shape array instead of array of array
05:32 psch hyper are supposed to more than one level down?
05:32 psch +s
05:32 psch +go
05:33 psch m: [$[$[$1]]]>>++.say
05:33 camelia rakudo-moar 2d337f: OUTPUT«[[[0]]]␤»
05:33 psch m: [$[$[1]]]>>++.say
05:33 camelia rakudo-moar 2d337f: OUTPUT«[[[1]]]␤»
05:33 TimToady m: .say for [[1,2,3],[4,5,6],[7,8,9]] »*» 2
05:33 camelia rakudo-moar 2d337f: OUTPUT«[2 4 6]␤[8 10 12]␤[14 16 18]␤»
05:33 psch but the for introduced another level of flattening..?
05:34 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
05:34 camelia rakudo-moar 2d337f: OUTPUT«[[2, 4, 6], [8, 10, 12], [14, 16, 18]]␤»
05:34 pierre-vigier m: say [[1,2,3],[4,5,6],[7,8,9]] »*» 2
05:34 camelia rakudo-moar 2d337f: OUTPUT«[[2 4 6] [8 10 12] [14 16 18]]␤»
05:34 psch it's definitely hard to get a comprehensive grasp on this language :P
05:34 psch m: say [[[1,2,3],[4,5,6],[7,8,9]]] »*» 2
05:34 camelia rakudo-moar 2d337f: OUTPUT«[[2 4 6] [8 10 12] [14 16 18]]␤»
05:35 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
05:35 TimToady m: say [[[1,2,3],[4,5,6],[7,8,9]],] »*» 2
05:35 camelia rakudo-moar 2d337f: OUTPUT«[[[2 4 6] [8 10 12] [14 16 18]]]␤»
05:35 TimToady m: say [$[[1,2,3],[4,5,6],[7,8,9]]] »*» 2
05:35 camelia rakudo-moar 2d337f: OUTPUT«[[[2 4 6] [8 10 12] [14 16 18]]]␤»
05:36 TimToady [] is a no-op around a []
05:36 psch right, but it still doesn't complain the same way the shaped array complained
05:37 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... :)
05:38 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␤␤»
05:38 TimToady yeah, not even if the arrays are identical
05:39 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
05:39 pierre-vigier however, really need to keep an eye on shaped array, loks great
05:40 pierre-vigier so let
05:42 pierre-vigier let's say i have my $matrix1 = Matrix.new([1,2],[3,4]); my $matrix1 = Matrix.new([2,3],[8,9]);
05:42 pierre-vigier to compare those 2 matrices,
05:43 pierre-vigier if $matrix1 == matrix2 , if $matrix1 eqv matrix2 , if $matrix1 eq matrix2
05:43 pierre-vigier i'm feeling none of those operators are fitting perfectly
05:44 TimToady eqv should be used for value equality here
05:44 TimToady and if it doesn't, it should :)
05:44 pierre-vigier ok, so i will remove my operator overload
05:45 pierre-vigier == and eq :)
05:45 pierre-vigier i felt it was not right
05:45 regreg joined #perl6
05:50 dalek rakudo/thunkyreduce: a1bed15 | TimToady++ | src/ (5 files):
05:50 dalek rakudo/thunkyreduce: Revert "Revert "get reductions thunking for left/list assoc""
05:50 dalek rakudo/thunkyreduce:
05:50 dalek rakudo/thunkyreduce: This reverts commit c5f81ae6086a5b1aa80d47f3251d495a1c02fea0.
05:50 dalek rakudo/thunkyreduce: review: https://github.com/rakudo/rakudo/commit/a1bed15876
05:50 sarya joined #perl6
05:50 dalek rakudo/thunkyreduce: 6516930 | TimToady++ | src/ (3 files):
05:50 dalek rakudo/thunkyreduce: redo reduce thunking, ignoring slip args now
05:50 dalek rakudo/thunkyreduce: review: https://github.com/rakudo/rakudo/commit/6516930c86
05:50 sarya hello
05:51 TimToady psch: it looks like there's another any() ~~ earlier in the same routine
05:53 keix joined #perl6
05:54 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
05:54 yoleaux TimToady: I'll pass your message to masak.
05:55 TimToady b2gills: that's either a very good sign, or a very bad sign, or both :)
05:56 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」
05:57 psch TimToady: i'll have a closer look later on, not enough thinking power left, fwiw...
05:57 b2gills https://codegolf.stackexchange.com/a/66240/1147 https://codegolf.stackexchange.com/a/66233/1147 https://codegolf.stackexchange.com/a/66125/1147
05:59 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
06:01 hahainternet b2gills: you're not going to win on product over a range vs Jelly looking at that score
06:01 hahainternet 2 bytes lol
06:08 pierre-vigier joined #perl6
06:10 TimToady hmm, too bad we don't allow [..] @_
06:12 b2gills I would like to see 「4 ==> {...}」 work instead of having to do 「4 ==> {...}()」 before I'd worry about that.
06:25 pierre-vigier joined #perl6
06:40 MadcapJake anyone interested in attempting to make a ludumdare.com game in perl6? :)
06:47 xjrK_ joined #perl6
06:48 domidumont joined #perl6
06:48 [Tux] test             50000    22.934    22.824
06:48 [Tux] test-t           50000    20.200    20.090
06:48 [Tux] csv-parser       50000    25.414    25.304
06:48 [Tux] still no Inline::Perl5 and I started afresh
06:50 [Tux] https://gist.github.com/Tux/31f7033183773546da69
06:53 domidumont joined #perl6
06:55 [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 [Tux] found it here: /pro/3gl/CPAN/rakudobrew/.panda-work/1449730304_1/blib/resources/p5helper.so
06:56 [Tux] blib/resources != resources
06:59 [Tux] it comes and goes. Now I see no p5helper.so anywhere anymore
07:01 [Tux] These two panda's are in my $PATH:
07:01 [Tux] 59245225 100775 -rwx   27   merijn     26807  10 Dec 2015 07:31 /pro/3gl/CPAN/rakudobrew/bin/panda
07:01 [Tux] 59904122 100755 -rwx    1   merijn      1435  10 Dec 2015 07:36 /pro/3gl/CPAN/rakudobrew/moar-nom/install/share/perl6/site/bin/panda
07:05 [Tux] 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 [Tux] that doesn't look right to ,e
07:05 karim joined #perl6
07:06 karim Could anyone help? http://pastebin.com/A5gwvW7k
07:07 [Tux] $ perl6 bootstrap.pl
07:07 [Tux] ==> Bootstrapping Panda
07:07 [Tux] Use of uninitialized value %ENV of type Any in string context
07:07 [Tux] Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub MAIN at bootstrap.pl:64
07:07 [Tux] in the panda git folder
07:07 [Tux] shell "$*EXECUTABLE --ll-exception bin/panda --force $prefix_str install $*CWD";
07:08 domidumont joined #perl6
07:08 [Tux] $ echo $CWD
07:08 [Tux] CWD: Undefined variable.
07:08 [Tux] HAH!
07:08 CQ [Tux]: this channel tends to wake up later in the day...
07:08 [Tux] I am running a tcsh, not a bash
07:08 ChoHag joined #perl6
07:09 [Tux] CQ, I know, but I also know others scollback (and lizmat will be awake :)
07:11 karim Could anyone help? http://pastebin.com/A5gwvW7k
07:12 pierre-vigier joined #perl6
07:17 psch karim: you're putting Pairs into the slots of the Array.
07:17 psch m: my @a = [a => 1, b => 2]; say @a[0] # like this
07:17 camelia rakudo-moar 2d337f: OUTPUT«a => 1␤»
07:17 psch m: my @a = [a => 1, b => 2]; say @a[0]; say @a[1] # like this
07:17 camelia rakudo-moar 2d337f: OUTPUT«a => 1␤b => 2␤»
07:18 karim what do you mean?
07:18 psch karim: as in, @jres[0] contains < file_id => ... >, @jres[1] contains < file_size => ... > etc
07:18 psch ...okay
07:18 psch vOv
07:22 _nadim joined #perl6
07:22 * [Tux] gives up
07:24 karim joined #perl6
07:25 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 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? http://pastebin.com/A5gwvW7k
07:25 [Tux] and panda *does* work for other modules
07:26 [Tux] karim, I looked, but cannot help
07:26 psch karim: what i told you before still applies
07:26 psch m: my @a = [a => 1, b => 2]; say @a[0]; say @a[1] #
07:26 camelia rakudo-moar 2d337f: OUTPUT«a => 1␤b => 2␤»
07:27 psch karim: that's what you're doing, albeit with different keys for the Pairs
07:27 psch 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
07:27 camelia rakudo-moar 2d337f: OUTPUT«1␤(Mu)␤(Mu)␤2␤»
07:33 karim but is it an array? as you can see, my json consists of only one element
07:34 karim {
07:34 karim "file_id":"fdsfdsfdsfdsfd",
07:34 karim "file_size":1028,
07:34 karim "file_path":"photo\/file_0.jpg"
07:34 karim }
07:34 dalek rakudo/thunkyreduce: 2d337f1 | peschwa++ | src/core/Signature.pm:
07:34 dalek rakudo/thunkyreduce: Fix slurpy hashes in Signature ACCEPTS.
07:34 dalek rakudo/thunkyreduce:
07:34 dalek rakudo/thunkyreduce: For some reason or other, the previous fix (62a029b44) worked when commited,
07:34 dalek rakudo/thunkyreduce: but doesn't anymore. Constraining the RHS Block of the infix:<~~> to Any helps,
07:34 dalek rakudo/thunkyreduce: and having to constrain it is specification-compliant.
07:34 dalek rakudo/thunkyreduce: review: https://github.com/rakudo/rakudo/commit/2d337f1848
07:34 karim and can I parse it so that  @json contains a single element?
07:34 dalek rakudo/thunkyreduce: ee0933a | TimToady++ | src/core/Signature.pm:
07:34 dalek rakudo/thunkyreduce: Merge branch 'nom' into thunkyreduce
07:34 dalek rakudo/thunkyreduce: review: https://github.com/rakudo/rakudo/commit/ee0933a093
07:34 dalek rakudo/thunkyreduce: 4a4ae62 | TimToady++ | src/Perl6/Actions.nqp:
07:34 dalek rakudo/thunkyreduce: allow thunking reduced list infixes too
07:34 dalek rakudo/thunkyreduce: review: https://github.com/rakudo/rakudo/commit/4a4ae62574
07:35 psch karim: no, the json is an object (or a map, maybe), which maps to a Hash in Perl 6
07:35 dalek roast: 52e3715 | TimToady++ | S03-metaops/reduce.t:
07:35 dalek roast: tests for thunky reduce ops
07:35 dalek roast: review: https://github.com/perl6/roast/commit/52e3715b88
07:35 psch m: my %h = a => 1, b => 2; say %h<a>; say %h<b>
07:35 camelia rakudo-moar 2d337f: OUTPUT«1␤2␤»
07:35 n0tjack joined #perl6
07:35 adhoc joined #perl6
07:36 psch karim: ^^^ use the %-sigil instead of @ and drop the [0] index and you can get the keys directly
07:36 psch m: my %h = from-json '{ "foo": "bar", "baz": "quux" }'; say %h<foo> # like this
07:36 camelia rakudo-moar 2d337f: OUTPUT«bar␤»
07:37 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:38 karim this does work
07:38 karim say @json[0]{"file_id"};
07:38 karim say @json[1]{"file_path"};
07:38 karim say @json[2]{"file_size"};
07:39 karim 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:40 karim psch: let me check your code
07:42 brrt joined #perl6
07:42 karim psch: thanks, it's working.
07:44 cxreg an interesting critique of Go: http://yager.io/programming/go.html
07:44 cxreg it's interesting to note that perl 6 holds up fairly well on their points of criticism
07:45 cxreg seems like the author likes Rust quite a bit
07:46 psch cxreg: i'm unsure how exactly we'd do the constrained generic bit
07:47 psch cxreg: as in, it's two obvious paths, (1) use Num as type and (2) use a where that check for .can('Numeric')
07:48 psch cxreg: but the former simply falls out of the predeclared type system (and might not fit for all user-types) and the latter does have runtime overhead
07:48 cxreg overhead is fixable :)
07:48 psch oh
07:49 psch right, the "no runtime overhead" is for the previous example anyway...
07:49 cxreg i think getting the semantics right is so much more important than worrying about the overhead of an implementation
07:50 psch i do recognize the interface{} complaint from asorted other blog posts i read before, in any case
07:52 psch the "java did it like this in 2004" jab is kind of interesting, because java still does type erasure, which means you can still get bad bytecode in some cases
07:52 psch but those cases usually happen when mucking with either reflection or bytecode gen, 'cause javac is very dilligent there
07:52 RabidGravy joined #perl6
07:53 pierre-vigier joined #perl6
07:54 CIAvash joined #perl6
07:55 psch i also have to mention that the amount of operator extensiability that comes from having the grammar of the language be a runtime thing in Perl 6 seems more and more to be one of the most amazing features
07:55 psch i mean, other language talk about overloading operators
07:56 psch and Perl 6 is like "oh, yeah, just pick any unicode string, give it a category and precedence, hey there's your operator"
07:56 cxreg isn't that one of swift's purported wins?
07:56 cxreg it is pretty astounding, though i'm not sure that power really belongs in the hands of mortals
07:57 psch cxreg: afaict, swift only offers prefix, postfix and infix
07:57 psch while Perl 6 brings (at least) postcircumfix as well
07:57 _nadim Good morning!
07:58 _nadim Where are all the class.perl defined? eg: where is it for type Match?
07:59 psch _nadim: method perl in general is defined in the corresponding .pm file
07:59 psch _nadim: as in, Match.perl is probably in src/core/Match.pm
08:00 psch m: sub postcircumfix:<' '>($a, $b) { say "aha, an $a, with $b behind" }; "foo"'"bar"' # postcircumfix \o/
08:00 camelia rakudo-moar 2d337f: OUTPUT«aha, an foo, with bar behind␤»
08:00 psch not sure if we have more than that in CORE, but i think not
08:01 psch something like precircumfix would fall to an is-parsed macro i guess?
08:01 psch well, maybe a Slang, but those are kinda related
08:01 _nadim psch: thanks, sometimes .perl seems to know what to do when I don't
08:03 cxreg precircumfix?  head asplode
08:04 moritz precircumfix would just be a term that is parsed as a circumfix, and expects another term aftewards
08:05 psch moritz: right, but excepting another term afterwards currently doesn't work out to anything but TTIAR
08:05 moritz psch: right
08:05 psch s/excepting/expecting/
08:06 hahainternet so i'm writing some python, and i need to write a function that can be passed a string, a list, or a list of lists, i'm trying to think of the best way to differentiate between these in perl6
08:06 hahainternet obviously for string vs list that's just multi dispatch
08:06 cxreg what's the state of the world on tracing / profiling / debugging in rakudo + moar?
08:06 psch prof-m: say "hi"
08:06 camelia prof-m 273e89: OUTPUT«hi␤Writing profiler output to /tmp/mprof.html␤»
08:06 camelia .. Prof: http://p.p6c.org/1c4b29c
08:06 cxreg having dtrace / perf_events instrumentation would be nice
08:06 hahainternet but i'm not so sure for lists vs lists of lists, obviously i can just check an element and do an if/given but i'm more interested in elegance
08:06 psch cxreg: that ^^^ is what we can do re: profiling atm
08:07 cxreg that's a solid start
08:08 cxreg even includes deopt hints, awesome
08:10 darutoko joined #perl6
08:10 psch hahainternet: if you want to rely on MMD for that you have to also rely on users to declare types properly, i think
08:10 hahainternet psch: for list vs list of lists? i don't really care about users, this is just theoretical anyway
08:10 hahainternet as the python to do it is spidery and ugly
08:10 psch m: sub f(Array @a) { }; f [[1], [2]] # doesn't work
08:10 camelia rakudo-moar 2d337f: OUTPUT«Type check failed in binding @a; expected Positional[Array] but got Array␤  in sub f at /tmp/lMfJ0v7xxR:1␤  in block <unit> at /tmp/lMfJ0v7xxR:1␤␤»
08:11 psch m: sub f(Array @a) { }; my Array @a = [[1], [2]]; f @a # does
08:11 camelia rakudo-moar 2d337f: ( no output )
08:11 hahainternet oh really
08:11 psch hahainternet: as per those two examples
08:11 hahainternet that's interesting
08:11 hahainternet so i guess that's the difference between containers and values
08:11 hahainternet that would be fine for my requirements anyway, thanks for the example :)
08:13 psch hahainternet: it can get hairy
08:13 hahainternet psch: it's still preferable to python
08:13 psch m: multi f(*@a) { say "slurpy" }; multi f(Int @a) { say "list" }; multi f(Array @a) { say "list of lists" }; f 1,2,3; f [1,2,3]; f [[1,2], [3,4]] # as here...
08:13 camelia rakudo-moar 2d337f: OUTPUT«slurpy␤slurpy␤slurpy␤»
08:14 psch m: multi f(Int @a) { say "list" }; multi f(Array @a) { say "list of lists" };f [1,2,3]; f [[1,2], [3,4]] # note, first invocation got removed
08:14 camelia rakudo-moar 2d337f: OUTPUT«Cannot call f(Array); none of these signatures match:␤    (Int @a)␤    (Array @a)␤  in block <unit> at /tmp/uXpmwxXBwG:1␤␤»
08:14 psch that's the not-typed-as Array[Int] in the last invocation that throws there
08:14 psch which again illustrates the "users have to declare types properly" gotcha
08:15 hahainternet yeah i've played a little with slurpy signatures and the like, i see what's going on there
08:15 hahainternet a minor annoyance really
08:15 hahainternet i just wondered the 'correct' way to do it in perl6
08:15 hahainternet and that seems pretty straightforward
08:15 psch well, it shifts the burden
08:15 ilogger2 joined #perl6
08:15 psch it's a bit of a hiccup, in my (and others) opinion, but it's probably better than the alternatives
08:16 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 hahainternet because i really didn't think of friendliness to anyone else, just elegance and expressiveness
08:17 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 psch which might be bad for elegance and expressiveness
08:17 psch 'cause it'd turn e.g. < f [1,2,3] > into < f my Int @ = 1,2,3 >
08:18 psch 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?
08:18 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]]);
08:18 camelia rakudo-moar 2d337f: OUTPUT«array␤array of arrays␤»
08:18 nine hahainternet: ^^^
08:18 hahainternet oh wow
08:18 hahainternet i knew about 'where'
08:18 hahainternet i didn't realise you could smartmatch against a type
08:18 hahainternet crikey
08:18 psch that's a gotcha :P
08:19 psch 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]]);
08:19 camelia rakudo-moar 2d337f: OUTPUT«array␤array␤array of arrays␤»
08:19 psch yeah, or all()
08:19 hahainternet either would be fine in my case to be fair, i wish i could be more type rigorous in python
08:19 hahainternet it's driving me mad that i have to keep it all in my head
08:20 hahainternet 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 hahainternet i really should start blogging somewhere notable
08:20 nine hahainternet: https://github.com/niner/Apache-To-Nginx/blob/master/lib/Apache/Config/Converter/Nginx.pm#L23 for where I make extensive use of this
08:21 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 hahainternet it's also beautifully expressed too :D
08:22 hahainternet 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
08:22 psch where clauses are kind of cheating to me vOv
08:22 hahainternet i doubt it's something i can help with much but might be worth it
08:22 psch like, it gives you turing-completeness in the type constraint for any parameter
08:22 psch that *is* cheating :P
08:24 psch 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␤␤»
08:24 psch m: sub f($ where rand < .1) { say "yay" }; (f 1) xx 10 # better odds?
08:24 camelia rakudo-moar 2d337f: OUTPUT«Internal error: inconsistent bind result␤  in sub f at /tmp/72D84kDPvb:1␤  in block <unit> at /tmp/72D84kDPvb:1␤␤»
08:24 psch oh
08:24 psch neat
08:24 psch m: sub f($ where rand < .2) { say "yay" }; (f 1) xx 10 # better odds?
08:24 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␤␤»
08:24 psch anyway, there's one "yay" :P
08:25 grondilu m: say "1".subst(/(.)$0*/, { $().chars ~ $0 }, :g)
08:25 camelia rakudo-moar 2d337f: OUTPUT«11␤»
08:25 grondilu m: say ("1", *.subst(/(.)$0*/, { $().chars ~ $0 }, :g) ... *)[^3];  # not sure what's wrong here
08:25 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…»
08:25 psch grondilu: probably $/-scoping
08:25 psch grondilu: well, it looks like that from here at least
08:26 grondilu m: say ("1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *)[^3];
08:26 camelia rakudo-moar 2d337f: OUTPUT«(1 11 21)␤»
08:26 grondilu I c
08:27 grondilu m: say ("1", *.subst(/(.)$0*/, { .chars ~ .[0] }, :g) ... *)[^3];
08:27 camelia rakudo-moar 2d337f: OUTPUT«(1 11 21)␤»
08:27 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
08:27 psch RabidGravy: well... volunteered? :)
08:29 pdcawley joined #perl6
08:31 grondilu m: my @ = ("1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *);
08:31 camelia rakudo-moar 2d337f: ( no output )
08:31 grondilu ^I'm a bit surprised that this is ok
08:31 Ven joined #perl6
08:32 grondilu m: my @ = "1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *;
08:32 camelia rakudo-moar 2d337f: ( no output )
08:32 grondilu oh wait, I thought this would hang^
08:32 nine grondilu: why shouldn't it be ok?
08:33 grondilu I thought this was hanging, but I was just not waiting long enough :)
08:34 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:35 psch m: my @a = "1", *.subst(/(.)$0*/, -> $/ { $/.chars ~ $/[0] }, :g) ... *; say eager @a
08:35 psch that hangs, i think
08:35 _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
08:35 camelia rakudo-moar 2d337f: OUTPUT«(timeout)»
08:36 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:37 psch RabidGravy: although, if you're using the same executable for writing *and* reading the serialization my guess is probably wrong... :)
08:37 snarkyboojum joined #perl6
08:37 timotimo very backlog
08:38 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
08:38 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␤»
08:38 psch m: my %h; nqp::atkey(%h, 'foo') # ooc
08:38 camelia rakudo-moar 2d337f: OUTPUT«(signal SEGV)»
08:39 dalek roast: 4b0efdd | usev6++ | S06-macros/errors.t:
08:39 dalek roast: Fix test where eval-lives-ok didn't get right context
08:39 dalek roast:
08:39 dalek roast: previously failed with:
08:39 dalek roast:   Error: Use of macros is experimental; please 'use experimental :macros'
08:39 dalek roast: review: https://github.com/perl6/roast/commit/4b0efddbf9
08:40 RabidGravy psch, it comes from loading one of several largish modules, so difficult to golf
08:41 xfix joined #perl6
08:43 psch RabidGravy: no old precomp files around?
08:45 pistacchio joined #perl6
08:45 RabidGravy entirely possible
08:47 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 psch 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
08:49 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␤»
08:50 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«␤»
08:50 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 });
08:50 camelia rakudo-moar 2d337f: ( no output )
08:50 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
08:50 camelia rakudo-moar 2d337f: OUTPUT«␤»
08:50 timotimo whyyyy
08:50 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.list
08:50 camelia rakudo-moar 2d337f: OUTPUT«[]␤»
08:51 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«............................................................[]␤»
08:51 timotimo whhhhyyyyyyyy
08:52 timotimo 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 #perl6
08:52 zakharyas joined #perl6
08:54 timotimo seems like that's b0rken :(
08:55 RabidGravy bad software
08:58 timotimo i mean .hyper and .race don't seem too worky?
09:00 znpy joined #perl6
09:02 dakkar joined #perl6
09:02 Actualeyes left #perl6
09:02 rindolf joined #perl6
09:08 pistacchio hi, i'm trying to learn "grammar" and actions. in this code http://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:09 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 grondilu m: "foo" ~~ /o { make 1 }/; say $/.made;
09:10 camelia rakudo-moar 2d337f: OUTPUT«1␤»
09:10 DrForr No, the 'make' is fine where it is, though I'd write it like so:
09:10 DrForr method TOP($/) { make @<down>>>.ast } method down($/) { make 1 }
09:11 yakudza joined #perl6
09:11 DrForr (I've been fixing https://github.com/drforr/perl6-ANTLR4/ these last few days.)
09:12 masak good antenoon, #perl6
09:12 yoleaux 05:54Z <TimToady> masak: try the thunkyreduce branch on 007 now
09:12 masak TimToady: will do.
09:13 leont joined #perl6
09:13 hahainternet in the repl, can you redefine a multi sub?
09:14 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
09:14 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
09:14 DrForr pistacchio: Repost please?
09:15 pistacchio http://pastebin.com/DC9HNiHy
09:15 pistacchio @DrForr also, what is the '>>>' operator?
09:16 DrForr The problem probably still is your grammar. And it's the '>>' operator on @<down>.
09:16 DrForr Hyperoperator, kind of like map().
09:16 hahainternet moritz: can't find much on google, any place i should look specifically?
09:17 _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.
09:17 _nadim Arff, Is everything really derived from Any.
09:18 moritz Junction and Mu aren't
09:18 rurban joined #perl6
09:18 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 moritz m: say ('a' ~~ /./).^attributes
09:19 camelia rakudo-moar 2d337f: OUTPUT«Method 'gist' not found for invocant of class 'BOOTSTRAPATTR'␤  in block <unit> at /tmp/Rwl6Ml9sYc:1␤␤»
09:19 moritz m: say ('a' ~~ /./).^attributes>>.name
09:19 camelia rakudo-moar 2d337f: OUTPUT«($!orig $!from $!to $!CURSOR $!made $!list $!hash)␤»
09:19 masak .tell TimToady 007 passes all tests on thunkyreduce.
09:19 yoleaux masak: I'll pass your message to TimToady.
09:19 * masak .oO( thunks a lot! )
09:21 pistacchio @DrForr https://ideone.com/2CjRTL same thing :/
09:22 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.
09:22 _nadim hahainternet: http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=a doesn't work like you expect it indeed
09:23 _nadim hahainternet: [[a]   , (yes a comma) ]
09:23 DrForr pistacchio: May I make a suggestion? Try testing the grammar on its own before adding actions.
09:23 pistacchio will do
09:23 DrForr You'll see that it doesn't parse,in that case.
09:24 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.
09:25 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.
09:25 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
09:25 El_Che it's like moar keeps state, weird
09:26 _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:27 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;
09:28 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 #perl6
09:28 timotimo so .hyper died somewhere between now and the last star
09:30 timotimo which ... well ...
09:30 DrForr pistacchio: http://paste.scsys.co.uk/502592
09:32 hahainternet also yet another question, in 'where' clauses, why doesn't the whatever * work as a substitute for the parameter?
09:32 hahainternet or does it, and i've done it wrong? :D
09:32 timotimo i don't see a lot of hyper spec tests
09:33 pistacchio @DrForr hey, thanks :)
09:33 timotimo all i see are tests for the listop, none for the method kind
09:33 grondilu hahainternet: it's supposed to.
09:33 grondilu m: subset oo of Str where * ~~ /oo/; say "foo" ~~ oo
09:33 camelia rakudo-moar 2d337f: OUTPUT«True␤»
09:34 grondilu though the semantics is currying here
09:34 hahainternet well with the positional example above, @a where all(@a) ~~ Positional
09:34 hahainternet didn't seem to work when i tested
09:34 hahainternet i'm gonna get back to it though and stop bothering here, thanks for the help
09:34 grondilu junctions don't work on Type searches, IIRC
09:35 grondilu or smartmatches
09:35 timotimo "type searches"?
09:35 grondilu I mean a junction will only ever smartmatch "Junction"
09:35 timotimo m: say any(1, 2, 3) ~~ Junction
09:35 camelia rakudo-moar 2d337f: OUTPUT«True␤»
09:35 timotimo m: say any(1, 2, 3) ~~ Int
09:35 camelia rakudo-moar 2d337f: OUTPUT«any(True, True, True)␤»
09:35 grondilu hum
09:35 grondilu I thought that did not work
09:36 hahainternet grondilu: yeah that was a working example above, but it didn't seem to work when i substituted *
09:37 grondilu m: subset Vector of Array where all(*) ~~ Real; say [ rand xx 5 ] ~~ Vector
09:37 camelia rakudo-moar 2d337f: OUTPUT«False␤»
09:37 grondilu ^like this?
09:37 hahainternet i guess, but don't worry about it
09:37 hahainternet i'll figure out what i did wrong, you don't learn by being shown everything :D
09:38 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
09:38 grondilu m: subset Vector of Array where { all($_) ~~ Real }; say [ rand xx 5 ] ~~ Vector
09:38 camelia rakudo-moar 2d337f: OUTPUT«False␤»
09:38 timotimo in that case you'd need to put a { } around and use $_
09:38 grondilu m: subset Vector of Array where { all(@$_) ~~ Real }; say [ rand xx 5 ] ~~ Vector
09:38 camelia rakudo-moar 2d337f: OUTPUT«True␤»
09:38 grondilu oh that's cool.  I swear I had tried that and fail some time ago.
09:38 timotimo ah, all and friends don't do single-argument type of stuff?
09:39 hahainternet yeah in my playing about @$_ works too
09:39 hahainternet but * does not
09:39 timotimo yeah, you shouldn't expect * to work there
09:39 grondilu ~~ does stop currification, I think
09:40 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
09:41 grondilu you can always use a block
09:42 espadrine joined #perl6
09:42 _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␤␤»
09:42 _nadim moritz: ^^
09:44 Sqirrel joined #perl6
09:44 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␤␤»
09:44 moritz m: sub g (Any $a){ $a.^attributes.sort.map: { }}; g ('a' ~~ m:g/(a)/)[0]
09:44 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␤␤»
09:44 timotimo m: (^20).hyper.map({True}).list.perl.say
09:44 camelia rakudo-moar 2d337f: OUTPUT«()␤»
09:44 moritz m: sub g (Any $a) { say $a.perl }; g ('a' ~~ m:g/(a)/)[0]
09:44 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)␤»
09:44 moritz m: sub g (Any $a) { say $a.^attributes }; g ('a' ~~ m:g/(a)/)[0]
09:44 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␤␤»
09:45 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)␤»
09:45 moritz _nadim: the problem is that {} is a hash literal, not a block
09:45 moritz _nadim: but it's a bug that "X::Multi::NoMatch exception produced no message"
09:46 _nadim Yoohoo bug #2 ;)
09:47 _nadim moritz: I  have code in the {}, same thing happens
09:49 timotimo i'm tired and map on hyper doesn't work :(
09:51 moritz _nadim: what code?
09:53 moritz 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 #perl6
10:00 dalek doc: f30444e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod:
10:00 dalek doc: add Any::sort
10:00 dalek doc: review: https://github.com/perl6/doc/commit/f30444e2f1
10:00 dalek doc: ab6c33a | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod:
10:00 dalek doc: add trap of interating Str
10:00 dalek doc: review: https://github.com/perl6/doc/commit/ab6c33a464
10:00 dalek doc: fb993b8 | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files):
10:00 dalek doc: Merge pull request #234 from gfldex/master
10:00 dalek doc:
10:00 dalek doc: add Any::sort, add trap of one element Str iteration
10:00 dalek doc: review: https://github.com/perl6/doc/commit/fb993b8663
10:01 vytas joined #perl6
10:02 PotatoGim joined #perl6
10:02 dalek rakudo/nom: 99218aa | lizmat++ | src/core/Any-iterable-methods.pm:
10:02 dalek rakudo/nom: Add a less LTA error for (1,2).map({})
10:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/99218aaa3d
10:03 timotimo yo
10:03 timotimo HTTP::UserAgent is unhappy in its tests
10:04 timotimo P6M Merging GLOBAL symbols failed: duplicate definition of symbol Response
10:04 RabidGravy yes it's since a rakudo of some point yesterday
10:04 Skarsnik *blame precomp*
10:05 Skarsnik And hello ^^
10:05 gfldex i officially complain about https://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.
10:05 timotimo i have no experience with that piece of the code :\
10:05 RabidGravy JSON::Infer stopped working at the same time
10:06 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.
10:07 Skarsnik The issue is why it work at all? x)
10:07 gfldex timotimo: sorting a string is sorting a string
10:07 Skarsnik hm, C-enum start a 0 or 1?
10:08 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
10:08 BooK gfldex: well sorting a string in perl 5 gives the same result
10:09 gfldex that perl 5 does it wrong is not a good argument
10:09 BooK consistency might be one
10:09 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:10 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*
10:10 gfldex no, because sort that a code ref as it's only argument
10:10 DrForr pistacchio: Did what I said make any sense?
10:11 RabidGravy Skarsnik, nah that's the job of a higher level abstraction
10:11 Skarsnik Str.sort-ascii() Str.sort-unicode
10:11 Skarsnik RabidGravy, Why?
10:12 masak I keep needing to remember that `.comb` in Perl 5 is spelled `=~ //g`
10:12 timotimo gfldex: huh?
10:12 BooK Skarsnik: what's the difference?
10:12 Zoffix I keep needing to remember that Perl 6 has .comb :)
10:12 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.
10:12 BooK masak: remember the perl 5 comb only has two teeth
10:12 BooK and a large handle
10:13 masak :)
10:13 grondilu totally off topic, but I laughed so hard at this I want to share:  https://i.imgur.com/saCPaJa.webm
10:14 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
10:14 Skarsnik s/formation/information/
10:15 timotimo grondilu: well trained dog :)
10:15 BooK Skarsnik: I was asking about your two sort methods
10:15 DrForr grondilu: I was actually a bit worried about doing something similar when potty-training Percy.
10:15 ChoHag Is there any way I can get an adverb into the pull-one method of an Iterator?
10:15 BooK timotimo: or a history of very clean windows and pain
10:15 timotimo mhm :(
10:15 Skarsnik oh nvm x)
10:15 ChoHag And does an Iterator class (as returned by the iterator method of an Iteratable) need a particular base class or role?
10:16 DrForr BooK: Yet another problem when raising birds. Luckily Percy's got a fairly strong noggin.
10:17 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
10:17 moritz m: my @a = gather { take 1; take 2; LEAVE take 3 }; say @a
10:17 camelia rakudo-moar 99218a: OUTPUT«[1 2 3]␤»
10:19 pippo joined #perl6
10:19 siriu5b joined #perl6
10:19 timotimo moritz: take it or leave it, i guess
10:20 literal joined #perl6
10:21 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:23 Skarsnik duh mysql does not have Boolean type?
10:24 timotimo even if it did, it'd probably still allow all integers :P
10:26 Skarsnik Boolean : These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true. (╯°□°)╯︵ ┻━┻
10:27 arnsholt Aaah, MySQL. How I donæt miss you
10:27 arnsholt But that's not too insane though. Booleans are stored as bytes, basically
10:27 Skarsnik Yes but that mean you don't know if you deal with a Bool field or a int value
10:29 znpy joined #perl6
10:29 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:30 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␤»
10:31 gfldex timotimo: i'm not sure if it's really a bit late as this change wont break existing code
10:32 arnsholt Skarsnik: Details, details! =)
10:35 Skarsnik What does given do when the value is undef?
10:36 brrt joined #perl6
10:38 donaldh joined #perl6
10:39 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
10:39 lizmat m: say 198873657652656.sort
10:39 camelia rakudo-moar 99218a: OUTPUT«(198873657652656)␤»
10:39 lizmat why wouldn't that sort the digits as well ?
10:39 masak what's the Perl 5 regex equivalent of ?{} (code assertion) ?
10:39 moritz masak: <?{ ... }> iirc
10:40 arnsholt <?{ }> I think
10:40 masak thank you
10:40 lizmat in all of Perl 6 we assume that a scalar is identical in behaviour to a single element list
10:40 lizmat a single element list sorts as itself
10:41 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
10:42 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
10:43 BooK gfldex: your argument is that a single string is actually a list
10:44 gfldex m: "bca".comb.sort.join; # why does that work if it isn't sortable?
10:44 camelia rakudo-moar 99218a: ( no output )
10:44 Zoffix m: say "bca".comb.sort.join;
10:44 camelia rakudo-moar 99218a: OUTPUT«abc␤»
10:45 Zoffix m: say "bca".comb.sort.join;
10:45 camelia rakudo-moar 99218a: OUTPUT«abc␤»
10:45 Zoffix m: say "bca".comb;
10:45 camelia rakudo-moar 99218a: OUTPUT«(b c a)␤»
10:45 gfldex m: dd "bca".comb # it ain't a list, it's a Seq
10:45 camelia rakudo-moar 99218a: OUTPUT«Seq $var = ("b", "c", "a").Seq␤»
10:46 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
10:46 camelia rakudo-moar 99218a: OUTPUT«(List)␤»
10:46 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
10:46 lizmat the sort turns the Seq into a List
10:47 arnsholt Yeah, strings should not have listy behaviour
10:47 arnsholt 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:49 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 #perl6
10:50 gfldex python is slightly less bad then perl6 on that matter, see: http://stackoverflow.com/questions/15046242/how-to-sort-the-letters-in-a-string-alphabetically-in-python
10:50 BooK well, if something is iterable, it has a default sort order
10:50 Skarsnik I think mysql does not let me not have root without a pass ><
10:50 * donaldh is perplexed by the listy behaviour of strings in python
10:50 BooK the order in which things show up
10:50 arnsholt Yeah, I hate that strings are iterable in Python
10:51 BooK and then "cba".sort is,er, "cba"
10:51 lizmat there's a reason we now have x and xx in Perl 6, like we now have .reverse and .flip
10:52 lizmat perhaps an .order for strings ?
10:52 donaldh which does .comb.sort.join ?
10:53 RabidGravy :)
10:55 lizmat yeah, pretty much
10:55 lizmat not sure if that's worth it
10:55 lizmat but then, you could argue the same for .reverse
10:55 Zoffix not worth it
10:55 lizmat .flip
10:55 pierre-vigier joined #perl6
10:55 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.
10:56 donaldh m: say "bca".sort
10:56 camelia rakudo-moar 99218a: OUTPUT«(bca)␤»
10:56 donaldh it silently succeeds at doing exactly what you asked it to
10:56 lizmat m: 42.sort   # also silly, also wanrn ?
10:56 camelia rakudo-moar 99218a: ( no output )
10:56 El_Che morning
10:56 Zoffix \o
10:57 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 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!
10:57 donaldh :)
10:59 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
11:00 pierre-vigier joined #perl6
11:00 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
11:01 donaldh gdflex: what's the use case?
11:01 donaldh gfldex:^
11:01 RabidGravy gfldex, because you can choose how to split and choose how to sort
11:01 lucs joined #perl6
11:01 gfldex donaldh: see: https://www.google.de/search?q=sort+string&amp;ie=utf-8&amp;oe=utf-8&amp;gws_rd=cr&amp;ei=eltpVtfCLcK3swGIpp7wBg
11:01 RabidGravy if you *choose* to split into characters and then sort lexically that's fine
11:02 gfldex donaldh: there seam to be load of folk who ask that question
11:05 pierre-vigier joined #perl6
11:05 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:06 ShimmerFairy [citation needed] :)
11:06 RabidGravy it's a programming language, it assumes that the person using it knows what they are doing
11:07 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
11:07 camelia rakudo-moar 99218a: OUTPUT«(a b c)␤»
11:07 donaldh And knowing which particular Str splitting and sorting seems to fail that test
11:08 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...
11:08 Zoffix "sort a single string" doesn't even make sense
11:08 Zoffix You sort characters
11:09 donaldh Ask me to sort characters in a string and I'll split the string into characters.
11:09 donaldh That's implicit in the "Ask a 12 year old" question
11:11 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:13 pierre-vigier joined #perl6
11:14 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
11:14 arnsholt And "for $str { ... }" iterating over the characters of the string is another thing I hate
11:15 lizmat creating a module / slang for that, would be pretty easy, though
11:16 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
11:16 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 #perl6
11:17 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:18 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␤»
11:18 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:20 donaldh In python, for example, I have to test for iterable, but not string
11:21 pierre-vigier joined #perl6
11:22 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␤␤»
11:22 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
11:22 Ven m: say 'perl6 is '[+'meta']
11:22 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␤␤»
11:22 Ven m: say 'perl6 is '['really' eq 'meta']
11:22 camelia rakudo-moar 99218a: OUTPUT«perl6 is ␤»
11:23 * donaldh just wrote a python function that needs to cope with strings or lists. It's hard to get right in python.
11:23 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.
11:23 donaldh Hmmm, sort will sort items.
11:24 donaldh Str and Num et al are items
11:25 donaldh DWIMming a list of 1 item seems generally more useful than DWIMming an item into a list of parts of the item.
11:26 * Zoffix choses to go with the red bikeshed colour and leaves
11:28 donaldh :)
11:28 kaare_ joined #perl6
11:28 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:29 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
11:31 ShimmerFairy Ven: it's probably more important now with the single arg rule (that is, [1] -> 1 and all of a sudden scalar!)
11:32 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 pierre-vigier joined #perl6
11:32 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:34 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:35 * grondilu agrees^
11:37 kid51 joined #perl6
11:37 gfldex Zoffix: is building http://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
11:39 Zoffix gfldex, no idea. cronjob that looks for commits would be my guess
11:40 ShimmerFairy stmuk: if nothing else, we at least have .rotor to "un-flatten" a list :)
11:41 stmuk gfldex: https://github.com/perl6/doc/blob/master/util/update-and-sync
11:44 stmuk Heap corruption detected: pointer 0x7f65ea2f1f18 to past fromspace
11:46 stmuk which, of course, I can't reproduce :/
11:46 timotimo urgh
11:47 * masak .oO( now they aren't nothing but frustration? ) :P
11:48 Zoffix :)
11:52 _nadim joined #perl6
11:55 n0tjack joined #perl6
11:58 El_Che in the grammar doc (http://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 » ?
12:00 * masak finds no "hyper" in all of http://docs.perl6.org/language/operators
12:00 mrf El_Che: its the unicode operator form of http://doc.perl6.org/routine/hyper
12:01 anaeem1 joined #perl6
12:01 El_Che thx
12:02 masak I found a bit about it here: http://docs.perl6.org/language/syntax#Meta_Operators
12:03 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 El_Che and the hyper thing introduces somewhat related concepts
12:03 El_Che if hyper is unavoidable (it isn't) we should at least link to the doc
12:04 llfourn yes hyper is in desperate need of docs
12:05 El_Che I am trying to document stuff as I they come along in my program.
12:08 El_Che 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 El_Che -> should not be
12:09 mrf Yeah I would certainly try and avoid introducing to many things in a tutorial.
12:10 xjrK_ joined #perl6
12:12 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?
12:13 El_Che i don't mind making the changes, but I must be sure they make sense
12:13 Actualeyes joined #perl6
12:18 masak the same thing can be done with a .map
12:18 masak $/.make: $<pair>.map(*.made)
12:18 PotatoGim joined #perl6
12:21 anaeem1 joined #perl6
12:22 _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  .  http://nopaste.linux-dev.org/?879024
12:23 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␤␤»
12:23 gfldex is there a way to make the last part work?
12:25 masak don't think so.
12:25 masak you need to put it in a variable, like with &foo
12:25 masak it fails partly because the operator becomes .(), not . like you intended
12:30 * 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:31 Gabriel_Hu joined #perl6
12:33 gfldex m: my $a = 'a'; say $a.&({ .ord })
12:33 camelia rakudo-moar 99218a: OUTPUT«97␤»
12:33 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:33 camelia rakudo-moar 99218a: OUTPUT«a␤b␤c␤Array $var = $[97, 98, 99]␤[194 196 198]␤[194 196 198]␤»
12:33 gfldex i'm pleased
12:35 gfldex m: say { Nil }.WHAT, &({ Nil }).WHAT;
12:35 camelia rakudo-moar 99218a: OUTPUT«(Block)(Block)␤»
12:36 Skarsnik dbiish still does pass its tests :(
12:38 sufrostico joined #perl6
12:41 Skarsnik I am not sure to get the diff between Num and Real, should a numeric in a DB be Num or Real?
12:42 pierre-vigier joined #perl6
12:44 moritz Num includes Complex, Real doesn't
12:45 moritz erm, wrong
12:45 moritz I meant Numeric
12:45 moritz Skarsnik: Num is a floating-point number
12:45 moritz Skarsnik: Real is a role that non-complex numbers do (Rat, Num, Int)
12:46 Actualeyes left #perl6
12:46 Skarsnik ok, so I can change the       1700  => 'Real',  # numeric in Pg to Num? since it's not a real (haha) type
12:47 ilmari no, numeric in pg is arbitrary-precision, not floating point
12:47 moritz Skarsnik: what is the type used for?
12:47 moritz as a constraint? then Real is good
12:48 Skarsnik *confused*
12:48 Ven joined #perl6
12:49 Skarsnik I don't really get the difference x)
12:50 ilmari numeric in postgres is exact, with «up to 131072 digits before the decimal point; up to 16383 digits after the decimal point»
12:51 Skarsnik m:say Num ~~ Real
12:51 Skarsnik m: say Num ~~ Real
12:51 camelia rakudo-moar 99218a: OUTPUT«True␤»
12:51 timotimo ilmari: so really it wants to just be Str :)
12:52 ilmari or FatRat
12:52 Skarsnik can't be Real then?
12:52 dalek doc: 2490324 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
12:52 dalek doc: add postfix C<».>
12:52 dalek doc: review: https://github.com/perl6/doc/commit/24903243ad
12:52 dalek doc: c68ee34 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
12:52 dalek doc: Merge pull request #235 from gfldex/master
12:52 dalek doc:
12:52 dalek doc: add postfix C<».>
12:52 dalek doc: review: https://github.com/perl6/doc/commit/c68ee34eb5
12:52 gfldex El_Che: you may find the examples useful https://github.com/perl6/doc/commit/24903243add6ca4450239fb45b5eb5c7dfcdd76b
12:54 kst` joined #perl6
12:55 emdashcomma_ joined #perl6
12:56 pyrimidi_ joined #perl6
12:57 jevin joined #perl6
12:58 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)
13:08 Skarsnik (╯°□°)╯︵ ┻━┻
13:09 BooK Skarsnik: I saw you talk about dbiish, what is it exactly? the DBI for Perl 6 ?
13:09 Skarsnik Yes
13:09 ilmari BooK: ish
13:09 BooK how ish is the ish?
13:09 BooK -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 #perl6
13:11 timotimo BBL
13:11 BooK well, DBI has a test suite, and there's been some work on Test::DBI
13:11 jkva joined #perl6
13:12 znpy joined #perl6
13:14 Skarsnik I don't get why only the mysql fail with the find_symbol error with a recent rakudo
13:14 dalek rakudo/nom: 8e8fb47 | grondilu++ | src/core/native_array.pm:
13:14 dalek rakudo/nom: adding a constraint to permutations
13:14 dalek rakudo/nom:
13:14 dalek rakudo/nom: permutations($n) does not make sense if $n <= 0
13:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e8fb4740c
13:14 dalek rakudo/nom: 7f63896 | lizmat++ | src/core/native_array.pm:
13:14 dalek rakudo/nom: Merge pull request #629 from grondilu/patch-7
13:14 dalek rakudo/nom:
13:14 dalek rakudo/nom: adding a constraint to permutations
13:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7f6389673e
13:17 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…»
13:17 gfldex will is cached come back?
13:18 lizmat m: use experimental :cached
13:18 camelia rakudo-moar 99218a: ( no output )
13:18 lizmat m: use experimental :cached; sub a is cached ($a) { ... }
13:18 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␤»
13:18 lizmat m: use experimental :cached; sub a($a) is cached) { ... }
13:18 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␤»
13:20 lizmat m: use experimental :cached; sub a($a) is cached { ... }
13:20 camelia rakudo-moar 99218a: ( no output )
13:20 lizmat gfldex: ^^^
13:20 lizmat the current implementation was not considered to be 6.c worthy really
13:21 lizmat so jnthn turned it into an experimental feature, just like macro's, btw
13:23 gfldex that breaks htmlify.p6 in the docs, what is no biggy because it doesn't work with current rakudo anyway
13:30 Actualeyes joined #perl6
13:33 dalek doc: 70cc088 | lizmat++ | htmlify.p6:
13:33 dalek doc: Make sure "is cached" works
13:33 dalek doc: review: https://github.com/perl6/doc/commit/70cc088339
13:35 zakharyas joined #perl6
13:38 |Tux| m: my$b=Buf.new(^2048 .map({256.rand.Int}));my Str$u=$b.decode("utf8-c8");
13:38 camelia rakudo-moar 7f6389: ( no output )
13:38 |Tux| m: my$b=Buf.new(^2048 .map({256.rand.Int}));my Str$u=$b.decode("utf8-c8");
13:38 camelia rakudo-moar 7f6389: OUTPUT«(signal SEGV)»
13:41 lucasb joined #perl6
13:45 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:46 _nadim joined #perl6
13:49 ggoebel8 joined #perl6
13:50 Skarsnik I hope it's not what I just change that make DBIish mysql/sqlite fail
13:52 zengargoyle joined #perl6
13:56 abraxxa joined #perl6
13:56 RabidGravy joined #perl6
13:57 aindilis` joined #perl6
13:58 BuildTheRobots joined #perl6
13:59 Juerd roast/S32-temporal/DateTime-Instant-Duration.t says "DateTime is the only means of constructing arbitrary Instants", but:
13:59 Juerd m: Instant.new(1e9).DateTime.say
13:59 camelia rakudo-moar 7f6389: OUTPUT«2001-09-09T01:46:08Z␤»
14:00 Juerd That's using Instant.new, not DateTime, to create an arbitrary Instant.
14:00 luis` joined #perl6
14:00 Juerd Also, http://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:01 [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 ...)
14:02 Skarsnik try with introspection
14:02 lizmat Juerd: but you're coercing it to a DateTime without :timezone, that assumes GMT
14:02 Skarsnik I think nothing is really private
14:03 lucs Skarsnik: Not sure how introspection works; can you point me to some docs please?
14:03 lucs (I'll ack the specs too)
14:03 Skarsnik http://doc.perl6.org/language/mop
14:04 lucs Thanks
14:04 Skarsnik I think $object.^find_method('private') could work?
14:04 gfldex lucs: these spectests may be helpful https://github.com/perl6/roast/blob/master/S12-methods/private.t#L6-L44
14:05 lucs gfldex: Nice, thanks.
14:05 kolikov joined #perl6
14:05 El_Che ok, without stepping on toes, the Grammar howto needs a lot of work
14:06 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 #perl6
14:07 DrForr El_Che: I might be tempted to rewrite after I get done with the talk on it.
14:08 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:10 El_Che The link grammar-actions feels like a lot of black magic ("oh you forgot a rat's liver? it won't work)
14:11 Skarsnik *wish travis did not rebuild rakudo/moar evertime*
14:12 RabidGravy you can cache it I believe
14:12 Sgeo joined #perl6
14:12 RabidGravy https://docs.travis-ci.com/user/caching/
14:13 Skarsnik I hope my "fix" is not a fix, otherwise it's pretty weird (I swaped some use)
14:15 pippo left #perl6
14:20 lizmat Juerd: maybe I misunderstood by what you meant with "not tied to any epoch)
14:21 lizmat "
14:21 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 pierre-vigier joined #perl6
14:22 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 Juerd I can imagine that this is platform dependent, but in that case it should imho be worded as such.
14:23 Juerd 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 ?
14:23 camelia rakudo-moar 7f6389: OUTPUT«1969-11-27T06:39:50Z␤»
14:23 Juerd Still epoch bound :)
14:23 lizmat so that it's origin doesn't really matter ?
14:24 lizmat 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.
14:24 zengargoyle Skarsnik: are you testing sqlite stuff?
14:24 kolikov m: my %b = a=>1 , b => 2;
14:24 camelia rakudo-moar 7f6389: ( no output )
14:24 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 ?
14:24 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 :)
14:24 lizmat perhaps TimToady can elaborate
14:25 Juerd lizmat: It's still clearly bound to that epoch, though.
14:25 Juerd Perhaps he can. :)
14:25 kolikov m: say my %b = a=>1 , b => 2;
14:25 camelia rakudo-moar 7f6389: OUTPUT«a => 1, b => 2␤»
14:25 lizmat Juerd: you need to fix it to somewhere
14:25 Juerd The tests were written by Blame
14:25 lizmat or somewhen
14:25 Juerd Argh
14:25 lizmat :-)
14:25 Juerd The tests were written by Kodi
14:25 kolikov m: my %b = a=>1 , b => 2; say %b.invert;
14:25 camelia rakudo-moar 7f6389: OUTPUT«(1 => a 2 => b)␤»
14:25 Juerd Corrected 'git balme' in the wrong window :)
14:26 Juerd I don't know who Kodi is. Are they on IRC? :)
14:26 ilmari 'git balm' for when your commits need soothing
14:26 kolikov m: my %b = a=>1 , b => 2; say %b.invert{2}
14:26 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␤␤»
14:27 kolikov m: my %b = a=>1 , b => 2; say %b.invert.WHAT;
14:27 camelia rakudo-moar 7f6389: OUTPUT«(Seq)␤»
14:27 kolikov Arrgg Seq !
14:28 zengargoyle m:  my %b = a=>1 , b => 2; say %b.invert.hash{2}
14:28 camelia rakudo-moar 7f6389: OUTPUT«b␤»
14:28 kolikov @zengargoyle ... Thanks !
14:29 zengargoyle m:  my %b = a=>1 , b => 2; say %b.invert.Hash{2}
14:29 camelia rakudo-moar 7f6389: OUTPUT«b␤»
14:29 * zengargoyle not sure what the difference between .hash and .Hash is. :)
14:29 Juerd Wow, the word 'now' is used a lot in test comments and descriptions :)
14:29 kolikov Just wished 'invert' would be context sensitive ...
14:31 skids joined #perl6
14:31 lizmat kolikov: how do you mean?
14:32 kolikov @lizmat : invert -> hash returns hash ... invert list returns list .
14:33 lizmat kolikov: fwiw, it *is* context sensitive in a way, as Hash.inverts returns a List of Pairs
14:35 ilmari kolikov: if Hash.invert returned a hash it would be lossy
14:35 ilmari if you have multiple keys with the same value, which should win?
14:35 lizmat that's why it returns a list of Pairs
14:35 ilmari exactly
14:35 lizmat so you can decide how to handle that
14:35 kolikov @lizmat : lossy ?
14:35 ilmari m: { a => 42, b => 42}.invert.hash.say
14:35 camelia rakudo-moar 7f6389: OUTPUT«42 => b␤»
14:35 lizmat like ilmari said: what if 2 keys have the same value?
14:36 kolikov @ilmari & lizmat : I see, it is logical !
14:37 zengargoyle i'd expect that to sometimes give 'a', but seems to be always 'b'... is the {}.invert not randomish?
14:38 lizmat zengargoyle: Hash.list is not randomish
14:38 lizmat (well, it is on JVM, I think)
14:38 lizmat anyway, one should not depend on order with anything hash related, as in Perl 5
14:39 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).
14:39 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. :)
14:40 moritz m: say (my %h).push: {a => 42, b => 42}
14:40 camelia rakudo-moar 7f6389: OUTPUT«a => 42, b => 42␤»
14:40 moritz m: say (my %h).push: {a => 42, b => 42}.invert
14:40 camelia rakudo-moar 7f6389: OUTPUT«42 => [a b]␤»
14:40 moritz mrf: ^^ that's how you get that
14:40 mrf moritz: is that rewriting %h inline?
14:40 moritz mrf: yes
14:41 mrf ahh. No its creating %h from a anon hash
14:41 moritz well, it's creating %h, and then mutating it
14:41 * mrf is still getting used to the "function: do" syntax
14:41 moritz m: (my %h).push: {a => 42, b => 42}.invert; say %h.perl
14:41 camelia rakudo-moar 7f6389: OUTPUT«{"42" => $["a", "b"]}␤»
14:42 moritz m: (my %h).push({a => 42, b => 42}.invert); say %h.perl
14:42 camelia rakudo-moar 7f6389: OUTPUT«{"42" => $["a", "b"]}␤»
14:44 dalek rakudo/nom: 61baf0f | hoelzro++ | src/core/JSON/Pretty.pm:
14:44 dalek rakudo/nom: Add JSONException and throw it on invalid JSON
14:44 dalek rakudo/nom:
14:44 dalek rakudo/nom: This way, instead getting a red herring "Method ast not found" error,
14:44 dalek rakudo/nom: users of JSON::Pretty can know what the underlying error actually is
14:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61baf0fe45
14:44 dalek rakudo/nom: e0c7590 | hoelzro++ | src/core/CompUnit/Repository/FileSystem.pm:
14:44 dalek rakudo/nom: Fail with friendly error message when failing to load META6.json
14:44 dalek rakudo/nom:
14:44 dalek rakudo/nom: The filesystem compunit repository loader consults META6.json (if
14:44 dalek rakudo/nom: available) for module metadata, but the error message includes JSON
14:44 dalek rakudo/nom: which the user may not immediately understand the source of.  This
14:44 dalek rakudo/nom: change points them to the source of the JSON so they can understand
14:44 dalek rakudo/nom: and fix what's going wrong
14:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e0c7590008
14:44 mrf m: (my %h).push({a => 42, b => 42}).invert.say;
14:44 camelia rakudo-moar 7f6389: OUTPUT«(42 => a 42 => b)␤»
14:44 mrf ahhh right now I think I understand
14:45 mrf moritz: is the end of the push: defined by the ; ?
14:46 mrf 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␤␤»
14:46 mrf m: a..z.map: {.uc.say};
14:46 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␤␤»
14:46 mrf :(
14:46 mrf oh well.
14:46 ilmari mrf: use more quotess
14:46 mrf m: "a".."z".map: {.uc.say};
14:46 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␤␤»
14:47 ilmari ("a".."z").map: { .uc.say }
14:47 ilmari m: ("a".."z").map: { .uc.say }
14:47 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␤»
14:47 mrf ilmari++
14:47 mrf moritz++
14:48 mrf m: ("a".."z")>>.map: {.uc.say};
14:48 camelia rakudo-moar 7f6389: ( no output )
14:48 * mrf goes and experiments in a repl and stops spamming people
14:49 lizmat m: "a".."z" .map: {.uc.say};  # note whitespace after "z"
14:49 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␤␤»
14:49 lizmat huh?
14:49 lizmat m: 1..10 .map: {.uc.say};  # note whitespace after "z"
14:49 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␤␤»
14:49 lizmat weird
14:50 pierre-vigier joined #perl6
14:54 pierre-vigier joined #perl6
14:54 TimToady .. is still looser
14:54 yoleaux 09:19Z <masak> TimToady: 007 passes all tests on thunkyreduce.
14:54 TimToady .. does not have the same precedence as ^
14:55 TimToady so you still need parens there
15:00 lizmat m: ^10 .map: {.uc.say};  # aaahhh
15:00 camelia rakudo-moar e0c759: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
15:00 ilmari m: ^"z".map:  { .uc.say };
15:00 camelia rakudo-moar e0c759: OUTPUT«WARNINGS:␤Useless use of "^" in expression "^\"z\".map:  { .uc.say }" in sink context (line 1)␤Z␤»
15:00 ilmari m: ^"z" .map:  { .uc.say };
15:00 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:04 TimToady please don't anyone make that dwim an "a" there
15:07 hankache joined #perl6
15:07 moritz but don't all alphabets start with "a"? :-)
15:08 TimToady yeah, and end with 'y'
15:09 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 ا..ي;
15:09 camelia rakudo-moar e0c759: OUTPUT«5===SORRY!5=== Error while compiling /tmp/togKRq71mh␤Undeclared routines:␤    ا used at line 1␤    ي used at line 1␤␤»
15:09 hankache m: say |(ا...ي);
15:09 camelia rakudo-moar e0c759: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eiF7kUtB7a␤Undeclared routines:␤    ا used at line 1␤    ي used at line 1␤␤»
15:10 hankache :(
15:10 Juerd m: say "ا".."ي"
15:10 camelia rakudo-moar e0c759: OUTPUT«"ا".."ي"␤»
15:11 Juerd m: say ("ا".."ي")[14]
15:11 dalek rakudo/nom: a1bed15 | TimToady++ | src/ (5 files):
15:11 camelia rakudo-moar e0c759: OUTPUT«ص␤»
15:11 dalek rakudo/nom: Revert "Revert "get reductions thunking for left/list assoc""
15:11 dalek rakudo/nom:
15:11 dalek rakudo/nom: This reverts commit c5f81ae6086a5b1aa80d47f3251d495a1c02fea0.
15:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a1bed15876
15:11 dalek rakudo/nom: 6516930 | TimToady++ | src/ (3 files):
15:11 dalek rakudo/nom: redo reduce thunking, ignoring slip args now
15:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6516930c86
15:11 dalek rakudo/nom: ee0933a | TimToady++ | src/core/Signature.pm:
15:11 dalek rakudo/nom: Merge branch 'nom' into thunkyreduce
15:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ee0933a093
15:11 dalek rakudo/nom: 4a4ae62 | TimToady++ | src/Perl6/Actions.nqp:
15:11 dalek rakudo/nom: allow thunking reduced list infixes too
15:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a4ae62574
15:11 dalek rakudo/nom: 7df9978 | TimToady++ | src/core/ (4 files):
15:11 dalek rakudo/nom: Merge branch 'nom' into thunkyreduce
15:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7df9978872
15:11 dalek roast: d486092 | TimToady++ | S03-metaops/reduce.t:
15:11 dalek roast: unfudge thunkyreduce tests
15:11 dalek roast: review: https://github.com/perl6/roast/commit/d4860926ab
15:11 Juerd hankache: You still have to quote strings :)
15:12 andreoss joined #perl6
15:12 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
15:12 hankache m: say |("ا".."ي");
15:12 camelia rakudo-moar e0c759: OUTPUT«ابةتثجحخدذرزسشصضطظعغػؼؽؾؿـفقكلمنهوىي␤»
15:12 TimToady Instant.new(123) is bogus
15:13 hankache Juerd++
15:13 mst TimToady: error: attempt to cross same river twice?
15:13 Juerd m: Instant.new(1449755609).DateTime.say
15:13 camelia rakudo-moar e0c759: OUTPUT«2015-12-10T13:52:53Z␤»
15:13 Juerd Should be disallowed?
15:13 TimToady yes
15:14 TimToady 1970 is not special to Instants
15:14 Juerd Since it's currently supported, deprecate or just remove?
15:14 AlexDaniel joined #perl6
15:15 RabidGravy "Invalid dependencies table index encountered (index 272)" - this gets more fun all the time
15:15 AlexDaniel bleh, spam in RT :(
15:15 TimToady given it's very contrary to spec, I'm inclined to rip it out and see who screams :)
15:15 ilmari m: Instant.from-posix(1449755609).DateTime.say
15:15 camelia rakudo-moar e0c759: OUTPUT«2015-12-10T13:53:29Z␤»
15:15 Juerd That leaves .from-posix, indeed. So is that one wrong too?
15:16 ilmari m: now.to-posix.say
15:16 camelia rakudo-moar e0c759: OUTPUT«(1449760573.968504 False)␤»
15:16 Juerd False?
15:17 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
15:17 * [Coke] waves.
15:17 Juerd TimToady: Okay, will remove the false comment then :)
15:19 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 TimToady so we could have Instant1970 for instance
15:19 * [Coke] pmichauds, "that's not the spec"
15:20 TimToady spec is short for speculation :P
15:20 * [Coke] waves his hand like ob-wan
15:20 [Coke] *obi-wan
15:20 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?
15:21 mst 'immediately' can include time for e.g. a travis run
15:21 [Coke] dunno - I could see value in not immediate. merging.
15:21 andreoss m: say |("\c[CYRILLIC CAPITAL LETTER A]" .. "\c[CYRILLIC CAPITAL LETTER TSHE]")
15:21 camelia rakudo-moar e0c759: OUTPUT«␤»
15:21 * ShimmerFairy still disagrees with the idea that roast is ~the~ spec; it's really a poor choice of format for human implementors to read :)
15:22 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
15:22 AlexDaniel mst: so it's just to see if tests are passing? Why not run them yourself?
15:23 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 TimToady maybe we should pick a random epoch when we start up :)
15:24 mst AlexDaniel: on a dozen different operating systems?
15:24 mst AlexDaniel: even setting up the VMs for that is hardly 'just'
15:24 Juerd ilmari: Wow, that seems like a rather useless feature to require [0] everywhere :(
15:24 TimToady .oO(Highlander Specs)
15:24 ilmari mst: I thought travis was just ubuntu and osx(?)
15:24 AlexDaniel mst: mm okay
15:25 ilmari AlexDaniel: it tests a bunch of different configurations in parallell
15:25 mst ilmari: I'm handwaving here
15:25 ilmari https://github.com/rakudo/rakudo/blob/nom/.travis.yml#L26
15:25 mst the obvious insanity of the question didn't require a detailed answer
15:26 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?
15:26 mst honestly, anybody who thinks more testing is ever 'just' may be missing how much sofwtare hates us all ;)
15:26 zengargoyle or before rebuilding, move .rakudobrew/moar-nom to .rakudobrew/moar-old and then switch between moar-old and moar-nom.
15:27 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 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...)
15:28 mst AlexDaniel: I'm really not sure what problem you're seeing here
15:28 TimToady Juerd: feel free, but note that the internals are using .new where they should be using .from-posix
15:28 AlexDaniel yeah, except that it does not create unnecessary pull request
15:28 mst unnecessary according to whom?
15:28 Juerd TimToady: Seems like a fun thing to kill then :)
15:28 mst everybody else seems to be fine with this workflow
15:28 AlexDaniel mst: I have no problem, I'm just trying to figure out what would be the right way to do stuff
15:29 TimToady ShimmerFairy: sure, but we intentionally sacrificed that to get to xmas
15:29 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.
15:29 mst really. then calling other people's workflow unnnecessary is not a good way to figure that out
15:29 AlexDaniel ShimmerFairy: sure, I understand that
15:29 mst maybe you could try again without the contempt for people who work differently to you?
15:29 AlexDaniel mst: sorry if it sounded like that
15:29 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 khw joined #perl6
15:30 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 mst and part of it is that if something does go wrong you now have the PR there to re-use later
15:30 mst 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
15:31 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
15:31 mst I'm basically convinced that the correct workflow is "whatever the team involved have found works for them"
15:32 moritz and that depends a lot on the people, the project, and the tooling
15:33 andreoss zengargoyle: i want old moar-nom to keep working until the build of new one is done
15:33 andreoss is it possible?
15:33 moritz andreoss: camelia uses a setup that allows this
15:33 moritz andreoss: with two separate build directories, and a symlink that's switched over when the build is successful
15:34 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;
15:34 moritz m: say "Hi, I'm a bot that runs Perl 6 code"
15:34 camelia rakudo-moar 7df997: OUTPUT«Hi, I'm a bot that runs Perl 6 code␤»
15:34 moritz andreoss: ^^
15:34 andreoss oh. i thought it could be some alternative build script for rakudo
15:35 zengargoyle andreoss: nevermind, won't work. :(
15:37 zengargoyle 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))
15:38 zengargoyle guess you'd have to go with building a specific commit sha1 instead of building a tag
15:40 [Coke] PRs are not automatically announced here, btw.
15:41 diakopter [Coke]: seems like a sensible thing to add
15:42 * zengargoyle really dislikes installations that aren't relocatable.
15:42 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
15:43 diakopter tadzik: github-backed++
15:43 retupmoca MadcapJake: I'm not sure if there are newer docs somewhere, but see https://github.com/jnthn/zavolaj#function-arguments
15:43 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
15:43 tadzik diakopter: well, I mostly mean firing up dzilla, adding all the files, building, talking to pause, yada yada
15:43 tadzik the actual pushing the archive to a place is not that bad
15:43 tadzik yes, I know dzilla does it for me
15:44 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
15:44 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"
15:44 MadcapJake you can't use void bare, and those aren't void pointers
15:44 andreoss is there any perl6 clones?
15:44 tadzik yeah, there's a bit of a bootstrapping problem with writing it in perl 6 :)
15:44 tadzik diakopter: I don't even wanna know
15:45 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
15:45 tadzik but having to build your very first perl 6 compiler with a perl 6 program may prove a bit tricky
15:46 mst tadzik: Dist::Zilla is the super-complicated fine control tool
15:46 mst 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
15:46 tadzik mst: oh, but it's still relatively hassle-free compared to the alternatives, innit?
15:46 mst tadzik: no
15:46 tadzik heck, I remember teaching it on a Perl course once, didn't take that much time
15:46 mst tadzik: it's the most complicated choice
15:47 tadzik mst: what would you go with instead?
15:47 nine Oh how I hate file locking issues
15:47 mst tadzik: http://shadow.cat/blog/matt-s-trout/mstpan-11/
15:48 mst *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 mst however there are four suggestions on that mstpan entry
15:48 mst dzil is the complicated one, the other three are various forms of simpler
15:48 _nadim moritz: did you see the link I send about the code that generted the exception we talked about earlier this morning?
15:49 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
15:49 andreoss mst: what's the point of these distro builders if I can a full mirror of CPAN in minutes?
15:49 mst andreoss: what?
15:50 mst how are those things even related?
15:50 andreoss may be not, never used those
15:50 tadzik zengargoyle: I worry that people will default to using it and then wonder why is .rakudobrew taking 99% of their disk space
15:50 * masak .oO( what's the point of these pots and pans if I can be at a restaurant in minutes? )
15:51 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
15:51 masak tadzik: remind me to show you sometime :P
15:51 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 :)
15:54 zengargoyle tadzik: i don't have much pity for folks using a timestamp every new build option and then getting irate. :)
15:54 zengargoyle think they'd also have to remember to do the rakudobrew switch part as well.
15:54 tadzik zengargoyle: well, if they specify the timestamps themselves, no :)
15:55 tadzik 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 tadzik (when their disks fill up :P)
15:55 mst I think you'd need auto-expiry
15:55 mst I'd been thinking about this for Object::Remote
15:55 mst basically "sha1 the bootstrap back and drop it into a dotdir, re-use that if present"
15:56 rindolf joined #perl6
15:58 molaf joined #perl6
15:59 andreoss I've read Dist::Zilla description, and it's purpose still obscure for me
15:59 andreoss hope a need for such tools is gone is Perl 6
15:59 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.
15:59 andreoss *in
16:00 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
16:01 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?" :)
16:01 mst hence my recommending tadzik tried one of the simpler but less configurable ones
16:01 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.
16:02 dj_goku .messages
16:02 dj_goku hi
16:03 moritz \o
16:05 tadzik o/
16:05 marchelzo joined #perl6
16:07 gfldex is the threadpool global or does it apply a pool to each start?
16:08 moritz it's per OS process, afaict
16:08 moritz dunno how it's on the JVM
16:09 gfldex per process is what i ment with global
16:09 Juerd Why is $!tai in Instant a Rat, not a Num?
16:10 andreoss gfldex: i guess you can localize $*SCHEDULER and have several threadpools
16:13 ZoffixW joined #perl6
16:13 TimToady Juerd: see S02:1447
16:14 lucs I'm really tempted to use dashes instead of underscores in my identifiers now.
16:14 Juerd TimToady: Thanks :)
16:14 lucs Any positive or negative experiences to share regarding that?
16:15 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 #perl6
16:15 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
16:15 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 ">"
16:15 dj_goku lucs: I would like that option in python. I am for it, but more a preference than anything.
16:16 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.
16:17 El_Che It looks so simple, but I feel I am doing the cargo cult thing and the cargo are explosives
16:17 El_Che :)
16:17 dj_goku lucs: right. so why not. :D
16:17 havenn joined #perl6
16:17 havenn joined #perl6
16:17 lucs dj_goku: Right :)
16:17 El_Che DrForr: I count on your rewrite of the doc :)
16:18 telex joined #perl6
16:18 andreoss left #perl6
16:18 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 TimToady lizmat: yes, specs are full of fossils at the moment
16:19 lizmat cleanup post 6.c I guess  :-)
16:19 El_Che how to create an infinite loop for dummies: method TOP($/) { $/.make: $/ }
16:19 El_Che :)
16:19 lucs What is "6.c" exactly?
16:19 emdashcomma joined #perl6
16:19 dj_goku Christmas I presume.
16:19 El_Che alfa, beta, california :)
16:20 dj_goku m: say Date.new()
16:20 camelia rakudo-moar 7df997: OUTPUT«2015-12-24␤»
16:20 dj_goku m: say Date.new
16:20 camelia rakudo-moar 7df997: OUTPUT«2015-12-24␤»
16:20 marchelzo El_Che: wouldn't it have to be "$./make: $./.made" to be an infinite loop?
16:20 JimmyZ so 03 Dec 2015 PHP 7.0.0 Released, and now Perl 6 :P
16:20 Juerd Hm, I thought that was deprecated? (Date.new returning non-today)
16:20 marchelzo oops $/.made
16:20 Actualeyes joined #perl6
16:21 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 ?
16:21 El_Che marchelzo: my example get 1 core at 100%
16:22 marchelzo hmm. then I don't understand grammar actions as well as I thought I did
16:25 diakopter tadzik: actually you could make it one step more meta
16:25 diakopter well, automated anyway
16:28 psy joined #perl6
16:29 diakopter tadzik: (reading your advent post)
16:29 dalek roast: 9767181 | TimToady++ | S03-metaops/reduce.t:
16:29 dalek roast: put in promised test for [&&] |0
16:29 dalek roast: review: https://github.com/perl6/roast/commit/9767181d2f
16:29 dalek roast: 61eb3e6 | TimToady++ | S03-metaops/reverse.t:
16:29 dalek roast: unfudge passing test
16:29 dalek roast: review: https://github.com/perl6/roast/commit/61eb3e6ebc
16:29 dalek roast: 498e542 | TimToady++ | S03-metaops/ (2 files):
16:29 dalek roast: tests for thunking X and Z lists
16:29 dalek roast: review: https://github.com/perl6/roast/commit/498e542693
16:29 psy joined #perl6
16:30 tadzik diakopter: oh?
16:35 * stmuk revises LPW perl6 talk slides in a state of impending panic
16:35 moei joined #perl6
16:35 lizmat stmuk: know the feeling
16:35 diakopter tadzik: well for instance here's a ton of grammars in antlr format: https://github.com/antlr/grammars-v4 that you could make a parser generator generator for
16:36 dalek roast: 9c76381 | TimToady++ | S03-metaops/ (2 files):
16:36 dalek roast: also test non-thunking of non-list on X and Z
16:36 dalek roast:
16:36 dalek roast: Otherwise someone might be tempted to implemente it accidentally.
16:36 dalek roast: review: https://github.com/perl6/roast/commit/9c763813ed
16:37 tadzik diakopter: I think someone did that
16:37 diakopter like, here's the Csharp one https://github.com/antlr/grammars-v4/blob/master/csharp/CSharp4.g4
16:37 diakopter tadzik: oh?
16:37 tadzik https://github.com/drforr/perl6-ANTLR4
16:37 tadzik yep, that'd be DrForr++
16:37 diakopter gah
16:39 diakopter .oO( surely I read about it months ago.. but I can't seem to recall it at all.. )
16:39 diakopter hm, maybe I saw it in the modules list
16:40 diakopter subconscious
16:40 diakopter well, Perl 6 is holding steady at 1 module/day on modulecounts.com
16:42 diakopter come on, people, we need 10,000/month to match Node!
16:42 TimToady we'll try to work harder :)
16:43 * 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?
16:44 TimToady well, it might still be unstable in the other sense, but I hope not
16:45 TimToady in that vein, does anyone else regularly get a hang on t/spec/integration/advent2013-day14.t?
16:46 TimToady (under TEST_JOBS)
16:46 TimToady would be nice to have a signal to hit it with and make a stacktrace of where it's at
16:47 masak TimToady: couldn't the source code be changed to enable that?
16:48 TimToady and t/spec/S17-supply/throttle.t hangs about half the time for me
16:48 TimToady masak: yes, it could!
16:49 nine throttle.t hangs pretty much all the time here
16:50 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
16:51 diakopter what even is Logic::Chairman
16:51 timotimo who's making all this damn backlog? :P
16:52 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!
16:52 Juerd m: say <1480211362058/1021>
16:52 camelia rakudo-moar 7df997: OUTPUT«===SORRY!===␤Cannot find method 'compile_time_value'␤»
16:52 Juerd ^ Is that a bug?
16:52 diakopter masak: is that the Hurry::Coward correspondence?
16:52 TimToady Juerd: yup
16:53 masak diakopter: I would say yes, but I don't have a constructive proof of it.
16:53 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:54 Juerd (That is, it returns "Instant.from-posix({ $.to-posix().perl })")
16:55 psy_ joined #perl6
16:56 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
16:59 timotimo Skarsnik: um, that's totally obvious
16:59 diakopter timotimo: maybe p5 allows it?
16:59 timotimo Skarsnik: all parameters after the script name go to the scripts parameters
16:59 diakopter oh
16:59 nine diakopter: I'm sure it doesn't
16:59 Skarsnik oh yeah make sense x)
17:00 * 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 #perl6
17:01 Skarsnik hm interesting https://travis-ci.org/perl6/DBIish/builds/96072086
17:01 kolikov left #perl6
17:02 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
17:02 Juerd TimToady: Test preexisted
17:03 Juerd m: now.to-posix[0].say
17:03 camelia rakudo-moar 7df997: OUTPUT«1449767032.010601␤»
17:03 ugexe something that would allow things like -M"augment class IO::Path { method mkdir(|) { $do-something-different };"
17:04 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␤   …»
17:05 Juerd m: my @a = now.to-posix; Instant.from-posix(|@a).say
17:05 camelia rakudo-moar 7df997: OUTPUT«Instant:1449767136.298782␤»
17:05 Juerd It round-tripped before. Don't know if it was supposed to :)
17:05 |Sno| joined #perl6
17:05 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)
17:05 timotimo other than that you can already write modules inside the -e, too
17:06 ugexe but you cant use that code from -e with a script
17:06 ugexe perl6 -e "augment blah blah { };" script.pl
17:07 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:09 TimToady we don't want a spectest that fails every time the turkeys in charge of civil time install a leap second
17:09 TimToady 'course, if *more* things failed when they do that, maybe they'd reconsider...
17:10 timotimo so, how do i spend my time
17:10 timotimo tests for .hyper and .race perhaps?
17:10 timotimo because they don't work well right now
17:10 TimToady sounds good
17:11 Skarsnik someone can try the current DBIish with adding use DBIish::mysql; on the t/10-mysql.t (after use DBIish)?
17:13 cdg joined #perl6
17:14 hankache joined #perl6
17:15 domidumont joined #perl6
17:16 Odud joined #perl6
17:17 Odud Hi folks - does anyone know if there are plans to make Windows .msi installer packages for Rakudo 2015.11?
17:18 Skarsnik Probably not, someone was working on trying to have it for msys2
17:19 lichtkind joined #perl6
17:19 Odud OK - I currently use the binaries for 2015.09 and wanted to be on the latest and greatest
17:20 Skarsnik Well, latest is kinda broken in some way x)
17:20 Odud presumably the official Christmas release will have .msi installers?
17:20 lichtkind does anyone know why words return strings but chars an int
17:20 Skarsnik m: say "il fait beau".words.WHAT;
17:20 camelia rakudo-moar 7df997: OUTPUT«(Seq)␤»
17:21 Skarsnik m: say "il fait beau".words.elems;
17:21 camelia rakudo-moar 7df997: OUTPUT«3␤»
17:21 Skarsnik probably what you want?
17:21 ugexe i think hes asking about the naming convention not being the same
17:21 znpy joined #perl6
17:22 ugexe at least im wondering about it now
17:22 Odud perhaps he thought it should return the count of words?
17:23 Odud without having to use .elems
17:23 TimToady + is sufficient
17:23 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)
17:23 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'"
17:24 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 #perl6
17:25 Skarsnik ugexe, Oh yes, I can see that, chars was confusing for me actually, should it be .graphems?
17:26 moritz Skarsnik: we have .graphs
17:26 Juerd TimToady: Pull requests created for roast and rakudo, regarding Instant.new
17:27 Juerd lizmat: ^ PR also includes something that exercises Instant.DateTime
17:27 Skarsnik pff Pg tests y u work but Pg/mysql not (╯°□°)╯︵ ┻━┻
17:29 Skarsnik Does has $.Version = 0.01; have a special meaning?
17:29 TimToady m: my $x = 42; say "${x}s"
17:29 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"␤»
17:30 dalek doc: 1244ecc | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Path.pod:
17:30 dalek doc: add lazy example for sub dir
17:30 dalek doc: review: https://github.com/perl6/doc/commit/1244ecc377
17:30 dalek doc: b894ae7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Path.pod:
17:30 dalek doc: Merge pull request #236 from gfldex/master
17:30 dalek doc:
17:30 dalek doc: add lazy example for sub dir
17:30 dalek doc: review: https://github.com/perl6/doc/commit/b894ae78dd
17:32 hankache joined #perl6
17:33 timotimo Skarsnik: it does not
17:35 hankache hello everyone
17:37 timotimo ohai
17:38 hankache hola timotimo
17:38 Skarsnik Well I will leave someone else to figure DBIish error x)
17:38 hankache m: say 1..9;
17:38 camelia rakudo-moar 7df997: OUTPUT«1..9␤»
17:39 hankache m: say 1...9;
17:39 camelia rakudo-moar 7df997: OUTPUT«(1 2 3 4 5 6 7 8 9)␤»
17:39 hankache what is the rationale behind the difference in those 2 ^^
17:39 hankache ?
17:39 timotimo well, the ... operator is specifically for creating lists of items
17:39 gfldex a Range is a thing with a lower and upper bound
17:39 Skarsnik :m 1..9.WHAT
17:39 Skarsnik m: say 1..9.WHAT
17:39 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␤␤»
17:40 moritz m: say 4.5 ~~ (1..9)
17:40 camelia rakudo-moar 7df997: OUTPUT«True␤»
17:40 timotimo m: say 1, 4, 9 ... * > 100
17:40 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␤␤»
17:40 hankache I know ... is lazy list and .. is range constructor but why does oone flatten and the other not?
17:40 timotimo m: say 1, 4, 9, 16 ... * > 100
17:40 camelia rakudo-moar 7df997: OUTPUT«===SORRY!===␤Unable to deduce arithmetic or geometric sequence from 4,9,16 (or did you really mean '..'?)␤»
17:40 timotimo what are those sequences called again?
17:40 moritz hankache: because ranges are useful not only for iteration, but also for matching against
17:41 moritz 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)␤»
17:41 moritz m: say 1, 4, * ** 2 .. * > 100
17:41 camelia rakudo-moar 7df997: OUTPUT«14WhateverCode.new␤»
17:41 moritz m: say 1, 4, * ** 2 ... * > 100
17:41 camelia rakudo-moar 7df997: OUTPUT«(1 4 16 256)␤»
17:41 moritz m: say 1, 2, * ** 2 ... * > 100
17:41 camelia rakudo-moar 7df997: OUTPUT«(1 2 4 16 256)␤»
17:41 gfldex there is an infinite amount of values between the upper and lower boundery of a Range. Bit tricky to serialise that.
17:43 hankache thank you
17:43 TimToady m: say (1..*)»²
17:43 grondilu that will definitely hang
17:44 camelia rakudo-moar 7df997: OUTPUT«(timeout)»
17:44 hankache TimToady: Camelia gave up :)
17:44 TimToady m: .say for (1..*)»²
17:44 grondilu that will also hang
17:44 TimToady I guess the hyper is eager
17:44 camelia rakudo-moar 7df997: OUTPUT«(timeout)»
17:44 ab6tract joined #perl6
17:44 grondilu yes it is, didn't you specced it such?
17:45 * 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.
17:46 hankache Do we have a specific date for the release of 6.c?
17:46 Juerd m: ("a".."z")>>.say
17:46 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␤»
17:46 Juerd gfldex: Not randomised :(
17:47 gfldex it used to be
17:47 gfldex hankache: yes, in 7 days
17:47 hankache yahoooooo
17:47 gfldex don't bet on it :)
17:47 grondilu I'm not sure it randomizes.  I thought it was supposed to do all in parallel yet still return in order.
17:48 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
17:48 ugexe i thought it used to forcefully randomize the values so in the future people would not expect it to happen in order
17:48 flussence m: say -0x00FF .fmt('%04X') # am I expecting too much from fmt here?
17:48 camelia rakudo-moar 7df997: OUTPUT«0-FF␤»
17:48 lichtkind thanks Skarsnik but yes i worried more about consistency
17:49 lichtkind sure i can put +() around it
17:49 grondilu oh yeah *execution* is randomized, but the returned values must stay in order.
17:49 grondilu (I suppose)
17:50 grondilu it'd be pretty confusing if it was returning in a different order.
17:50 TimToady that's what .race is for
17:50 * grondilu never used that
17:51 grondilu 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...
17:51 * grondilu finds it in S02
17:52 TimToady m: .say for (1..100).race  # still busted, seems
17:52 camelia rakudo-moar 7df997: ( no output )
17:52 TimToady m: .say for (1..100.grep: *.is-prime).race
17:52 camelia rakudo-moar 7df997: OUTPUT«Seq objects are not valid endpoints for Ranges␤  in block <unit> at /tmp/_WzQNflZrZ:1␤␤»
17:52 TimToady m: .say for ((1..100).grep: *.is-prime).race
17:52 camelia rakudo-moar 7df997: ( no output )
17:53 grondilu no prime in 1..100 :P?
17:53 TimToady no racey ones, anyway
17:57 grondilu m: say my @ = (^3).map({ sleep rand; $_ }).race
17:57 camelia rakudo-moar 7df997: OUTPUT«[]␤»
17:57 grondilu ^not sure this should work
17:57 vendethiel joined #perl6
17:58 flussence m: printf('%+#012x', -12345); # now I'm fairly convinced this is wrong
17:58 camelia rakudo-moar 7df997: OUTPUT«000000x-3039»
17:59 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
17:59 geekosaur yeh, that's more like what I would expect
18:00 flussence (now that I've noticed they're in that order, printf syntax just became a million times less cryptic to me...)
18:01 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:02 flussence I'm aware I'm trying to do weird and obscure stuff here, so I don't mind if it stays broken :)
18:03 TimToady yes, this is a variant of RT #123979 I think
18:04 gfldex for interested parties, parsing many .pod-files in parallel: https://gist.github.com/gfldex/d31705b4478c87eb3467
18:10 leont joined #perl6
18:11 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 RabidGravy something weird going on there
18:11 adhoc joined #perl6
18:12 xfix joined #perl6
18:24 kyclark joined #perl6
18:27 dalek ecosystem: 49e9466 | (Zoffix Znet)++ | META.list:
18:27 dalek ecosystem: Add Number::Denominate to ecosystem
18:27 dalek ecosystem:
18:27 dalek ecosystem: Break up numbers into preset or arbitrary denominations: https://github.com/zoffixznet/perl6-Number-Denominate
18:27 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/49e94662ea
18:27 dalek rakudo/nom: 67f9259 | (Stefan Seifert)++ | src/core/CompUnit/ (3 files):
18:27 dalek rakudo/nom: Fix spurious file locking problems with precomp store
18:27 dalek rakudo/nom:
18:27 dalek rakudo/nom: File locking is a mess. Because it's racy, we cannot rely on upgrading a
18:27 dalek rakudo/nom: shared lock to an exclusive lock, so we have to take an exclusive lock
18:27 dalek rakudo/nom: even for reading precomp files.
18:27 dalek rakudo/nom:
18:28 dalek rakudo/nom: We also now only lock a file once and count how often we tried locking
18:28 dalek rakudo/nom: the same file, so we only unlock after the last locker set it free.
18:28 dalek rakudo/nom:
18:28 dalek rakudo/nom: Lastly we re-check the existence of a precomp file after loading failed
18:28 dalek rakudo/nom: and we locked the store again for precompilation, because in between,
18:28 dalek rakudo/nom: someone else may have precompiled and we could only make matters worse
18:28 dalek rakudo/nom: if we precompile again.
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67f9259950
18:28 nine It's impossible to feel my hate for file locking if you haven't tried using it yet...
18:29 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?  http://lpaste.net/146871
18:31 flussence kyclark: why not use «multi MAIN($in where *.IO.e) {...}; multi MAIN($in) {...}»?
18:32 lucs kyclark: foo = bar ?? baz !! baq  # Ternary conditional
18:33 dalek ecosystem: 9f347e3 | (Zoffix Znet)++ | META.list:
18:33 dalek ecosystem: stmuk/p6-app-p6tags/master/META.info is now at stmuk/p6-app-p6tags/master/META6.json
18:33 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9f347e34b6
18:33 kyclark lucs, the ternary works for this simple case, but what about something more involved?
18:35 lucs kyclark: The baz and baq can be as involved as you wish:  foo = bar ?? do {...} !! do {...}
18:36 kyclark OK, that's nice.
18:36 lucs Be generous with newlines in code like that :)
18:38 RabidGravy kyclark, you can have a return value for given:
18:38 dalek rakudo/repository_registry: a5ced67 | (Stefan Seifert)++ | / (9 files):
18:38 dalek rakudo/repository_registry: Rename CompUnitRepo to CompUnit::RepositoryRegistry
18:38 dalek rakudo/repository_registry:
18:38 dalek rakudo/repository_registry: Its job will be to manage the mapping of repository spec strings to
18:38 dalek rakudo/repository_registry: repositories.
18:38 RabidGravy my $foo = do given Bool.pick { when True { "true" }; default { "false" }}; say $foo;
18:39 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;
18:39 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 #perl6
18:39 RabidGravy or something like that
18:40 RabidGravy m: my $foo = do given <1 2>.pick { when 1 { "1" }; default { "2" }}; say $foo;
18:40 camelia rakudo-moar 67f925: OUTPUT«2␤»
18:41 lucs The ternary conditional factors out the assignment, and the given, the "do" also (so, better in this case).
18:43 timotimo hm. it's just that S07 doesn't say much of anything about .hyper and .race yet
18:44 [Coke] lizmat, moritz: there should be no deprecated stuff in the christmas release, as a rule.
18:45 [Coke] (re Christmas)
18:45 [Coke] TimToady: (hang on advent) yes, for a week now
18:46 dwarring joined #perl6
18:46 hankache joined #perl6
18:46 [Coke] just found a hang on the jvm spectest suite also. bah.
18:46 kyclark What is "the thing" inside a "given"? $_, *
18:47 timotimo "context variable"
18:47 timotimo $_
18:50 joeschmoe left #perl6
18:51 hankache m: my $x = 1; say $x.WHERE; $x++; say $x.WHERE;
18:51 camelia rakudo-moar 67f925: OUTPUT«139669833703664␤139669833703704␤»
18:51 [Coke] (date for release) see docs/release* and the last announcement email. It'll be between next thursday and the 25th.
18:51 hankache how do you explain this ^^
18:51 [Coke] Probably the 25th for a) maximal testing time, and b) style.
18:52 hankache why incrementation changed the address of $x?
18:52 b2gills It's a new Int
18:54 WizJin joined #perl6
18:54 hankache indeed
18:55 hankache i am trying to see if this is related to immutability
18:55 * hankache still doesn't fully understand immutability/mutability
18:56 b2gills I think I would like the release announcement to have 「Brad Gilbert (b2gills)」 instead of 「Brad "b2gills" Gilbert」
18:56 xinming joined #perl6
18:56 b2gills m: for $=1,$=2,$=3 { say ++$_ }
18:56 camelia rakudo-moar 67f925: OUTPUT«2␤3␤4␤»
18:57 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…»
18:58 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 https://doc.perl6.org/language/containers i think it might help
18:58 nine hankache: you cannot change the 1, but you can ffill $x with a different object
18:59 gfldex hankache: reading this years 2 advent calender entry might help too
19:00 gfldex that's a small might tho :)
19:00 hankache nine gfldex b2gills thanks
19:00 [Coke] b2gills: done.
19:01 dalek rakudo/nom: 6aa4bfa | coke++ | docs/announce/2015.12.md:
19:01 dalek rakudo/nom: conform to b2gills name prefs.
19:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6aa4bfa16d
19:02 retupmoca nine++ # file locking bits
19:02 retupmoca nine: my panda bootstrap on windows is happy again!
19:02 flussence `panda smoke` still hangs in the same places, it seems :(
19:05 El_Che for who's interested, I sent a PR to add Documentation and tutorial to most-wanted: https://github.com/perl6/perl6-most-wanted/pull/10
19:06 lostinfog joined #perl6
19:07 dalek perl6-most-wanted: ea0de4d | (Claudio Ramirez)++ | / (3 files):
19:07 dalek perl6-most-wanted: Add documentation and tutorials to most wanted
19:07 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/ea0de4d6fe
19:07 dalek perl6-most-wanted: e7e0465 | (Wenzel P. P. Peppmeyer)++ | / (3 files):
19:07 dalek perl6-most-wanted: Merge pull request #10 from nxadm/master
19:07 dalek perl6-most-wanted:
19:07 dalek perl6-most-wanted: Add documentation and tutorials to most wanted
19:07 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/e7e0465e0e
19:08 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
19:09 El_Che gfldex: yeah, I haven been browsing the docs and making small changes when needed.
19:14 grondilu day 7 of the advent of code could be a nice show-case for S17.  https://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 prammer joined #perl6
19:15 grondilu this remined me of VHDL btw.
19:16 dalek rakudo/nom: 14b378f | lizmat++ | src/core/Temporal.pm:
19:16 dalek rakudo/nom: Deprecate Date.new now!
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/14b378f95b
19:16 grondilu (it'd be nice to have a VHDL slang/interpretor)
19:16 uruwi joined #perl6
19:16 st_iron joined #perl6
19:16 st_iron good afternoon my friends
19:17 grondilu hello
19:18 dalek rakudo/nom: 561ed95 | (Juerd Waalboer)++ | src/core/I (2 files):
19:18 dalek rakudo/nom: Forbid Instant.new
19:18 dalek rakudo/nom:
19:18 dalek rakudo/nom: 16:12 < TimToady> Instant.new(123) is bogus
19:18 dalek rakudo/nom: 16:14 < TimToady> 1970 is not special to Instants
19:18 dalek rakudo/nom: 16:15 < TimToady> given it's very contrary to spec, I'm inclined to rip
19:18 dalek rakudo/nom: it out and see who screams :)
19:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/561ed95bb6
19:18 dalek rakudo/nom: 8287aad | lizmat++ | src/core/I (2 files):
19:18 dalek rakudo/nom: Merge pull request #630 from Juerd/nom
19:18 dalek rakudo/nom:
19:18 dalek rakudo/nom: Forbid Instant.new
19:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8287aad3bc
19:19 dalek roast: af258c3 | (Juerd Waalboer)++ | S32-temporal/DateTime-Instant-Duration.t:
19:19 dalek roast: Add round-tripping tests for Instant.DateTime
19:19 dalek roast:
19:19 dalek roast: And remove false statement about DateTime being the only means of
19:19 dalek roast: creating an arbitrary Instant. There's also .from-posix().
19:19 dalek joined #perl6
19:21 * st_iron compiling moar again...
19:21 TimToady probably a good day for rainbows, and here I am making ~~ chain correctly...
19:23 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
19:24 nine retupmoca: great! I have hoped that it would make things at least a bit more platform independent
19:28 vendethiel uruwi: +@foo - @foo.squish :P
19:28 vendethiel I guess the first "+" is even optional
19:29 * 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:30 Skarsnik ++ to remove stuff x)
19:30 Skarsnik How roas is versioned?
19:30 timotimo TimToady: do you think S07-hyperrace/ would be a good place to put some hyper/race related tests?
19:31 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:32 uruwi vendethiel, no, that's not what I meant
19:33 uruwi 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?
19:34 vendethiel uruwi: bag?
19:34 vendethiel m: say bag <a a a b b c>
19:34 camelia rakudo-moar 8287aa: OUTPUT«bag(a(3), c, b(2))␤»
19:34 ugexe loks like he wants a mix of bag and squish
19:35 vendethiel uh?
19:35 vendethiel ah, indeed
19:35 vendethiel "fold" :P
19:36 znpy joined #perl6
19:36 dalek rakudo/repository_registry: 3fe70a9 | (Stefan Seifert)++ | / (13 files):
19:36 dalek rakudo/repository_registry: Replace language module loaders by CompUnit::Repositorys
19:36 dalek rakudo/repository_registry:
19:36 dalek rakudo/repository_registry: We now have CompUnit::Repository::NQP and CompUnit::Repository::Perl5
19:36 dalek rakudo/repository_registry: for loading modules from these languages. By unifying module loaders to
19:36 dalek rakudo/repository_registry: CompUnit::Repository based classes and a single $*REPO chain we may in
19:36 dalek rakudo/repository_registry: the future have mixed language repositories.
19:36 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/3fe70a9238
19:37 Skarsnik ooohh
19:39 dalek roast/repository_registry: c52919d | (Stefan Seifert)++ | S (2 files):
19:39 dalek roast/repository_registry: CompUnitRepo is now CompUnit::RepositoryRegistry
19:39 dalek roast/repository_registry: review: https://github.com/perl6/roast/commit/c52919d628
19:39 dalek roast/repository_registry: 4ef98f2 | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
19:39 dalek roast/repository_registry: method load is now provided by CompUnit::Repository
19:39 dalek roast/repository_registry: review: https://github.com/perl6/roast/commit/4ef98f27b7
19:39 leont joined #perl6
19:41 timotimo TimToady: because i'm indecisive and procrastinatorily engaged right now
19:41 yqt joined #perl6
19:45 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 kyclark I've tried several ways but can't make "map" or the list happy.
19:46 mst err, in perl5 you'd write
19:46 lizmat kyclark: "%base<A C G T>"
19:46 Actualeyes joined #perl6
19:46 joeschmoe joined #perl6
19:46 joeschmoe m: my regex number { \d+ [ \. \d+ ]? }; say "32.51" ~~ &number;
19:46 camelia rakudo-moar 8287aa: OUTPUT«「32.51」␤»
19:46 mst say join ' ', @hash{qw[A C G T]};
19:46 mst which maps directly to the form lizmat just gave in perl6
19:46 lizmat mst: that would be %hash
19:46 RabidGravy not in Perl 5
19:46 mst lizmat: um. I said "in perl5 you'd write"
19:47 mst lizmat: so, no, it wouldn't
19:47 RabidGravy :)
19:47 lizmat yeah, sorry  :-)
19:47 mst kyclark: so, yeah, do it right in perl5, and then use lizmat's translation of the right way to perl6
19:47 mst and all will be awesomer
19:47 mst also 20% cooler :D
19:47 joeschmoe m: my regex number { \d+ [ \. \d+ ]? }; say "15 + 4.5" ~~ / <number> \s* '+' \s* <number> /
19:47 camelia rakudo-moar 8287aa: OUTPUT«「15 + 4.5」␤ number => 「15」␤ number => 「4.5」␤»
19:48 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>;
19:49 kyclark It relies on a lot of implied stuff.
19:49 kyclark E.g., is there an $OFS kind of thing at play?
19:50 lizmat $OFS ??
19:50 RabidGravy output field separator
19:50 geekosaur they're speaking per;5 still although I think they meant $"
19:50 geekosaur (or didn't because they don't know that much p5?)
19:51 geekosaur basically, when perl5 expands an array in a string, it puts the value of $" between the elements
19:52 RabidGravy I don't think I have used that more than a couple of times in twenty years
19:52 moritz join exists
19:52 * geekosaur actually uses it fairly often for debugging
19:53 moritz "explicit is better than implicit" # you can tell I've been doing some python lately
19:54 geekosaur {local($") = '><'; print STDERR (caller(0))[3], " <@_>\n";}
19:54 geekosaur (sorry for polluting #perl6 with ugly p5 :p )
19:54 * mst basically always uses join in perl5
19:54 mst since then I can see exactly what's happening
19:55 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
19:55 flussence (also, I do what mst said)
19:55 flussence I know it's all covered by spectests but... I just don't trust it sometimes :)
19:55 geekosaur mostly that's habit from $formerjob which was stuck for yeeeeears on perl5.8 :/
19:56 dalek rakudo/repository_registry: 5a0cded | (Stefan Seifert)++ | src/ (2 files):
19:56 dalek rakudo/repository_registry: Make CompUnit objects available to higher level loading code
19:56 dalek rakudo/repository_registry:
19:56 dalek rakudo/repository_registry: Perl6::World's self.do_pragma_or_load_module now has access to the CompUnit
19:56 dalek rakudo/repository_registry: object instead of just the low level CompUnit::Handle.
19:56 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/5a0cded526
19:58 n0tjack joined #perl6
19:58 hankache what is immutable in Perl 6?
19:59 hankache values like 1 "hello"
19:59 hankache lists, ranges?
19:59 Juerd hankache: It's hard to make a complete list.
19:59 flussence anything that's not explicitly mutable
20:00 hankache ok what is explicitly mutable?
20:00 moritz hankache: containers!
20:00 Skarsnik everything that not immutable
20:00 TimToady containers, natives
20:00 moritz arrays, hashes, scalars
20:00 vendethiel- joined #perl6
20:00 moritz hankache: lists are immutable, but they can contain mutable elements like scalar containers
20:01 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
20:01 ugexe glad to see repository registry mightmake it before xmas
20:04 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?
20:04 TimToady because we are not Python
20:05 Skarsnik fix broken comp stuff so module can work again!
20:05 TimToady use .=sort for in-place
20:05 Skarsnik .sort return a sorted version but does not sort the array itself?
20:05 lizmat nine: I'm here
20:05 lizmat (now)
20:05 TimToady from P5 experience, sorting en passant is much more common than sorting in place
20:06 TimToady 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?
20:06 TimToady from P5 experience, sorting en passant is much more common than sorting in place
20:07 TimToady so that's what .sort should do by default
20:07 TimToady and .sort isn't just for arrays
20:08 TimToady m: say (1,3,2).sort
20:08 camelia rakudo-moar 8287aa: OUTPUT«(1 2 3)␤»
20:08 TimToady m: say (1,3,2).pop
20:08 camelia rakudo-moar 8287aa: OUTPUT«Cannot call 'pop' on an immutable 'List'␤  in block <unit> at /tmp/3gfUZ_GEH9:1␤␤»
20:08 TimToady and we are not Python :)
20:08 Skarsnik y no last? :(
20:09 El_Che TimToady: it could work as a tagline :)
20:09 TimToady why no last what?
20:09 nine TimToady: Python has .sort for in-place sorting and .sorted which returns a sorted list
20:09 TimToady yes, I know, and we don't need it because we have .=
20:10 TimToady obviously I'm not answering some implicit question here...
20:10 hankache actually it makes sense. If you want to sort in place use .=
20:10 El_Che (Just for the record, ruby went the sort and sort! way)
20:10 nine OMG
20:10 Skarsnik nine, what? .sorted for me mean "is this sorted?"
20:10 TimToady yes, ruby's ! is our .=
20:10 TimToady that's by design
20:10 El_Che that a second tagline
20:11 El_Che 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
20:12 El_Che I like the .= syntax (operator vs method)
20:15 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?
20:15 timotimo i haven't written roasty tests in so long, it feels like
20:16 ZoffixW joined #perl6
20:17 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? :)
20:17 camelia rakudo-moar 8287aa: ( no output )
20:17 flussence ooh, thanks. ZoffixW++
20:17 ZoffixW Druid and GGE seem to be bit-rotten beyond my skills tho :P
20:17 timotimo GGE for sure, yeah
20:17 timotimo i've given Druid a shred of attention again and again over the years
20:18 flussence .oO( in hindsight, telling people that "fixing GGE" is lhf is kinda evil... :)
20:18 timotimo ugh
20:18 timotimo yeah
20:19 dalek rakudo/nom: 06ed575 | lizmat++ | src/core/IO/ArgFiles.pm:
20:19 dalek rakudo/nom: Remove IO::ArgFiles.nl
20:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06ed575d0d
20:19 ZoffixW Brace yourselves!
20:19 ZoffixW .tell tadzik You have one PR waiting for a module fix: https://github.com/tadzik/perl6-Acme-Meow/pulls
20:19 ZoffixW .tell masak you have a few PRs for panda/module fixes: https://github.com/masak/druid/pulls https://github.com/masak/gge/pulls
20:19 ZoffixW .tell ShimmerFairy you've got a PR: https://github.com/ShimmerFairy/Lingua--EN--Numbers--Ordinal/pulls
20:19 ZoffixW .tell arnsholt you have some PRs waiting, some since March: https://github.com/arnsholt/Algorithm-Viterbi/pulls
20:19 yoleaux ZoffixW: I'll pass your message to tadzik.
20:19 yoleaux ZoffixW: I'll pass your message to masak.
20:19 yoleaux ZoffixW: I'll pass your message to ShimmerFairy.
20:19 yoleaux ZoffixW: I'll pass your message to arnsholt.
20:20 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.
20:20 RabidGravy If anyones feeling bored they could look at why H::UA is occassionally causing bad byte code
20:21 Skarsnik still http::message?
20:22 tadzik Zoffix: thanks :)
20:22 yoleaux 20:19Z <ZoffixW> tadzik: You have one PR waiting for a module fix: https://github.com/tadzik/perl6-Acme-Meow/pulls
20:22 timotimo bad bytecode?!
20:22 timotimo bwuh?
20:26 Skarsnik Zoffix, Config::Simple worked btw? I use the same kind of stuff that DBIish
20:28 RabidGravy All the errors I have been baffled by in the last few days have been centred in H::UA
20:32 Skarsnik *pick a random piece of code* I blame use Encode;
20:35 ugexe RabidGravy: if you just need a hack for now try adding `no precompilation` to every file
20:35 joeschmoe m: 'https://www.washingtonpost.com/news/checkpoint/wp/2015/12/10/in-new-serial-podcast-bowe-bergdahl-says-he-likened-himself-to-jason-bourne-before-capture//' ~~ %..|.*url=http|&ei.*/
20:35 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 RabidGravy :)
20:36 * flussence tries to use Term::ColorText for something then realises it's still broken...
20:40 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:41 Skarsnik m: 'https://www.washingtonpost.com/news/checkpoint/wp/2015/12/10/in-new-serial-podcast-bowe-bergdahl-says-he-likened-himself-to-jason-bourne-before-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.*/␤»
20:41 joeschmoe in pcre it looks like this %..|.*url=http|&ei.*/mgx
20:42 joeschmoe that link is a bad example
20:42 joeschmoe iv tested this one https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU
20:42 Skarsnik %.. is what? x)
20:44 joeschmoe % matches the character % literally
20:44 joeschmoe . matches any character (except newline)
20:44 joeschmoe then
20:45 joeschmoe . matches any character (except newline)  again
20:45 Skarsnik m: '%AA' ~~ /\%..|.*url=http|&ei.*/
20:45 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…»
20:45 joeschmoe I use this cool sit https://regex101.com/ to test it
20:46 Skarsnik m: '%AA' ~~ /'%'..|.*url=http|&ei.*/
20:46 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…»
20:47 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 sen
20:47 Skarsnik I think pcre and perl6 are quit different
20:48 grondilu they are
20:48 joeschmoe I will have to do some work to translate it then. thanks
20:48 joeschmoe https://regex101.com/  is realy great for PCRE.
20:48 grondilu well you can use m:P5
20:49 joeschmoe thanks for the tip
20:51 grondilu m: '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/
20:51 camelia rakudo-moar 06ed57: ( no output )
20:51 grondilu m: say '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/
20:51 camelia rakudo-moar 06ed57: OUTPUT«「%AA」␤»
20:51 grondilu m: '%AA' ~~ m:P5/\%..|.*url=http|&ei.*/; say $/.perl
20:51 camelia rakudo-moar 06ed57: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "\%AA", to => 3, from => 0)␤»
20:55 joeschmoe m:p5 -pe s/https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU/%..|.*url=http|&ei.*/mg
20:55 joeschmoe m:p5 -pe s/https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU/%..|.*url=http|&ei.*/mg'
20:56 Skarsnik that does not call perl5 with camelia x)
20:56 RabidGravy that ain't going to work,
20:57 [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:58 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:59 joeschmoe ill hack on it somemore thanks
21:00 RabidGravy of course by far the best way to do this would be
21:00 RabidGravy perl6 -MURI -e 'say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU").query-form<url>'
21:00 Skarsnik oh it's how you use than?
21:01 Skarsnik 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:02 bartolin_ [Coke]: fwiw, I've seen those hangs as well (since today)
21:02 joeschmoe m: -MURI -e 'say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU").query-form<url>'
21:02 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("https://www.google.com/ur␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
21:03 _nadim joined #perl6
21:03 RabidGravy joeschmoe, that doesn't work
21:03 RabidGravy m: use URI
21:03 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…»
21:04 Skarsnik m-star: use URI;
21:04 Skarsnik r-star: use URI;
21:04 moritz star-m: use URI;
21:04 camelia star-m 2015.09: ( no output )
21:04 Skarsnik I was close x)
21:04 moritz camelia: help
21:04 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))
21:04 camelia ..$perl6_program>
21:05 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)
21:06 RabidGravy star-m: use URI; say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU").query-form<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␤␤»
21:06 RabidGravy star-m: use URI; say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU").query_form<url>
21:06 camelia star-m 2015.09: OUTPUT«http://undiscoveredfeatures.com/elixir-tasks-vs-scala-futures/␤»
21:06 RabidGravy boo
21:07 Skarsnik kyclark, probably with one of the hyperoperator Z=>?
21:07 Skarsnik hm should patch that for kebab case maybe?
21:07 joeschmoe Thats amazing
21:08 RabidGravy Skarsnik, it is kebabed in the github
21:09 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␤␤»
21:09 Skarsnik It was too easy x)
21:09 Skarsnik 2015.09 x)
21:10 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 geraud joined #perl6
21:11 hankache is there a way to name a block?
21:11 ugexe m: my %x = <A B C D> >>=>>> 0; say %x
21:11 camelia rakudo-moar 06ed57: OUTPUT«A => 0, B => 0, C => 0, D => 0␤»
21:11 Skarsnik m: MYBLOCK { say "Hello"}
21:11 camelia rakudo-moar 06ed57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lx87xxdFbR␤Undeclared name:␤    MYBLOCK used at line 1. Did you mean 'Block'?␤␤»
21:11 hankache and by block I mean code surrounded by { }
21:11 Skarsnik m: MYBLOCK: { say "Hello"}
21:11 camelia rakudo-moar 06ed57: OUTPUT«Hello␤»
21:12 hankache thanks Skarsnik
21:12 RabidGravy that's a label rather than a name of the block
21:13 ugexe if you're trying to reference the block from inside the block itself, you can use &?BLOCK
21:13 n0tjack joined #perl6
21:14 hankache what i want to do is reference a variable declared with "our"
21:14 hankache how can i do it?
21:14 Skarsnik := ?
21:15 TEttinger joined #perl6
21:15 RabidGravy m; module Foo { { our $foo = "bar"; }}; say $Foo::foo;
21:16 RabidGravy m: module Foo { { our $foo = "bar"; }}; say $Foo::foo;
21:16 camelia rakudo-moar 06ed57: OUTPUT«bar␤»
21:16 joeschmoe star-m: use URI; say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwj0xLepm9LJAhVEw2MKHU87D98QFggdMAA&amp;url=http%3A%2F%2Fwww.businessinsider.com%2Fcia-predictions-for-2015-from-2000-2015-7&amp;usg=AFQjCNEDib6knVFYveWY3sJuC-aKOYu_NQ&amp;sig2=fzYRp3qov_MRIZ1vfmUUDg").query_form<url>
21:16 camelia star-m 2015.09: OUTPUT«http://www.businessinsider.com/cia-predictions-for-2015-from-2000-2015-7␤»
21:16 joeschmoe Thats soo cool!!!
21:16 joeschmoe what is URI cus i love it now
21:16 hankache joeschmoe we're glad you like Perl 6
21:17 RabidGravy the block there is not an additional package
21:17 masak joeschmoe: you can find it in this list: http://modules.perl6.org/
21:17 yoleaux 20:19Z <ZoffixW> masak: you have a few PRs for panda/module fixes: https://github.com/masak/druid/pulls https://github.com/masak/gge/pulls
21:17 joeschmoe So its a perl6 module
21:17 RabidGravy yeah
21:18 masak Zoffix: merged xx 4 -- thanks!
21:18 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
21:18 kyclark So guarding against a missing value in the hash
21:19 hankache RabidGravy yes but what if i do not want to create a module just a block?
21:20 RabidGravy then you don't need to worry at all
21:20 hankache how's that?
21:20 RabidGravy m: { our $foo = "bar"; }; say $foo;
21:20 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;␤»
21:21 RabidGravy m: { our $foo = "bar"; }; say $::foo;
21:21 Skarsnik it stay in the block
21:21 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;␤»
21:21 b2gills kyclark: how about 「%foo<A C> >>//>> 0」
21:21 RabidGravy hah
21:21 Skarsnik I am pretty sure you can't use it oustide the block
21:21 Skarsnik that pretty weird actually
21:22 hankache there must be a way
21:22 hankache or another declarator?
21:22 b2gills You would need it's full name, which it doesn't even have
21:22 Skarsnik the question is: why would you want to do that? x)
21:22 joeschmoe Rabidgravy: i get most of it but is the ".new:" part of URI that strips tracking
21:23 hankache Skarsnik: why not? ;)
21:23 joeschmoe or the .query_form<url>
21:23 kyclark OK, would appreciate any improvements to this code: http://lpaste.net/146871
21:24 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
21:24 hankache joeschmoe query_form<url>
21:24 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)
21:25 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
21:26 * hankache wonder what is RFC 3986
21:26 RabidGravy star-m: use URI; say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2Fundiscoveredfeatures.com%2Felixir-tasks-vs-scala-futures%2F&amp;ei=jyz_VLuQCtKuogTX-oC4DQ&amp;usg=AFQjCNFBXcYnknaDPt3Mjaxca6k8TxOlWQ&amp;bvm=bv.87920726,d.cGU").query_form.perl
21:26 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("http://undiscoveredfeatures.com/elixir-tasks-vs-scala-futures/"), :usg("AFQjCNFBXcYnknaDPt3Mjaxca6k8TxO…»
21:27 Skarsnik kyclark, replace split('') with comb? but it look good enought
21:28 joeschmoe https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjm4qXyndLJAhVE32MKHRcFBlsQFggdMAA&amp;url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc3986&amp;usg=AFQjCNFEL6RwHsa6hMJTbSH2y7nuddRhwg&amp;sig2=VNipKpJgn2thJzr8b8WcZQ
21:28 joeschmoe woops
21:28 joeschmoe star-m: use URI; say URI.new("https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjm4qXyndLJAhVE32MKHRcFBlsQFggdMAA&amp;url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc3986&amp;usg=AFQjCNFEL6RwHsa6hMJTbSH2y7nuddRhwg&amp;sig2=VNipKpJgn2thJzr8b8WcZQ").query_form<url>
21:28 camelia star-m 2015.09: OUTPUT«https://tools.ietf.org/html/rfc3986␤»
21:28 hankache block1: { our $var = 'Text'; say $var; } say $block1::var;
21:28 joeschmoe see thats why you need to strip all the google junk
21:29 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…»
21:29 hankache m: block1: { our $var = 'Text'; say $var; }; say $block1::var;
21:29 camelia rakudo-moar 06ed57: OUTPUT«Text␤(Any)␤»
21:29 hankache ^^
21:30 joeschmoe rfc 3986 is the standard Uniform Resource Identifier (URI): Generic Syntax  "web links"
21:30 kyclark Skarsnik: thanks and tah!
21:31 ab6tract joined #perl6
21:32 Skarsnik Good night here x)
21:32 diakopter m: say &VAR
21:32 camelia rakudo-moar 06ed57: OUTPUT«sub VAR (Mu \x) { #`(Sub|80350208) ... }␤»
21:33 masak with precompilation, the 007 tests run in ~55 seconds :>
21:34 masak (~75 seconds cold)
21:34 lizmat m: say "🇬 🇧".subst(" ","")
21:34 camelia rakudo-moar 06ed57: OUTPUT«🇬🇧␤»
21:34 diakopter masak: I wonder.. if you precompile the spectest suite...
21:34 masak I don't remember what it used to be, but somewhere around 180 seconds, thereabouts
21:34 gfldex m: my %hash of Int is default(0); dd %hash<c>
21:34 camelia rakudo-moar 06ed57: OUTPUT«Int $var = 0␤»
21:34 gfldex he is gone already :(
21:35 diakopter dd?
21:35 lichtkind should be there also a perl.com article when p6 comes out
21:35 masak diakopter: it stands for "Dudley Dursley"
21:35 gfldex anyway, if you want to default to 0 you can have it default to 0
21:36 diakopter gfldex: can you have a default key?
21:36 diakopter masak: I'm not sure that's right
21:36 gfldex don't think so. Shaped hashes are not completely implemented.
21:37 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 #perl6
21:45 colomon masak: it’s probably Daredevil
21:47 nanis joined #perl6
21:47 RabidGravy :)
21:49 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 nanis in block <unit> at t\spec\S32-io\io-spec-win.t:299` when building on Windows 10 using VS2013.
21:49 TEttinger diddly doodly
21:49 lizmat dd is the tiny data dumper, so tiny, we left off the tiny
21:50 lizmat src/core/IO/Spec.pm and src/core/IO/Spec/*.pm
21:50 lizmat nanis: ^^
21:51 n0tjack joined #perl6
21:51 nanis Thank you!
21:54 hankache joined #perl6
21:56 lucs Given Foo.pm having "unit class Foo; class Bar { $whatever } ...", when in another file I do "use Foo", should Bar be available?
21:57 Zoffix I believe that will throw an error "can't have class after unit"
21:57 n0tjack joined #perl6
21:57 lucs It appears to compile correctly, but Bar.new fails.
21:57 Zoffix hm weird
21:57 * Zoffix tries
21:58 Zoffix lucs, seems the error message vanished
21:59 Zoffix 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.
21:59 Zoffix Oh
21:59 Zoffix Then maybe I'm thinking of something else not liking class/role/grammar after unit ; stuff
21:59 RabidGravy Foo::Bar
21:59 lucs RabidGravy: Oh, is that how it ends up? Cool.
21:59 Zoffix RabidGravy++ thanks
21:59 RabidGravy but not ideal mixing the styles
22:00 grondilu joined #perl6
22:01 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:02 lizmat unless you mark it "our"
22:02 lizmat m: class Foo { our class Bar { } }; say Foo::Bar.new
22:02 camelia rakudo-moar 06ed57: OUTPUT«Foo::Bar.new␤»
22:02 RabidGravy m: class A { class B {} }; A::B.new
22:02 camelia rakudo-moar 06ed57: ( no output )
22:02 lucs Aha.
22:02 RabidGravy m: class A { my class B {} }; A::B.new
22:02 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 RabidGravy lizmat the other way round
22:02 lizmat hmmm... RabidGravy: not sure whether that isn't a bug ?
22:03 lizmat RabidGravy: the default is "my"
22:03 RabidGravy I've seen it documented
22:03 masak colomon: now I think I remember it was actually "dubic dentiliter"
22:03 RabidGravy as our
22:03 lizmat ah, indeed... yes
22:03 lizmat duh
22:03 lizmat lizmat--
22:03 RabidGravy :)
22:03 hankache joined #perl6
22:03 lucs RabidGravy, lizmat: Thanks all the same :)
22:05 lichtkind good night
22:05 Zoffix night
22:07 RabidGravy I'd be stuffed it that was fixed as a bug as I have lots of code that does that
22:08 jdv79 as in taxidermy?
22:08 * masak .oO( is this taxi bothering you? shall I remove it? )
22:09 hankache https://doc.perl6.org/language/containers#Binding
22:09 hankache the lexpad entry for $x directly points to the Int 42. Which means that you cannot assign to it anymore:
22:10 hankache 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 #perl6
22:10 hankache m: my Int $var := 123; say $var; $var := 999; say $var;
22:10 camelia rakudo-moar 06ed57: OUTPUT«123␤999␤»
22:11 lizmat masak: I do know (again)  :-)
22:11 gfldex the conatant stuff is the value, not the container
22:12 masak (and methods/rules are 'has' by default) ;)
22:12 RabidGravy my Int $v :=  67; $v =9;
22:12 * masak .oO( and radioactive slangs are hazmat by default )
22:12 RabidGravy m: my Int $v :=  67; $v =9;
22:12 camelia rakudo-moar 06ed57: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/gCA6K3oyAd:1␤␤»
22:13 dalek rakudo/nom: f457007 | TimToady++ | src/ (2 files):
22:13 dalek rakudo/nom: allow ~~ to chain where practical
22:13 dalek rakudo/nom:
22:13 dalek rakudo/nom: (A regex or closure must be at the end of the chain, however.)
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f457007181
22:13 jdv79 anyone know if we'lll have, or can do now, immutble aggregate attrs?  as in a ro pos or assoc attr?
22:13 Zoffix Is there a nicer way of writing    $_ ~~ Int ?
22:13 Zoffix or $_ ~~ List
22:14 n0tjack joined #perl6
22:14 Juerd Depends on what you think is nicer :)
22:15 Zoffix Like I can write $_ ~~ /foo/ as simply /foo/
22:15 dalek roast: cf080c9 | TimToady++ | S0 (3 files):
22:15 dalek roast: tests for new ~~ chaining semantics
22:15 dalek roast:
22:15 dalek roast: (Note that $foo ~~ $bar no longer automatically topicalizes $bar if it happens
22:15 dalek roast: to contain a regex; you need $foo ~~ /$bar/ or a closure to get topicalization now.)
22:15 dalek roast: review: https://github.com/perl6/roast/commit/cf080c9f95
22:15 RabidGravy m: my @a; @a[0] := 1; @a[0] =99;
22:15 camelia rakudo-moar 06ed57: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/KeO4dqwVKM:1␤␤»
22:15 jdv79 when?
22:15 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 #perl6
22:16 gfldex m: given 10 { say so .&infix:<~~>(Int) }
22:16 camelia rakudo-moar 06ed57: OUTPUT«True␤»
22:16 gfldex no $_ anymore
22:16 gfldex i would not call that nicer tho
22:16 Zoffix m: my Str $x = '42'; given $x { when Str { say "TIS A STRING!" }; when Int { say "TISANINT!" } };
22:16 camelia rakudo-moar 06ed57: OUTPUT«TIS A STRING!␤»
22:16 jdv79 m: m: $_  = Array.new; say "woohoo" when Array
22:16 camelia rakudo-moar 06ed57: OUTPUT«woohoo␤»
22:16 jdv79 m: m: $_  = Array.new; say "woohoo" when Hash
22:16 camelia rakudo-moar 06ed57: ( no output )
22:17 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 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!␤»
22:17 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.
22:17 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«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␤      …»
22:17 Zoffix :(
22:18 Zoffix m: my Str $x = '42'; given $x { say "TIS A STRING!" if Str;  };
22:18 camelia rakudo-moar 06ed57: ( no output )
22:18 Juerd Zoffix: .isa(Int)
22:18 Zoffix m: my Str $x = '42'; given $x { say "TIS A STRING!" when Str;  };
22:18 camelia rakudo-moar 06ed57: OUTPUT«TIS A STRING!␤»
22:18 Zoffix :o
22:19 jdv79 what's what i said ^^
22:19 Zoffix postfix when is nice
22:19 Zoffix jdv79++
22:19 gfldex m: for 1,'a' { .say when Str }
22:19 camelia rakudo-moar 06ed57: OUTPUT«a␤»
22:23 n0tjack joined #perl6
22:25 ugexe i dont use postfix when inside a given because it looks funny next to a default { }
22:35 jdv79 why can't panda install non-eco dists?
22:36 Zoffix Sure it can.
22:36 Zoffix panda install .
22:38 RabidGravy I'm sure it would me fairly easy to do the same from a URI as well
22:38 jdv79 https://gist.github.com/anonymous/c87ad438a09a883ddccb
22:39 RabidGravy no META.info?
22:41 Zoffix That's a weird error message tho.
22:41 jdv79 huh.  it is missing a meta file
22:41 jdv79 the error is wrong nontheless
22:42 RabidGravy I'm sure that could be fixed
22:44 jdv79 thanks
22:44 jdv79 bugged
22:47 lizmat good night, #perl6!
22:47 Zoffix MadcapJake, bruh
22:48 Zoffix MadcapJake, oh, never mind me. You *did* notice description was spelled incorrectly
22:48 Zoffix (sarcasm doesn't translate well over GitHub issues after you had a few brews :) )
22:48 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:52 jdv79 could we have a dist named .?
22:53 jdv79 that would be f'ed up
22:53 snarkyboojum joined #perl6
22:53 RabidGravy yeah I think it needs to be a valid idebtifier
22:54 louis__ joined #perl6
22:54 RabidGravy probably could fix that up
22:55 RabidGravy I'll take a look in the morning
22:56 masak 'night, #perl6
22:56 jdv79 yeah, its time.
22:56 jdv79 nite
22:56 znpy joined #perl6
22:59 zengargoyle joined #perl6
23:06 Zoffix If anyone cares, made me a little tool to generate spiffy Table of Contents for my docs from README.md: https://github.com/zoffixznet/github-toc-maker
23:06 Zoffix Here's an example of the generated TOC: https://github.com/zoffixznet/perl6-Number-Denominate/#table-of-contents
23:07 grondilu joined #perl6
23:17 n0tjack hmm, brew rm rakudo-star ; brew install rakudo-star still installs 2015.09
23:17 n0tjack I want 2015.11 so I can get shaped arrays which I need for a project
23:20 Psyche^ joined #perl6
23:27 n0tjack maybe I'll just wait for 6.Christmas
23:28 RabidGravy is this windows?
23:28 geekosaur os x, homebrew
23:32 uruwi joined #perl6
23:34 n0tjack correct, OSX, homebrew
23:34 znpy joined #perl6
23:35 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:38 skids joined #perl6
23:39 cognominal joined #perl6
23:41 Psyche^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo