Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-26

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:03 dalek doc: 680163f | gfldex++ | doc/Type/Code.pod6:
00:03 dalek doc: link to Signature
00:03 dalek doc: review: https://github.com/perl6/doc/commit/680163f523
00:05 tushar what is the best way to identify whether an array has a specific index or not? I have achieved it this way.
00:05 tushar m: my @a = [[1,2,3],[4,5,6]]; @a.pairs.[0]:exists; @a.pairs.[3]:exists;
00:05 camelia rakudo-moar 922afd: ( no output )
00:06 tushar m: my @a = [[1,2,3],[4,5,6]]; @a.pairs.[0]:exists.say; @a.pairs.[3]:exists.say;
00:06 camelia rakudo-moar 922afd: OUTPUT«True␤False␤»
00:06 TimToady m: my @a = [[1,2,3],[4,5,6]]; @a[0]:exists.say; @a[3]:exists.say;
00:06 camelia rakudo-moar 922afd: OUTPUT«True␤False␤»
00:07 timotimo "if it has a specific index" should work with just @a[4]:exists
00:08 dalek doc: 40b0715 | (Zoffix Znet)++ | doc/Type/Code.pod6:
00:08 dalek doc: Use code block and not a sub in example
00:08 dalek doc:
00:08 dalek doc: .of on sub {} uses Callable.of()
00:08 dalek doc: review: https://github.com/perl6/doc/commit/40b0715d65
00:09 tushar timotimo: thanks.
00:09 aod say "exists" if 4 == one @a
00:10 timotimo that's not about keys, though :)
00:11 tushar TImToday: Thanks. Missed your response at first.
00:11 aod ops
00:13 rgrinberg joined #perl6
00:14 sufrostico joined #perl6
00:14 tushar how about checking existence for multiple indexes and receive single response such as true or false. If any index is not present, return false. If all indexes are present, return true.
00:15 timotimo you can do it like this:
00:15 gfldex tushar: use a Junction
00:15 timotimo m: my @a = 1, 2, 3; say @a[0,2]:exists
00:15 camelia rakudo-moar 922afd: OUTPUT«(True True)␤»
00:15 timotimo m: my @a = 1, 2, 3; say @a[0,2,4,6]:exists
00:15 camelia rakudo-moar 922afd: OUTPUT«(True True False False)␤»
00:15 gfldex tushar: see https://docs.perl6.org/language/subscripts#:exists
00:21 tushar timotimo: I tried your way before asking. But it returns a list with true or false. And I am looking for only true and false -- a single response. Any ways, I can use "all" method.
00:21 tushar gfldex: Thanks.
00:22 tushar m: my @a = [[1,2,3],[4,5,6]]; if all @a[0,1]:exists { say True; } else { say False; }
00:22 camelia rakudo-moar 922afd: OUTPUT«True␤»
00:22 tushar m: my @a = [[1,2,3],[4,5,6]]; if all @a[0,2]:exists { say True; } else { say False; }
00:22 camelia rakudo-moar 922afd: OUTPUT«False␤»
00:22 ugexe m: my @a = [[1,2,3],[4,5,6]]; say so all @a[0,2]:exists
00:22 camelia rakudo-moar 922afd: OUTPUT«False␤»
00:26 tushar ugexe: sweet..
00:26 ugexe m: my @a = [[1,2,3],[4,5,6]]; say @a.map: *.rotor(2).Slip
00:26 camelia rakudo-moar 922afd: OUTPUT«((1 2) (4 5))␤»
00:28 ugexe m: my @a = 1,2,3,4,5; say @a.rotor(2)
00:28 camelia rakudo-moar 922afd: OUTPUT«((1 2) (3 4))␤»
00:28 ugexe if you can use rotor you can skip checking if there are enough elements
00:33 perlawhirl joined #perl6
00:34 tushar ugexe: I might not clear on what I am trying to achieve. I would like to check whether an index of an array has data or not before I actually extract them. So I am checking an existence of the index. Thanks though for all your help. Every day I am learning good stuff here.
00:35 TimToady if you just want to "grep" out the existing indices, you can use :k
00:36 TimToady m: my @a = 1,2; say @a[0..100]:k
00:36 camelia rakudo-moar 922afd: OUTPUT«(0 1)␤»
00:36 ugexe look at the output above. there are 5 elements but only 1 2 3 4 are in the output. the 5th element is skipped because the last iteration does not have 2 elements
00:36 ugexe rotor(2)
00:37 TimToady otoh, if by "exists" you mean "has a sublist containing something", that's different
00:37 TimToady "exists" has a very specific meaning for an array element
00:38 TimToady m: my @a = (),(); say @a[1]:exists
00:38 camelia rakudo-moar 922afd: OUTPUT«True␤»
00:38 TimToady m: my @a = Nil,Nil; say @a[1]:exists
00:38 camelia rakudo-moar 922afd: OUTPUT«True␤»
00:39 timotimo rotor has a named argument to also give you incomplete tuples
00:39 timotimo only pass it if you're prepared to handle incomplete tuples :)
00:40 BenGoldberg joined #perl6
00:41 TimToady tushar: but in general, asking if something is there first is kind of a design smell; it's usually better to have an interface where the degenerate case just does nothing, or has an easily trapped failure
00:42 TimToady if you "ask to ask", you set yourself up for race conditions if anything else can change the state between the 1st time you ask and the 2nd
00:43 TimToady so, for instance, you never see people writing "until eof() {...}" anymore
00:44 tushar TimoToday: Hmmm..
00:47 tushar TimToday*: apologize for my spelling mistake..
00:48 timotimo i hope timtoady is fine with being mashed up with me
00:50 tushar timotimo: haha..
00:50 BenGoldberg s: Pair, "ACCEPTS"
00:50 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/922afd3/src/core/Mu.pm#L12
00:51 sufrostico joined #perl6
00:52 pierre_ joined #perl6
00:52 BenGoldberg m: dd dir('.')[0];
00:52 camelia rakudo-moar 922afd: OUTPUT«".cpanm".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤»
00:53 BenGoldberg s: Pair, "ACCEPTS", ".".IO;
00:53 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
00:53 BenGoldberg s: Pair, "ACCEPTS", ".".IO
00:53 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Pair, Str, IO::Path); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:53 TimToady s: Pair.new, "ACCEPTS"
00:53 SourceBaby TimToady, Sauce is at https://github.com/rakudo/rakudo/blob/922afd3/src/core/Mu.pm#L12
00:53 BenGoldberg s: Pair, "ACCEPTS", (".".IO)
00:53 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Pair, Str, IO::Path); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:54 BenGoldberg s: Pair, "ACCEPTS", :(".".IO)
00:54 SourceBaby BenGoldberg, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Malformed parameterâ�¤at -e:6â�¤------> [32m    put sourcery( Pair, "ACCEPTS", :("."[33mâ��[31m.IO) )[1];[0mâ�¤    expecting any of:â�¤        constraintâ�¤        formal parameterâ�¤
00:54 TimToady that's really only finding the proto
00:54 TimToady the :D version is in Pair.pm
00:54 dayangkun joined #perl6
00:55 TimToady m: say $*IO ~~ :r
00:55 camelia rakudo-moar 922afd: OUTPUT«Dynamic variable $*IO not found␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3090␤  in block <unit> at <tmp> line 1␤␤»
00:55 TimToady m: say $*IN ~~ :r
00:55 camelia rakudo-moar 922afd: OUTPUT«True␤»
00:55 TimToady m: say :r.ACCEPTS($*IN)
00:55 camelia rakudo-moar 922afd: OUTPUT«True␤»
00:56 BenGoldberg s: :d, "ACCEPTS", ".".IO
00:56 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str, IO::Path, :d); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:56 BenGoldberg s: :d, "ACCEPTS"
00:56 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str, :d); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:58 TimToady s: (:d), "ACCEPTS"
00:58 SourceBaby TimToady, Sauce is at https://github.com/rakudo/rakudo/blob/922afd3/src/core/Mu.pm#L12
00:58 TimToady that's still just the proto, not the multi
00:58 ka joined #perl6
00:58 Actualeyes joined #perl6
01:02 sufrostico joined #perl6
01:02 BenGoldberg m: say $*IN.ACCEPTS((:d))
01:02 camelia rakudo-moar 922afd: OUTPUT«False␤»
01:02 BenGoldberg m: say $*IN.ACCEPTS((:r))
01:02 camelia rakudo-moar 922afd: OUTPUT«False␤»
01:02 BenGoldberg m: say $*IN.ACCEPTS(:r)
01:02 camelia rakudo-moar 922afd: OUTPUT«Cannot resolve caller ACCEPTS(IO::Handle: :r); none of these signatures match:␤    (Mu:U $: \topic, *%_)␤    (Mu:U $: Mu:U \topic, *%_)␤    (Any:D $: Mu:D \a, *%_)␤    (Any:D $: Mu:U \a, *%_)␤    (Any:U $: \topic, *%_)␤  in block <unit> at <tmp…»
01:03 BenGoldberg s: Associative, "ACCEPTS"
01:03 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Too many positionals passed; expected 2 arguments but got 3␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
01:10 dalek doc: 1c9b0e3 | gfldex++ | doc/Type/Signature.pod6:
01:10 dalek doc: link to ~~
01:10 dalek doc: review: https://github.com/perl6/doc/commit/1c9b0e3c9c
01:17 sufrostico joined #perl6
01:26 pierre_ joined #perl6
01:26 dayangkun joined #perl6
01:29 zakharyas joined #perl6
01:33 sufrostico joined #perl6
01:33 pierre_ joined #perl6
01:34 synopsebot6 joined #perl6
01:35 zakharyas joined #perl6
01:54 zengargoyle joined #perl6
01:54 aod guys, how do I redeclare a class?
01:55 MasterDuke .seen perlpilot
01:55 yoleaux I saw perlpilot 23 Sep 2016 21:55Z in #perl6: <perlpilot> thundergnat: fwiw, it looks like a bug to me too.
01:56 aod class aod { method gist { "Its me" } }
01:56 aod ===SORRY!=== Error while compiling: Redeclaration of symbol 'aod'
01:58 TimToady you can "augment class aod" but I don't think we've implemented "supersede class aod" yet
01:58 aod do I have to restart the interpreter?
01:58 geekosaur oh, this is the repl? at the moment I think you do
01:59 zakharyas joined #perl6
01:59 TimToady m: class aod { method gist { "It's me" } }; augment class aod { method gist { "It's really me" } }; say aod.new
01:59 camelia rakudo-moar 3d2a91: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3 gist { "It's me" } }; augment class aod7⏏5 { method gist { "It's really me" } }; s␤    expecting any of:␤        generic rol…»
02:00 TimToady m: use MONKEY; class aod { method gist { "It's me" } }; augment class aod { method gist { "It's really me" } }; say aod.new
02:00 camelia rakudo-moar 3d2a91: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Package 'aod' already has a method 'gist' (did you mean to declare a multi-method?)␤at <tmp>:1␤»
02:00 TimToady m: use MONKEY; class aod { method ghost { "It's me" } }; augment class aod { method gist { "It's really me" } }; say aod.new
02:00 camelia rakudo-moar 3d2a91: OUTPUT«It's really me␤»
02:02 aod ok.. use MONKEY is like a python's monkey patching license
02:02 TimToady well, it's short for use MONKEY-TYPING in this case
02:02 TimToady m: use MONKEY-TYPING; class aod { multimethod gist { "It's me" } }; augment class aod { method gist { "It's really me" } }; say aod.new
02:02 camelia rakudo-moar 3d2a91: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    multimethod used at line 1␤␤»
02:03 labster joined #perl6
02:03 TimToady m: use MONKEY-TYPING; class aod { multi method gist { "It's me" } }; augment class aod { multi method gist { "It's really me" } }; say aod.new
02:03 camelia rakudo-moar 3d2a91: OUTPUT«Ambiguous call to 'gist'; these signatures all match:␤:(aod $: *%_)␤:(aod $: *%_)␤  in block <unit> at <tmp> line 1␤␤»
02:04 TimToady one should never use MONKEY in production code
02:04 TimToady 'course, one should never use MONKEY-* in real code either
02:08 aod another question: say I do this:
02:08 aod subset naovazio of Str where /\S/; sub imprime (naovazio $s) { say $s };
02:09 aod then when I do imprime "" I get an error
02:09 aod Constraint type check failed for parameter '$s'
02:09 aod BUT it works when I do it inside a try
02:09 aod try { imprime "" }
02:09 aod but I cannot CATCH the error
02:09 noganex joined #perl6
02:10 TimToady m: subset naovazio of Str where /\S/; sub imprime (naovazio $s) { say $s }; imprime ""; CATCH { default { say "HERE" }}
02:10 camelia rakudo-moar 3d2a91: OUTPUT«HERE␤»
02:10 TimToady still in the repl?
02:11 gfldex aod: you may be looking for https://docs.perl6.org/language/objects#Mixins_of_Roles
02:11 TimToady the repl fakes it by adding a new lexical scope every line, so a subsequent CATCH is likely to be in a different scope than you want
02:14 aod ahh got it
02:15 aod thx timtoady
02:16 zengargoyle is there any hope for a more normal-ish REPL?
02:17 aod So I should really put the CATCH inside the try block, to avoid that in repl?
02:19 zengargoyle from what i can tell, you're better off using and editor in one window and save then run the script in th other window.
02:19 zengargoyle if you're trying to do anything at all fancy.
02:20 ugexe i just write entire monolith apps inside -e
02:20 zengargoyle ugexe: me too. :P
02:21 zengargoyle or use `fc`
02:21 SmokeMachine____ fc?
02:21 geekosaur list/edit shell history
02:22 zengargoyle bash/*nix, fc == fix command.  opens last command in editor and runs on exit
02:22 SmokeMachine____ I didn't know that! Thanks!
02:22 geekosaur (ksh, inherited by both bash and zsh)
02:22 SmokeMachine____ I keep pressing up and editing...
02:23 geekosaur (bash dropped the handy 'r' alias though. "r foo=bar [cmd]": find the most recent command starting with "cmd" (or the previous command if omitted), replace foo with bar, rerun)
02:24 geekosaur although foo can't be a pattern
02:24 zengargoyle i do the up arrow a bunch, esp with P5 that i know a bunch better.  keep a '0liners' file to cut-n-paste things into for future use (after perltidy) if needed.
02:25 zengargoyle there should be an 'e' variant that sets environment variables.... that would be handy.
02:28 grondilu you know you can do $ ENVVAR=stuff perl6 -e '...'  right?
02:29 zengargoyle inotify is also pretty cool.  watch a file or directories and execute command when changed.  start it up in another window and you have poor man's CI that runs on every save.
02:29 zengargoyle yeah, i was thinkimg more like: e PERL5LIB=~/perl5 thething
02:30 grondilu I don't see how that's better but *
02:30 geekosaur alias e=env
02:30 geekosaur :)
02:31 geekosaur or, just leave it off in Bourne-style shells
02:31 geekosaur PERL5LIB=~/perl5 thething
02:31 zengargoyle missing the search back through history for command matching 'thething'
02:31 zengargoyle and having the rest of the arguments after 'thething'
02:32 geekosaur if you have history turned on, PERL5LIB=~/perl5 !thething
02:32 geekosaur er, histchars
02:32 zengargoyle there's probably a fancy !/foo/ sort of thing ... :)
02:32 geekosaur !?foo
02:32 grondilu !?
02:33 geekosaur (it's a backward search, after all...)
02:33 * grondilu runs !?Configure all the time after pulling rakudo
02:33 zengargoyle usually w/o the prefix stuff C-r Conf does that bit.
02:34 geekosaur yes, but you don't get to insert stuff :)
02:34 grondilu (as it always matches with $ perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix=/usr/local)
02:34 * zengargoyle probalby uses C-r too much to learn the other !? things.
02:35 zengargoyle but will try it now...
02:35 * geekosaur usually turns histchars off, but still knows them from years of csh
02:35 * grondilu finds C-r slightly too awkward a finger technique
02:35 geekosaur (jumped ship to ksh as soon as he got access, never looked back)
02:36 * grondilu never really tried ksh.  Too much used to bash, I guess.
02:37 zengargoyle i was not too computer-ish during ksh days, bash was there by the time i returned.
02:37 zengargoyle always wanted to strangle old-timeers at last job who were tcsh fans....
02:38 * grondilu has not used tcsh in like 15 years.
02:42 cuonglm joined #perl6
02:42 cuonglm Hi, anyone get this error when testing rakudo with latest commit from rakudo, moarvm and roast
02:43 yoleaux 29 Aug 2016 08:49Z <jnthn> cuonglm: No design doc, though the key data structures are described somewhat in the .h files; of note see https://github.com/MoarVM/MoarVM/blob/master/src/strings/nfg.h and https://github.com/MoarVM/MoarVM/blob/master/src/strings/normalize.h
02:43 cuonglm "Method 'M' not found for invocant of class 'IO::Path'"
02:44 Zoffix joined #perl6
02:44 Zoffix cuonglm, no. What test is it?
02:45 TimToady recompiling to see if I can repro
02:45 cuonglm Zoffix: It's ./S16-filehandles/filetest.t
02:46 Zoffix passes clean for me.
02:46 Zoffix cuonglm, what OS are you on?
02:46 cuonglm Zoffix: I'm in OSX
02:46 * Zoffix is on Linux
02:46 TimToady case-free filesystem issue, maybe?
02:46 Zoffix cuonglm, what's the exact error message?
02:47 Zoffix OSX is case-free? 0.o
02:47 geekosaur yes
02:47 cuonglm Here's the version I use
02:47 cuonglm "This is Rakudo version 2016.09-58-g3d2a919 built on MoarVM version 2016.09-1-gdebb859"
02:47 cuonglm The exactly error message is:
02:47 * Zoffix is on his is Rakudo version 2016.09-57-g922afd3 built on MoarVM version 2016.09-1-gdebb859
02:47 cuonglm Method 'M' not found for invocant of class 'IO::Path'   in block  at ./S16-filehandles/filetest.t line 87   in block <unit> at ./S16-filehandles/filetest.t line 77
02:48 TimToady you're running the .t without fudging, is the problem
02:48 cuonglm I saw the condition "#?rakudo 3 skip ':M, :C, :A'"
02:48 cuonglm is this related
02:48 geekosaur more precisely hfs+ is case-insensitive but case-preserving. you can create ufs filesystems, or case sensitive hfs+ filesystems, but the OS install is only supported on case insensitive hfs+
02:48 TimToady you can use prove -v -e t/fudgeandrun
02:49 geekosaur (blame adobe, who refused to fix their case bugs in porting stuff to os x)
02:49 cuonglm TimToady: Oh, thanks, try it now
02:49 Zoffix cuonglm, yes, that's a "fudge". A way to tell the preprocessor to mark those tests as skipped
02:49 TimToady or just run all the tests, and then run the .rakudo.moar instead of the .t
02:49 Zoffix Or just run make t/spec/S16-filehandles/filetest.t
02:49 Zoffix left #perl6
02:50 * TimToady always hates on that particular feature
02:50 TimToady since it violates the spirit of the verb in question
02:50 TimToady me, I just alias prove -v -e t/fudgeandrun to 'pf'
02:51 cuonglm Hmm, I got "Could not execute (t/fudgeandrun t/fudge.t): open3: exec of t/fudgeandrun t/fudge.t failed at /System/Library/Perl/5.18/TAP/Parser/Iterator/Process.pm line 168."
02:51 cuonglm sounds like problem with my system
02:51 * cuonglm try run all test now
02:52 TimToady you have to run it from the top dir
02:52 TimToady so the name of the file is t/spec/S16-filehandles/filetest.t
02:54 zengargoyle TimToady: i just watched YAPC::EU video, have you published rad anywhere yet?
03:03 cuonglm TimToady: Works now, thanks.
03:09 Actualeyes joined #perl6
03:12 cuonglm TimToady: For related discussion, I'm fixing https://rt.perl.org/Public/Bug/Display.html?id=129162#ticket-history
03:15 cuonglm I saw that both perl6 and perl5 return False with IO.e/-e for broken symlink
03:16 cuonglm In perl6, IO.l called $.e before checking so IO.l throw exception even if symlink is existed
03:18 stmuk_ joined #perl6
03:23 TEttinger joined #perl6
03:32 Actualeyes left #perl6
03:34 Actualeyes joined #perl6
03:35 pierre_ joined #perl6
03:38 TimToady zengargoyle: not yet
03:39 TimToady cuonglm: seems a bit wrongihs
03:40 matiaslina joined #perl6
03:40 TimToady oh, I see you already fixed it in -dev
03:40 cuonglm TimToady: Yep, at least perl5 also return True with -l 'broken_symlink'
03:40 TimToady cuonglm++
03:40 cuonglm i fixed it :D
03:41 wamba joined #perl6
03:43 zakharyas joined #perl6
03:52 pierre_ joined #perl6
03:54 zengargoyle TimToady: cool, i poked you probably a year or so ago after first hints.  i poke around EDIC and KANJIDICT in the never ending quest to learn Japanese so just a bit more interested than the everage bear. will poke later or put me on a sticky note for when you put it up somewhere.
03:55 pierre_ joined #perl6
03:59 Actualeyes joined #perl6
04:09 Cabanossi joined #perl6
04:10 khw joined #perl6
04:43 AndyBotwin joined #perl6
04:54 jcallen joined #perl6
05:00 nadim joined #perl6
05:01 pierre_ joined #perl6
05:12 Xliff__ joined #perl6
05:12 john51_ joined #perl6
05:12 mohae_ joined #perl6
05:12 [1]ringer1 joined #perl6
05:13 zostay_ joined #perl6
05:13 bob778 joined #perl6
05:13 llfourn_ joined #perl6
05:13 zhmylove_ joined #perl6
05:14 Upasaka_ joined #perl6
05:14 pnu__ joined #perl6
05:14 dustinm`_ joined #perl6
05:15 obfusk_ joined #perl6
05:16 nemo_ joined #perl6
05:16 rblackwe_ joined #perl6
05:16 f3ew_ joined #perl6
05:16 Shozan joined #perl6
05:16 ab5tract joined #perl6
05:16 Gothmog__ joined #perl6
05:16 d^_^b joined #perl6
05:16 d^_^b joined #perl6
05:16 krunen__ joined #perl6
05:16 Kaffe_ joined #perl6
05:16 atta_ joined #perl6
05:16 riatre_ joined #perl6
05:16 vcv_ joined #perl6
05:16 TheDir_ joined #perl6
05:16 krakan_ joined #perl6
05:16 TimToady_ joined #perl6
05:16 xiaomiao joined #perl6
05:16 yubimusubi joined #perl6
05:16 captain-1dequate joined #perl6
05:16 DrForr_ joined #perl6
05:16 profan_ joined #perl6
05:16 Woodi_ joined #perl6
05:16 ponbiki joined #perl6
05:16 a3r0_ joined #perl6
05:17 tsadok joined #perl6
05:18 tbrowder_ joined #perl6
05:19 PotatoGim_ joined #perl6
05:19 bitmap_ joined #perl6
05:19 clkao_ joined #perl6
05:19 exodist_ joined #perl6
05:20 Actualeyes joined #perl6
05:20 xxpor_ joined #perl6
05:20 musca` joined #perl6
05:21 jkramer joined #perl6
05:21 [ptc] joined #perl6
05:22 wamba joined #perl6
05:23 john51 joined #perl6
05:23 dgl joined #perl6
05:24 Guest81107 joined #perl6
05:27 ggoebel joined #perl6
05:27 k-man joined #perl6
05:28 timeless joined #perl6
05:28 melezhik_ joined #perl6
05:28 salparadise joined #perl6
05:28 b2gills joined #perl6
05:28 timotimo joined #perl6
05:29 ssm joined #perl6
05:29 akiym joined #perl6
05:30 risou_ joined #perl6
05:38 camelia joined #perl6
05:58 imcsk8_ joined #perl6
06:00 domidumont joined #perl6
06:12 pierre_ joined #perl6
06:20 xinming joined #perl6
06:25 pierre_ joined #perl6
06:28 firstdayonthejob joined #perl6
06:50 domidumont joined #perl6
06:54 salva joined #perl6
07:06 rindolf joined #perl6
07:13 [particle] joined #perl6
07:19 wamba joined #perl6
07:19 ufobat joined #perl6
07:21 rurban joined #perl6
07:27 zhmylove joined #perl6
07:35 djbkd joined #perl6
07:36 CIAvash joined #perl6
07:43 darutoko joined #perl6
07:48 pierre_ joined #perl6
07:49 RabidGravy joined #perl6
07:49 DrForr_ captain-1dequate: Perl::ToPerl6 is the appropriate module space now.
07:56 scott is there any subscripting shorthand for `$foo{'key with spaces'}`?
07:56 scott err, `%foo`
07:58 moritz no
08:01 jonas1 joined #perl6
08:01 Actualeyes joined #perl6
08:01 dakkar joined #perl6
08:03 scott can anyone see an obvious way to improve this simple code? I'm just new to perl6 and looking for any tips https://gist.github.com/solson/410ee20f210d17f1b663d0d55e3d81ec
08:03 scott mainly wondering if I'm missing any handy shortcuts
08:03 scott $j<seen> is an array of hashes, each with an array of directors, for context
08:05 moritz scott: if you want to count things, a Bag is usually the most idiomatic thing to use
08:05 moritz m: say Bag.new(<a b c c c c b>)
08:05 camelia rakudo-moar f0b3b5: OUTPUT«bag(a, c(4), b(2))␤»
08:05 scott nice!
08:08 ocbtec joined #perl6
08:09 scott oh, of course, I can also just write .key, .value
08:12 scott `.sort({ -.value, .key })` is also more what I want, and maybe more readable
08:15 scott the only part I still dislike is `.map(|*<directors>)` - not sure if that's really the best way to flatten those arrays of directors
08:18 kanl joined #perl6
08:18 moritz scott: if you paste a runnable snippet that includes two or three items of the data structure, I can look for nicer ways
08:23 DrForr_ yoleaux: hi
08:23 DrForr_ Okey-dokey, no messages, I guess.
08:23 zakharyas joined #perl6
08:25 scott moritz: I made a simplified sample here, based on the .perl output for these few https://gist.github.com/solson/5f6872e8e9b6315d76fe85c68b210894
08:25 pierre_ joined #perl6
08:30 moritz scott: the best I can come up with right now is .map(*<directors>.Slip), but that just replaces prefix | with .Slip
08:30 scott fair enough. thanks for checking!
08:30 moritz scott: unrelated, Bag.new(...) can be bag(...)
08:31 scott also, I found out I can tack .Bag onto the array instead of wrapping in bag(...)
08:31 scott which makes it a bit more linear
08:42 nadim Good morning P6!
08:42 DrForr Mornin'.
08:42 bjz_ joined #perl6
08:47 rurban left #perl6
09:14 pierre_ joined #perl6
09:31 araujo joined #perl6
09:32 araujo joined #perl6
09:33 Dunearhp joined #perl6
09:35 araujo joined #perl6
09:37 araujo joined #perl6
09:40 canopus joined #perl6
09:40 araujo joined #perl6
09:42 zakharyas joined #perl6
10:01 pierre_ joined #perl6
10:09 keix joined #perl6
10:22 gregf_ joined #perl6
10:28 _matt joined #perl6
10:32 ka joined #perl6
10:35 pierre_ joined #perl6
10:41 pierre_ joined #perl6
10:57 pmurias joined #perl6
10:57 pmurias hi
10:57 moritz ho
11:05 woolfy joined #perl6
11:08 SmokeMachine____ zengargoyle: for that '0liners' (but in my case not with that name) for perl5 o use App::Rad
11:10 DrForr . o ( Let's go! )
11:30 bob777 joined #perl6
11:30 rurban joined #perl6
11:37 RabidGravy there, HTTP::Server::Tiny passing it's tests again :)
11:38 pdcawley joined #perl6
11:40 RabidGravy tokuhirom++ has given me commit so it shouldn't fall apart again (assuming I don't go mad and become a crazy erlang hacker or something)
11:53 perlawhirl joined #perl6
11:59 cuonglm joined #perl6
11:59 cuonglm Zoffix: this issue seems to be fixed in latest version of rakudo https://rt.perl.org/Public/Bug/Display.html?id=123838
12:00 cuonglm rakudo: my $f = open("x", :w); $f.print("abc"); say $f.tell
12:00 camelia rakudo-moar f0b3b5: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub open at src/RESTRICTED.setting line 9␤  in block <unit> at <tmp> line 1␤␤»
12:03 rindolf joined #perl6
12:12 hackedNODE joined #perl6
12:14 hackedNODE cuonglm: out of curiosity, what does that ticket have to do with Zoffix?
12:17 jkramer I've asked this some time ago but forgot about the solution. :( How do I get the possible values of an enum? .enums gives me a map of Str => Int, but I want the actual values, not the string representations
12:17 jkramer Bool.pick(*) returns a list of the actual values but I think the RNG is a bit useless overhead here :)
12:17 timotimo m: say Bool::.values
12:17 camelia rakudo-moar f0b3b5: OUTPUT«(True False)␤»
12:18 jkramer Goddamn me
12:18 jkramer Thanks :D
12:20 hackedNODE joined #perl6
12:26 rgrinberg joined #perl6
12:27 rgrinberg joined #perl6
12:30 RabidGravy :)
12:32 cuonglm hackedNODE: Hmm, I saw Zoffix have been added to perl6 group in Github, and he recently merged my PRs and response to the RT thread
12:33 cuonglm So I  just want to ask him to close it
12:33 psch RT bug admin and GH perl6 group permissions aren't directly related
12:34 hackedNODE cuonglm: but there's not even such nick in this channel. If ticket needs to be changed, I think it's best to mention it in #perl6-dev rather than pinging some random specific person :)
12:34 cuonglm psch: Yep, but I saw Zoffix closed it in RT
12:34 cuonglm hackedNODE: Ok, will do it next time.
12:34 psch cuonglm: zoffix just likes messing around with their nick all the time and then being snarky about it, don't worry about it :)
12:34 hackedNODE Thanks.
12:35 RabidGravy yeah, I'm in the GH group and can't do anything to the tickets in RT ;-) as it should be ....
12:41 pdcawley joined #perl6
12:45 perlpilot_ joined #perl6
12:48 ka joined #perl6
12:49 andrzejku joined #perl6
13:01 Actualeyes joined #perl6
13:02 pierre_ joined #perl6
13:12 cdg joined #perl6
13:13 ptolemarch joined #perl6
13:21 cdg joined #perl6
13:21 sammers hi perl6
13:21 hackedNODE \o
13:21 moritz \o sammers
13:22 sammers how is everyone today?
13:22 sammers tonight? afternoon?
13:22 RabidGravy .seen masak
13:22 yoleaux I saw masak 25 Sep 2016 14:10Z in #perl6: <masak> I mean, if you know up-front exactly what inputs you're going to give, irrespective of any outputs that come back...
13:22 hackedNODE sleepy
13:22 moritz it's always morning in UGT!
13:22 cog__ joined #perl6
13:23 sammers good morning moritz !
13:23 sammers it is almost 2230 here in Japan
13:25 sammers question about panda, is there a way to tell panda to exclude files in a folder, something like .gitignore?
13:25 hackedNODE Is there a way to pun a role, while still leaving it as a :U?
13:25 moritz sammers: wow, Japan is more than 200 years ahead of us! :-)
13:25 jnthn hackedNODE: .^pun I think
13:26 psch m: role R { }; my $r = R.^make_pun; say $r.WHAT; say $r ~~ R:U
13:26 camelia rakudo-moar f0b3b5: OUTPUT«(R)␤True␤»
13:26 psch m: role R { method foo(R:U) { say "okay" } }; my $r = R.^make_pun; $r.foo
13:26 camelia rakudo-moar f0b3b5: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:26 psch m: role R { method foo(R:U: ) { say "okay" } }; my $r = R.^make_pun; $r.foo
13:26 camelia rakudo-moar f0b3b5: OUTPUT«okay␤»
13:27 hackedNODE c: Blob.^pun, 'allocate', \(42, 'meow')
13:27 Undercover hackedNODE, The code is NOT hit during stresstest See http://perl6.WTF/src_core_Buf.pm.coverage.html#L48 for details
13:27 hackedNODE Sweet, jnthn++ thanks
13:27 psch colons everywhere
13:27 psch m: Blob.^pun
13:27 camelia rakudo-moar f0b3b5: ( no output )
13:27 psch m: role R { method foo(R:U: ) { say "okay" } }; my $r = R.^pun; $r.foo
13:27 camelia rakudo-moar f0b3b5: OUTPUT«okay␤»
13:27 psch vOv
13:27 sammers yes moritz, Kirk will be born in a few more years.
13:27 psch that's again one of those .^can vs .^lookup things isn't it
13:28 psch where they have slightly different meaning and i just can't for the live of me figure them out nor remember them :P
13:32 andrzejku hi guys
13:32 andrzejku :)
13:32 hackedNODE \o
13:33 andrzejku how to build operating system with perl6?
13:34 skids joined #perl6
13:34 hackedNODE hahahaha
13:34 moritz andrzejku: what's your goal?
13:35 hackedNODE .oO( SlowOS... sounds catchy )
13:35 andrzejku ...
13:35 andrzejku I want to learn Perl6
13:35 andrzejku and C++
13:35 andrzejku by mixing them
13:35 andrzejku so I got a great idea to make OS
13:36 mniip joined #perl6
13:36 psch that doesn't sound like a great idea to me, honestly.  it's kind of outside of the scope of *both* languages, isn't it
13:36 moritz well, I don't think why C++ wouldn't be suited
13:36 perlpilot andrzejku: maybe start with making a command line shell in Perl 6 ?
13:36 psch i mean, sure, C++ probably works but there's a lot of stuff you don't really want or need for building an OS
13:37 andrzejku mmm
13:37 andrzejku what about rewriting perl6 vm to c++?
13:37 andrzejku ;D
13:37 sufrostico joined #perl6
13:37 timotimo i think the operating system of the nintendo 3ds is written in C++
13:38 moritz I kinda agree with psch. There are many more things where you can mix those two languages that sound much more workable
13:38 timotimo at least the API it provides to user space programs is based on C++ objects
13:38 perlpilot andrzejku: or find a C++ library that's really useful and make a Perl 6 binding for it?
13:38 andrzejku not I want to write C++
13:38 andrzejku ;-)
13:38 andrzejku and Perl
13:38 andrzejku not just checking a documentation
13:38 moritz andrzejku: there's a nice numerical library called Eigen, or Eigen2
13:39 moritz andrzejku: the interesting thing is that it uses template expressions
13:39 moritz so there's no straight-forward mapping to a C API
13:39 moritz hooking Perl 6's MOP to the template expression thingy in C++ sounds like an interesting challenge (if you're into that kind of masochism)
13:40 psch o.o
13:40 psch yes, probably a *lot* of fun hidden there
13:40 timotimo if you want to write a C++ compiler in perl6, then yeah, that sounds fun
13:40 andrzejku :-)
13:40 andrzejku too many options
13:41 andrzejku what about Perl6 embedded?
13:41 andrzejku for AVR?
13:41 Woodi_ andrzejku: I have request: vim clone based on Perl6 :)
13:42 andrzejku that would be slow
13:42 moritz question of the day: What's more work, writing an OS or a C++ compiler? :-)
13:43 psch i'm going with "yes"
13:44 moritz cheater!
13:44 hackedNODE A C++ compiler
13:45 Woodi_ OS is simple. you do OS part that do something and add IP stack, which is hard becouse that must cooperate with other implementations :)
13:45 moritz hackedNODE: I tend to agree, simply because C++ has a spec, and you need to implement all of it. An OS can be rather minimal
13:46 moritz (nobody mentioned a GUI, or networking. Right? :-)
13:46 timotimo that's correct
13:46 timotimo not even that it has to do any sort of multiprocessing
13:46 RabidGravy .tell masak I'm just fixing your https://github.com/tokuhirom/p6-HTTP-Server-Tiny/issues/28 while I'm in the mood :)
13:46 yoleaux RabidGravy: I'll pass your message to masak.
13:48 moritz RabidGravy++ # while I'm in the mood :)
13:49 andrzejku moritz, what's Perl 6 MOP?
13:49 RabidGravy "Meta Object Protocol"
13:49 andrzejku https://docs.perl6.org/language/mop
13:52 jkramer What's the protocol for porting/rewriting P5 modules for P6? Can I just use the name or should I contact the original author first?
13:53 psch i think we're on first-come-first-serve basis with namespace spots?
13:53 moritz jkramer: you can just use the name (unless the author registered a trademark, I think)
13:53 psch although asking definitely wouldn't hurt
13:53 timotimo since everything has an implicit :auth<github:yourusername> ... :P
13:53 psch oh, yeah, trademark might be a concern potentially
13:53 jkramer Are there trademarks on module names? o_O
13:53 psch hopefully not :)
13:53 hackedNODE Ask mst :)
13:54 hackedNODE https://metacpan.org/release/Nagios-Plugin :)
13:54 moritz jkramer: if you go to a trademark office and register one for YourSuper::Duper::Org::API, I'm sure they'll grant it :/
13:55 timotimo i'm pretty sure apple is going to sue our asses for having an App:: namespace
13:55 hackedNODE :D
13:55 jkramer :D
13:56 jkramer WTF that actually happened? (Nagios=
13:57 moritz yes, those guys have a reputation for being nasty on occasion
13:58 RabidGravy Also Docker have had github repos beginning with "docker" removed
13:58 jkramer o_O
13:59 timotimo nastyos
14:00 moritz there's also the piece of nastiness in law that you can lose trademark that you don't defend
14:00 moritz so if you don't have an explicit policy of allowing such things that contain your trademark'd name, you basically *have* to go after those folks to not lose it
14:01 ilmari moritz: the policing requirement is nowhere near as strict as lots of companies would like you to think
14:03 RabidGravy yeah and they could make, if they so wished, specific provision for certain uses
14:03 moritz ilmari: I guess I should read up on the actual requirements
14:04 ilmari https://twitter.com/RickSandersLaw/status/778988402150694916
14:05 ilmari IMO docker-foo does not dilute the docker trademark if it's a thing for using docker and foo together
14:07 jkramer I shall register IO::File™ and become insanely rich. Or maybe strict™
14:08 hackedNODE jkramer: I'd go for v6 :)
14:10 jkramer I present to you the great new Log::Dispatch™ for Perl v6™! https://gist.github.com/jkramer/9e4431b293e9bf2a03a599e448de502f
14:10 jkramer Sadly you can't use it or I'll sue you
14:11 grondilu joined #perl6
14:13 ugexe actually its Log::Dispatch:auth<github:jkramer>
14:13 ugexe perl6 needs improvements for commiting traderight infringement by module authors
14:14 ugexe trademark
14:15 ilmari shouldn't Output be a role, not a class?
14:15 zoosha joined #perl6
14:16 timotimo No Copyright Intended™
14:18 jkramer ilmari: Don't know, does make a big difference in the case for me. What advantage would a role bring here?
14:19 ugexe role is 1 letter less to type
14:19 jkramer :D
14:19 ilmari jkramer: you can't usefully instantiate Object
14:19 ilmari abstract classes are a workaround for lack of rolse
14:19 ilmari *roles
14:19 rurban left #perl6
14:19 ilmari s/Object/Output/
14:20 jkramer Yeah, I ugexe alredy conviced me :)
14:21 ugexe you can also abuse parameterized roles to use a different style of class invocation
14:22 ugexe m: role Foo[$bar] { has $.baz; method bar {$bar}; }; say Foo[1].new(baz => 2).bar;
14:22 camelia rakudo-moar f0b3b5: OUTPUT«1␤»
14:23 jkramer $!fh = open $.path, :a or die $!fh unless $!fh; - is this doing what I want it to do? It seems to work but it looks weird :)
14:23 ugexe role Log::Dispatch[Logger $logger] { has IO::Handle $.stdout; has IO::Handle $.stderr; method log { ... } } for instance
14:23 wamba joined #perl6
14:26 user9 joined #perl6
14:26 * [Coke] stares at irc logs over coffee
14:27 timotimo careful, don't wanna spill irc logs into your coffee
14:28 RabidGravy right that's me done with fixing other people's software for the day, let's fix some of mine instead :)
14:28 brrt joined #perl6
14:29 RabidGravy .tell masak I closed that PR on HST on the grounds that it doesn't spew that error any more ;-)
14:29 yoleaux RabidGravy: I'll pass your message to masak.
14:29 brrt left #perl6
14:29 RabidGravy .tell masak  err, "issue" not "PR"
14:29 yoleaux RabidGravy: I'll pass your message to masak.
14:34 RabidGravy anyone else notice that the Travis-CI for OS/X is a lot slower than for Linux?
14:34 kaare_ joined #perl6
14:35 RabidGravy or rather it seems to share load in a way that makes the OS/X jobs more likely to stall and time out
14:36 timotimo that's just because it uses clang
14:36 RabidGravy ah, of course
14:38 RabidGravy anyway that's Cache::Memcached back on the straight and narrow, now back to breaking this streaming server
14:39 zacts joined #perl6
14:40 bob777 joined #perl6
14:41 timotimo the only reason clang times are so bad is because interp.c takes *ages* to compile with it
14:41 timotimo everything else hardly changes, i'd think
14:43 RabidGravy I keep meaning to try and compile it with openwatcom, that used to be by far and away the fastest back in the last century
14:43 timotimo openwat
14:43 * geekosaur can't help but think of watfiv >.>
14:44 timotimo i don't know what that is
14:47 RabidGravy that is to say when it was still the "Watcom C compiler" it was the fastest, it has since been bought by someone and then opensourced
14:47 girafe joined #perl6
14:53 geekosaur waterloo fortran iv compiler
14:54 RabidGravy yeah they're both from the same place, I think that one was fast as well
14:54 RabidGravy not that I have done more than about four lines of fortran in the last twenty years
15:03 gregf_ joined #perl6
15:06 wamba joined #perl6
15:06 ka joined #perl6
15:18 grondilu I don't know what's going on but today compiling rakudo takes ages.
15:18 grondilu For once, I'm compiling something else at the same time, but still.
15:19 lizmat grondilu: it is a 1.4MB source file, with 42.5K lines
15:19 optikalmouse joined #perl6
15:20 timotimo is your device swapping?
15:20 timotimo slow hard drive wouldn't make it take ages i don't think
15:21 acrussell joined #perl6
15:21 skids joined #perl6
15:22 grondilu yes, lots of swap.  I'm now pretty sure I can blame the other compilation
15:24 * grondilu interrupts the rakudo compilation and waits for the other one to finish
15:28 timotimo vms that do garbage collection like rakudo does have a bad time when you run out of ram
15:32 timotimo when you want to write "nice make" and it comes out as "mike" instead ...
15:33 * moritz would have expected "mice"
15:34 optikalmouse I would have expected mexican spice.
15:34 optikalmouse but then, I'm hungry.
15:34 timotimo i just had a sammich
15:37 ugexe fortune 500 company asked about possible perl6 uses today :)
15:38 hackedNODE what answer did they get? :)
15:38 awwaiid I assume they were confused. The first users of new languages tend to be the sorts who don't "ask"
15:39 andrzejku joined #perl6
15:41 ugexe hackedNODE: that it's not ready from a web framework perspective but that it would fit for our parsing and backend processing needs
15:42 TimToady_ jkramer: I'd probably write that as: $!fh ||= open($.path, :a) || die $!;
15:42 TimToady_ presuming you meant die $! there, not die $!fh
15:47 duncan_dmg joined #perl6
15:47 ugexe awwaiid: why wouldn't they ask? the alternative is to read a bunch of reddit comments from people who have never used it
15:50 MilkmanDan joined #perl6
15:50 RabidGravy of course a fortune 500 company could probably invest some employee time into improving the web framework thing :)
15:50 RabidGravy if they were keen enough to see Perl 6 as a strategic language of course
15:50 timotimo if the company has enough money, perhaps
15:52 RabidGravy though of course there have always been plenty of large companies who are only interested in passively consuming open source software
15:52 RabidGravy (there are of course some notable exceptions)
15:53 profan s/large companies/companies/ and it still applies :p
15:55 ugexe I imagine they'd like to get their feet wet with the good parts and business logic before getting hit with the idea of investing money into writing a web framework
15:56 ugexe they are a TPF sponsor so they aren't just a passive consumer
15:57 RabidGravy cool
15:59 ka joined #perl6
15:59 avuserow m: multi foo() {nextwith(1)}; multi foo($a) {note "here"}; foo(); # Can someone unconfuse my use of nextwith here?
15:59 camelia rakudo-moar 74b5d7: ( no output )
15:59 RabidGravy I think now people are becoming more accepting of "mixed architectures" with different languages playing to their strengths in certain subsystems of an application
15:59 optikalmouse joined #perl6
15:59 timotimo avuserow: "next" will only go through things that are already up for consideration
16:00 timotimo the foo($a) candidate wasn't considered because your call was foo()
16:00 timotimo you want callwith instead
16:00 jnthn Want samewith, no? :)
16:00 jnthn callwith also iterates the same candidate lsit
16:00 jnthn *list
16:00 timotimo oh
16:00 timotimo good catch
16:00 avuserow ah, didn't know about samewith. looks like that's what I want, thanks
16:01 FROGGS joined #perl6
16:02 avuserow is it new-ish? it's not mentioned in the docs around nextwith/callwith as far as I can tell (in language/functions for example)
16:02 moritz moritz@pete:~/p6/doc$ git grep --word nextwith|wc -l
16:02 moritz 11
16:03 avuserow looks like samewith is 2013 vintage, so not super new, but newer than some of the advent stuff I stumbled upon
16:04 lizmat I thought of "samewith" at that time
16:04 RabidGravy avuserow, you just reminded me to check the PR on Audio::Taglib::Simple :)  It''s fixed so I'll close it
16:04 jkramer TimToady_: Yup, I already rewrote pretty much like that
16:05 lizmat but from a performance point of view, you'd probably be better of doing "self.nameofmethod(your params)"
16:05 lizmat at least for the foreseeable future
16:07 awwaiid ugexe: I mean that -- I hypothesize initial use of a new tech (esp without large corporate backing) tends to be bottom-up, from random engineers on small projects, rather than top-down, which is how I interpret the idea of a Company asking things
16:07 RabidGravy is it a massive difference in the performance thing?  I do tend to use samewith quite a lot
16:09 lizmat RabidGravy: i would say massive, yes
16:09 optikalmouse joined #perl6
16:09 jkramer Is there some kind of destructor thing in P6 that gets called when an object's life is over?
16:09 RabidGravy Hmm maybe I''ll take a look at that at some point as I say I tend to use it quite a lot
16:09 lizmat fwiw, I think I can make it a bit better, but basically, if you use samewith, you have no chance of it getting optimized atm
16:10 jkramer Does DESTROY still exist?
16:10 lizmat RabidGravy: samewith is about 30x slower
16:10 RabidGravy yikes
16:11 RabidGravy maybe I ought to find a choice module that uses it a lot and swap it then
16:11 lizmat m: multi a() { samewith(42) }; multi a($a) { $a }; my $now = now; for ^10000 { a }; say now - $now
16:11 camelia rakudo-moar 74b5d7: OUTPUT«0.1814039␤»
16:11 lizmat m: multi a() { a(42) }; multi a($a) { $a }; my $now = now; for ^10000 { a }; say now - $now
16:11 camelia rakudo-moar 74b5d7: OUTPUT«0.0049243␤»
16:11 jnthn jkramer: DESTROY exists, but you have on promises about when it will be called or, if your object lives until close the program exit, if it will be called at all.
16:11 jnthn *no promises
16:12 andrzejku joined #perl6
16:13 jnthn (To be specific, it gets run shortly after the GC determines the object can be freed.)
16:14 jkramer m: class A { sub DESTROY { say "boom!" } }; { my $a = A.new; say "done" }; say "done even more"
16:14 camelia rakudo-moar 74b5d7: OUTPUT«done␤done even more␤»
16:14 ptolemarch joined #perl6
16:14 jkramer Meh
16:15 xiaomiao joined #perl6
16:15 jnthn Right, GC never happened
16:15 jnthn So, don't use it for resource management.
16:15 jnthn (It's a trade-off. If you ref-count, you give up a bunch of other nice things.)
16:15 jkramer Ok, I was hoping for something that would be called as soon as the object leaves the scope
16:15 jnthn You can write a LEAVE block in the scope itself
16:16 rurban joined #perl6
16:16 ugexe awwaiid: its breaking a perl5 monolith into microservices so it *would* be small stand-alone projects - a mix of perl5 and perl6 each playing to their own strengths
16:16 TimToady_ m: class A { }; { my $a will leave { say "boom" } = A.new; say "done" }; say "done even more"
16:16 camelia rakudo-moar 74b5d7: OUTPUT«done␤boom␤done even more␤»
16:16 hackedNODE :o
16:16 timotimo leaving a scope is very easy compared to "is no longer referenced by anything"
16:17 timotimo because leaving a scope is pretty much discoverable statically with a little help for exception handling and such
16:17 RabidGravy ugexe, sounds like something Perl 6 could fit in with nicely
16:17 FROGGS o/
16:17 hackedNODE \o
16:18 psch i'd like the declarant as $_ in the 'will leave' Block, i think
16:18 MasterDuke_ joined #perl6
16:18 TimToady_ m: { my $a will leave { say "terminating " ~ $_ } = 'your visit'; say "done" }; say "done even more"
16:18 camelia rakudo-moar 74b5d7: OUTPUT«done␤terminating your visit␤done even more␤»
16:18 rurban left #perl6
16:19 TimToady_ psch: just went into my time machine and fixed it for you
16:19 psch m: class A { method left { "bye" } }; { my $a will leave { .left } = A.new; say "done" }; say "really done"
16:19 camelia rakudo-moar 74b5d7: OUTPUT«done␤really done␤»
16:19 psch TimToady_: you did? :)
16:19 psch TimToady_: time machine is probably right though
16:19 TimToady_ you didn't say it
16:19 psch yeah
16:20 MasterDuke_ while a large number of @LARRY are in the room, any opinion on RT #129248?
16:20 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129248
16:20 psch i saw that right then
16:20 psch TimToady++ # responsible time machine use
16:21 psch bit sad we can't have Whatever there, but parsing that would probably be really weird
16:21 jkramer Can I use 'will leave' inside to object so it'll be triggered whenever it leaves any scope? :)
16:22 jkramer Ah, I guess that's GC-stuff again and not easy to detect
16:22 psch jkramer: i think a new declarator is probably your best bet there
16:22 psch like, my-leaving $a or something
16:22 psch jkramer: just gotta figure out a way to tell it globally what to call :)
16:23 psch jkramer: the thing is, 'will leave' is still phaser-y, which is still always bound to the Block it's in
16:23 psch jkramer: so the class itself can't bring it, unless it does black CALLER:: magic in .new at runtime to install phasers
16:24 psch s/runtime/compile time/
16:24 psch which i don't think we actually *can* do because .new isn't compile time
16:24 jkramer psch: The problem is I don't want to user of the class to take care of the cleanup :) So it should happen transparently somewhere inside the class. But it's not that important, I was just wondering if there's something like that
16:24 Woodi_ maybe Perl6 is good for prototyping (to discover some architecture things) becouse: a) code can look clean/readable during reimplementation;  b) chance of skipping reimplementation is very low :)  no good GUI is two edge sword...
16:24 RabidGravy okay finding the module with the greatest number of samewith is taking some time
16:25 RabidGravy and strangely the one with the greatest number is not released yet
16:25 hackedNODE s: &trait_mod:<will>, \(:leave)
16:25 SourceBaby hackedNODE, Something's wrong: ␤ERR: Could not find candidate that can do \(:leave)␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤  in block <unit> at -e line 6␤␤
16:25 hackedNODE :(
16:25 psch jkramer: i'm not sure, but maybe you can somehow get EXPORT to install a LEAVE phaser in the importing scope..?
16:26 psch jkramer: i mostly don't know if you can (1) find the right scope to install the phaser in and (2) EXPORT runs early enough
16:28 TimToady_ MasterDuke_: rindex is not symmetrical with index, since positions are measured from the start of the needle, not the end, so I'd say the rindex("1234","2",4) should fail indicating the correct range is 0..3, since the actual allowed range is not 0 .. 4 but rather 0 .. 4 - $needle.chars
16:28 avuserow RabidGravy: thanks, been meaning to do a bit of cleanup on my various modules. appreciate the PR, and I'm going to eventually set up travis so I'll catch stuff like that in advance :)
16:28 RabidGravy avuserow, there's still a fail on "bitrate" here though, not sure what that''s all about
16:28 jkramer psch: It's alright, it's not that important that I'd hack weirdo stuff like that :) It'd just be nice to have in this case
16:29 TimToady_ MasterDuke_: though I suppose we could just return Nil up through 4 just for convenience
16:29 RabidGravy (I'm only using the module to test Audio::Encode::LameMP3 at the moment)
16:30 jkramer But you reminded me of another question I had. Can I still use somehow use the 'use' parameters for random module options and stuff like in P5 or is it only for 'is export' stuff now? The only thing I found was for export tags.
16:30 TimToady_ MasterDuke_: or we could say that if they give us a position within the string that is too long to match, we just force it to the first position that could match
16:31 avuserow RabidGravy: do you remember what OS/arch combination this appears on?
16:31 TimToady_ such that rindex("1234","2",4) would simply return 1, and rindex("1234","2",5) would report failure
16:31 TimToady_ and then it wouldn't matter if it said 0..3 or 0..4
16:32 RabidGravy avuserow it's Linux x86_64
16:33 TimToady_ MasterDuke_: so I think the last thing I said is probably the best approach
16:33 TimToady_ hmm, I seem to have grown a tail...
16:34 TimToady_ maybe I'm not really me...
16:34 duncan_dmg left #perl6
16:34 TimToady joined #perl6
16:34 RabidGravy avuserow, my working hypothesis is that it's actually the underlying library rather than the module
16:34 MasterDuke_ TimToady: thanks for the input
16:35 TimToady hmm, maybe you're not really you :)
16:35 dogbert2 TimToady: up for another question wrt duckmap?
16:35 TimToady we should pay attention to iterable if it's undefined, if that's the question
16:35 TimToady *shouldn't
16:36 TimToady darn n't key is broken again
16:36 RabidGravy well there's four samewith ridded anyway
16:36 avuserow RabidGravy: certainly possible. if you have a test file, I can take a look. I have an old C++ binary around taglib I can use for this stuff.
16:36 dogbert2 it's probably the question, what should this return: my @a = [1, "a"]; dd duckmap({ $_ ~~ Int ?? $_ !! Any }, @a);
16:37 avuserow RabidGravy: I've also been meaning to write a pure Perl6 parser for some tag formats partially as a demo for Binary::Structured (once I'm happier with its features/API/stability)
16:37 RabidGravy I've got an MP3 frame parser in Perl 6 somewhere around
16:38 gfldex i wonder if IO::Handle.open should check for stale symlinks. That file-i-can-clearly-see-does-not-exist-error always trips me of.
16:39 robertle joined #perl6
16:39 andrzejku joined #perl6
16:39 avuserow RabidGravy: is it online anywhere? I'm interested in having a look
16:41 RabidGravy It's https://github.com/Perl6-Noise-Gang/Audio-Format-MP3 - if you want a hack you can join the noise gang
16:41 RabidGravy :)
16:42 RabidGravy actually I've just invited you :)
16:42 cog__ joined #perl6
16:44 andrzejku joined #perl6
16:46 dogbert17 joined #perl6
16:46 acrussell joined #perl6
16:52 dalek joined #perl6
16:57 TimToady dogbert2: it oughta return [1,Any], not try to iterate Any
16:58 TimToady even if it were [1,List], it should return [1,List] rather than trying to iterate a type object
17:00 dogbert17 TimToady: thanks, the docs were a bit vague so for a second I was wondering if it should return [1, "a"]
17:00 TimToady actually, duckmap is intended for methods, not functions, so the functional form doesn't really make sense
17:00 TimToady you can have [1,2,3].foo failing to dispatch, which is what triggers the iteration on a defined [1,2,3]
17:02 dogbert17 m: my @a = [1, [2,3],4]; dd duckmap({ $_ ~~ Int ?? $_ !! Any }, @a)
17:02 camelia rakudo-moar 74b5d7: OUTPUT«(1, (2, 3), 4)␤»
17:02 TimToady but detecting failure to dispatch on a foo([1,2,3]) is a bit more problematic, unless maybe we test explicitly for the appropriate dispatch failure, which {} is never going to produce
17:03 TimToady I mean, with foo() we know at compile time that the name 'foo' actually exists, but maybe it won't bind to any signature
17:04 TimToady we can't indicate failure to dispatch by returning an undefined value, in any case, because undefined values are a valid return from a duckmap
17:06 dogbert17 so if the expression returns undef and the element in question is NOT iterable, then we should return Any ?
17:06 poohman joined #perl6
17:06 TimToady so what duckmap really needs to test is that the call returns a failure to dispatch, and then iterate if the input value is defined and Iterable
17:07 TimToady otherwise it should just return the undefined return value, whatever it was
17:07 TimToady which might or might not be Any
17:08 TimToady we never test the returned value for definedness, only for failure to dispatch
17:09 TimToady you should be able to duckmap to undefined values just fine
17:09 TimToady as long as they aren't dispatch failures
17:09 TimToady this is all based on, if .quack or quack() works, it's a duck
17:10 TimToady otherwise see if it's a flock of ducks
17:10 TimToady where "works" is defined as "dispatches and binds okay"
17:10 poohman Hello all, where can I find documentation about running Perl6 on JVM - eventually in Windows
17:11 dogbert17 I was hoping that something like this would be enough.
17:11 dogbert17 multi sub duckmap(\op, \obj) {
17:11 dogbert17 nodemap(-> \arg { try { op.(arg) } // try { arg ~~ Iterable ?? duckmap(op,arg) !! arg } }, obj);
17:11 dogbert17 }
17:11 * dogbert17 is probably in over his head
17:12 TimToady the // is incorrect there
17:12 hackedNODE poohman: no idea about docs, but this can buildd it: git clone https://github.com/rakudo/rakudo/; cd rakudo; perl Configure.pl --gen-nqp --backends=jvm; make; make test; make install
17:12 TimToady since op.(arg) may have intended to map to an undefined value, which should be allowed
17:13 dogbert17 the src in rakudo is this:   nodemap(-> \arg { try { op.(arg) } // try { duckmap(op,arg) } }, obj);
17:13 psch poohman: https://github.com/rakudo/rakudo/blob/nom/INSTALL.txt#L36
17:14 poohman Thanks
17:14 psch poohman: while that's a linux prompt it's not that different for r-j on windows
17:14 firstdayonthejob joined #perl6
17:14 psch poohman: you do still need make, as mentioned in INSTALL.txt
17:15 psch poohman: also note that rakudo-j is a bit behind feature-wise
17:15 TimToady it's more like: nodemap(-> \arg { my \result = try { op.(arg) }; result ~~ Failure ?? try { arg.defined && arg ~~ Iterable ?? duckmap(op,arg) !! arg } !! result }, obj);
17:15 poohman ok
17:15 TimToady or maybe just arg ~~ Iterable:D
17:16 TimToady which is probably faster and more better anyway than explicitly calling .defined
17:16 poohman thanks - let me have a look at the Install file
17:18 dha joined #perl6
17:18 dogbert17 TimToady: with your change, my @a = [1, [2,3], 'a']; say duckmap({ $_ ~~ Int ?? $_ !! Any }, @a)    would return (1 (Any) (Any))
17:20 TimToady as I said, it makes no sense for a block that has no signature
17:20 dogbert17 if that's the intended behavior then you have fixed the bug :-)
17:21 TimToady try it with -> Int { $_ } to get the binding to fail
17:21 TimToady or whatever the correct incantation is :0
17:21 TimToady -> Int $x { $x }
17:21 setty1 joined #perl6
17:23 dogbert17 (1 Nil Nil) if I did this correctly
17:23 TimToady arguable whether it should return [1,[2,3],'a'] or [1,[2,3],Nil]
17:24 Dunearhp joined #perl6
17:24 hackedNODE m: &duckmap
17:24 camelia rakudo-moar 6974b8: OUTPUT«WARNINGS for <tmp>:␤Useless use of &duckmap in sink context (line 1)␤»
17:24 hackedNODE s: &duckmap
17:24 SourceBaby hackedNODE, Sauce is at https://github.com/rakudo/rakudo/blob/38ec2e2/src/core/metaops.pm#L683
17:25 TimToady m: say try { push(now) }.WHAT
17:25 camelia rakudo-moar 6974b8: OUTPUT«Nil␤»
17:25 TimToady m: try { push(now) }; say $!.WHAT
17:25 camelia rakudo-moar 6974b8: OUTPUT«(NoMatch)␤»
17:25 TimToady I guess try doesn't actually return the failure
17:25 dogbert17 hackedNODE, could that be an alias for Z...
17:26 hackedNODE nah
17:26 TimToady m: my \x = push(now); say x.WHAT
17:26 camelia rakudo-moar 6974b8: OUTPUT«Cannot resolve caller push(Instant: ); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at <tmp> line 1␤␤»
17:26 TimToady and I guess that doesn't work
17:29 hackedNODE m: sub {CATCH {.return}; push(now)}().WHAT.say
17:29 camelia rakudo-moar 6974b8: OUTPUT«(NoMatch)␤»
17:29 dogbert17 should we commit your fix or do you think more code is necessary?
17:29 TimToady hackedNODE is on the right track
17:30 dogbert17 hackedNODE is as clever as they get :-)
17:30 tony-o i'm looking at implementing the pluggable interfaces in zef and looking for input on what actions should be pluggable and what points in each should have interfaces for extension.  right now i'm just looking at putting in the pre/post pluggables for build|install|test and the way i have prototyping structured is you just need to 'does' a role and tell zef to attempt to use that as a plugin.  curious what
17:30 tony-o environment variables, data, etc people would want passed around to plugins
17:30 RabidGravy if like me you are afflicted with samewith-mania then "find . -name '*.pm' | xargs grep -c samewith | sort -t ':' -k 2 -g" may help ;-)
17:31 eliasr joined #perl6
17:31 wamba joined #perl6
17:33 TimToady nodemap(sub (\arg) { { CATCH { return arg ~~ Iterable:D ?? duckmap(op,arg) !! arg }; op.(arg); } }, obj);
17:33 TimToady or so...
17:34 TimToady hmm, useless brackets there
17:34 TimToady nodemap(sub (\arg) { CATCH { return arg ~~ Iterable:D ?? duckmap(op,arg) !! arg }; op.(arg); }, obj);
17:35 TimToady or possibly:
17:35 TimToady nodemap(sub (\arg) { CATCH { return arg ~~ Iterable:D ?? duckmap(op,arg) !! $_ }; op.(arg); }, obj);
17:35 TimToady depending on whether we want to return "a" or the failure
17:36 TimToady I can argue that either way
17:37 TimToady which may mean that we want to give the user the choice of behavior
17:37 domidumont joined #perl6
17:38 TimToady if we make it return the "a", that works out better for "just adjust the nodes you recognize, and leave the others the same"
17:38 RabidGravy there all the released modules don't have 'samewith', lizmat++ cheers for the "heads up"
17:39 TimToady which is sort of the spirit of duckmap
17:39 dogbert17 yes, sounds better than "(1 (2 3) Type check failed in binding to $x; expected Int but got Str ("a")"
17:39 RabidGravy if nothing else it has improved my apparent productivity for the day ;-)
17:41 TimToady if they really want the failure, they can write a function that returns a handled $failure, which won't throw
17:41 optikalmouse joined #perl6
17:42 dogbert17 your second suggestion, i.e. nodemap(sub (\arg) { CATCH { return arg ~~ Iterable:D ?? duckmap(op,arg) !! arg }; op.(arg); }, obj);     it is then
17:42 dogbert17 maybe hackedNODE has already implemented it
17:42 TimToady also, if they feed it [1,[2,3],"a"], it should really give back [1,[2,3],"a"] rather than (1,(2,3),"a")
17:42 TimToady mappers should try to preserve structure types
17:44 TimToady especially since duckmaps are likely to be applied to wonky iterable types
17:44 TimToady that might or might not quack in the night
17:45 dogbert17 the ordinary map doesn't seem to retain structure either
17:45 TimToady m: say ([1,2,3] but role { method quack { say "QUACK!" } }).quack
17:45 camelia rakudo-moar 38ec2e: OUTPUT«QUACK!␤True␤»
17:45 TimToady such as that
17:46 TimToady m: say ([1,2,3] but role { method quack { say "QUACK!" } }).WHAT
17:46 camelia rakudo-moar 38ec2e: OUTPUT«(Array+{<anon|80947680>})␤»
17:46 TimToady a duckmapper should preserve that anonymous type
17:47 TimToady well, any mapper should, to the extent possible
17:47 dogbert17 m: my @a = [1,2,3]; say @a.map(-> Int $x { $x })
17:47 camelia rakudo-moar 38ec2e: OUTPUT«(1 2 3)␤»
17:48 TimToady arguable that's wrongish
17:48 labster joined #perl6
17:49 TimToady m: my @a = [1,[2,3],4]; say @a.deepmap({ $_ + 1 })
17:49 camelia rakudo-moar 38ec2e: OUTPUT«[2 [3 4] 5]␤»
17:50 TimToady well, deepmap does it right
17:50 TimToady maybe .map is coercive to list, and that's okay
17:50 hackedNODE dogbert17: nah, I didn't implement anything. I'm a Perl 6 n00b :)
17:51 hackedNODE (I've been using it for like three days ;))
17:51 dogbert17 well, figuring out what destroys the structure is a bit over my tiny head I'm afraid :(
17:52 TimToady so whatever .deepmap is doing to preserve [], .duckmap should too
17:53 TimToady really, the only difference between deepmap and duckmap is whether it gives priority to the duckiness or to the flockiness
17:53 TimToady well, I said that backwards, one way or the other
17:54 TimToady deepmap first check flockiness, duckmap first checks duckiness
17:54 TimToady *checks
17:56 TimToady so if a flock of geese has a .fly method in order to fly in formation, $flock.duckmap will fly the flock, rather than flying each individual goose
17:57 TimToady or a flock of ducks will quack in unison, or whatever
17:57 dogbert17 :-)
17:58 * dogbert17 finds himself in a quackmire
18:02 kyclark joined #perl6
18:03 mst _o< _o< did somebody say ducks? >o_ >o_
18:03 mst _o< _o< everybody loves ducks >o_ >o_
18:03 geekosaur possibly better than a quaggamire
18:03 itcharlie joined #perl6
18:07 poohman joined #perl6
18:09 masak duck! http://mashable.com/2016/09/26/giant-inflatable-duck-glasgow/
18:09 yoleaux 13:46Z <RabidGravy> masak: I'm just fixing your https://github.com/tokuhirom/p6-HTTP-Server-Tiny/issues/28 while I'm in the mood :)
18:09 yoleaux 14:29Z <RabidGravy> masak: I closed that PR on HST on the grounds that it doesn't spew that error any more ;-)
18:09 yoleaux 14:29Z <RabidGravy> masak: err, "issue" not "PR"
18:09 masak RabidGravy: oh hey -- thanks
18:09 * masak chuckles at his "and version * of HTTP::Server::Tiny"
18:10 RabidGravy tokuhirom made the grave mistake of giving me commit on that ;-)
18:11 masak *evil cackle*
18:11 kyclark panda says that "p6doc" is installed, but it's not found in my path.  I get "The 'p6doc' command exists in these Perl 6 versions: moar-2015.12" How do I fix this?
18:11 masak RabidGravy: https://github.com/tokuhirom/p6-HTTP-Server-Tiny/commit/3ed7fd8b0d68970ceda96db966bb3d9097086524 -- nice and small fix
18:11 masak too bad about the text-based pattern match... ;)
18:11 ugexe kyclark: rakudobrew rehash
18:12 kyclark I tried that.  Same error.
18:12 kyclark "Currently running moar-2016.09"
18:12 hackedNODE kyclark: do you have ~/.rakudobrew/moar-nom/install/share/perl6/site/bin in path?
18:12 RabidGravy yeah, I may track down and Exceptionify the source of that at some point tomorrow
18:13 kyclark $ echo $PATH | sed "s/:/^M/g" | grep rakudo
18:13 ugexe you dont point your path to rakudobrew perl6 bin paths
18:13 kyclark "/Users/kyclark/.local/binw/moar-nom/install/share/perl6/site/bin"
18:13 ugexe that defeats the point of rakudobrew
18:13 masak RabidGravy: you're like a golden avocado. precious.
18:13 ugexe ~/.rakudobrew/bin should be at the start of your path
18:13 hackedNODE kyclark: and where is p6doc installed to? (find ...)
18:13 masak er, I mean ++RabidGravy :)
18:14 kyclark ./moar-2015.12/install/share/perl6/site/bin/p6doc
18:14 kyclark well, ~/.rakudobrew/...
18:15 RabidGravy :)
18:15 geekosaur suppose there's always rakudobrew exec p6doc
18:16 El_Che RabidGravy: The author of Crust said at FOSDEM that it had trouble (blocking) with > 200 process concurrency. Doe  HTTP-Server-Tiny have similar trouble?
18:16 ugexe sounds like PATH is incorrect and you're invoking a module installer under a specific rakudo version instead of letting rakudobrew handle it
18:17 RabidGravy El_Che, Crust is typically a layer over HTTP::Server::Tiny so yes, probably ;-)
18:18 RabidGravy It may have improved with some of the concurrency stabilization work in the last six months
18:22 RabidGravy my current interest in HST is switching the streaming server WIP I have to use it rather than the hacked up reinvention it uses now
18:23 RabidGravy right lets remove these last samewiths from the yet to be released 'Sofa'
18:23 El_Che I have some questions from people using the built-in go http server (https://golang.org/pkg/net/http/) and were looking for a perl 6 lib
18:26 [ptc] is testers.perl6.org still current?  Or is modules.perl6.org the definitive reference for modules and their testing status?
18:26 [ptc] just wondering...
18:27 awwaiid I didn't even know there was a testers.perl6.org
18:28 kyclark OK, I finally figured out my path problems.  Finally I "p6doc Test" and get "No Pod found in Test" --- so, where can I find docs on Test?
18:28 kyclark Nothing here either: http://modules.perl6.org/
18:29 awwaiid kyclark: https://docs.perl6.org/language/testing is what I've looked at
18:29 [ptc] awwaiid: it looks very much like cpantesters
18:29 [ptc] however almost all of the modules are currently showing "N/A" for the testing status, so I was wondering if maybe it's not the one to look at anymore
18:29 kyclark Helpful!    Thanks awwaiid
18:29 awwaiid [ptc]: I looked and don't see my module on there. dunno
18:30 [ptc] awwaiid: I think it needs to be submitted, just like how test reports for cpantesters need to be explicitly submitted
18:45 [Coke] mst: http://ducksarethebest.com/
18:46 acrussell joined #perl6
18:46 [ptc] ... except in cricikt
18:46 [ptc] *cricket
18:46 labster joined #perl6
18:48 RabidGravy okay, that's a WOW
18:48 avuserow there is also (or used to be) http://smoke.perl6.org/report but it seems unused at this point...
18:48 RabidGravy my smoke test of all my modules is down to 11 minutes
18:49 RabidGravy which is less than a quarter of the high mark
18:49 geekosaur "never pick up a duck in a dungeon"
18:49 RabidGravy and half from the last time
18:51 RabidGravy so good work everybody :)
18:51 setty1 joined #perl6
18:51 RabidGravy that's 57 modules BTW
18:52 [ptc] avuserow: yes, I'd forgotten about smoke.perl6.org!
18:56 mohae joined #perl6
18:57 sjoshi joined #perl6
18:58 sjoshi joined #perl6
19:00 BillSussman joined #perl6
19:08 domidumont joined #perl6
19:12 ka joined #perl6
19:16 rgrinberg joined #perl6
19:22 TEttinger joined #perl6
19:25 pygra1 joined #perl6
19:28 skids m: my $v := array[uint8].new(0,1,2); dd (|$v); Buf[uint8].new(|$v[*]).say; Buf[uint8].new(|(0,1,2)).say; Buf[uint8].new(|$v).say
19:28 camelia rakudo-moar 38ec2e: OUTPUT«slip(0, 1, 2)␤Buf[uint8]:0x<00 01 02>␤Buf[uint8]:0x<00 01 02>␤Type check failed in initializing element #0 to Buf[uint8]; expected uint8 but got Int (0)␤  in any  at gen/moar/m-Metamodel.nqp line 1752␤  in block <unit> at <tmp> line 1␤␤Actual…»
19:35 hackedNODE m: my \Perl = so 'gangsta'; for i { .roll, .floor for .reals }
19:35 camelia rakudo-moar 38ec2e: ( no output )
19:35 hackedNODE m: say q|my \Perl = so 'gangsta'; for i { .roll, .floor for .reals }|.subst: :g, /<-[\w\s]>+/, '';
19:35 camelia rakudo-moar 38ec2e: OUTPUT«my Perl  so gangsta for i  roll floor for reals ␤»
19:36 hackedNODE m: say q|my \Perl = so 'gangsta'; for i { .roll, .floor for .reals }|.words;
19:36 camelia rakudo-moar 38ec2e: OUTPUT«(my \Perl = so 'gangsta'; for i { .roll, .floor for .reals })␤»
19:36 hackedNODE aw
19:37 hackedNODE m: class That's {};     That's.HOW, i.roll
19:37 camelia rakudo-moar 38ec2e: ( no output )
19:37 hackedNODE ^_^
19:40 hackedNODE m: i .tan for Perl
19:40 camelia rakudo-moar 38ec2e: ( no output )
19:41 avuserow m: i .roll with class {}
19:41 camelia rakudo-moar 38ec2e: ( no output )
19:43 hackedNODE m: i, gather i.^can, die for Perl
19:43 camelia rakudo-moar 38ec2e: ( no output )
19:52 perlawhirl joined #perl6
19:53 skids m: :2b or not :2b
19:53 camelia rakudo-moar 38ec2e: OUTPUT«WARNINGS for <tmp>:␤Useless use of "not " in expression "not :2b" in sink context (line 1)␤»
20:02 cog__ joined #perl6
20:03 cdg joined #perl6
20:11 itcharlie left #perl6
20:21 andrzejku hi
20:21 andrzejku ;)
20:26 telex joined #perl6
20:27 TEttinger m: say ٢³
20:27 camelia rakudo-moar 38ec2e: OUTPUT«8␤»
20:28 andrzejku TEttinger, do you know where can I find some Perl 6 friend?
20:29 TEttinger I don't really use perl 6!
20:29 TEttinger m: say ߃߂³
20:29 camelia rakudo-moar 38ec2e: OUTPUT«32768␤»
20:33 setty1 joined #perl6
20:33 aindilis joined #perl6
20:37 edehont joined #perl6
20:41 nadim joined #perl6
20:43 devmikey joined #perl6
20:52 lichtkind joined #perl6
20:54 tony-o [ptc]: modules.zef.pm has a listing of modules - testing results from actual people's systems are not yet but in the works
20:54 tony-o modules.zef.pm has travis pass/fail but no logs
21:01 dalek Inline-Perl5: 2f6ca76 | niner++ | / (2 files):
21:01 dalek Inline-Perl5: Save 4 native calls on each function/method/coderef call
21:01 dalek Inline-Perl5:
21:01 dalek Inline-Perl5: Use an rw flag to communicate whether an error occured and only if it actually
21:01 dalek Inline-Perl5: did, try to handle it. Saves 4 native calls (p5_err_sv, p5_type, p5_sv_utf8 and
21:01 dalek Inline-Perl5: p5_sv_to_char_star) when no error occured (which is quite often).
21:01 dalek Inline-Perl5:
21:01 dalek Inline-Perl5: Saves ~ 16 % in the csv-ip5xs.pl benchmark.
21:01 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/2f6ca766c1
21:04 jnthn nine++ # nice! :)
21:06 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/09/26/2016-39-keys-to-cover-moar-tests/
21:07 lichtkind jnthn: greetings is the mail from your jnthn site still valifd?
21:07 lichtkind valid
21:11 jnthn lichtkind: Yes
21:11 jnthn lichtkind: Are you planning to send me something, or did I miss something/should go hunt in my spam folder? :)
21:15 El_Che lizmat: maybe for the next P6W: native linux packages of the monthly rakudo releases https://github.com/nxadm/rakudo-pkg/releases <-- it's probably only dogfood at the moment :)
21:15 nine_ We're now down to 10 native calls per iteration of the benchmark (which calls 3 methods).
21:21 nine_ (used to be 70 native calls not long ago)
21:27 lichtkind jnthn: its basically a resent bu i got fresh information too
21:32 lichtkind jnthn: its out
21:36 sufrostico joined #perl6
21:42 canopus joined #perl6
21:43 bbkr joined #perl6
21:46 jnthn lichtkind: Moc dobře, that one arrived. :-)
21:47 jnthn Will reply shortly (or tomorrow :))
21:51 cpage_ joined #perl6
22:00 perlawhirl joined #perl6
22:05 stmuk_ I think MoarVM/issues/410 affects linux
22:09 sufrostico joined #perl6
22:21 cpage_ joined #perl6
22:23 Unavowed joined #perl6
22:24 gfldex m: sub f( | ( :$a) where $a.defined ) {}; f 42
22:24 camelia rakudo-moar 447d59: OUTPUT«Cannot call method 'defined' on a null object␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:24 gfldex i
22:24 gfldex i'm quite sure that is a bug but am not sure where
22:24 gfldex m: sub f( | ( :$a) where :$a.defined ) {}; f 42
22:24 camelia rakudo-moar 447d59: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub-signature␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:24 gfldex m: sub f( | ( :$a) where :$a.defined ) {}; f :a(42)
22:24 camelia rakudo-moar 447d59: ( no output )
22:24 gfldex m: sub f( | ( :$a) where $b.defined ) {}; f 42
22:24 camelia rakudo-moar 447d59: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$b' is not declared␤at <tmp>:1␤------> 3sub f( | ( :$a) where 7⏏5$b.defined ) {}; f 42␤»
22:29 SmokeMachine____ do you guys know if is there any open perl6 job position?
22:29 SmokeMachine____ *are
22:30 gfldex singular was the right pick, see http://news.perlfoundation.org/2016/09/jonathan-worthingtons-recent-g.html
22:30 gfldex and that open position is already taken :->
22:30 stmuk_ SmokeMachine____: plenty of open volunteer roles!
22:31 Matias[m] joined #perl6
22:32 SmokeMachine____ stmuk_: I am studying to try to get those too... :)
22:34 ShimmerFairy joined #perl6
22:38 aries_liuxueyang joined #perl6
22:40 ShimmerFairy joined #perl6
22:41 Unavowed joined #perl6
22:57 skids joined #perl6
23:02 Unavowed joined #perl6
23:04 bjz joined #perl6
23:21 BenGoldberg joined #perl6
23:22 cog__ joined #perl6
23:25 vytas joined #perl6
23:27 cpage_ joined #perl6
23:27 adu joined #perl6
23:28 bjz joined #perl6
23:32 Dunearhp joined #perl6
23:32 cpage_ joined #perl6
23:34 Unavowed joined #perl6
23:42 bjz joined #perl6
23:57 cpage_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo