Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-02

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:14 cpage_ joined #perl6
00:30 lookatme joined #perl6
00:30 lookatme morning \o.
00:31 Herby_ o/
00:35 skids joined #perl6
00:40 lookatme joined #perl6
00:44 lookatme joined #perl6
00:44 Juerd ♥ given $input { when any(@stack) { note "Already selected!" } ... }
00:48 lookatme joined #perl6
00:51 kurahaupo joined #perl6
00:54 astj joined #perl6
00:55 Cabanossi joined #perl6
01:02 astj joined #perl6
01:04 lookatme joined #perl6
01:08 lookatme joined #perl6
01:08 baest joined #perl6
01:09 astj joined #perl6
01:13 Zoffix joined #perl6
01:14 Zoffix Any idea why when I run this program it always prints "Killing" three times, but frequently it doesn't end, suggesting the murder did not succeed? https://gist.github.com/zoffixznet/79543eee430a9833bd405c6580314796#file-p6-p6-L37-L41
01:14 Zoffix As you can see, I even tried sending three different kill signals, to no avail
01:16 Zoffix And indeed `ps ax` shows the procs unkilled, still running
01:18 kurahaupo Zoffix: do you own the processes in question?
01:18 Zoffix kurahaupo: they're started by that very script
01:18 lookatme Use SIGKILL ?
01:18 kurahaupo check for error returns?
01:19 lookatme check $! ?
01:19 Zoffix Error returns from where?
01:19 Zoffix lookatme: at which point?
01:19 Zoffix And yeah, I'm already sending SIGKILL
01:19 MasterDuke if you add signal handlers to the code you're running in the Proc, do they fire?
01:20 kurahaupo error returns from the kills
01:20 Zoffix kurahaupo: it just returns the signal number
01:20 MasterDuke run under strace and see what that shows happening?
01:21 cyphase joined #perl6
01:23 Zoffix adding `signal(SIGINT).tap: {say "got a signal"};` to the spawned procs and then sending $proc.kill: SIGINT don't print that message :/
01:23 Zoffix I don't know how to use strace.
01:24 kurahaupo strace -o newtracefile program args ...
01:24 MasterDuke you'll want -f also
01:24 Juerd https://github.com/Juerd/shalog/blob/master/tracking.p6  # Beginning of something usable
01:24 kurahaupo but for this you'll want -f or -ff
01:24 kurahaupo MasterDuke: snap
01:25 astj_ joined #perl6
01:25 Zoffix Hm. The code's `say "Killing!"; say $proc.kill: SIGSEGV;` and it always prints 3 killing but only 1-3 "11"s
01:26 Juerd At some point I want to spread my code over several files. Are there any best practices regarding putting multiple classes in a single file?
01:26 Zoffix Juerd: no
01:26 Juerd Great, at least I can stop looking for them then :)
01:27 kurahaupo Zoffix: if you just want something to stop normally, SIGTERM should be your first choice. SIGHUP is typically caught by daemons and used to trigger reloading
01:27 kurahaupo not that you've made the relevant arrangements, but that's the convention
01:28 MasterDuke you could add an `fprintf(stderr, "Kilroy was here")` to src/io/procops.c:1073 and see if the moarvm op is getting called 3 times
01:30 kurahaupo for interactive processes SIGHUP indicates that its terminal has disconnected -- the "hup" or "hangup" refers to a phone line with a dial-up modem
01:31 Zoffix Here's the strace. What am I looking for https://gist.githubusercontent.com/zoffixznet/1c0f694b63a23f6d551e4bc29a2acb5a/raw/6b839d8dfec33b9f40d614c8aeb8abfe7ebc237f/gistfile1.txt ?
01:31 Zoffix here's the program that I used to generate it: https://gist.github.com/zoffixznet/c737b799dec4856ef7ffee75d9b5339f
01:37 BenGoldberg joined #perl6
01:38 Zoffix Golfed down a bit: await ^2 .map: {start { with Proc::Async.new: $*EXECUTABLE, "-e", "sleep" -> $p { Promise.in(2).then: {say "Killing"; $p.kill: SIGTERM}; await $p.start } }}
01:38 Zoffix What's weird is it doesn't appear to happen if that `^2` is a `^1`
01:39 * Zoffix files in hopes jnthn++ would know a fix
01:46 Zoffix .ask jnthn any idea what may be causing a Proc::Async.kill to fail killing when there's more than one Proc::Async involved? This is sort of blocking my ecosystem toaster script :( would be sweet if it could be fixed: https://rt.perl.org/Ticket/Display.html?id=131479
01:46 yoleaux Zoffix: I'll pass your message to jnthn.
01:46 Zoffix Man, need to learn C so I could fix stuff like this on my own :*
01:46 pilne c is dark and full of terrors... but at least is isn't c++ (:
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:52 lookatme joined #perl6
01:55 Cabanossi joined #perl6
01:55 kurahaupo_ joined #perl6
01:56 aborazmeh joined #perl6
01:56 aborazmeh joined #perl6
02:00 cpage_ joined #perl6
02:00 Zoffix pilne: yeah, that's why we say Perl 6 is the last language you'll ever learn :)
02:00 * Zoffix goes into hybernation mode
02:01 Zoffix I see I first suspected .kill was busted last September: https://github.com/perl6/roast/issues/158
02:02 lookatme I send SIGTERM can killed one of **Promise** which tag with "bar"
02:03 * Zoffix &
02:03 lookatme @_@
02:05 pilne i just have to keep hoping i'll be in the right place at the right time to jump on something looking to try "anything" as a coding backend >.< but there is a lot of buzzword hype and shenanigans locally.
02:06 pilne but just barely getting to know perl6, it feels fantastic for "big data" and even machine learning/AI stuff.
02:16 curt_ performance isn't quite there yet, but NativeCall is my best friend.  I love how trivial it is to drop into C.
02:18 Juerd "The following packages were stubbed but not defined:", but if I remove the "..." it says about the definition later in the file: "Redeclaration of symbol 'Nowhere'"
02:18 Juerd Any ideas?
02:18 Juerd (Nowhere is the name of the class)
02:18 lookatme Is machine learning/AI need performance ?
02:19 lookatme Juerd, can you paste code to somewhere
02:20 Juerd lookatme: https://gist.github.com/Juerd/27947ac0e75650cec92f16abf69011fd
02:20 zhongjin616 joined #perl6
02:20 Juerd It worked when I didn't have it in a .pm file
02:20 curt_ I'm not doing machine learning/AI, my 'big data' is just volume.
02:27 lookatme Juerd, I comment on the gist
02:28 pilne for research purposes, technically, machine learning and AI don't need speed, they need "flexibility", but speed is always nice in that area (:
02:29 raschipi joined #perl6
02:29 TEttinger pilne: there's also bearlibterminal if you don't need some of the stuff libtcod provides. it's probably much easier to call from a not-C language
02:29 lookatme The document about that forward declared not very clear
02:30 TEttinger (libtcod defines their own kinds of list and such)
02:30 TEttinger http://foo.wyrd.name/en:bearlibterminal
02:30 pilne ahhhh, TEttinger, i was mainly interested in libtcod for it's terminal stuffs, tyvm
02:30 TEttinger BLT's terminal is definitely better in a lot of ways
02:30 pilne and it reminds me of a good meal
02:30 pilne so it's like... doubleplusgood
02:31 TEttinger it allows movement of each char outside its position, plus layers
02:31 TEttinger and works with TTF fonts
02:31 pilne project tcodperl: killed before germination
02:31 TEttinger BLT only does terminal output, since most games want their own map gen anyway
02:32 pilne this will allow me to just write all the "roguelike" stuff (ai, etc.) in perl6, and use that for terminal.
02:32 TEttinger yep
02:32 TEttinger roguebasin has good resources
02:32 pilne tyvm, no need to lug around the horse trailer full of horses i ain't using
02:32 pilne yeah, it's where i get most of my stuff, not sure how i missed that
02:33 TEttinger I don't know if BLT has much presence there. libtcod had a monopoly on full-color terminal-likes for many years
02:33 TEttinger but it stopped mac support and various other oddities before finally picking up some pieces
02:33 TEttinger http://www.roguebasin.com/index.php?title=Dijkstra
02:33 pilne yeah, and it was kinda "more" than i wanted from a library, even when using it in a tutorial for python a longtime ago.
02:34 TEttinger (useful but easy to miss AI technique)
02:34 pilne i actually read a comparison of fill, dijkstra, and a* recently
02:34 xiaoyafeng joined #perl6
02:34 TEttinger I work on a very "more" library for roguelikes but it's in Java
02:34 TEttinger yeah, it's crazy the differences
02:35 xiaoyafeng hello, I have a question.
02:35 pilne i just have a hard time feeling comfy as a one-man-dev in javaland, everything just feels so "big"
02:36 TEttinger currently in my benchmarks, I have A* beating everything hand-down for short simple paths, but surprisingly a breadth-first search with no heuristic can beat A* on long and moderately convoluted paths
02:36 xiaoyafeng what's different between ".".io.dir.grep: {d} and ".".io.dir.grep({d});
02:36 xiaoyafeng please help
02:36 pilne TEttinger: a* "thinks too much" on the long and convoluted paths i've noticed.
02:37 TEttinger hi xiaoyafeng. there's some experts around recently, but I am not one of them
02:37 pilne likewise, my perl-fu is weak like cooked spaghetti
02:37 xiaoyafeng :(....
02:38 TEttinger (I'm rather sure Zoffix is an expert, since I've seen a lot of commits tied to the name)
02:38 pilne m: ".".io.dir.grep: {d}
02:38 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    d used at line 1␤␤»
02:39 lookatme xiaoyafeng, no different.
02:39 curt_ xiaoyafeng: subroutine(...) and subroutine: ... are just two ways of calling the sub
02:39 pilne it might just be alternate syntax, have you examined them?
02:39 TEttinger also you might not have access to current dir in the bot
02:39 xiaoyafeng ".".io.dir.grep: {.d}
02:39 xiaoyafeng sorry
02:39 raschipi m: ".".io.dir.grep: {.d}
02:39 camelia rakudo-moar b667e8: OUTPUT: «No such method 'io' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
02:39 lookatme m: say ".".IO.dir.grep:{.d};
02:39 camelia rakudo-moar b667e8: OUTPUT: «(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-m-1".IO "rakudo-m-2".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j…»
02:39 xiaoyafeng IO
02:40 lookatme m: say ".".IO.dir.grep({.d});
02:40 camelia rakudo-moar b667e8: OUTPUT: «(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-m-1".IO "rakudo-m-2".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j…»
02:40 raschipi It's just two ways of saying the same thing.
02:40 Cabanossi joined #perl6
02:40 TEttinger oh, one was {.d} and one was {d}
02:40 pilne god i love this bot
02:40 TEttinger it's a pretty great bot
02:40 lookatme It just two ways of function/sub call, you can chose your prefer style
02:40 xiaoyafeng so : and () is identical
02:41 raschipi What is different yould be ".".IO.dir.grep ({.d}); The space makes a difference.
02:42 raschipi m: ".".IO.dir.grep ({.d});
02:42 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3".".IO.dir.grep7⏏5 ({.d});␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        st…»
02:42 lookatme m: say ".".IO.dir.grep : {.d};
02:42 camelia rakudo-moar b667e8: OUTPUT: «Cannot resolve caller grep(Seq: ); none of these signatures match:␤    ($: Bool:D $t, *%_)␤    ($: Mu $t, *%_)␤  in block <unit> at <tmp> line 1␤␤»
02:42 raschipi m: say ".".IO.dir.grep\                       ({.d});
02:42 camelia rakudo-moar b667e8: OUTPUT: «(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-m-1".IO "rakudo-m-2".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j…»
02:43 xiaoyafeng well it's not allowed space. between sub and args
02:43 raschipi m: say ".".IO.dir.grep\        ␤               ({.d});
02:43 camelia rakudo-moar b667e8: OUTPUT: «(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-m-1".IO "rakudo-m-2".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j…»
02:44 raschipi You can even split into multiple lines, as long as you put a \ there. Otherwise it means something else.
02:44 xiaoyafeng but why ".".IO.dir.grep:     ({.d})  is allowed too?
02:45 raschipi That is an alternative format.
02:45 xiaoyafeng ok, now it's 3 ways to call a sub
02:45 raschipi Gotta have at least three ways of doing something in Perl6.
02:47 xiaoyafeng TIMTTWTDI
02:47 xiaoyafeng ;)
02:47 lookatme m: say ".".IO.dir.grep {.d};
02:47 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3say ".".IO.dir.grep7⏏5 {.d};␤    expecting any of:␤        infix␤        infix…»
02:48 lookatme m: say grep {.d}, ".".IO.dir;
02:48 camelia rakudo-moar b667e8: OUTPUT: «(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-m-1".IO "rakudo-m-2".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j…»
02:49 noganex joined #perl6
02:51 lookatme m: say ({.d}).WHAT
02:51 camelia rakudo-moar b667e8: OUTPUT: «(Block)␤»
02:51 lookatme xiaoyafeng, ({.d}) also a callable Block
02:52 lookatme like {.d} does
02:52 xiaoyafeng yeah, it makes sense
02:56 aborazmeh joined #perl6
02:56 aborazmeh joined #perl6
03:02 raschipi m: lc('Y','N'); lc 'Y','N'
03:02 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5===␤Calling lc(Str, Str) will never work with declared signature (Cool $s)␤at <tmp>:1␤------> 3<BOL>7⏏5lc('Y','N'); lc 'Y','N'␤Calling lc(Str, Str) will never work with declared signature (Cool $s)␤at <tmp>:1␤------> 3lc…»
03:02 raschipi m: lc ('Y','N'); lc 'Y','N'
03:02 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling lc(Str, Str) will never work with declared signature (Cool $s)␤at <tmp>:1␤------> 3lc ('Y','N'); 7⏏5lc 'Y','N'␤»
03:03 lookatme m: say lc('Y', 'N');
03:03 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling lc(Str, Str) will never work with declared signature (Cool $s)␤at <tmp>:1␤------> 3say 7⏏5lc('Y', 'N');␤»
03:03 lookatme m: say lc('Y');
03:03 camelia rakudo-moar b667e8: OUTPUT: «y␤»
03:04 raschipi bisectable6: say lc ('Y','N');
03:04 bisectable6 raschipi, On both starting points (old=2015.12 new=b667e81) the exit code is 0 and the output is identical as well
03:04 bisectable6 raschipi, Output on both points: «y n»
03:04 lookatme m: say lc ('Y', 'N');
03:04 camelia rakudo-moar b667e8: OUTPUT: «y n␤»
03:04 lookatme m: say &lc.WHAT;
03:04 camelia rakudo-moar b667e8: OUTPUT: «(Sub)␤»
03:05 lookatme m: say &lc('Y', 'N');
03:05 camelia rakudo-moar b667e8: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at <tmp> line 1␤␤»
03:05 raschipi I see, in the second, it was the version without parens that it didn't like.
03:06 lookatme m: say &lc.signature.perl;
03:06 camelia rakudo-moar b667e8: OUTPUT: «:(Cool $s)␤»
03:07 lookatme m: say &lc(('Y', 'N'));
03:07 camelia rakudo-moar b667e8: OUTPUT: «y n␤»
03:08 lookatme m: say ('Y', 'N') ~~ Cool;
03:08 camelia rakudo-moar b667e8: OUTPUT: «True␤»
03:08 lookatme Oh.. @_@
03:08 Cabanossi joined #perl6
03:12 raschipi m: say lc( ('Y','N') );
03:12 camelia rakudo-moar b667e8: OUTPUT: «y n␤»
03:13 lookatme m: say &lc(('Y', 'N')).WHAT;
03:13 camelia rakudo-moar b667e8: OUTPUT: «(Str)␤»
03:41 simonm joined #perl6
03:49 Xliff joined #perl6
03:49 Xliff \o
03:49 Xliff Is there a way to make a class that is only available to a specific scope?
03:51 Xliff m: class A { my class B { method bb { say "bb"; } }; method new( B.bb; }; }; A.new;
03:51 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3method bb { say "bb"; } }; method new( B7⏏5.bb; }; }; A.new;␤    expecting any of:␤        constraint␤        formal parameter␤»
03:51 Xliff m: class A { my class B { method bb { say "bb"; } }; method new( B.new.bb; }; }; A.new;
03:51 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3method bb { say "bb"; } }; method new( B7⏏5.new.bb; }; }; A.new;␤    expecting any of:␤        constraint␤        formal parameter␤»
03:51 Xliff m: class A { my class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new;
03:51 camelia rakudo-moar b667e8: OUTPUT: «bb␤»
03:51 Xliff m: class A { my class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; A::B.new.bb;
03:51 camelia rakudo-moar b667e8: OUTPUT: «bb␤Could not find symbol '&B'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:51 Xliff Hmm... that should work.
03:53 Cabanossi joined #perl6
03:54 raschipi m: class A { our class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; A::B.new.bb;
03:54 camelia rakudo-moar b667e8: OUTPUT: «bb␤bb␤»
03:55 raschipi Xliff: ^^
04:02 raschipi m: class A { our class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; B.new.bb;
04:02 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    B used at line 1␤␤»
04:03 raschipi m: class A { our class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; my B.new.bb;
04:03 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5===␤Type 'B' is not declared␤at <tmp>:1␤------> 3} }; method new{ B.bb; }; }; A.new; my B7⏏5.new.bb;␤Malformed my␤at <tmp>:1␤------> 3; } }; method new{ B.bb; }; }; A.new; my7⏏5 B.new.bb;␤␤»
04:07 Xliff raschipi: Why "our" instead of "my"?
04:08 raschipi They say where the symbol will be visible. 'my' means it's visible only inside the block, 'our' means it will be visible outside.
04:09 Xliff But if I only want B visible to methods in A, isn't that the same?
04:10 raschipi If you want B visible only inside, use my. If you want it visible outside, use our.
04:11 Xliff m: class A { my class B { method bb { say "bb"; } }; method new{ B.bb; }; method aa { say "aa" B.bb; }; A.new; A::B.new.bb;
04:11 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ethod new{ B.bb; }; method aa { say "aa"7⏏5 B.bb; }; A.new; A::B.new.bb;␤    expecting any of:␤        infix␤        infix stopper␤        postfix…»
04:11 Xliff m: class A { my class B { method bb { say "bb"; } }; method new{ B.bb; }; method aa { say "aa"; B.bb; }; A.new; A::B.new.bb;
04:11 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3{ say "aa"; B.bb; }; A.new; A::B.new.bb;7⏏5<EOL>␤»
04:11 Xliff m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; method aa { say "aa"; B.bb; }; }; A.new; A::B.new.bb;
04:11 camelia rakudo-moar b667e8: OUTPUT: «bb␤Could not find symbol '&B'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
04:12 raschipi m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; method aa { say "aa"; B.bb; }; }; A.new; A.new.aa;
04:12 camelia rakudo-moar b667e8: OUTPUT: «bb␤bb␤No such method 'aa' for invocant of type 'Bool'␤  in block <unit> at <tmp> line 1␤␤»
04:12 raschipi m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; method aa { say "aa"; B.bb; }; }; A.new; A.aa;
04:12 camelia rakudo-moar b667e8: OUTPUT: «bb␤aa␤bb␤»
04:12 Xliff m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; method aa { say "aa"; B.bb; }; }; A.new.aa;
04:12 camelia rakudo-moar b667e8: OUTPUT: «bb␤No such method 'aa' for invocant of type 'Bool'␤  in block <unit> at <tmp> line 1␤␤»
04:12 Xliff m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; }; method aa { say "aa"; B.bb; };  A.new.aa;
04:12 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5===␤Undeclared name:␤    B used at line 1␤␤Other potential difficulties:␤    Useless declaration of a has-scoped method in mainline (did you mean 'my method aa'?)␤    at <tmp>:1␤    ------> 3b"; } }; method new { B.bb; }; };…»
04:13 Xliff m: class A { my class B { method bb { say "bb"; } }; method new { B.bb; }; }; method aa { say "aa"; B.bb; }; }; A.new.aa;
04:13 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5===␤Unexpected closing bracket␤at <tmp>:1␤------> 3b; }; }; method aa { say "aa"; B.bb; }; 7⏏5}; A.new.aa;␤Other potential difficulties:␤    Useless declaration of a has-scoped method in mainline (did you mean 'my method aa…»
04:13 Xliff OK, this needs an editor.
04:15 geekosaur joined #perl6
04:16 Xliff m: class A {
04:16 Xliff my class B {
04:16 camelia rakudo-moar b667e8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class A {7⏏5<EOL>␤»
04:16 Xliff method new { B.bb; };
04:16 Xliff method bb { say "bb"; };
04:16 Xliff };
04:16 Xliff method aa { say "aa"; B.bb; };
04:16 Xliff };
04:16 Xliff A.new.aa;
04:16 Xliff Feck.
04:17 Xliff class A { my class B { method new { B.bb; }; method bb { say "bb"; }; }; method aa { say "aa"; B.bb; }; }; A.new.aa;
04:17 raschipi Use a pastie
04:17 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; }; }; method aa { say "aa"; B.bb; }; }; A.new.aa;
04:17 camelia rakudo-moar b667e8: OUTPUT: «aa␤bb␤»
04:17 Xliff That would have been my next step if that hadn't worked.
04:17 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; }; }; method aa { say "aa"; B.bb; }; }; A.new.aa; A.B.new;
04:17 camelia rakudo-moar b667e8: OUTPUT: «aa␤bb␤No such method 'B' for invocant of type 'A'␤  in block <unit> at <tmp> line 1␤␤»
04:17 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; }; }; method aa { say "aa"; B.bb; }; }; A.new.aa; A::B.new;
04:17 camelia rakudo-moar b667e8: OUTPUT: «aa␤bb␤Could not find symbol '&B'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
04:18 raschipi do a /msg camelia
04:18 Xliff OK, so I don't really see a noticible difference between using "my" and "our"
04:19 xtreak_ joined #perl6
04:19 raschipi m: class A { our class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; A::B.new.bb;
04:19 camelia rakudo-moar b667e8: OUTPUT: «bb␤bb␤»
04:19 raschipi m: class A { my class B { method bb { say "bb"; } }; method new{ B.bb; }; }; A.new; A::B.new.bb;
04:19 camelia rakudo-moar b667e8: OUTPUT: «bb␤Could not find symbol '&B'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
04:20 raschipi The second one doesn't work because B doesn't exist outside of A
04:20 Xliff Heh.
04:20 Xliff Which is exactly what I want.
04:20 Xliff I don't want B to work outside of A
04:20 raschipi So use it. What's the problem?
04:21 Xliff No problem. I just wanted to know if I was doing it the right way.
04:21 Xliff You suggested "our" and I was confused if I had missed something.
04:21 Xliff No worries.
04:22 Xliff Thanks for the input, though.
04:23 raschipi I see. Yeah, using 'my' is the way to go. If you want something else, there are other options.
04:26 Xliff 'k
04:39 Cabanossi joined #perl6
04:40 xtreak joined #perl6
04:41 fatguy joined #perl6
04:45 aborazmeh joined #perl6
04:45 aborazmeh joined #perl6
04:47 aindilis joined #perl6
04:56 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; A.aa;}; }; method aa { say "aa"; B.bb; }; };
04:56 camelia rakudo-moar b667e8: ( no output )
04:56 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; A.aa;}; }; method aa { say "aa"; B.bb; }; }; A.new.aa
04:56 camelia rakudo-moar b667e8: OUTPUT: «(timeout)aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤bb␤aa␤…»
04:57 Xliff m: class A { my class B { method new { B.bb; }; method bb { say "bb"; A.aa}; }; method aa { B.bb }; }; A.new.aa
04:57 camelia rakudo-moar b667e8: OUTPUT: «(timeout)bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤bb␤…»
04:59 Xliff m: class A { my class B { method bb { say "bb"; A.aa }; }; method a { say B.bb }; method aa { say "aa" }; }; A.new.a
04:59 camelia rakudo-moar b667e8: OUTPUT: «bb␤aa␤True␤»
04:59 Xliff m: class A { my class B { method bb { say "bb"; A.aa }; }; method a { B.bb }; method aa { say "aa" }; }; A.new.a
04:59 camelia rakudo-moar b667e8: OUTPUT: «bb␤aa␤»
05:00 Xliff Rawk.
05:00 finanalyst joined #perl6
05:07 astj joined #perl6
05:08 Cabanossi joined #perl6
05:10 finanalyst can someone tell me what had happened to perl6-debug? I have just rerun 'rakudobrew build moar', then 'perl6-debug' and got 'perl6-debug: command not found'
05:30 ufobat joined #perl6
05:33 domidumont joined #perl6
05:52 zengargoyle finanalyst: i think it's broken or going away or being changed or something.  you probably have a `perl6-debug-m` for the moar build but that gives some other error.
05:53 finanalyst zengargoyle: if it's going away, it would be nice to know.
05:53 zengargoyle quotable6: perl6-debug
05:53 quotable6 zengargoyle, https://gist.github.com/3ef7cdc97a78f145bfeb0378c134949d
05:53 finanalyst If being changed, when will it be back?
05:54 finanalyst perl6-debug-m does not work at all - gives an error for all input
05:54 zengargoyle gues that doesn't do what i thought. :)  too many bots to keep track of.  i remember seeing a bit of discussion about perl6-debug in the past few days here in IRC.
05:55 Mithaldu joined #perl6
05:55 finanalyst how to find discussion?
05:55 zengargoyle if you search the IRC logs you'll probably find the answer.  it was just a few days or so ago.
05:57 zengargoyle https://irclog.perlgeek.de/perl6/2017-06-02
05:57 * zengargoyle thinks theres a bot that can search the logs but i don't know which one or how it works. :/
05:58 zengargoyle https://irclog.perlgeek.de/perl6/search/?nick=&amp;q=perl6-debug
06:00 Xliff Does FALLBACK take positional args?
06:02 Xliff Oh, nevermind.
06:02 Xliff It can.
06:03 zengargoyle finanalyst: i think perl6-debug vs perl6-debug-m is a little implementation detail of rakudobrew vs rakudo-star or whatever.  not sure if the brokeness is terminal or just a bit of "it hasn't caught up yet". :)  but you're not alone, it doesn't work.
06:04 finanalyst zengargoyle: just looking through the last few logs
06:05 finanalyst basically debug & Grammar:: Debug stopped working at the last update
06:05 domidumont joined #perl6
06:06 astj joined #perl6
06:08 zengargoyle finanalyst: cool.  BTW i'm probably going to steal your Task::Popular as a template to make my own little set of favorite modules because i'm too lazy to track down the old Task::Star. :P
06:08 finanalyst zengargoyle: :)
06:09 stmuk_ joined #perl6
06:09 finanalyst zengargoyle: By the way, I created a local directory on my computer, put a META6.json file in it with some modules I like to have, and then used zef on the directory URL
06:10 finanalyst It nicely installed all the modules
06:10 finanalyst list the required modules in the depends list
06:10 zengargoyle but i wonder if having an actual Task::Popular module that has nothing but a bare actual module with a version so it can somehow be tested against is more cromulent than just a Null install with dependencies....
06:11 zengargoyle like the p5 'perl -MTask::Whatever\ 99999' quick check of is it installed or not???
06:13 finanalyst zengargoyle: not sure what you mean about "testing against" a distribution
06:14 zengargoyle package manager satisfying dependencies is a bit different than being able to 'use Task::Whatever' and then check Task::Whatever's version inside the code.
06:15 zengargoyle it's sortof a meta thing that's probably not too important anyways... :)
06:16 nadim_ joined #perl6
06:16 lookatme perl6 -MTask::Whatever ?
06:18 zengargoyle `perl -MGetopt::Long\ 9999 -e1` -> Getopt::Long version 9999 required--this is only version 2.48 at /usr/share/perl/5.24/Getopt/Long.pm line 1530.
06:19 zengargoyle if Task::Popular (or Task::Whatever) doesn't actuall install a module named Task::Popular with a version, then as far as perl6 is concerned it doesn't exist.
06:20 zengargoyle only the package manager can tell by checking wheter all dependencies are installes.
06:21 zengargoyle if there's an actual Task::Poplular module that does nothing but is installed then the check is quick and easy.  require Task::Popular.  or query the version installed.
06:22 wamba joined #perl6
06:25 zengargoyle lookatme: doing the -MSome::Module\ 9999999 is just a really quick and easy way to see if a module is installed and which version is actually installed.  you ask perl to load a reallly high version and it fails and tells you which version it actually has or that there's no such module installed.
06:27 lookatme zengargoyle, I see. I dont' know much about module version control.
06:27 zengargoyle IMHO, it's best practice for every module/package/bundle/whatever to have an actual module that gets installed (even if it doesn't do anything) just so you can tell that it's there and what version it is.
06:29 zengargoyle but i may be alone in this thinking :)
06:29 lookatme Is there a way use specify version module in command `perl6 -M..` or in Perl 6 script..
06:32 zengargoyle i'm not really sure about p6.  but that's pretty much exactly what's going on in p5.  in a script 'use Foo 4;' is the command line 'perl "-MFoo 4" (because spaces).
06:33 darutoko joined #perl6
06:36 lowbro joined #perl6
06:36 zengargoyle but the point is can you tell that Task::Whatever is installed or not?  if Task::Whatever actually installs a Task::Whatever module then you can tell.  if Task::Whatever is just a list of dependencies and doesn't install an actual Task::Whatever module, then you can't check that it has been installed except by checking all of the dependencies.
06:36 lowbro joined #perl6
06:38 zengargoyle one way is easy, one is a PITA. :P
06:39 lookatme zengargoyle, There are something about module version in document. Such as `module mymodule:ver<0.0.1> { }`, but I dont' think it's exactly way manager module version.
06:41 lookatme I gotta do a test about that.
06:41 lookatme https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing
06:42 zengargoyle i don't think i've seen many command line (or scripts) that actually use the version information.... https://github.com/dnmfarrell/Perl6-One-Liners  this page has a few uses of -M but not that many.
06:43 lookatme Use that module would be like that `perl6 -MSOme::Module::ver<0.0.1>`
06:44 lookatme I think they add the `-M` option recently
06:44 lookatme The command **perl6** not have that option before
06:46 zengargoyle i don't think i've ever used a version in a -M other than checking whether module was installed or not....
06:47 zengargoyle one-liner's are usually using what you know work. :)
06:50 fatguy anyone using IO-Notification-Recursive ? i need to catch file/dir event (create/modify/delete), how can i do that ?
06:50 parv joined #perl6
06:58 zengargoyle `perl6 '-MTask::Popular' -e ''` --> No output
06:59 zengargoyle `perl6 '-MTask::Popular' -e ''` --> ===SORRY!=== Could not find Task::Popular at line 1 in: ......
07:00 zengargoyle gah, `perl6 '-MPSGI' -e ''` --> No output.
07:02 cpage_ joined #perl6
07:08 parv zengargoyle, what is the difference in commands with Task::Popular so that you get the output only on the second time?
07:09 lookatme Zef can install specify version module like this `zef install Foo:ver<1.0.0>`
07:12 lookatme And I found it's work when I use `use Foo:ver<1.0.0>` in script file, but not in `-M` option.
07:13 zengargoyle lookatme: the first time was a cut-n-paste error....  -MPSGI shows nothing -MTask::Popular returns error (even though Task::Popular is installed) because Task::Popular doen't actually install a modules named Task::Popular, it just has a list of dependencies that must be met (which `zef install Task::Popular` will happily do.
07:13 Voldenet fatguy: start with IO::Notification class, it has .watch-path command and a good example on consuming the supply :)
07:14 zengargoyle lookatme: me too.  i haven't been able to make -MFoo:ver<x.y>' work after trying many variants....
07:15 Voldenet watch-recursive pretty much does the same, except it sets up watches for the tree and merges the supplies
07:17 fatguy Voldenet: where can i find the example and types of event doc ?
07:18 zengargoyle parv: oops, that cut-n-paste error reply was to your question...
07:19 Voldenet hm, https://docs.perl6.org/type/IO::Notification
07:19 parv zengargoyle, don't worry; i read that.
07:19 zengargoyle :)
07:19 fatguy Voldenet: i don't understand what is FileRenamed event classification
07:20 fatguy i did look at p6doc
07:20 Voldenet Hmm, It's not very well-documented
07:20 Voldenet https://github.com/rakudo/rakudo/blob/c1941b550beccbd78e2a8dbefea667fd068e45e0/src/core/IO/Notification.pm
07:20 Voldenet but at least the underlying enums and classes are short ;)
07:22 Voldenet apparently "event" is FileRenamed or FileChanged, no idea why inotify events like IN_CREATE are not described
07:27 fatguy Voldenet: thanks ! i will use p5 inotify2 for my case
07:33 Sgeo_ joined #perl6
07:33 lookatme joined #perl6
07:38 rindolf joined #perl6
07:38 Cabanossi joined #perl6
07:47 dct joined #perl6
07:48 astj joined #perl6
07:49 astj_ joined #perl6
07:50 astj joined #perl6
07:52 xtreak joined #perl6
07:52 geekosaur joined #perl6
07:52 fatguy how can i print current line number and namespaces ?
07:53 astj_ joined #perl6
07:57 lookatme Do you mean $?LINE and $?PACKAGE
07:57 salv0 joined #perl6
07:58 lookatme fatguy, it's package, there no namespace.
08:01 Sgeo__ joined #perl6
08:03 fatguy lookatme: yes, how about printing the method ? the $?PACKAGE print the class name, i need to print module name then class , then method for debugging msg purpose
08:03 xtreak joined #perl6
08:07 lookatme fatguy, there are many compile-time variable about that: https://docs.perl6.org/language/variables#Compile-time_variables
08:08 lookatme The method is &?BLOCK
08:08 lookatme m: class A { method f-print-name( ){ say &?BLOCK; } }; A.new.f-print-name;
08:08 camelia rakudo-moar b667e8: OUTPUT: «f-print-name␤»
08:14 fatguy lookatme: thanks!
08:14 wamba joined #perl6
08:15 lookatme :)
08:15 AlexDaniel joined #perl6
08:15 xtreak joined #perl6
08:18 nadim_ joined #perl6
08:24 AlexDaniel quotable6: ‘perl6-debug’
08:25 quotable6 AlexDaniel, https://gist.github.com/f23c1cb3afddef7ac09663d8142244ce
08:32 zakharyas joined #perl6
08:38 Cabanossi joined #perl6
08:40 Ven joined #perl6
08:45 zakharyas joined #perl6
09:01 xtreak_ joined #perl6
09:04 rightfold m: (my $foo) = ();
09:04 camelia rakudo-moar 348891: ( no output )
09:05 vimal2012 joined #perl6
09:05 sivoais joined #perl6
09:07 xtreak joined #perl6
09:10 xtreak joined #perl6
09:10 vimal2012 <:Lt> does not match anything, but <:Lu> matches 'T', 'V', 'M'.  Aren't the letters 'T', 'V', 'M' titlecase letters in the following string?
09:10 vimal2012 p6: "Trump Visits Mexico" ~~ m:g/<:Lt>/
09:10 camelia rakudo-moar 348891: ( no output )
09:10 vimal2012 p6: "Trump Visits Mexico" ~~ m:g/<:Lu>/
09:10 camelia rakudo-moar 348891: ( no output )
09:10 vimal2012 p6: say "Trump Visits Mexico" ~~ m:g/<:Lu>/
09:10 camelia rakudo-moar 348891: OUTPUT: «(「T」 「V」 「M」)␤»
09:10 Ven joined #perl6
09:11 vimal2012 p6: say "Trump Visits Mexico" ~~ m:g/<:Lt>/
09:11 camelia rakudo-moar 348891: OUTPUT: «()␤»
09:15 vimal2012 None of the 26 Uppercase letters in English match <:Lt>.  It looks like English doesn't have titlecase letters? Then what other languages have titlecase letters?
09:16 moritz vimal2012: there's a greek title case latter, iirc
09:18 lookatme m: say "Trump Visits Mexico" ~~ m:g/<:Lt>/;
09:18 camelia rakudo-moar 348891: OUTPUT: «()␤»
09:18 moritz m: say (1..0x10FFFF).grep({ .chr ~~ /<:Lt>}).map(&uniname)
09:18 camelia rakudo-moar 348891: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3say (1..0x10FFFF).grep({ .chr ~~ /<:Lt>7⏏5}).map(&uniname)␤    expecting any of:␤        infix stopper␤        term␤»
09:18 moritz m: say (1..0x10FFFF).grep({ .chr ~~ /<:Lt>/}).map(&uniname)
09:19 camelia rakudo-moar 348891: OUTPUT: «(LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON LATIN CAPITAL LETTER L WITH SMALL LETTER J LATIN CAPITAL LETTER N WITH SMALL LETTER J LATIN CAPITAL LETTER D WITH SMALL LETTER Z GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI GREEK CAPITAL…»
09:19 lookatme m: say "Trump Visits Mexico" ~~ /<:Lt>/;
09:19 camelia rakudo-moar 348891: OUTPUT: «Nil␤»
09:19 rightfold m: say "Dž" ~~ /<:Lt>/;
09:19 camelia rakudo-moar 348891: OUTPUT: «「Dž」␤»
09:20 rightfold Seems to be those ligatures where the first letter is uppercase and the second one is lowercase
09:20 moritz it's 4 latin and 27 greek capital letters that match <:Lt>
09:20 lookatme m: say "a Trump Visits Mexico" ~~ m:g/<:Lt>/;
09:20 camelia rakudo-moar 348891: OUTPUT: «()␤»
09:23 Cabanossi joined #perl6
09:23 rightfold There's no ASCII in Lt
09:24 Ven_ joined #perl6
09:41 finanalyst joined #perl6
09:44 robertle joined #perl6
09:50 mr-foobar joined #perl6
10:03 ufobat joined #perl6
10:06 vimal2012 left #perl6
10:06 vimal2012 joined #perl6
10:06 Zoffix finanalyst: perl6-debug just bittrotted. It's not going away. Gonna try to fix it before next release (though I recall saying the same like 3 releases ago :P)
10:09 Zoffix xiaoyafeng, no difference, as both are compile time errors unless you augmented Strs to have .io and implemented `d` routine or constant :) There's, however, no difference between '.'.IO.dir.grep: {.d} and '.'IO.dir.grep({.d}); the `:` is just an alternative way to write `()` in this case, except you can't follow it with another method call in the same chain.
10:11 Zoffix TEttinger, nah, I'm a total n00b. Started with Perl 6 like a week ago.
10:11 Zoffix And it's hrd
10:11 Zoffix left #perl6
10:23 Cabanossi joined #perl6
11:00 aborazmeh joined #perl6
11:00 aborazmeh joined #perl6
11:08 Cabanossi joined #perl6
11:16 tbrowder .tell dwarring i installed latest version and both courier and times-roman show True for IsFixedPitch. i'm not positive about your methods but i think the default value of IsFixedPitch should be False, and the Adobe spec says the absence of it is False.
11:16 yoleaux tbrowder: I'll pass your message to dwarring.
11:24 tbrowder .tell dwarring the is-deeply test on the metric may be giving an unexpected result
11:34 cpage joined #perl6
11:43 curt_ joined #perl6
11:46 vimal2012 left #perl6
11:59 pmurias joined #perl6
12:12 tbrowder .tell dwarring you need to actually test the module with a Font::AFM object, then the IsFixedPitch test fails for Courier using ok (expected True)
12:12 yoleaux tbrowder: I'll pass your message to dwarring.
12:14 Voldenet m: say "Zażółć gęślą jaźń λ" ~~ m:g/<:Lt>/;
12:14 camelia rakudo-moar 348891: OUTPUT: «()␤»
12:15 Voldenet m: say "Λ" ~~ m:g/<:Lt>/;
12:15 camelia rakudo-moar 348891: OUTPUT: «()␤»
12:17 pmurias joined #perl6
12:18 ufobat joined #perl6
12:19 mcmillhj joined #perl6
12:28 pmurias joined #perl6
12:34 pmurias joined #perl6
12:34 simonm joined #perl6
12:41 pmurias joined #perl6
12:42 pilne joined #perl6
12:43 nebuchadnezzar hello
12:54 tbrowder .tell dwarring i have submitted a PR for new tests that show the problem
12:54 yoleaux tbrowder: I'll pass your message to dwarring.
12:55 nebuchadnezzar I have a NFG character and I want the list of code points of the NFD form
12:56 timotimo m: say "ö".NFD.perl
12:56 camelia rakudo-moar 348891: OUTPUT: «Uni.new(0x006f, 0x0308).NFD␤»
12:56 timotimo m: say "ö".NFD.list.perl
12:56 camelia rakudo-moar 348891: OUTPUT: «(111, 776).Seq␤»
12:57 nebuchadnezzar thanks
13:08 aborazmeh joined #perl6
13:08 aborazmeh joined #perl6
13:24 Zoffix joined #perl6
13:25 Zoffix When I Lock.protect something, does it matter where the lock is instantiated? I see the docs list it as `my $l = Lock.new; $l.protect({ #`( some unsafe operations here ) 1 + 1; });`, but it wonder why `$l` is involved there
13:25 Zoffix Can it be written as just Lock.new.protect({ #`( some unsafe operations here ) 1 + 1; }); or does the Lock need to be created outside the threaded area?
13:29 Zoffix Aha! My hunch was right. Lock must be created outside the threaded area.
13:29 Zoffix This spams stuff in wrong order: perl6 -e 'await ^100 .map: { start {  Lock.new.protect: { print "Foo"; sleep rand; print "Bar"; sleep rand; say "Ber"; } } }'
13:29 Zoffix While this works right (note how lock is outside the promises):  perl6 -e 'my $l = Lock.new; await ^100 .map: { start {  $l.protect: { print "Foo"; sleep rand; print "Bar"; sleep rand; say "Ber"; } } }'
13:30 [Coke] foo bar ber? heretic!
13:30 [Coke] as a foo bar baz-ian, I must protest.
13:31 Zoffix :)
13:31 jnthn .oO( foo bar ber-ians at the gate... )
13:31 yoleaux 01:43Z <Zoffix> jnthn: any idea what may be causing a Proc::Async.kill to fail killing when there's more than one Proc::Async involved? This is sort of blocking my ecosystem toaster script :( would be sweet if it could be fixed: https://rt.perl.org/Ticket/Display.html?id=131479
13:31 Zoffix jnthn: never mind about that ^. I just found where the bug's at. Race in $*KERNEL.signal
13:32 jnthn d'oh
13:32 jnthn Zoffix++ # bug hunting
13:32 Zoffix \o/
13:38 liweigan joined #perl6
13:40 Geth ¦ doc: f98e28f667 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Lock.pod6
13:40 Geth ¦ doc: Expand Lock.protect docs
13:40 Geth ¦ doc:
13:40 Geth ¦ doc: To explain the lock must be instantiated outside the threaded area
13:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f98e28f667
13:40 Zoffix left #perl6
13:45 fatguy joined #perl6
13:47 araraloren joined #perl6
13:51 Voldenet Could locks work with 6.0d's continuations? Would it be possible to use locks in async context? (schedule execution when lock available)
13:52 Voldenet something like: my $l = AsyncLock.new; await $l.lock(); ... $l.unlock();
13:54 Cabanossi joined #perl6
13:54 Voldenet or even: my $l = AsyncLock.new; await $l.protect({ ...piece of async code });
13:54 mcmillhj joined #perl6
13:59 timotimo ZofBot: if you $l = Lock.new inside of a multi-threaded area, you'll just be creating one lock per thread, which won't do very much :)
13:59 astj joined #perl6
14:00 jnthn Voldenet: I've pondered a Lock::Async at some point
14:00 jnthn It can be a kinda useful mechanism
14:04 ChoHag joined #perl6
14:16 nadim joined #perl6
14:21 rindolf joined #perl6
14:24 dct joined #perl6
14:41 holyghost joined #perl6
14:45 araraloren evening .o/
14:46 dudz \o.
14:53 zakame joined #perl6
14:54 mls joined #perl6
14:55 AnX joined #perl6
14:55 Herby_ joined #perl6
14:56 Herby_ o/
14:57 AnX o/
14:57 AnX how to start with perl 6
14:59 AnX joined #perl6
14:59 amerlyq joined #perl6
14:59 AlexDaniel joined #perl6
14:59 Herby_ Anx: here's a new book that was just released on getting started with Perl 6: http://greenteapress.com/wp/think-perl-6/
14:59 khw joined #perl6
15:02 moritz AnX: do you have previous programming experience with other languages?
15:03 AnX Hi
15:03 AnX yes
15:04 AnX i worked sometime in perl 5, little tcl, shell, C/C++
15:04 AnX thanks for the link Hereby_
15:04 moritz then in a few weeks, https://www.apress.com/us/book/9781484228982 will be out
15:04 moritz that targets folks that are already familiar with the basic programming constructs
15:05 AnX ok i see .. that would be great
15:05 ovechkin joined #perl6
15:05 robertle moritz: is yours really 140 pages as the apress page says?
15:06 moritz robertle: it's 125 pages content in A4 format
15:06 moritz robertle: so a bit more in a smaller format
15:06 moritz (A4 is pretty big, as far as books go)
15:07 robertle ok, thanks
15:09 Cabanossi joined #perl6
15:11 Herby_ moritz: can't wait to read it
15:13 darutoko- joined #perl6
15:15 Herby_ question: I'm using zoffix's Twitter module. I used Zef to install it.  How do I find the local path of the module on my pc?
15:15 Zoffix joined #perl6
15:16 Herby_ and he appears
15:16 Zoffix I have a bot ping me 'cause you mentioned me
15:16 Herby_ ahhh
15:16 Zoffix Herby_: why do you need a path? Theoretically there don't have to be one
15:16 Zoffix Like, what are you trying tod o?
15:17 Zoffix Installed modules get precompiled, so I doubt the path will help you much
15:17 Herby_ I don't really know how to use git. I like your module and would like to try and add some more functionality to it
15:17 Herby_ figured if i could find the local file i could start adding additional GET methods
15:17 Zoffix right, module's path will be useless for that
15:17 Herby_ :(
15:18 Zoffix Just do git clone https://github.com/zoffixznet/perl6-Twitter Twitter
15:18 Zoffix And then you'll have the Twitter dir. Go into it and you'll be able to load your local changes when you use `perl6 -Ilib`
15:19 Zoffix or do `perl6 examples/bot.pl6` that script already adds `lib` topaths
15:19 Herby_ ok. does it matter what folder I'm in when I do the:  git clone https://github.com/zoffixznet/perl6-Twitter Twitter  command?
15:20 Zoffix nope
15:20 Herby_ awesome. I'll give it a shot, thanks
15:21 cdg joined #perl6
15:22 Zoffix And if you end up with something that you'd want to add to the module, you need to "fork" my repo and then do a PR ("Pull Request"). Appears to be a guide for the process: https://gist.github.com/Chaser324/ce0505fbed06b947d962
15:22 * Zoffix vanishes into the shadows
15:22 Zoffix left #perl6
15:22 Actualeyes joined #perl6
15:25 cdg joined #perl6
15:32 hythm joined #perl6
15:33 hythm joined #perl6
15:34 hythm joined #perl6
15:41 setty1 joined #perl6
15:47 zakame hi, is Task::Star gone from modules.perl6.org list?  I can see its github still though
15:48 tadzik yeah, it's been removed from the ecosystem
15:48 zakame ah
15:49 tadzik some people actually noticed its disappearance though, so perhaps a fork would be desirable
15:49 zakame there's still Task::Galaxy etc
15:54 Cabanossi joined #perl6
16:06 hythm joined #perl6
16:12 * zengargoyle resists urge to summon the Z
16:14 Herby_ I think I'm missing an essential step on something. I cloned the perl 6 twitter module and am trying to add a new GET method
16:15 astj joined #perl6
16:15 Herby_ none of the changes I'm making appear to be taking affect. its like my script is still pointing to the Twitter module I installed with zef
16:15 Herby_ instead of the local lib that I'm changing
16:15 Herby_ ahh nevermind
16:15 ugexe are you using -Ilib
16:15 Herby_ disregard
16:16 ugexe or -I.
16:16 Herby_ looks like i needed to run it from the parent directory
16:28 ugexe or you could -Ipath/to/parent-directory
16:29 ugexe or `PERL6LIB="/path/to/parent-directory" perl6 ...`
16:30 Herby_ ugexe: thanks
16:31 cibs joined #perl6
16:32 zengargoyle don't export PERL6LIB=lib or similar, it makes things strange and slow whenever you change directories. :P
16:34 zengargoyle it took me way to long to figure out that setting PERL6LIB in my .profile was why p6 was so slow all the time but only sometimes. :)
16:35 devmikey joined #perl6
16:37 robertle joined #perl6
16:37 tbrowder i've not noticed any ill effects using PERL6LIB defined with multiple ditrctories
16:39 zengargoyle if they're relative then it's like a new repo chain each time.  (i think).  i noticed by rsyncing rakudobrew installs (and ~/.perl6) across machines and noticing the startup lag after every sync.
16:43 troys joined #perl6
16:43 eater our can't have type constraints?
16:44 AlexDaniel eater: seems so
16:44 eater m: module Aliens { our Str $type-me = "ayyyy"; } say Alliens::typ-me;
16:44 camelia rakudo-moar 79b8ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot put a type constraint on an 'our'-scoped variable␤at <tmp>:1␤------> 3module Aliens { our Str $type-me7⏏5 = "ayyyy"; } say Alliens::typ-me;␤    expecting any of:␤        constraint␤»
16:44 eater is this an active design choice?
16:47 geekosaur I think the problem is that you 'our' it to use it in multiple modules; which one gets the type annotation, or do you need to check for matching annotations every time you compile *or load* a module that 'our's it?
16:47 jnthn Yes; `our` is just a lexical alias to something in a package. And packages are really just a hash table of keys to values, which you can poke whatever you like into without even needing declaration.
16:48 eater ah
16:48 eater thanks
16:48 eater sounds like a nice feature tho
16:48 eater but I guess it's a bitch to implement in what a module is now?
16:48 cdg joined #perl6
16:48 jnthn Even without a module...
16:49 jnthn module Foo { sub a { our Str $x }; sub b { our Int $x }; sub c { Foo::<$x> = 4.2 } } # uhh :)
16:49 jnthn All of those are talking about the same slot.
16:49 jnthn Uh, I meant even *within* a module.
16:50 jnthn It's not so much a "hard to implement" as a "what would we even implement" ;)
16:50 eater you can define in a sub an our D:
16:50 eater makes sense if you look at a module as hash
16:50 jnthn That's precisely what a module's symbol table is.
16:53 eater hmm, but from a non-"i know all the insides" standpoint, it seems rather confusing. you could just forbid our definition's outside the module block ????
16:53 eater keeps most code cleaner, and it looks like it would make more sense
16:54 eater but idk, maybe Im missing something
16:55 st_elmo joined #perl6
16:57 eater hmm maybe my idea of module's is just wrong
16:58 cdg_ joined #perl6
17:08 TreyHarris anybody here ever tried to learn duodecimal (dozenal) or sexagesimal? I just read something suggesting that some people with dyscalculia have had success with them. (I'm rather good with math but abysmal with arithmetic.)
17:19 Voldenet well, I use base-60 for hours, it's quite neat
17:20 Voldenet if that's what you mean
17:21 TreyHarris lol
17:22 Voldenet but if someone asked me to added 34 to 48 i wouldn't be too sure
17:23 Voldenet s/added/add/
17:23 mr-foobar joined #perl6
17:33 AnX left #perl6
17:42 skids joined #perl6
17:55 dct joined #perl6
18:07 geekosaur I remember playing with duodecimal a bit as a kid, but that's about it
18:08 dylanwh base 6 is more fun
18:08 geekosaur and the link to time _is kinda obvious for both of those bases :)
18:09 geekosaur (in fact, I kinda wonder the vintage of the claim that people have had success with those bases; they're much easier when you can just glance at the nearest clock... which doesn't work in the age of digital clocks :)
18:09 mcafee joined #perl6
18:10 geekosaur then again, the flip side of _that_ one is that the Sumerians used those bases for a reason...
18:12 domidumont joined #perl6
18:17 BooK wasn't the reason for 12 or 60 is that it's easily divisible by 2, 3, 4 (and 5)
18:18 mcafee Today I evaluated the expression [Z+] ((1,2,3),), expecting it to return (1,2,3) since I'm zipping a single element, but instead I got (6).  What's going on here?
18:19 moritz something flattens :(
18:19 moritz m: say [Z+] ([1, 2, 3], )
18:19 camelia rakudo-moar 99421d: OUTPUT: «(6)␤»
18:20 pilne m: say [+] ([1, 2, 3],)
18:20 camelia rakudo-moar 99421d: OUTPUT: «[1 2 3]␤»
18:21 pilne m: say [Z+] ([1, 2, 3])
18:21 camelia rakudo-moar 99421d: OUTPUT: «(6)␤»
18:21 pilne m: say [Z+] ([1, 2, 3], )
18:21 camelia rakudo-moar 99421d: OUTPUT: «(6)␤»
18:21 pilne hrm
18:22 moritz m: say [Z+] $(1, 2, 3)
18:22 camelia rakudo-moar 99421d: OUTPUT: «(6)␤»
18:22 moritz m: say [Z+] $(1, 2, 3),
18:22 camelia rakudo-moar 99421d: OUTPUT: «(6)␤»
18:22 mcafee So it's not just me that's surprised?  Whew!
18:22 moritz wow, it seems *really* eager the flatten the shit out of any single-element list it gets
18:23 moritz mcafee: your sanity isn't in question this time! :-)
18:23 mcafee It's really puzzling because I thought Z+ is supposed to combine elements from different lists, but here it seems to degenerate to [+] on a single list...
18:25 mcafee I'm golfing and have written some code like: [Z+] @_.map: { ... } and it's falling over if @_ has just one element.
18:33 ufobat joined #perl6
18:34 b2gills A work around [Z+] 0 xx *, |@_.map: { ... }
18:35 espadrine_ joined #perl6
18:36 b2gills I've come across this a few times, but I was always in the process of creating a golf, so I just quickly moved on to the next algorithm.
18:39 TeamBlast joined #perl6
18:39 perlpilot Though you'd have to change the identity element depending on the operation.
18:40 perlpilot i.e.  [Z*] 1 xx *, |@_.map: { ... }
18:40 mcafee Yeah, I came up with that workaround too, but I hate to lose all those strokes!
18:45 Zoffix joined #perl6
18:45 Zoffix How specify a constraint for "all elements of array are either Cool:D or Nil or Any:U" ?
18:45 Zoffix m: my @stuff = (1, Any, 3); -> @a where {@a.all.ACCEPTS: Cool:D|Nil|Any:U} { say "got it"}( @stuff )
18:45 camelia rakudo-moar 99421d: OUTPUT: «Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got Array ($[1, Any, 3])␤  in block <unit> at <tmp> line 1␤␤»
18:46 Zoffix Reading the Junction.ACCEPTS code suggests the above should work, but it doesn't
18:47 TeamBlast joined #perl6
18:47 Zoffix m: my @stuff = (1, Any, 3); say @stuff.map(*.ACCEPTS: Cool:D|Nil|Any:U)
18:47 camelia rakudo-moar 99421d: OUTPUT: «(any(False, False, False) any(True, True, True) any(False, False, False))␤»
18:47 Zoffix Ah, ok
18:47 Zoffix well, I see why that way don't work, but what's the way?
18:49 mr-foobar joined #perl6
18:51 Zoffix Actually, I don't want just any Any:U but THE Any:U
18:52 moritz then you need { $_ === Any:U }
18:53 Zoffix Well, that's the easy part. How to combine all that into something that doesn't look insane :D
18:54 dogbert17 is this statement from the docs still correct:
18:54 Zoffix Also, you need === Any, not === Any:U :)
18:54 dogbert17 "Coercion types are supposed to work wherever types work, but Rakudo currently (2015.02) only implements them for subroutine parameters."
18:54 Zoffix dogbert17: yes
18:55 Zoffix m: my Int() $x
18:55 camelia rakudo-moar 99421d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Coercion Int(Any) is insufficiently type-like to qualify a variable␤at <tmp>:1␤------> 3my Int() $x7⏏5<EOL>␤    expecting any of:␤        constraint␤»
18:55 dogbert17 Wasn't it implemented for return types or something to that effect
18:55 Zoffix Well, yes as in it don't work; I guess they're supposed to work
18:55 Zoffix m: -> --> Int() { '42' }().say
18:55 camelia rakudo-moar 99421d: OUTPUT: «42␤»
18:55 Zoffix m: -> --> Int() { '42' }().^name.say
18:55 camelia rakudo-moar 99421d: OUTPUT: «Int␤»
18:55 Zoffix dogbert17: looks like it
18:56 Zoffix dogbert17: oh, well, "subroutine" should read just "routine", since they work in methods too
18:56 * Zoffix wildly guesses they work in unpacking too
18:56 Zoffix m: my (Int() $x) := ('42',); dd $x
18:56 camelia rakudo-moar 99421d: OUTPUT: «Int $x = 42␤»
18:56 dogbert17 thx Zoffix, will update the text
18:56 Zoffix Haha yes :)
18:57 dogbert17 is unpacking the right term to use in the text
18:57 Zoffix No idea
18:57 moritz isn't that just binding an anonymous signature?
18:58 moritz m: -> Int() $_ { say .^name }('42')
18:58 camelia rakudo-moar 99421d: OUTPUT: «Int␤»
18:59 Zoffix m: my @stuff = (1, 42, 3); -> @ where {so all .map: {$_ ~~ Cool:D|Nil or $_ === Any}} { say "got it" }( @stuff )
18:59 camelia rakudo-moar 99421d: OUTPUT: «got it␤»
18:59 Zoffix Well, that's the shortest I got it to. Any saner way?
19:00 Zoffix (`so ` part can be removed, but what else)
19:00 Zoffix I guess it ain't that bad. /me goes with that
19:00 dogbert17 how about: "Coercion types are supposed to work wherever types work, but Rakudo currently (2017.05) only implements them for routine parameters and return types."
19:01 moritz ... "only implements in signatures, for both parameters and return types"
19:01 moritz *them
19:01 Zoffix left #perl6
19:01 dogbert17 moritz++, will fix and commit
19:02 moritz on a completely different topic...
19:02 moritz I have the domain perl6book.com, which I intended as a landing page for my book
19:02 moritz but, apress has one, so I can reuse it for another purpose
19:03 moritz I thought I might give an overview of all Perl 6 books there
19:03 moritz and maybe even a small "which Perl 6 book to read" wizard
19:04 moritz any thoughts on that? Does anybody want to contribute?
19:05 perlpilot moritz++ sounds like an excellent idea.
19:06 Geth ¦ doc: 2ebb405467 | (Jan-Olof Hendig)++ | doc/Language/functions.pod6
19:06 Geth ¦ doc: Fixed a few errors. Zoffix++, moritz++
19:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2ebb405467
19:12 zakharyas joined #perl6
19:14 itaipu joined #perl6
19:16 cpage_ joined #perl6
19:21 moritz I'm starting to collect data and thoughts at https://github.com/moritz/perl6book-web/blob/master/redesign.md
19:22 moritz if anybody else wants to contribute, send a PR. Or if that's too much hassle, I can transfer the repo the perl6 org
19:22 moritz (though I feel bad doing that as long as there's so much out-of-date stuff on the front page)
19:24 wamba joined #perl6
19:29 moritz ok, I'm filling out https://github.com/moritz/perl6book-web/blob/master/redesign.md now
19:30 moritz if you think some of the characterizations are not fair or balanced, please speak up
19:33 tbrowder moritz:  how about the book Metagenomics?
19:33 moritz tbrowder: that's a bit of a weird one. It doesn't advertise any Perl 6, but contains lots of it
19:34 moritz tbrowder: I'm having trouble coming up with a description that doesn't sound totally weird
19:34 tbrowder ok, Perl 6 in the trenches?
19:34 moritz link?
19:35 tbrowder sorry, my attempt at humor, description of metagenomics...
19:35 moritz oh :-)
19:36 grumble joined #perl6
19:37 moritz anyone want to create a generic Perl 6 book logo, with camelia reading a book or something? :-)
19:40 zostay i just found a weird bug in DateTime::TimeZone's tools for generating classes from the Olsen TZ database that looks like a grammar doing something a grammar should not be able to do
19:41 moritz zostay: it became self-aware?
19:41 zostay maybe
19:41 zostay when you run the script, it outputs this error: Substring length (-3194) cannot be negative
19:41 zostay in any Str at /Users/sterling/.rakudobrew/moar-nom/install/share/nqp/lib/QRegex.moarvm line 1
19:42 zacts joined #perl6
19:42 zostay the line causing it is: my $yfrom = +$rule<from>;
19:42 zostay where $rule<from> is a hash lookup in a Match
19:43 moritz try changing it to +~$rule<from>
19:43 moritz just to see if it makes a difference
19:43 zostay same error
19:44 moritz right, it tries to call Str already
19:45 zostay the more i work with it, the weird it behaves... like dd hangs trying to show the returned parse tree
19:46 kyan joined #perl6
19:46 zostay if i have Grammar::Tracer loaded, it starts tracing infinitely somewhere in the middle on the dd line
19:46 zostay i'm wondering if one of the very common names used for the tokens might be clashing with a built-in
19:47 zostay but that's just a guess at this point
19:49 moritz zostay: try inspecting $rule<from> for its .from, .to and .orig properties
19:52 zostay i think i just confirmed my hypothesis doing a search/replace and insert "tz-" on to the front of all the rule names fixed it... i wonder if having a rule named to or from is a no-no
19:53 moritz erm, yes
19:53 moritz and i can't believe I didn't notice
19:54 moritz tokens/rules are really methods on the cursor
19:55 moritz at least "orig", "target" and "pos" would be verboten
19:55 moritz but it seems of the Match methods/attributes are too
19:55 zostay to and from are definitely the problem, i changed just those to tz-to and tz-from and the problem goes away
19:56 zacts joined #perl6
19:56 zostay this seems like a place where having final methods could be helpful
19:59 mcmillhj joined #perl6
20:00 moritz agreed
20:01 moritz or having to be explicit about masking parent classes method
20:01 zostay yeah, true final would be anti-perl right? there'd have to be something like augment to get around it, right? ;)
20:01 moritz right :-)
20:02 zapwai joined #perl6
20:11 moritz my Perl 6 book decision tree: https://github.com/moritz/perl6book-web/blob/master/redesign.md#decision-tree :-)
20:20 ingy is there a way to access all args like @_?
20:20 moritz |c in the signature
20:21 moritz then c becomes a capture
20:22 bdmatatu joined #perl6
20:25 ingy https://gist.github.com/anonymous/5a7c24b114ff8513719326c8e2a5eed3 something like that
20:26 cpage_ joined #perl6
20:27 moritz m: sub foo(*@_ ($x, $y)) { die @_ }; foo('a', 'b')
20:27 camelia rakudo-moar 99421d: OUTPUT: «a b␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:29 timotimo m: sub foo(|c, $x, $y) { die c.list }; foo("a", "b")
20:29 camelia rakudo-moar 99421d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot put required parameter $x after variadic parameters␤at <tmp>:1␤------> 3sub foo(|c, $x7⏏5, $y) { die c.list }; foo("a", "b")␤    expecting any of:␤        constraint␤»
20:30 timotimo ah, right
20:30 ingy so no way without changing the sig?
20:31 moritz no official way, at least
20:31 moritz I guess if you dive deep enough into nqp:: ops, you'll find something
20:31 Xliff \o
20:31 ingy :)
20:33 mcmillhj joined #perl6
20:33 ingy p5 has to be better at something ;)
20:33 Xliff What's the best way to check type against all elements of an array?
20:33 moritz fsvo "better"
20:34 moritz Xliff: all(@array) ~~ TheType
20:34 Xliff LOL
20:34 Xliff I was doing TheType ~~ all(@array)
20:34 Xliff And it wasn't working.
20:35 Xliff Why is ~~ not commutative?
20:36 Xliff Or is it the junction that is not commutative?
20:36 timotimo because that went very, very, very wrong in perl5 :)
20:36 Xliff LOL!!!
20:36 timotimo you remember how they got smartmatch, but then decided to toss it again?
20:36 Xliff No.
20:36 Xliff I smell a story
20:36 Xliff Is there a blog post, or is it timotimo story time? :)
20:37 timotimo not only was it a bad fit because of the lack of types in perl5, but it was also bad in general because they stole it before perl6ers realized commutative smartmatch is not a good idea at all
20:37 Xliff Ooooooo
20:37 Xliff So it's always better to do: <Thing you are checking> ~~ <Type>?
20:38 Xliff m: say 4 = any(2, 3, 4, 5)
20:38 camelia rakudo-moar 99421d: OUTPUT: «Cannot modify an immutable Int (4)␤  in block <unit> at <tmp> line 1␤␤»
20:38 moritz that's the only correct way to do it :-)
20:38 Xliff m: say 4 == any(2, 3, 4, 5)
20:38 camelia rakudo-moar 99421d: OUTPUT: «any(False, False, True, False)␤»
20:38 Xliff m: say any(2, 3, 4, 5) == 4
20:38 camelia rakudo-moar 99421d: OUTPUT: «any(False, False, True, False)␤»
20:38 Xliff OK, so it is smartmatch.
20:38 moritz it's ~~ that's not commutative
20:38 moritz right
20:38 Xliff Up to this point, I've only used == with junctions.
20:39 Xliff timotimo++ && moritz++
20:42 mcmillhj joined #perl6
20:42 awwaiid ingy: you can get some interesting things with MY::, but it is a superset of what you requested
20:43 awwaiid m: sub my_params($x, $y) { say MY::.perl } ; my_params(2, 4)
20:43 camelia rakudo-moar 99421d: OUTPUT: «PseudoStash.new(("\$!" => Nil,"\$*DISPATCHER" => Mu,"\$/" => Nil,"\$_" => Any,"\$x" => 2,"\$y" => 4,"\$¢" => Nil))␤»
20:43 ingy awwaiid: awesome
20:44 awwaiid m: sub my_params($x, $y) { say MY::.perl; my $z = 7 } ; my_params(2, 4)
20:44 camelia rakudo-moar 99421d: OUTPUT: «PseudoStash.new(("\$!" => Nil,"\$*DISPATCHER" => Mu,"\$/" => Nil,"\$_" => Any,"\$x" => 2,"\$y" => 4,"\$z" => Any,"\$¢" => Nil))␤»
20:44 awwaiid $z in scope but not defined, interesting.
20:45 moritz declaration is a compile-time operation
20:45 awwaiid ah yes
20:45 moritz but the initialization is run time
20:46 awwaiid ingy: I hope you are doing horrible horrible things... whatchya up to?
20:47 ingy I'm writing new languages in a dialect or perl6 for $work.
20:47 awwaiid I cannot parse that sentence without more parenthesis, but sounds cool
20:49 geekosaur change "or" to "of"
20:49 awwaiid ahh
20:49 ingy openresty.org has a (soon to be open-sourced) internal programming language called FanLang that uses (mostly) Perl6 syntax to compile to LuaJIT. And with that lanugage they are writing several other languages/DSLs internally.
20:50 awwaiid madness
20:51 moritz that's what agentzh has been working on, right?
20:51 ingy at the moment I'm implementing Template-Toolkit (Jemplate/Lemplate) in FanLang
20:51 ingy which itself is a language (DSL)
20:52 ingy yeah it's agentzh's startup company
20:53 ingy I bet I could port TT2 from Fan to Perl6 quite easily.
20:53 TEttinger joined #perl6
20:53 awwaiid feel free
20:53 ingy :)
20:53 ingy mostly I'm working on getting the p6 YAML stuff done ASAP
20:53 zostay \o/
20:53 ingy Make YAML Great Again!!!
20:54 [Coke] "too soon"
20:54 ingy YAML == SAD
20:54 moritz s/Again// # SCNR :)
20:54 ingy Hillary told me that YAML is already great.
20:55 awwaiid needs more exclamation marks. sad!
20:55 zostay YAML is a polarizing force... like ingy... maybe ingy should run for President and have YAML as his running mate
20:55 grondilu joined #perl6
20:55 zostay i'd vote for that duo
20:56 grondilu joined #perl6
20:56 ingy tinita has YAML.pm6 working (over the libyaml stuff)
20:56 ingy we should get that out this weekend
20:56 awwaiid I tell all my friends that ingy taught me in-person that YAML is a superset of JSON. Mostly they just stare at me because they haven't met Ingy so haven't felt the mad-science inspiration that drips from his soul
20:56 ingy heh
20:57 awwaiid also many of my friends are not programmers, and thus even further removed from being able to relate to my cool story
20:57 ingy I feel totally "Ingy" trying to write a new language in a new language in a ...
20:58 awwaiid and getting paid to do it, so that's good
20:58 ingy +10!
20:58 Herby_ whats the simplest way to pretty print a hash?
20:58 Herby_ or print a hash in a pretty state :)
20:59 awwaiid m: say {a => 2, b => 4}.perl
20:59 camelia rakudo-moar 99421d: OUTPUT: «{:a(2), :b(4)}␤»
20:59 awwaiid m: say {a => 2, b => 4}
20:59 camelia rakudo-moar 99421d: OUTPUT: «{a => 2, b => 4}␤»
20:59 timotimo well, Data::Dump::Tree isn't simple, but it is really pretty
20:59 moritz awwaiid: that kinda reminds me of a story a colleague told me. At the dinner party of some ruby conf, he talked for over an our with some friendly Japanese guy
20:59 timotimo you can use json::fast's to-json with :pretty
20:59 zostay m: dd {a => 2, b => 4}
20:59 camelia rakudo-moar 99421d: OUTPUT: «Hash % = {:a(2), :b(4)}␤»
20:59 moritz awwaiid: ... and only later learned that it was Matz :-)
20:59 timotimo that's rather simple and looks good
20:59 awwaiid hahaha
21:00 awwaiid How pretty is pretty, Herby_?
21:00 Herby_ thanks i'll take a look at
21:00 Herby_ sorry, missend
21:00 pilne i'd love to find an opportunity to jump ship from where i'm working now (non-coding) to something coding, but every time i sit down and try and work on something coding related that isn't perl6 now, i get frustrated at how much I feel like i'm appeasing the language instead of utilizing it lol.
21:00 timotimo i can only hope that when someone meets me at a party they aren't intimidated by me being the author of the #1 most cited perl6 module :)
21:00 ingy I can see that. I've had beers with Matz. He's totally chill.
21:00 Herby_ a json response from twitter, trying to print it out so i can see whats going on
21:00 Herby_ right now its just a blob
21:00 pilne and a good... 100% of the stuff around here is java/python/php/ruby (not in that order necesarily).
21:01 zostay pilne: where you at -ish?
21:01 moritz Herby_: say .key, "\t", .value for %hash;
21:01 pilne ruby is "ok" but i feel like everything in that ecosystem is webdev
21:01 [Coke] pilne: makes you feel any better, I work somewhere where that is about 60/39/1 java/cold fusion/php
21:01 pilne zostay=> closest major metro (and it is close) is saint louis, missouri.
21:01 pilne your poor sanity coke
21:02 Herby_ moritz: thanks
21:02 pilne there's some perl5 stuff around, but tbh, i barely know perl5.
21:02 zostay i'm near KC, assuming you won't relo, if you are open to working remote, we are hiring perl hackers like crazy
21:02 ingy I remember the first time I had lunch with TimToady. I was sitting next to him and I asked him a question and he just stared off into space. After a minute I just went back to eating. Then 5 minutes later he turns to me and gives me a 5 minute answer.
21:03 pilne p5 or p6 zostay?
21:03 zostay p5, i don't know of much p6 work out there
21:03 ingy He never even nodded that he heard me or anything. It was awesome awkward. :)
21:03 zostay or python
21:04 pilne relocation might not be impossible, missouri end-to-end isn't that bad, i used to live near kingdom city in missouri.
21:05 AlexDaniel joined #perl6
21:05 pilne i'm comfortable with python, i'm sure i could learn perl5 since well, perl6 is coming easy, but i'm not great in either, i took a long hiatus from programming when i got ptsd from c++ and java in 2000 lol.
21:05 ingy ah nostalgia. ok back to the almost-p6-salt-mines...
21:06 perlpilot learning programming languages is easy ... learning how to /think/ is hard  :)
21:06 moritz perlpilot: you'd think that :-)
21:07 Xliff zostay: I am in DC and cannot relocate. Can I pass you a resume? ;)
21:07 Xliff perlpilot++
21:08 pilne perlpilot=> my love of perl6 stems from the fact that it generally allows me to think how i want and it (often) easily translates to code.
21:08 Xliff pline++ # Once you learn the syntax, this is (mostly) true.
21:08 moritz I'll be teaching a programing course at $work, starting next week
21:08 moritz (python though)
21:08 perlpilot indeed.  That's one of the reasons I've stuck with Perl 5 since forever--it fits my brain well.   Perl 6 more so.
21:09 Xliff python--
21:09 moritz looking forward to it
21:09 Xliff I have tried my hand at python. Was able to grok it enough to get it to do what I wanted in a large project.
21:09 moritz the initial response was pretty good: 25 out of about 200 employees signed up
21:09 Xliff Did not enjoy the experience.
21:10 perlpilot Xliff: python is okay until you try to do something perlish and it fights you  ;)
21:10 moritz it assumes a different mindset than Perl
21:10 Xliff Yes. I got Lisp flashbacks.
21:10 moritz it took me about 2 years to kinda like it
21:10 timotimo i built a pretty cool cellular automata simulator framework in python
21:10 Xliff I'm not supposed to have Lisp flashbacks!!!
21:11 Xliff python: Lisp lite, without all of the bloody parens.
21:11 perlpilot .oO( <Xliff> I haven't even ever used Lisp! )
21:11 Xliff O_O
21:11 Xliff I never said that!
21:11 Xliff I disbelieve?
21:11 Xliff (should have not ended that in a ?)
21:12 perlpilot It's funny that you equate Python and Lisp  (when I used to hang out on #python, they did too), but I never thought they were that close
21:12 perlpilot Python seems more like a high-level C to me.
21:13 perlpilot Lisp at least groks closures; python still struggles
21:13 moritz I still hate python's scoping (or lack thereof)
21:13 Xliff I have made my feelings on Lisp known here, before.
21:13 Xliff https://irclog.perlgeek.de/perl6/search/?nick=Xliff&amp;q=Lisp
21:13 tadzik it's awful :|
21:13 moritz and implicit declaration of variables
21:13 mcmillhj joined #perl6
21:13 pilne python's "do it this way or else" just kinda irks me...
21:13 Xliff pilne++
21:15 Xliff perlpilot: The problem there is that C is not as pedantic as python. At least C knows its limitations.
21:15 Xliff Python implies less restrictions than C, but in reality there are more
21:15 Xliff :/
21:16 pilne i mean, there's usually a lib or something to be able to to just about anything in python, but sometimes i look at it and go "but.... why?" (note: i've always loved scheme)
21:16 Xliff You could say the same about C/C++
21:17 pilne tbh i'd rather use python/ruby/perl on top of c, instead of c++ if i want more abstractions.
21:17 Xliff NativeCall FTW!
21:17 Xliff That was one of the things that drew me to Perl6.
21:18 Xliff And maybe I am just more used to c++, but I would prefer that than python.
21:18 pilne i read through the docs on nativecall and still have a lot to learn about it, but damn it looks fun.
21:18 Xliff It is.
21:18 Xliff Until your code blows up MoarVM
21:19 pilne to be fair, the last time i was doing c++ it was c++98
21:19 Xliff Oooooooo
21:19 perlpilot Xliff: what are you doing with NativeCall?  Anything interesting?
21:19 Xliff was doing C++ up until 2003 or 4ish?
21:19 Xliff Then it was all Java and C#
21:19 Xliff (and Perl <5 and 6> whenever I got some spare time)
21:20 Xliff perlpilot: I am still trying to work on a P6 wrapper for libxml2
21:20 perlpilot cool.
21:20 Xliff But Perl6's design has changed since then and everything that FROGGS and I have written will need to be rewritten.
21:20 Xliff FROGGS is the current maintainer. I just contribute.
21:21 Xliff I haven't touched it in months cos.... life
21:21 Xliff I need to get back to it.
21:22 ingy how many people here get paid to write perl6 (not to hack on the language itself)?
21:22 Xliff ingy: Not much of a Perl6 market, yet.
21:22 pilne i write code snippets for 5/6 on my phone at work when there's downtime? lol.
21:23 perlpilot The 2 modules that I think allow Perl 6 the most flexibility and power are NativeCall and Inline::Perl5.   If I can't do something directly in P6, I know I can delegate to P5 for most things and then NativeCall for everything else.
21:23 moritz ingy: does getting paid for a Perl 6 book count? :-)
21:23 ingy no :)
21:24 Cabanossi joined #perl6
21:24 perlpilot ingy: I've been trying come up with a good excuse to use P6 at work, but haven't found the right project yet.   So ... not getting paid for P6 now, but I hope to in the not-too-distant future
21:24 AlexDaniel ingy: I've never heard of anybody using just perl 6 on their job, but some people seem to use it for little scripts and stuff
21:24 timotimo i was being paid for perl6 work for a few months
21:25 perlpilot ingy: Although a few years ago, I got paid for P6 in that I used it to help with a fortran -> java translation.  P6 did some parsing and provided a test framework.
21:26 ingy perlpilot: awesome
21:26 pilne my problem with trying to use anything at my job code-related is that the company will own it all with no obligation to compensate/promote me lol.
21:26 ingy yeah I think using P6 to make internal DSLs is a future
21:27 ingy agentzh/openresty are shooting for top performance so having full control of their runtime is critical.
21:29 ingy when writing new languages is trivial, everyone will do it
21:29 ingy unless it's in Haskell ;)
21:29 ingy writing new languages in Haskell is trivial (once you know Haskell...)
21:30 mcmillhj joined #perl6
21:30 ingy or so I've heard
21:31 pilne haskell does have incredible parsing/lexing abilities
21:31 perlpilot Do you mean in the sense of using Parsec, or warping Haskell's syntax to suit your needs?
21:31 pilne but lord is it a mindbender of a language
21:31 * ingy was actually started the perl6 channel (back when au was trivially implementing p6 in Haskell)
21:31 ingy that's why it's on freenode
21:31 ingy s/was//
21:32 timotimo you haven't seen "mindbender of a language" until you've worked with prolog, IMO
21:33 ingy (at the time I didn't consider p6 to be a Perl language :D
21:33 pilne now *that* would be a fun inline module :p
21:33 * ingy 's mind is too bent already :(
21:34 pilne i love all the older smaller more-focused languages, and feel that perl, and perl6 have done the most when it comes to learning from those languages (well, moreso perl6, but for it's roots, perl5 can do some incredible things).
21:34 timotimo why don't we get some Inline::Forth? :) :)
21:35 ingy I think I wrote a CPAN Forth module
21:35 ingy cen't remember
21:35 ingy https://metacpan.org/pod/Pegex::Forth
21:35 Xliff Someone mentioned Haskell?
21:36 Xliff YIKES! I'm outta here! ;)
21:36 Xliff It's Friday anyways.
21:36 ingy Xliff: Perl6 came from Haskell!
21:36 lizmat joined #perl6
21:36 Xliff ingy: Perl6 is less Haskelly than... Haskell
21:37 ingy TimToady was said "People say that Perl 6 is Haskell's scripting language. I say that Haskell is Perl 6's functional language."
21:37 ingy *once said
21:38 japhb timotimo: As a (years ago) Forthwright, I have to ask: Why would you want an Inline::Forth?  Its use cases are pretty much diametrically opposed to Perl 6's.
21:38 ingy at least that's what I remember (which isn't that much these days)
21:38 timotimo you're right, it was a little facetious
21:39 ingy japhb: Perl never asks Why... :)
21:39 ingy Perl asks Why not...!
21:39 mcmillhj joined #perl6
21:39 pilne acme anyone? (:
21:39 ingy for better or worse.
21:39 ingy (or best)
21:40 timotimo a perl6-based forth should be called sixth
21:40 ingy Forx
21:40 japhb Now, doing a teaching version of Forth with a debugger and visual editor and all that, written in Perl 6, that could be fun.
21:41 lizmat http://perltricks.com/article/on-sigils/   # also about Perl 6
21:45 lizmat https://news.ycombinator.com/item?id=14462863  ^^^  HN comments
21:47 Xliff ???
21:47 Xliff $ is "no type constraint"?
21:47 Xliff According to that sigils article.
21:48 moritz what type constraint do you think that $ implies?
21:49 Xliff Well. This is probably more Perl5 constraint. But I always thought of $ as a singular object or reference.
21:49 Xliff s/Perl5 constraint/Perl5 thinking/
21:49 Xliff @ isn't singular.
21:50 Xliff % isn't either
21:50 timotimo stacks and queues are totally provided natively by perl5 though?
21:51 Xliff You can implement them with @
21:51 pilne singular/plural isn't really a "type"
21:52 timotimo i wouldn't say "can implement them"
21:52 timotimo by using .push and .shift you have a queue
21:52 timotimo by using .push and .pop you have a stack
21:52 Xliff Exactly.
21:52 timotimo more like "you can ignore parts of @ to have a stack/queue"
21:52 Xliff LOL
21:52 Xliff Fair enough.
21:52 pilne $, @, and % are more about the shape of the data being held, not what that data is made of.
21:53 b2gills a $ containing a @, contains a single @ value
21:53 Xliff ^^ THIS
21:54 pilne makes sense to my brain
21:54 timotimo i find the paragraph about variables with "the same name but different sigils" really confusing or misleading
21:54 pilne hell a $ containing a @ that contains %s still makes sense
21:54 pilne i try to avoid same name with different sigils, just cuz i can do it don't mean i should.
21:55 timotimo it's not about "the way the variable is stored in the namespace"
21:55 timotimo $foo and @foo are stored the exact same way in the namespace
21:55 Xliff pilne: But in that case, the $ still contains a singular @ value
21:56 ChoHag joined #perl6
21:56 pilne yeup, i've never had a problem with that notion
21:57 pilne although using $x = @array to get the length of an arrray (context?) in perl5 is something i still see as one of those "wow cool" things but still trips me up sometimes
21:57 pilne and lets not mention how i put $ instead of $_ twice the other day when working on some rosetta code for perl6....
21:58 ugexe there is always $x += @array
21:59 pilne lol
22:00 timotimo and also, the paragraph above the OrderedHash.new code claims "if the sigil truly were an interface only in perl6 we could apply any of the sigils to the same variable"
22:00 timotimo but you *can*
22:00 timotimo you just have to keep the name and put a sigil in front
22:00 timotimo i.e. not my $ordered, then %ordered and @ordered
22:00 timotimo but my $ordered, then %$ordered and @$ordered
22:00 timotimo this really grinds my gears a little
22:04 moritz oops, midnight coming around suddenly. Time for sleep here :-)
22:05 MasterDuke joined #perl6
22:06 timotimo gnite moritz :)
22:11 mcmillhj joined #perl6
22:13 timotimo can someone reach david farrell?
22:15 astj joined #perl6
22:21 skids left #perl6
22:21 pilne i wonder if i'd bugger up perlbrew trying to install two versions of perl simultaneously?
22:23 mcmillhj joined #perl6
22:28 [Coke] I've used perl 6 for a $dayjob script that is still in production
22:28 Xliff pilne: Have two .rakudobrew directories.
22:28 [Coke] (and some one offs to extract data from .docx)
22:29 Xliff .rakudobrew and .rakudobrew2 ... repeat for as many versions as you need.
22:29 Xliff [Coke]: What did you use to extract data from .docx?
22:29 cgfbee joined #perl6
22:30 pilne nahhhhh i'll just try and focus my nearly non-existent patience (:
22:31 geekosaur joined #perl6
22:31 Xliff pilne: You're (patience's) funeral. :>
22:31 DrForr_ joined #perl6
22:31 pochi joined #perl6
22:31 pilne LOL
22:31 zengargo1le joined #perl6
22:32 grondilu_ joined #perl6
22:32 sivoais_ joined #perl6
22:37 jantore_ joined #perl6
22:38 [Coke] Xliff: don't have access to the repo atm, but basically: unzip the .docx and dig through the xml
22:39 Cabanossi joined #perl6
22:40 xiaomiao joined #perl6
22:40 timotimo one of perlbrew's features is having multiple perl5 versions installed and easily switching between them, isn't it?
22:40 Some-body_ joined #perl6
22:40 araraloren joined #perl6
22:40 [Coke] aye.
22:41 kent\n joined #perl6
22:45 pilne yes, i was just wondering if it would barf if i used two terminals to  install two different versions at the same time
22:46 simonm joined #perl6
22:49 timotimo Xliff: what. rakudobrew's feature is to have multiple rakudo versions installed at the same time and switch with a single command
22:53 pilne i think there was a bit of a misunderstanding as to what I was trying to do earlier.
23:02 Xliff timotimo: Oh. I've never used that feature so I didn't know.
23:02 Xliff Change of topic. Is there a ^remove_method method in the MOP?
23:03 timotimo don't think so, no
23:04 Xliff Crud.
23:04 Xliff So if I have a dynamically created method x() on an object.
23:04 Xliff And I want to change the definition of x()... do I still use ^add_method and ^compose?
23:05 timotimo change the definition of it, eh ...
23:05 Xliff yeah, eh
23:05 timotimo really, i'd probably use wrap on the routine object
23:05 Xliff "use wrap"
23:05 Xliff ???
23:06 Xliff Is there a helpful linky that explains that?
23:06 timotimo you use find_method and call .wrap(-> some-signature-or-something { new code })
23:06 timotimo normally you'd be calling to the original function inside the wrapper
23:07 timotimo but you can abuse this to replace methods
23:08 Xliff And is this abusable behavior going to stick around, or is a later version of Rakudo going to close that hole?
23:08 Xliff Like... say.... 6.e?
23:09 timotimo i think you're supposed to have to "use soft" for this to work
23:12 Xliff https://perl6advent.wordpress.com/2011/12/07/grammarprofiler/
23:12 Xliff ^^ Something like that... but it doesn't use .wrap
23:12 timotimo yeah that changes how methods are returned from lookup
23:14 Xliff OK. So it looks like my FALLBACK method, which adds methods based on certain conditions, will need to handle all use cases in the method being added.
23:14 Xliff *Whee*
23:14 Xliff I was hoping to just define the useful method when data existed and just have a dummy method when it didn't.
23:15 Xliff Then I added the ability to load data at run time.
23:15 timotimo ah, hmm
23:15 Xliff Which means that the methods that were set to the dummy routine might then become available, later.
23:15 timotimo oh, hm.
23:15 Xliff I was hoping I could check the instance for all of the dummy methods and replace them.
23:16 timotimo watch out, though, instances don't have their own method tables and such
23:16 Xliff Erp!
23:16 timotimo you'll want to mix in roles for that
23:17 Xliff so: class A { my class B {}; has B $!b; };
23:17 Xliff Class B will have same method tables across each instance of A?
23:17 timotimo yup
23:17 timotimo the method table is a property of the type
23:17 Xliff EEP!
23:18 Xliff OK, but that doesn't hold true for Roles?
23:19 Xliff (but if method table is property of the type... then that doesn't make sense.)
23:21 Xliff timotimo++ # Gives me something to think about.
23:21 Xliff Now... back to my regularly scheduled drining.
23:21 Xliff s/drining/drinking/
23:21 pilne ya'll are definitely further down the rabbit hole than I am
23:21 Xliff And if I was cogent enough to make that correction... I have not drunk enough!
23:21 pilne a nice craft beer or 3 sounds good for tonight
23:24 Cabanossi joined #perl6
23:24 timotimo you can create roles dynamically through the MOP
23:26 setty1 joined #perl6
23:32 Xliff timotimo: OK. That is something.
23:32 timotimo and by parameterizing a non-dynamic role you can also do some stuff
23:33 Xliff However I think I may just re-implement things so that the dynamic methods Do The Right Thing, regardless of whether the data exists or not.
23:33 Xliff Maybe when I understand more about Roles and their dynamic-ness I will write something that takes advantage of it.
23:34 Xliff Any links on that particular subject would be good. :)
23:34 Xliff Thanks.
23:34 timotimo oof
23:57 labster joined #perl6

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

Perl 6 | Reference Documentation | Rakudo