Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-30

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:02 dataf3l joined #perl6
00:05 dataf3l joined #perl6
00:08 dataf3l joined #perl6
00:11 dataf3l joined #perl6
00:14 dataf3l joined #perl6
00:17 dataf3l joined #perl6
00:20 dataf3l joined #perl6
00:23 dataf3l joined #perl6
00:26 dataf3l joined #perl6
00:29 dataf3l joined #perl6
00:32 dataf3l joined #perl6
00:34 cdg joined #perl6
00:34 small-wolf joined #perl6
00:37 dataf3l joined #perl6
00:40 mawkish_ joined #perl6
00:41 dataf3l joined #perl6
00:41 Gasher joined #perl6
00:44 dataf3l joined #perl6
00:48 dataf3l joined #perl6
00:51 dataf3l joined #perl6
00:55 mawkish_ joined #perl6
00:56 dataf3l joined #perl6
00:58 rburkholder joined #perl6
01:01 dataf3l joined #perl6
01:03 pierre_ joined #perl6
01:07 dataf3l joined #perl6
01:12 dataf3l joined #perl6
01:15 mawkish_ joined #perl6
01:15 dataf3l joined #perl6
01:19 dataf3l joined #perl6
01:22 aborazmeh joined #perl6
01:22 aborazmeh joined #perl6
01:22 dataf3l joined #perl6
01:22 mawkish_ joined #perl6
01:26 dataf3l joined #perl6
01:28 cibs joined #perl6
01:29 BenGoldberg joined #perl6
01:29 dataf3l joined #perl6
01:32 dataf3l joined #perl6
01:35 cdg joined #perl6
01:36 dataf3l joined #perl6
01:38 BenGoldberg joined #perl6
01:39 dataf3l joined #perl6
01:42 dataf3l joined #perl6
01:45 Ben_Goldberg joined #perl6
01:45 dataf3l joined #perl6
01:48 dataf3l joined #perl6
01:48 * notviki realizes 2002 In Flame's song "Cloud Connected" all of a sudden is not a nonsensical phrase in 2016 :P
01:48 notviki In Flames
01:49 notviki https://www.youtube.com/watch?v=CAXtDPKkOlA
01:51 kalkin joined #perl6
01:52 kalkin hi
01:52 dataf3l joined #perl6
01:52 lucs How can I here avoid the if/else and have the foo() invocation not repeated?: if $some-condition { foo(:$a, :$b, :$c) } else foo(:$a, :$b, :$c, :$d) }
01:53 kalkin I just notice there is no way in zef to install a specific verson of a module, even if the git managed source code is properly tagged
01:54 lucs (got my brackets wrong there, but there it is)
01:54 djbkd joined #perl6
01:54 kalkin I would love to somehow match version managment tags to actual module versions, but there is no way besides adding aditional logic to zef
01:55 kalkin (or writing a script which checksout the module with proper tag and then cd $DIR && zef install .)
01:55 lucs I'd like something like  foo(:$a, :$b, :$c, 「nothing here if $some-condition, else pass the :$D arg」)
01:57 kalkin May be the module itself can provide the information about different versions in META6.json?
01:58 kalkin but I don't think it's a nice solution
01:59 kalkin this would make META6.json administration annoying, but it could also be automated with mi6 release or something
02:02 * geekosaur thought zef was being updated with version support at some point
02:03 geekosaur (supposedly prior to it replacing panda)
02:03 dataf3l joined #perl6
02:05 kalkin geekosaur: but how should this versioning logic work?
02:05 mspo feels like a very possible enhancement
02:05 mspo ugexe: ?
02:05 kalkin I would patch it in if I would know how perl6 modules should map different versions to version control tags
02:06 dataf3l joined #perl6
02:06 mspo `zef install "CSV::Parser:auth<tony-o>:ver<0.1.2>"`
02:06 mspo from https://github.com/ugexe/zef
02:06 kalkin mspo: yes but it currently just checks if such a distribution is known, but it doesn't check CSV:Parser git for version tag x.y.
02:07 kalkin AFAIK zef just gathers it's data from HEAD of each repository containing a META file
02:07 kalkin which is kind of suboptimal
02:07 mspo how about this version?  `zef install github:tony-o:CSV--Parser:0.1.2`
02:08 kalkin also people don't have the habbit of versioning their dependencies
02:08 mspo indeed
02:09 kalkin git ls-remote -t git://github.com/tony-o/perl6-csv-parser.git returns nothing
02:10 kalkin this means zef has no idea how to fetch any other version besides the one in HEAD/META.json version field
02:11 dataf3l joined #perl6
02:11 kalkin i think it would be nice if some QA standarts would be defined for modules.perl6.org, i.e: version your dependencies, tag your versions
02:15 AlexDaniel samcv: are there any unknown issues on that page? https://docs.perl6.org/routine/$EQUALS_SIGN$COLON$EQUALS_SIGN
02:16 AlexDaniel samcv: highlighting I mean
02:16 samcv uhm the highlighting is LTA
02:16 samcv oh yeah
02:16 samcv was gonna say it seems fine lol
02:16 samcv other than the hl
02:16 AlexDaniel “proto sub” is wrong and “=:=” is wrong
02:16 samcv ah yeah i have a ticket open for proto sub
02:16 AlexDaniel what about =:= ?
02:16 samcv i will fix the =:= right now though
02:17 AlexDaniel ok, thank you very much!
02:17 mspo =:= ?  I had to check which channel I was in :)
02:17 samcv if i work on protosub it's likely that i could break like multi sub
02:17 samcv so less than trivial cause. uh how perl6 allows different things. tho i could duplicate it. but don't realy want to do that
02:17 mspo =:= and =/= are erlang-ese
02:18 TimToady in our case, =:= is what you get after a :=
02:19 samcv m: say " ".uniprop('Line_Break')
02:19 camelia rakudo-moar 9fc616: OUTPUT«SP␤»
02:19 cyphase joined #perl6
02:19 samcv m: say 0x200D.uniprop('Line_Break'
02:19 camelia rakudo-moar 9fc616: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3say 0x200D.uniprop('Line_Break'7⏏5<EOL>␤»
02:20 samcv m: say 0x200D.uniprop('Line_Break')
02:20 camelia rakudo-moar 9fc616: OUTPUT«BK␤»
02:20 samcv TimToady,  what is your thoughts on having the cmp operation compare alphabetically using proper unicode collation order. so diacritics are not misordered
02:20 samcv cause atm Z is less than a
02:20 TimToady I just said over in #moarvm :)
02:21 samcv oh
02:21 samcv didn't see
02:24 aindilis joined #perl6
02:24 dataf3l joined #perl6
02:26 notviki lucs: you ninja-in ( the "|(:)" looks like a ninja sideways) the named arg:   foo :$a, :$b, :$c, |(:$d if $d);
02:27 dataf3l joined #perl6
02:27 notviki lucs: the :$d if $d ends empty if the :$d is false and if it's true the |() slips into the args for the routine
02:28 notviki s:2nd/':$d'/\$d/
02:30 telex joined #perl6
02:32 SmokeMachine lucs: terrible, but that's what I got:
02:32 SmokeMachine m: multi foo(:$a!,:$b!,:$c! --> "without d") {}; multi foo(:$a!,:$b!,:$c!,:$d! --> "with d") {}; my $a=1; my$b=2; my$c=3; my$d; say foo |%(<a b c d> Z=> ($a,$b,$c,$d).grep: *.defined)
02:32 camelia rakudo-moar 9fc616: OUTPUT«without d␤»
02:34 notviki :/
02:34 mawkish_ joined #perl6
02:35 SmokeMachine notviki: great!
02:35 lucs notviki: Ah, just what I needed. Thanks!
02:35 cdg joined #perl6
02:36 lucs SmokeMachine: Um, a bit complicated compared to notviki's solution, but thanks anyways :)
02:36 notviki m: my$c=3; dd $c
02:36 camelia rakudo-moar 9fc616: OUTPUT«Int $c = 3␤»
02:36 shayan_ joined #perl6
02:36 shayan_ Why isn’t macperl.com available?
02:36 * notviki surprised that even parses
02:36 notviki shayan_: it's a secret. Check back in a year for the great reveal of the secret.
02:36 SmokeMachine lucs: yes! notviki's much better!
02:37 shayan_ @notviki: why can’t you provide the appropriate answer? I am trying to download perl for mac. I’m reading my first programming book, based in perl
02:38 notviki huggable: hug shayan_
02:38 * huggable hugs shayan_
02:39 shayan_ Similarly, Mac users can get a copy of MacPerl from the Internet by going to www.macperl.om and following the directions for downloading MacPerl.
02:39 notviki uhuh
02:40 notviki shayan_: so what's dsnextgen.com then?
02:41 shayan_ @notviki: your poor mother’s existence.
02:46 shayan_ @notviki: rot in hell, mother fucker.
02:46 notviki Have a nice day!
02:46 djbkd left #perl6
02:46 notviki Obviously no one click that URL
02:46 notviki Some fucking malware infested crap.
02:46 mspo which url?
02:46 notviki both
02:46 notviki Heh, he's apparently a 30-minute driving distance away from me.
02:46 cyphase joined #perl6
02:46 notviki I'd email the ISP if I weren't so lazy....
02:47 ilbot3 joined #perl6
02:47 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!
02:49 cyphase joined #perl6
02:49 xtreak joined #perl6
02:49 cyphase joined #perl6
02:50 cyphase joined #perl6
02:53 dataf3l joined #perl6
02:56 dataf3l joined #perl6
02:58 labster joined #perl6
02:59 dataf3l joined #perl6
03:02 dataf3l joined #perl6
03:04 mawkish_ joined #perl6
03:07 dataf3l joined #perl6
03:07 cyphase joined #perl6
03:08 Ben_Goldberg joined #perl6
03:10 BenGoldberg joined #perl6
03:11 dataf3l joined #perl6
03:14 Xliff Hmmm... camelia seems slow.
03:14 Xliff m: (2+2).say
03:15 * BenGoldberg pokes camelia.
03:15 camelia rakudo-moar 9fc616: OUTPUT«4␤»
03:16 * BenGoldberg wonders what butterflies eat, so he can try bribing her.
03:16 Xliff Over a minute?
03:16 Xliff Wow.
03:16 Xliff m: (2+2).say
03:16 camelia rakudo-moar 9fc616: OUTPUT«4␤»
03:16 Xliff Better!
03:16 * Xliff pets camelia
03:16 BenGoldberg m: 'alive'.say
03:16 camelia rakudo-moar 9fc616: OUTPUT«alive␤»
03:16 Xliff m: 42.WHAT.say
03:16 camelia rakudo-moar 9fc616: OUTPUT«(Int)␤»
03:16 Xliff m: 42.WHY.say
03:16 camelia rakudo-moar 9fc616: OUTPUT«(Any)␤»
03:17 BenGoldberg m: 42.5.HOW.say
03:17 camelia rakudo-moar 9fc616: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
03:17 BenGoldberg m: 42.5.WHERE.say
03:17 camelia rakudo-moar 9fc616: OUTPUT«140623898977248␤»
03:17 BenGoldberg m: 42.5.WHERE.say
03:18 camelia rakudo-moar 9fc616: OUTPUT«140157770388448␤»
03:19 AlexDaniel eval: 2+2 .say
03:19 evalable6 AlexDaniel, rakudo-moar 9fc616f: OUTPUT«WARNINGS for /tmp/5e91x6ZuyH:␤Useless use of "+" in expression "2+2 ." in sink context (line 1)␤2»
03:19 AlexDaniel evalable seems fast!
03:20 AlexDaniel even though it unpacks an archive every run
03:20 AlexDaniel yea, there's some room for speeding things up. Contributions welcome!
03:24 Vynce joined #perl6
03:28 BenGoldberg m: # testing ␤'success'.say;
03:28 camelia rakudo-moar 9fc616: OUTPUT«success␤»
03:30 BenGoldberg m: say <<WHEE;␤This thing all things devours,␤Birds, beasts, trees, and flowers.␤WHEE␤
03:30 camelia rakudo-moar 9fc616: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '>>' ␤at <tmp>:5␤------> 3<BOL>7⏏5<EOL>␤    expecting any of:␤        argument list␤        shell-quote words␤        te…»
03:31 BenGoldberg m: say q:to/WHEE/;␤This thing all things devours,␤Birds, beasts, trees, and flowers.␤WHEE␤
03:31 camelia rakudo-moar 9fc616: OUTPUT«This thing all things devours,␤Birds, beasts, trees, and flowers.␤␤»
03:32 * BenGoldberg grins.
03:37 cyphase joined #perl6
03:42 bisectable6 joined #perl6
03:45 shayan_ joined #perl6
03:48 noganex joined #perl6
03:48 lichtkind__ joined #perl6
04:05 pierre_ joined #perl6
04:47 mawkish_ joined #perl6
04:47 xtreak joined #perl6
04:52 mawkish_ joined #perl6
04:55 tojo joined #perl6
05:09 pyrimidi_ joined #perl6
05:12 Cabanossi joined #perl6
05:21 Actualeyes1 joined #perl6
05:27 dugword joined #perl6
05:27 itcharlie_linux left #perl6
05:30 giraffe joined #perl6
05:38 webstrand Is there any way to parse the output of Proc or Proc::Async without waiting for the process to exit?
05:40 webstrand I have a process which is producing formatted output, and I'd like to parse it with a grammar incrementally
05:51 MasterDuke webstrand: you should be able to .tap() the stdout of the proc
05:54 regnarg joined #perl6
05:58 Imme joined #perl6
05:59 Imme Join
06:07 pierre_ joined #perl6
06:08 regnarg joined #perl6
06:16 bjz joined #perl6
06:23 petrutrimbitas joined #perl6
06:24 wamba joined #perl6
06:44 bjz joined #perl6
06:51 xtreak joined #perl6
06:51 darutoko joined #perl6
06:54 Woodi hi today :)
06:57 RabidGravy joined #perl6
06:59 Woodi from backlog:"isn't there an infinitely large family of taylor approximations of functions?  it's not so simple" - err... Aleph-0 is for house wifes now ? or mafia, they are rational ppls, needs to count their stuff ;) # <small>warning: backlog rigged<small> :)
07:00 telex joined #perl6
07:06 rburkholder joined #perl6
07:07 Woodi about functional programming: I think in SICP was chapter about implementing algebra with functions. and replacing assigments with functions :)  but it still is academic topic. simple becouse CPUs use registers, assigments, etc :)  so, if CPUs will have function calls as cheap as operation on register then we can stop using languages with assignments for performance critical applications
07:10 thayne joined #perl6
07:12 Woodi also, if that quantum computers will start to be more popular we will have our free lunch back ! ;) - industry will stop caring about concurency stuff, functional and lazy languages, etc. all that nice thing possibly will be put back on the shelves or even archived somewhere :)  but maybe few things from functional world is already assimilated into industry...
07:22 Tonik joined #perl6
07:33 pyrimidine joined #perl6
07:53 Actualeyes joined #perl6
07:55 xtreak joined #perl6
07:55 Woodi oo, btw. last months I notice in news used numbers, eg. govs numbers like budget expenses. looks all what we needs in common cases is int64 -  govs spends "only" bilions :)
08:12 regnarg joined #perl6
08:16 ths joined #perl6
08:20 ths Hello, Has anyone managed to get perl6 on raspberry pi using rakudobrew
08:22 grondilu joined #perl6
08:23 grondilu is there a quick way to see installed modules without using panda or zef?
08:23 grondilu for instance I want to parse a JSON string but I don't know which parser is installed (there are so many on modules.perl6.org)
08:25 RabidGravy I have a snippet somwhere, 'ang on
08:29 RabidGravy https://gist.github.com/jonathanstowe/7028f036dd40b99711556d79d2896fdc
08:29 RabidGravy however that needs, an, er, JSON parser
08:30 wamba joined #perl6
08:38 labster joined #perl6
08:44 Cabanossi joined #perl6
08:46 stmuk I'm getting perm errors from the irclog site
08:47 stmuk oh fixed now :)
08:47 xtreak joined #perl6
08:58 pierre_ joined #perl6
09:04 domidumont joined #perl6
09:06 FROGGS joined #perl6
09:06 RabidGravy grondilu, fixed to use the approved mechanism https://gist.github.com/jonathanstowe/7028f036dd40b99711556d79d2896fdc
09:10 some joined #perl6
09:11 domidumont joined #perl6
09:12 xfix joined #perl6
09:13 samcv nice just implemented my bidi bracket matching code ^_^
09:22 xtreak joined #perl6
09:28 rindolf joined #perl6
09:32 grondilu m: say <foo bar>.kv
09:32 camelia rakudo-moar acec1e: OUTPUT«(0 foo 1 bar)␤»
09:32 grondilu m: say <foo bar>.vk
09:32 camelia rakudo-moar acec1e: OUTPUT«No such method 'vk' for invocant of type 'List'␤  in block <unit> at <tmp> line 1␤␤»
09:33 grondilu kind of LTA, IMHO
09:37 dugword joined #perl6
09:43 RabidGravy what that there isn't a vk method on lists?
09:49 RabidGravy m: say ( <foo bar> but role :: { method vk() { self.kv.map( -> $k, $v { $v, $k }) } }).vk
09:49 camelia rakudo-moar acec1e: OUTPUT«((foo 0) (bar 1))␤»
09:49 RabidGravy there, fixed it for you :)
09:53 RabidGravy actually it should be flatmap to be the same as kv, but hey
10:12 bjz_ joined #perl6
10:23 iH2O joined #perl6
10:29 iH2O left #perl6
10:35 woolfy joined #perl6
10:45 woolfy left #perl6
10:50 xtreak joined #perl6
10:58 dalek ecosystem: 1c1af99 | (JJ Merelo)++ | META.list:
10:58 dalek ecosystem: Add Math::Constants to ecosystem
10:58 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1c1af998bb
10:58 dalek ecosystem: 4a73a7a | (Zoffix Znet)++ | META.list:
10:58 dalek ecosystem: Merge pull request #276 from JJ/master
10:58 dalek ecosystem:
10:58 dalek ecosystem: Add Math::Constants to ecosystem
10:58 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4a73a7aa71
11:12 grondilu m: say qq{""}
11:12 camelia rakudo-moar acec1e: OUTPUT«""␤»
11:12 grondilu m: say qq{"{"foo!"}"}
11:12 camelia rakudo-moar acec1e: OUTPUT«"{"foo!"}"␤»
11:12 grondilu ^this surprised me
11:12 * grondilu was expecting C<"foo!">
11:14 notviki Sorry, we've not implemented clayvorance yet.
11:15 notviki It's interesting that you expected it to view first set of quotes and second set of brackets as delimiters, but not the second set of quotes too?
11:16 notviki Aj
11:16 grondilu to me inside a qq construct, double quotes should lose any special meaning and thus should not prevent curlies to interpolate
11:17 wamba joined #perl6
11:17 notviki grondilu: it's likely due to this bug: https://rt.perl.org/Ticket/Display.html?id=130205
11:18 notviki m: say qq|"{"foo!"}"|
11:18 camelia rakudo-moar acec1e: OUTPUT«"foo!"␤»
11:18 kalkin joined #perl6
11:19 moritz this looks correct to me
11:19 yoleaux 02:47Z <notviki> moritz: may be worth scrubbing this URL and the dsnextgen one below from logs; has an inframe leading to an infested site https://irclog.perlgeek.de/perl6/2016-12-30#i_13822500
11:19 notviki moritz: why is it correct?
11:20 notviki and which "this"
11:20 grondilu m: say qq{{"{"foo!"}"}}
11:20 camelia rakudo-moar acec1e: OUTPUT«"foo!"␤»
11:20 notviki grondilu: seems some interaction when the delimiter is reused inside
11:20 grondilu yeah
11:21 moritz notviki: qq|"{"foo!"}"| is parsed as a string "..." which contains a closure, which returns foo!
11:21 notviki moritz: ah, that sure.
11:21 notviki m: say qq{"{"foo!"}"}
11:21 camelia rakudo-moar acec1e: OUTPUT«"{"foo!"}"␤»
11:21 notviki this isn't
11:22 moritz right
11:22 notviki grondilu: sorry for lashing out on you. I'm just really pissed right now :(
11:22 kalkin- joined #perl6
11:22 grondilu no worries, I've spent most of my times in much harsher internet places lately.
11:23 rashc joined #perl6
11:31 rburkholder joined #perl6
11:31 lukaramu joined #perl6
11:56 darutoko- joined #perl6
11:59 darutoko joined #perl6
12:05 bjz joined #perl6
12:18 FROGGS joined #perl6
12:24 dalek joined #perl6
12:31 ths joined #perl6
12:35 rightfold joined #perl6
12:36 rightfold Does Perl 6 have Perl 5's goto?
12:36 rightfold For proper tail calls.
12:38 dalek joined #perl6
12:40 notviki rightfold, not yet
12:40 rightfold ok
12:40 notviki Well, we ain't got a goto at all, whether it's planned to work like Perl 5's I've no idea
12:41 lizmat we've been able to get by so far
12:41 rightfold well it doesn't matter if it's called goto
12:41 notviki sure
12:41 rightfold as long as it does a proper tail call :P
12:41 notviki :)
12:41 lizmat also, goto in perl 5 is not really a tail call either
12:41 lizmat afaik it's really messing with the stack reporting really
12:42 notviki oh
12:42 FROGGS joined #perl6
12:42 lizmat from what I remember (and this is now close to 5 years ago), doing a call at the end of a sub is cheaper gotoing
12:42 lizmat *than
12:45 RabidGravy I think the only place in P5 I have used "goto &sub" is in an AUTOLOAD
12:58 Rawriful joined #perl6
13:03 rashc The docs don't say what's in $*PROGRAM-NAME when the interpreter is reading from $*IN. It only talks about -e.
13:06 notviki rashc: feel free to correct them: https://github.com/perl6/doc/
13:06 notviki it's in doc/Language/Variables.pod6
13:07 Rawriful_ joined #perl6
13:07 RabidGravy it is "interactive" BTW
13:07 lucasb joined #perl6
13:09 RabidGravy though it would be cooler if it realised what was happening and had "stdin" or something (and suppressed the "To exit type 'exit' or '^D'")
13:10 lucasb perl6 - <<< 'say $*PROGRAM-NAME'  #=> "-"
13:11 lucasb this REPL behaviour needs to be fixed
13:12 lucasb before starting the REPL, check that stdin is an tty
13:12 notviki Well volunteered!
13:12 lucasb I think pmurias added code for this
13:12 samcv spectest done. and pass. time for bed :)
13:13 notviki lucasb: I don't see any indication that that invokation starts the REPL
13:13 notviki Or is that what you mean by fixing?
13:13 samcv night @all
13:13 notviki night
13:13 samcv o/
13:13 rashc night
13:13 RabidGravy [jonathan@coriolanus squirrel]$ echo 'say $*PROGRAM-NAME' | perl6
13:13 RabidGravy To exit type 'exit' or '^D'
13:13 RabidGravy interactive
13:13 lucasb perl6 <<< 'say $*ERR: $*PROGRAM-NAME' 1>/dev/null  #=> 'interactive' :)
13:15 rashc It hink that, because of the REPl, the filename will have to be '-' for P6 to know it's supposed to read from $*IN
13:16 rashc Checking it's a TTY isn't enough.
13:16 stmuk and make it all work on Windows too!
13:16 notviki Hilarious: https://en.wikipedia.org/wiki/USS_Yorktown_%28CG-48%29#Smart_ship_testbed
13:17 notviki US battlecruiser dead in the water due to div-by-zero error
13:17 pierre_ joined #perl6
13:17 pierre_ joined #perl6
13:21 rashc Reuiring the '-' avoids a conflict where one might want to use the REPL to process data from $*IN. Just being a TTY doesn't mean it's a program and not data.
13:23 petrutrimbitas joined #perl6
13:24 ggoebel perl 6 made it onto a list of hottest up and coming programming languages for 2017... https://opensource.com/article/16/12/yearbook-top-programming-trends-2016
13:25 rashc Oh, now I understood, it has to check if $*In is a TTY to launch the REPL, not the other way around.
13:26 notviki ggoebel: neat
13:27 notviki kinda puts the pressure on tho....
13:33 notviki How come we use === Inf in the setting in many places?
13:34 notviki Is it for performance or is the goal to not blow up Failures/div-by-zeros?
13:34 ggoebel I suppose. As a regular long time lurker... it makes me uncomfortable with my level of involvement. I need to do a little self-introspection, change some habits, and deal with some time management and organization issues so I lurk less and contribute more.
13:34 timo joined #perl6
13:44 wamba joined #perl6
13:52 nebuchadnezzar joined #perl6
14:04 khw joined #perl6
14:07 tbrowder notviki: i see in the article a few jabs at MS, too
14:14 notviki Not surprising. Multiple sclerosis is a serious condition....
14:14 tbrowder i've been browsing our sites and don't see any mention of the books we know are in print or in prep, did i miss something?
14:16 Axord joined #perl6
14:16 rasch joined #perl6
14:19 raschip joined #perl6
14:24 FROGGS joined #perl6
14:32 Khisanth joined #perl6
14:32 bjz_ joined #perl6
14:49 nebuchadnezzar joined #perl6
14:59 kalkin- joined #perl6
15:09 ugexe kalkin-: zef can install specific versions of modules. your actual problem is the ecosystem is not used in a way that allows versioning
15:09 ugexe kalkin-: tbrowder has actually used the ecosystem with versioned distributions
15:10 ugexe kalkin-: see: https://github.com/perl6/ecosystem/commit/e78aa0402a215c15afc80ee9fbf4a693fa1aa4b4 Just note zef is entirely able to handle versions, but its still up to the ecosystem to handle what is visible
15:11 bwisti joined #perl6
15:11 raschip CPAN support can't come soon enough.
15:12 ugexe CPAN support already exists
15:13 raschip But have to start sending their modules to PAUSE, then.
15:13 ugexe kalkin-: also zef doesn't just check the HEAD of a repository because it doesn't only handle git repositories. realistically people should not be linking to their git repo as their source-url
15:15 cdg joined #perl6
15:16 raschip It's time to leave this kludge behind.
15:16 ugexe if you use --metacpan (when the p6 version is up - it goes down sometimes) or --cpan (which doesn't have many distributions yet) there is no git involved
15:17 raschip Should be the deafult and fallback to git.
15:17 ugexe or if you want to use the current ecosystem you put your .tar.gz links as your source-url and link *each version* of your meta file to the ecosystem META.list (by commit id)
15:17 raschip Does version support works when using CPAN?
15:17 finanalyst joined #perl6
15:18 ugexe version support works for everything
15:18 notviki raschip: the was (and maybe still is) a script running that automatically pushes new versions in our ecosystem to CPAN
15:18 notviki huggable: cpan
15:18 huggable notviki, nothing found
15:18 ugexe the reason it doesnt default to CPAN is because that would be wasted time for almost all queries since it doesn't have a full listing
15:19 raschip i.e. CPAN is still broken for perl6 modules.
15:19 ugexe the main thing with CPAN is working out how to handle the `auth` field
15:19 raschip Can't wait for it to get fixed.
15:20 ugexe perl6 -Ilib bin/zef --/metacpan --/p6c --cpan search CSV
15:20 ugexe ===> Found 2 results
15:20 ugexe 1 |Zef::ContentStorage::Ecosystems<cpan>|Text::CSV:ver('0.002'):auth('github:Tux')
15:20 ugexe 2 |Zef::ContentStorage::Ecosystems<cpan>|CSV::Parser:ver('0.1.2'):auth('auth:tony-o')
15:20 notviki raschip: what's broken exactly?
15:21 raschip it doesn't have a full listing
15:21 ugexe it may never have a full listing
15:21 notviki ranguard and mst are leading that effort. May wanna talk to them
15:21 ugexe the idea of perl6 recommendation engines is that they should work together
15:23 ugexe other than that it has to be determined how to map an existing `auth` from a p6 ecosystem module to whatever is copied to CPAN
15:23 ugexe because you can't just change the auth from say :auth<me@foo.com> to :auth<me:cpan> as this changes the identity of the module, and the identity is meant to be immutable
15:25 ugexe and CPAN isn't built for sharing namespaces (which the above is meant to allow)
15:25 raschip This should be fixed.
15:25 ugexe i'm sure they will welcome any help :)
15:26 raschip The maaping from module name to module should be one to one, not one to many, pulling a random module from there.
15:26 ugexe it IS one to one unless you are fuzzy about what you want
15:26 ugexe Foo::Bar is exactly the same as Foo::ver<*>
15:26 ugexe Foo::Bar:ver<*>
15:26 raschip "fuzzy" as in specifing the name of the module?
15:27 ugexe Foo::Bar:auth<xyz> is not the same as Foo::Bar:auth<abc>
15:27 ugexe but either one would fulfill a request for just "Foo::Bar"
15:27 jantore joined #perl6
15:27 ugexe if you are explicit you will get the one you explicitly requested
15:28 raschip Should work the same as traditional package managers, tbh.
15:28 ugexe we're solving problems that traditional package managers have ignored
15:28 ugexe look at the dbix::class namespace drama
15:30 raschip You're shifting the burden to the user, I tough it should be the other way around.
15:30 AlexDaniel joined #perl6
15:31 ugexe the burden of choosing explicit versions to avoid dependency hell is up to the user, but they are welcome to ignore it like the majority currently do
15:31 ugexe i.e. everyone does `use Foo::Bar;` but if they were writing production code it should be `use Foo::Bar:ver<...>` (and realistically :auth<whatever>)
15:32 ugexe how else are you supposed to do `{ use Foo::Bar:ver<1>; } { use Foo::Bar:ver<2> }`?
15:33 AlexDaniel morning \o/
15:34 notviki \o
15:34 * AlexDaniel looks at the clock… 17:34…
15:35 ugexe raschip: right now if you install Foo::Bar:ver<1> and then Foo::Bar:ver<2> and then `use Foo::Bar;`, what do you think will happen?
15:35 notviki It'd use :ver<2>
15:36 ugexe I think it will use whatever is installed first
15:36 notviki :S
15:36 notviki That's awful.
15:36 notviki I'd expect it to use latest and greatest. Same as omiting `use v6.whatever` would.
15:37 hankache joined #perl6
15:37 ugexe well technically it resolves to :ver<*> which is literally "whatever" version
15:37 notviki And it kinda makes sense, considering it's perfectly reasonable run the installer and get a fresher version without ensuring you uninstall everything first.
15:37 ugexe so whatever it encounters first
15:37 * notviki would argue that's a bug
15:37 ugexe i brought this up in perl6-toolchain though with the same expectation
15:38 * notviki forgot we even had a #perl6-toolchain
15:38 notviki ugexe: and what was the outcome when you brought it up
15:38 ugexe originally they wanted to leave those decisions up to policy and out of rakudo, but i argued it doesn't make sense that different versions would get used based on the order of CUR used (such as with -Ilib)
15:38 ugexe let me find the discussion...
15:38 hankache hello #perl6
15:39 notviki \o
15:40 raschip That is most certainly a bug, it completely breaks user expectations.
15:40 ugexe https://irclog.perlgeek.de/perl6-toolchain/2016-12-12#i_13727142 (also goes into the next day)
15:41 ugexe and its because when it caches what is loaded it does like %!loaded{$module.short-name} instead of %!loaded{$module.short-name, $module.ver, $module.auth}
15:42 Axord left #perl6
15:42 ugexe another point was that the *first* choice should always be in the current distribution if it exists
15:42 pierre_ joined #perl6
15:43 ugexe if you already have Foo::Bar installed, and are working on a local copy that does `use Foo::Bar;` it should imply using the copy from the local distribution not from CURI
15:43 raschip ugexe: "the *first* choice should always be in the current distribution if it exists". Why?
15:44 ugexe well how else do you know if changes you've made are taking affect?
15:44 raschip If I have a distribution with some version and install a new minor version of the module, I would expect the code to start using that. Anything else is a bug.
15:45 zakharyas joined #perl6
15:45 raschip It has to use new installed versions to facilitate security updates.
15:45 ugexe im talking about if you have Foo::Bar installed, then decide to `git clone http://github/foo-bar` and `perl6 -Ilib whatever`
15:45 raschip Modules should be forced to do it, in fact.
15:46 raschip Use the newest version unless told otherwise. Anything else is a security bug.
15:47 ugexe there are other not-yet-implemented strategies for that (emulates, supercedes, superceded-by, etc)
15:47 raschip Debian forbids more than one version of something to ensure this, in fact.
15:48 raschip Should follow user expectations. This isn't even about Perl6 programmers, but sysadmins giving support and users.
15:48 raschip If they need to be aware things work differently in Perl6, they aren't going to like it.
15:48 ugexe well we certainly *are* supported multiple versions
15:48 ugexe thats not something that will go away
15:48 raschip Sure, supporting multiple versions isn't a problem.
15:49 ugexe Consider two installed distributions Foo:ver<1> and Foo:ver<2>, both of which provide Foo::Bar and `use Foo::Bar` inside Foo.pm - if I `use Foo:ver<1>` it would be expected that `use Foo::Bar` inside of Foo.pm (for v1) loads Foo::Bar from the same distribution and not from a possibly newer or older distribution
15:49 raschip But things should use the newest compatible version, otherwise users and sysadmins will have serious problems.
15:50 raschip It wouldn't. If a version isn't especified, it should be the newer version.
15:50 RabidGravy it would be
15:50 ugexe then it breaks when the newer version isn't compatible with the older
15:50 RabidGravy I'm with ugexe here
15:50 raschip The behavior you suggest would be completely unexpected.
15:51 raschip It has to follow Semver, sure.
15:51 raschip I'm talking about minor upgrades.
15:51 RabidGravy I think you aren't getting the idea of "Distribution"
15:51 raschip It's like a package from CPAn, isn't it?
15:52 ugexe how will users have such expectations when it seems like multiple versions is not a common thing
15:53 raschip Say, there's a Foo:ver<1.1> and a Foo:ver<1.2>, I would expect the second to be loaded if someone asks for Foo::*.
15:53 ugexe thats not what im talking about though
15:53 RabidGravy right and it will do that
15:53 notviki ugexe: what happens if I have Foo installed and run zef install Foo (given a newer version has been released since previous installation)?
15:53 notviki ugexe: I'd end up with two versions of Foo, no?
15:54 raschip The user expectation is that just installing Foo:ver<1.2> will solve a problem present on Foo:ver<1.1>
15:54 RabidGravy yes
15:54 ugexe notviki: if you explicitly declare the version it will install it (or if you use zef upgrade ...)
15:54 notviki And if you say leaving off the :ver<> will give me the first installed, then I'd end up with unupgraded module...
15:54 notviki ugexe: and if I don't?
15:54 ugexe otherwise if you just do `zef instll Foo::Bar` it will tell you Foo::Bar:ver<*> is already installed
15:54 notviki :S
15:55 raschip That should upgrade it.
15:55 notviki Seems very uintutive
15:55 notviki Especially if you compare with things like `cpanm` and `cpan` that upgrade if there's a new version available.
15:55 ugexe right, but its also not very intuitive for the meaning of :ver<*> to switch
15:55 ugexe hence zef upgrade
15:56 raschip Yep, prepare for angry bug reports, there will be a lot of angry sysadmins looking for you.
15:56 ugexe there will always be lots of angry sysadmins looking for you
15:56 notviki ugexe: and what syntax to "install latest"?
15:56 notviki for ver
15:57 notviki or :ver<latest-and-greatest> I mean
15:57 ugexe notviki: if its not already installed (any version of it) then just `zef install Foo::Bar`. if it *is* installed then `zef upgrade Foo::Bar` (i think)
15:57 notviki ugexe: but why is that condition exists?
15:57 raschip "zef install Foo::Bar" should upgrade the module if it installed.
15:57 notviki ugexe: I basically have to run zef upgrade, see it fail because the module is not installed, and then run zef install
15:57 ugexe because CUR.is-installed.grep(* ~~ Foo::Bar:ver<*>) == True
15:58 notviki ugexe: but I'm talking in more general terms. If I'm `use`ing a module, how to tell it to use latest and greatest version?
15:59 ugexe there is no way to `use` like that (and zef just followed suit with how that acts). im not saying that right or wrong, but thats why zef treats it the way it does (so no discrepency in the meaning of *)
15:59 notviki :o
15:59 ugexe if perl6 treated :ver<*> as latest-and-greatest then zef would be changed as well
16:00 notviki That's what I intuitively expect it to mean. So it's predictable.
16:00 notviki I don't what point is there in asking for "whatever you happen to find first"
16:00 ugexe to be fair a lot of this stuff is only just now accessible due to lexical module loading now working
16:00 raschip notviki++
16:04 ugexe as mst pointed out maybe there should be a way to declare like `use Foo::Bar:from<THIS DISTRIBUTION ONLY>` such that they dont have to use `use Foo::Bar:ver<this version>:auth<this auth>` and edit it every time they release a new version
16:05 raschip And the module ecosystem should make sure published modules don't make use of the feature that allows specifing specific versions of another module.
16:05 ugexe i couldn't disagree with that more
16:05 Ven joined #perl6
16:05 raschip (For minor versions)
16:05 ugexe best practice should be to *always* declare the version of what you are using
16:05 ugexe perl6 doesn't enforce semvar
16:06 raschip Far major versions, yes.
16:06 ugexe you can have poop emoji as your version if you want
16:06 notviki lol
16:07 ugexe if you want to do the semver thing then you do `use Foo::Bar:ver<1.*>`
16:07 raschip It's a good idea to declare a major version, otherwise it shouldn't declare any version at all.
16:07 notviki m: say Ver.new: "💩"
16:07 camelia rakudo-moar 338336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Ver used at line 1␤␤»
16:07 notviki m: say Version.new: "💩"
16:07 camelia rakudo-moar 338336: OUTPUT«v␤»
16:07 raschip Camelia ate the poop.
16:08 notviki m: dd Version.new: "💩"
16:08 camelia rakudo-moar 338336: OUTPUT«Version.new␤»
16:08 notviki s: Version, 'new', \("x")
16:08 SourceBaby notviki, Sauce is at https://github.com/rakudo/rakudo/blob/3383361/src/core/Version.pm#L24
16:08 ugexe i only increment my versions by adding an additional poop emoji each iteration (so it still passes a version compare)
16:09 notviki m: dd Version.new: ["💩"], "💩", 42
16:09 camelia rakudo-moar 338336: OUTPUT«Version.new('💩')␤»
16:09 notviki m: Version.new(["💩"], "💩", 42).perl.EVAL.perl.say
16:09 camelia rakudo-moar 338336: OUTPUT«Version.new␤»
16:10 notviki m: Version.new(["💩"], "💩", 42).perl.say
16:10 camelia rakudo-moar 338336: OUTPUT«Version.new('💩')␤»
16:10 notviki heh, bug
16:11 ugexe m: say Version.new("💩") cmp Version.new("💩💩") # ok maybe not
16:11 camelia rakudo-moar 338336: OUTPUT«Same␤»
16:12 ugexe but theoretically!
16:13 notviki m: say Version.new(" ") cmp Version.new(" . ")
16:13 camelia rakudo-moar 338336: OUTPUT«Same␤»
16:13 notviki m: say Version.new(" . ").Stringy
16:13 camelia rakudo-moar 338336: OUTPUT«␤»
16:13 notviki it's also a bug
16:14 notviki at the very list because it silently goes for Version.new()
16:14 raschip New versions have security fixes and should be used. Using outdated versions is a security bug.
16:14 raschip It's better to break software otright than silently keeping security bugs.
16:15 raschip outright*
16:15 ugexe m: say v1.💩 cmp v1.💩💩 # boo
16:15 camelia rakudo-moar 338336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3say v1.7⏏5💩 cmp v1.💩💩 # boo␤»
16:15 ugexe m: say v1.1 cmp v1.2
16:15 camelia rakudo-moar 338336: OUTPUT«Less␤»
16:15 notviki .u poop
16:15 yoleaux No characters found
16:15 raschip She just eats it.
16:18 raschip If users or admins want to keep old versions around, they should be able to, but the software deciding that on it's own is very bad.
16:18 ugexe tbf its not entirely difficult to implement your own CompUnit::Repository that resolves things its own way
16:18 regnarg joined #perl6
16:19 raschip It's should be easy. And predictable.
16:19 raschip It*
16:19 shayan_ joined #perl6
16:20 cdg joined #perl6
16:21 ugexe consider something that has a depends on "Foo::Bar:ver<1.*>" and you already have Foo::Bar:ver<1.0> installed but a Foo::Bar:ver<1.9> exists in the ecosystem (but is not installed). Not everyone expects that it should have to download the newer version of Foo::Bar since its already fulfilled
16:21 raschip No new downloads, you're right on that.
16:22 raschip And I agree with you zef and panda should do the same ar P6 itself. It's P6 that should be fixed.
16:22 ugexe so the meaning of * now changes with context. that is not predictable. so the problem is it cant be so simple and also be predictable
16:23 raschip Do the multiple versions are in the same place on @*INC?
16:23 kaare_ joined #perl6
16:23 ugexe they are placed in whatever CompUnit::Repository you install them to
16:24 raschip I see.
16:25 raschip Can't it be solved by an option of the Comp::Unit::Repository? To return the right versions?
16:25 ugexe CUR (CompUnit::repository) must implement a .resolve method that serves that purpose yes
16:27 raschip It's possible to implement a CUR that returns the latest version unless told otherwise, or that understands SemVer? It's an important feature.
16:28 raschip Should be the default.
16:31 ugexe they all understand semver already
16:32 Ven joined #perl6
16:33 raschip They do something with it?
16:34 ugexe in some parts yes
16:35 ugexe https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L512
16:35 ugexe thats the real problem (caching)
16:35 raschip When is the cache invalidated?
16:35 ugexe caching on the short-name (the Foo::Bar of Foo::Bar:ver<...>:auth<...>)
16:36 ugexe never - it shouldn't have to be
16:36 raschip This cache is saved to the disk?
16:36 ugexe its just mapping a loaded CompUnit to something its searching for
16:36 BenGoldberg joined #perl6
16:38 dugword joined #perl6
16:39 raschip What is the scope of the cache? If it ends up there, all P6 invocations will use it?
16:40 ChoHag joined #perl6
16:41 ugexe its just a way to memoize the loading code for a specific request for a module
16:42 raschip When P6 starts, this cache is empty?
16:44 ugexe you're over thinking this. it just means `return %!loaded{$spec.short-name} if %!loaded{$spec.short-name}:exists;` needs to s/$spec.short-name/~$spec/
16:45 ugexe (slightly simplified, as that doesn't cover version ranges, but works other than that)
16:45 raschip I wouldn't say I'm overthinking it too much, I was just asking.
16:45 raschip So, you say the problem with using a newer version is that it's cached in the way above?
16:46 small-wolf joined #perl6
16:47 ugexe yes, but using a "different" version period
16:48 raschip Ok, but it's not a problem to keep using the same version in the sameinvocation of the program. Users and admins already are used to restart services to make them load newer versions.
16:48 raschip Even in Unix-like systems that overwrite libraries when upgrading that is necessary.
16:48 pyrimidine joined #perl6
16:49 ugexe but in perl6 you can do `{use Foo::Bar:ver<1>} {use Foo::Bar:ver<2>}`
16:50 raschip Yes, if it is specified, use whatever was specified. The case in question is when there's no version specified.
16:50 raschip It should use new versions after the program is restarted.
16:50 ugexe the example I showed ignores the version
16:51 raschip Uses the first one it sees?
16:51 ugexe first one that was loaded
16:52 ugexe the "first one it sees" problem is separate
16:52 raschip ok
16:52 Ven joined #perl6
16:53 raschip It's not the problem I'm concerned with. It's only when there's no version specified.
16:59 dugword joined #perl6
17:00 dugword joined #perl6
17:07 pmurias joined #perl6
17:08 pmurias in Backtrace.pm there is a comment "note that backtraces are nqp::list()s, marshalled to us as a List"
17:08 pmurias what does the marshalling
17:08 pmurias ?
17:12 arnsholt The HLL interface in NQP presumably, as configured by nqp::sethllconfig or whatever the op is?
17:16 xinming_ joined #perl6
17:20 cdg joined #perl6
17:22 webstrand I'm trying to incrementally parse $*IN with a grammar. In exegesis 5, a mechanism for binding a scalar to a stream, but that doesn't seem to exist. Is this currently possible?
17:25 notviki is that the Cat type? It's NIY
17:28 webstrand Not sure, google doesn't turn up anything for Cat. The proposed syntax was: my $text is from($*ARGS);
17:30 cdg joined #perl6
17:32 Ven joined #perl6
17:35 PapaChub joined #perl6
17:37 pmurias webstrand: AFAIK it NIY
17:39 small-wolf joined #perl6
17:39 AlexDaniel webstrand: that's interesting, at some point I've wondered about this too. What are you trying to do, by the way?
17:40 pmurias arnsholt: thanks, forgot to set the hllRole
17:41 cdg joined #perl6
17:41 webstrand AlexDaniel: I'
17:41 AlexDaniel oops, seems like this answer is a Cat… :)
17:42 webstrand Do you know where I can find documentation on cat?
17:42 AlexDaniel webstrand: it's not yet implemented
17:42 notviki How can I simulate `is default` on a routine without actually usign the trait? The trait just `does role { method default() { True } }`; I tried multi foo {...} does role {...] but that doesn't do it. Any idea?
17:43 webstrand But somewhere, someone has specified what Cat is, right?
17:43 notviki webstrand: try looking on http://design.perl6.org/
17:43 AlexDaniel webstrand: vaguely, yea
17:44 pierre_ joined #perl6
17:44 notviki m: multi foo (Rational, Rational) {say "got it"}.^mixin(role { method default() { True } }); multi foo (Real, Real) {say "fail"}; foo 1.1, 1.1
17:44 camelia rakudo-moar 338336: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:(Rational $, Rational $)␤:(Real $, Real $)␤  in block <unit> at <tmp> line 1␤␤»
17:47 pmurias 65
17:47 pmurias sorry
17:50 notviki BINGO!
17:52 Ven joined #perl6
17:55 webstrand I don't suppose there's a low-level interface to grammars, so that I could manually feed in data?
17:56 shayan_ joined #perl6
18:00 zakharyas joined #perl6
18:00 raschip I think we hava an XY problem here.
18:00 raschip What's the problem you're finding on the standard interface?
18:01 webstrand In my limited experience with PEG parsers, there's often a way to take action when a subrule matches
18:02 webstrand If you're parsing a large file, or the data is from a slow source, it's nice not to have to load the whole thing into memory
18:03 webstrand From what I can tell, grammars currently require all of the data to be in a string before parsing.
18:03 lizmat that is correct
18:03 PapaChub Stupid question: What's the idiomatic way to "die" from a script without printing a backtrace?  Short of redefining my own "sub die { note ~@_; exit 1 }"
18:04 shayan_ joined #perl6
18:04 lizmat exit
18:04 lizmat PapaChub: ^^^
18:04 notviki But how to print the message?
18:04 ugexe m: for 1..5 { exit note "Error" }
18:04 camelia rakudo-moar 338336: OUTPUT«Error␤»
18:04 PapaChub lizmat Does that take a message?
18:04 notviki oh
18:05 PapaChub Neat
18:05 webstrand Since there's no mechanism to create 'lazy' strings, I was hoping I could drive the parser myself by supplying individual characters
18:05 raschip Is there a field separator in what you're trying to parse?
18:06 * notviki wonders what exit note ... would do if note fails..
18:07 lizmat well, then note would return False, and exit would return 0 ?
18:07 notviki Yeah
18:07 notviki m: say +note 0/0
18:07 camelia rakudo-moar 338336: OUTPUT«Attempt to divide by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:07 notviki .oO( bad example )
18:08 notviki m: exit 1+note "Error"
18:08 camelia rakudo-moar 338336: OUTPUT«Error␤»
18:08 webstrand raschip: Yeah, newlines. I was hoping for a more general solution, so that I could parse more complicated formats, like VDF
18:08 AlexDaniel b: say ‘test’
18:08 AlexDaniel c: say ‘test’
18:08 Undercover AlexDaniel, Something's wrong: test␤␤ERR: Cannot resolve caller sourcery(Bool); 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␤␤
18:08 lizmat webstrand: could you do it with .split ?
18:08 AlexDaniel Undercover: get out of here!
18:09 notviki AlexDaniel: I can change its trigger if you want to use that for something more useful.
18:09 webstrand lizmat: yep, or .lines
18:09 lizmat well, .split on IO::Handle is supposed to be lazyish
18:09 AlexDaniel notviki: I'm just thinking that “c: 2015.12” is easier to type than “commit: 2015.12”, but I'm going to add “mc:” anyway
18:09 AlexDaniel mc: say 42
18:10 notviki ok
18:11 AlexDaniel e: say 42
18:11 raschip If there is a filed separator, it's possible to define IFS to that and P6 will pull it piece by piece for you.
18:11 * notviki goes to hack Undercover
18:11 raschip The grammar engine doesn't work byte by byte, I think.
18:12 Ven joined #perl6
18:12 PapaChub m: CATCH { note .payload; exit 1 }; die "Error"
18:12 camelia rakudo-moar 338336: OUTPUT«Error␤»
18:12 AlexDaniel notviki: do you want it to be 2015.12 or 2015.12,HEAD ?
18:12 lizmat m: say 2017.is-prime  # USP of 2017 so far
18:12 camelia rakudo-moar 338336: OUTPUT«True␤»
18:12 Undercover joined #perl6
18:13 * moritz wants to publish at least one book in 2017
18:13 notviki AlexDaniel: juse 2015.12
18:13 notviki *just
18:13 notviki c: dsadasdas
18:13 notviki Undercover: help
18:13 Undercover notviki, Use s: trigger with args to give to sourcery sub. e.g. cover: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
18:13 notviki heh
18:13 lizmat (courtesy of http://xkcd.com/1779/ )
18:13 teksteiner joined #perl6
18:14 Undercover joined #perl6
18:15 notviki Undercover: help
18:15 Undercover notviki, Use cover: trigger with args to give to sourcery sub. e.g. cover: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
18:15 notviki cover: Int, 'base'
18:15 Undercover notviki, The code is hit during stresstest [WARNING: this line is a proto! Check individual multies] See http://perl6.WTF/src_core_Int.pm.coverage.html#L64 for details
18:15 notviki Oh hilarious. Old coverage is actually still on the site because the broken coverage used different filenames.
18:16 notviki Yey? :)
18:18 evalable6 joined #perl6
18:19 petrutrimbitas joined #perl6
18:19 evalable6 joined #perl6
18:19 committable6 joined #perl6
18:19 bisectable6 joined #perl6
18:20 raschip Welcome back, bots.
18:21 raschip What did I do?
18:22 moritz nobody will ever know for sure.
18:23 bisectable6 joined #perl6
18:24 committable6 joined #perl6
18:28 * arnsholt <3 git commit --amend
18:28 arnsholt (And git in general)
18:30 committable6 joined #perl6
18:30 jonadab arnsholt: Indeed.
18:32 Ven joined #perl6
18:34 PapaChub m: &note.wrap: { callsame; False }; exit note "exit zero"
18:34 camelia rakudo-moar 338336: OUTPUT«exit zero␤»
18:35 notviki m: note "exit zero", exit
18:35 camelia rakudo-moar 338336: ( no output )
18:35 notviki riiight
18:35 notviki m: note("exit zero"), exit
18:35 camelia rakudo-moar 338336: OUTPUT«exit zero␤»
18:35 notviki m: "exit zero".note, exit
18:35 camelia rakudo-moar 338336: OUTPUT«exit zero␤»
18:35 committable6 joined #perl6
18:36 PapaChub m: note "exit zero" => exit
18:36 camelia rakudo-moar 338336: ( no output )
18:37 rightfold say &note.WHY
18:37 rightfold m: say &note.WHY
18:37 camelia rakudo-moar 338336: OUTPUT«Nil␤»
18:38 rightfold I don't understand WHY
18:41 notviki m: say WHY 'Life, the Universe and Everything':
18:41 camelia rakudo-moar 338336: OUTPUT«42␤»
18:41 ugexe m: for 1..5 { exit() R, note("exit 0") }
18:41 camelia rakudo-moar 338336: OUTPUT«Potential difficulties:␤    Useless use of R, in sink context␤    at <tmp>:1␤    ------> 3for 1..5 { exit() 7⏏5R, note("exit 0") }␤exit 0␤»
18:42 ugexe m: for 1..5 { exit() R, note("exit 0") if 1 }
18:42 camelia rakudo-moar 338336: OUTPUT«exit 0␤»
18:42 ugexe weird
18:43 * ugexe refers to R, as the "right-after" operator in my head
18:44 Vynce joined #perl6
18:45 PapaChub m: my $dir = "."; $dir = $dir.IO.resolve.Str; dd $dir
18:45 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/home/camelia"␤»
18:45 PapaChub m: my $dir = "."; $dir .= IO.resolve.Str; dd $dir
18:45 camelia rakudo-moar 338336: OUTPUT«IO::Path $dir = ".".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤»
18:46 PapaChub Is there a shortcut for ".="-ing a longer method chain?
18:47 committable6 joined #perl6
18:47 committable6 joined #perl6
18:48 PapaChub m: my Str $dir = "."; $dir .= IO.resolve.Str; dd $dir
18:48 camelia rakudo-moar 338336: OUTPUT«Type check failed in assignment to $dir; expected Str but got IO::Path (".".IO(:SPEC(IO::Spec...)␤  in block <unit> at <tmp> line 1␤␤»
18:48 ugexe m: my $a = 1 andthen {$_++}; say $a
18:48 camelia rakudo-moar 338336: OUTPUT«2␤»
18:48 committable6 joined #perl6
18:49 ugexe but whatever you are trying to do with those IO objects looks wrong
18:49 shayan_ joined #perl6
18:50 ugexe mutating a string type into an IO::Path for instance
18:50 PapaChub I was hoping to mutate it back to a Str (i.e., go from "." to "/some/path")
18:50 pyrimidine joined #perl6
18:51 ugexe ah right
18:52 Ven joined #perl6
18:53 ugexe not ideal but you could do
18:54 ugexe m: my Str $dir = "." andthen {$_ = .IO.resolve.Str}; dd $dir
18:54 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/home/camelia"␤»
18:55 ugexe not sure why you get that type check error actually
18:55 PapaChub sub MAIN (Str $dir is copy = ".") { $dir = $dir.IO.resolve.Str }
18:55 pierre_ joined #perl6
18:55 PapaChub I think ".=" only does one method
18:55 skids joined #perl6
18:56 PapaChub m: sub MAIN (Str $dir is copy = ".") { $dir = $dir.IO.resolve.Str; dd $dir }
18:56 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/home/camelia"␤»
18:56 PapaChub m: sub MAIN (Str $dir is copy = "/tmp") { $dir = $dir.IO.resolve.Str; dd $dir }
18:56 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/tmp"␤»
18:56 PapaChub Does camelia accept command-line parameters?
18:57 ugexe yu can call &MAIN(...)
18:57 PapaChub m: sub MAIN (Str $dir is copy = ".") { $dir = $dir.IO.resolve.Str; dd $dir }; &MAIN("/tmp")
18:57 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/tmp"␤Str $dir = "/home/camelia"␤»
18:58 PapaChub m: multi sub MAIN (Str $dir is copy = ".") { $dir .= IO.resolve.Str; dd $dir }; &MAIN("/tmp")
18:58 camelia rakudo-moar 338336: OUTPUT«Type check failed in assignment to $dir; expected Str but got IO::Path ("/tmp".IO(:SPEC(IO::S...)␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:59 ugexe I often find myself wishing we could do coercing for that ala `sub foo(Str(IO::Path) $dir) { }`
18:59 PapaChub m: multi sub MAIN (Str $dir is copy = ".") { $dir = $dir.IO.resolve.Str; dd $dir }; &MAIN("/tmp")
18:59 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/tmp"␤Str $dir = "/home/camelia"␤»
18:59 PapaChub m: sub SUB (Str $dir is copy = ".") { $dir = $dir.IO.resolve.Str; dd $dir }; &SUB("/tmp")
18:59 camelia rakudo-moar 338336: OUTPUT«Str $dir = "/tmp"␤»
19:03 Ven joined #perl6
19:07 webstrand The docs list a number of pragmas that are NYI, such as MONKEY-WRENCH. Neither the design nor the roast mention them. Any idea where they're specified?
19:08 notviki webstrand: they're not. They're just reserved.
19:08 webstrand Shouldn't they be TBD then?
19:08 notviki We just wanted to call dibs on all the cool MONKEYs if we come up with something for them in the future
19:08 notviki webstrand: where are they listed?
19:08 webstrand understandable. Here: https://docs.perl6.org/language/pragmas
19:09 moritz there should be a statement that all upper-case names are reserved
19:09 moritz instead of listing specific ones
19:09 notviki webstrand: yeah, that needs some lovin'
19:09 notviki moritz: that seems pretty harsh.
19:10 notviki I guess that would make my SPEC::Func illegal?
19:11 webstrand I can submit a pull request to change the pragmas. Shall I mark all pragmas marked [NYI] but not listed in either design or the roast as [TBD]?
19:14 notviki webstrand: a more awesome approach would be to add them into roast with just a simple eval-dies-ok 'use MONKEY-WHATEVER'; and then document them as just reserved for possible future use.
19:14 notviki webstrand: because we're basically not supposed to document anything that's not in roast
19:14 notviki And there should also be Issues in doc and/or roast for these
19:14 pmurias are they specced to die?
19:15 pmurias * should they be?
19:15 notviki pmurias: they're not specced at all
19:15 webstrand I can do that
19:15 notviki m: use MONKEY-WRENCH
19:15 camelia rakudo-moar 8d3595: ( no output )
19:15 notviki m: use MONKEY-WRENCH;
19:15 camelia rakudo-moar 8d3595: ( no output )
19:15 notviki Isn't that one of the reserved?
19:15 pmurias notviki: you want them to be specced to die
19:16 notviki We already had this discussion before.
19:16 ugexe i'd really like a way to access the list of pragmas rakudo/implementation supports
19:16 pmurias notviki: when?
19:18 ugexe then zef could ignore depends on those items, and Test::META could warn users
19:19 Tonik joined #perl6
19:19 moritz ugexe: +1
19:19 notviki webstrand: I'd expect them to die with a message that they're reserved but I see that they currently don't so perhaps those tests don't work
19:19 notviki *won't work
19:20 webstrand wouldn't that be a good thing? Then the tests will succeed when the pragmas correctly die?
19:20 notviki pmurias: I believe this was a previous discussion: https://irclog.perlgeek.de/perl6/2016-12-02#i_13669763
19:21 notviki webstrand: oh, OK, I see the proposal was to add it as a "does NOT die" test: https://irclog.perlgeek.de/perl6/2016-12-02#i_13669791
19:22 notviki m: use MONKEY-BRAINS
19:22 camelia rakudo-moar 8d3595: ( no output )
19:22 notviki m: use MONKEY-BALLS
19:22 camelia rakudo-moar 8d3595: OUTPUT«===SORRY!===␤Could not find MONKEY-BALLS at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::…»
19:22 ugexe webstrand: a pragma isnt a dependency/module, so while you can query something like $_.is-installed.grep($identity) for the later (module) there is no way to tell if its a pragma that exists
19:22 notviki m: use Test; use-ok 'MONKEY-BRAINS'
19:22 camelia rakudo-moar 8d3595: OUTPUT«ok 1 - The module can be use-d ok␤»
19:22 notviki heh
19:23 Ven joined #perl6
19:23 ugexe maybe they belong somewhere else, but they dont belong under depends
19:23 pmurias I don't see any value in adding a test for "reserved" pragmas
19:24 ugexe warn the user the dependency list contains a pragma and that is not what they should do?
19:25 pmurias ugexe: having zef test for a dependency on a pragama makes sense
19:25 pmurias ugexe: I meant having a test in the spec that 'use MONKEY-WRENCH' dies
19:26 notviki that it lives
19:26 notviki or dies with "this is reserveed"
19:26 ugexe ah sorry, wasn't following the rest :)
19:26 notviki The value is pretty obvious if you don't assume Rakudo represents Perl 6
19:26 notviki or defines Perl 6, I should say
19:28 notviki We can't claim MONKEY-X is reserved in Perl 6 language just because we typed some letters in Rakudo implementatino. That's what the roast is for.
19:28 pmurias why is MONKEY-X reserved?
19:28 notviki docs.perl6.org represents Perl 6 Language, not Rakudo. Hence why it follows the rule that we don't document stuff that's in roast.
19:29 notviki I think TimToady is the author of the most MONKEY reservasion commits, ask him vOv
19:29 pmurias Rakudos currently allows MONKEY-WRENCH, it's just a noop
19:31 notviki Right, you can't have a module named MONKEY-WRENCH; you won't be able to `use` it
19:32 dalek doc: 65172ba | (Tom Browder)++ | doc/Language/faq.pod6:
19:32 dalek doc: no need for parens
19:32 dalek doc: review: https://github.com/perl6/doc/commit/65172baa07
19:32 synopsebot6 Link: http://doc.perl6.org/language/faq
19:32 geekosaur TinToady reserved the MONKEY* namespace for "dangerous" things, iirc
19:32 notviki .oO( can still `require` it tho)
19:33 geekosaur all of which are expected to be pragmas; "dangerous" normal modules are something for the community to work out
19:33 notviki hah
19:37 mst geekosaur: <auth:DCONWAY>
19:37 geekosaur not going there kthxbai :p
19:38 petrutrimbitas joined #perl6
19:42 Predator00100 joined #perl6
19:45 espadrine joined #perl6
19:49 domidumont joined #perl6
19:59 noganex_ joined #perl6
20:02 Ven joined #perl6
20:03 cyphase joined #perl6
20:13 labster joined #perl6
20:14 labster joined #perl6
20:15 petrutrimbitas joined #perl6
20:21 Ven joined #perl6
20:22 labster joined #perl6
20:22 petrutrimbitas joined #perl6
20:25 zakharyas joined #perl6
20:29 pyrimidine joined #perl6
20:46 TEttinger joined #perl6
20:50 Ven joined #perl6
21:09 Ven joined #perl6
21:12 pierre_ joined #perl6
21:20 webstrand joined #perl6
21:30 Ven joined #perl6
21:37 samcv o/
21:37 samcv morning all
21:38 lukaramu joined #perl6
21:42 teksteiner good evening samcv and everyone o/
21:44 cdg joined #perl6
21:54 xinming joined #perl6
21:55 samcv :)
22:00 tbrowder Hi, samcv and teksteiner!
22:01 samcv <notviki> docs.perl6.org represents Perl 6 Language, not Rakudo. Hence why it follows the rule that we don't document stuff that's in roas
22:01 samcv don't you mean _not_ in roast?
22:02 webstrand I'm getting segfaults from Inline::Python's test suite on rakudo-git. Does anyone else have this problem?
22:03 notviki samcv: yes
22:04 * notviki rocks out to https://www.youtube.com/watch?v=yTpOy6ydf_0
22:04 notviki Perfect music to squash bugs to!
22:05 notviki webstrand: I'm just getting this: pyhelper.c:1:20: fatal error: Python.h: No such file or directory
22:05 notviki #include "Python.h"
22:05 webstrand Your probably missing python-dev or python-devel?
22:06 notviki probably
22:07 notviki webstrand: what's rakudo-git BTW?
22:08 webstrand I mean i built rakudo from git HEAD
22:08 notviki OK. You can try a proper release.
22:08 notviki japhb was having issues with Native::Blob. Maybe related?
22:09 Ven joined #perl6
22:09 webstrand Ah. Last time i was hear HEAD was basically the release. I'll rebuild
22:09 notviki https://irclog.perlgeek.de/perl6-dev/2016-12-30#i_13825883
22:09 notviki err, no, HEAD is development
22:10 notviki You can just checkout the release tag:   2016.12
22:10 notviki and build that way
22:10 notviki Otherwise, compiler releases are at http://rakudo.org/downloads/rakudo/ and user-facing distro (with docs and modules) is at http://rakudo.org/downloads/star/
22:12 teksteiner Quick question, what would be the easiest way to remove all newlines from a String?
22:12 notviki teksteiner: $string.lines.join
22:13 lizmat m: "a\nb\nc\n\nd".trans("\n" => "").say   # teksteiner
22:13 camelia rakudo-moar b2332c: OUTPUT«abcd␤»
22:13 teksteiner notviki thank you :)
22:13 samcv @notviki, on perl6.fail “Search is NIY”
22:14 samcv what is this NIY and when it be implemented?
22:14 samcv :P
22:14 pierre_ joined #perl6
22:14 samcv (the search box default greyed out text)
22:15 notviki samcv: NIY is Not Implemented Yet as for when... I currently have very little desire to add it, but patches welcome: https://github.com/zoffixznet/R6
22:16 samcv oh thought it was typo to be NYI
22:16 samcv ignore me then
22:16 notviki I've no idea why everyone writes it as NYI..
22:17 mst Not Yet Implemented
22:17 notviki I've no idea why everyone writes it as Not Yet Implemented
22:17 mst because 'Not Yet X' is a common phrasing
22:18 notviki :)
22:19 samcv and putting the X at the end is clearer i think
22:19 samcv than in the middle of the word
22:19 geekosaur "is X ...?" "not yet"
22:19 lizmat NYD  # not yet documented
22:19 samcv is NYA a thing too
22:20 samcv NYC, New York not sure what that means
22:20 samcv maybe somebody can think of something witty
22:20 notviki *shrug*
22:21 notviki I know the other side of the pond people get pissed and bars and cars have boots, so what do I know :P
22:21 notviki s/and/in/;
22:22 notviki 114M results in google for Not Yet Implemented and only 7M for NIY
22:23 notviki "Yet is normally placed at the end of the clause, particularly in informal English and in questions, but can go immediately after not in negative sentences in a more formal style, such as Cambridge Dictionaries and the British Library have used. Compare also the following:"
22:26 committable6 joined #perl6
22:28 Ven joined #perl6
22:32 jdv79 not yet calm,capable,chaos,cheap,classy,clean,cynical
22:33 geekosaur the questions one is roughly akin to the inversion structure of questions: does X Y? X does Y.
22:40 webstrand notviki: moarvm/nqp/rakudo at tag 2016.12: Inline::Python's t/call_back.t segfaults
22:41 notviki webstrand: please report it as a bug by emailing to rakudobug@perl.org
22:49 Ven joined #perl6
22:52 newbie1 joined #perl6
22:52 skids is S01-perl-5-integration/hash.t a well-known failing test right about now?
22:53 notviki Not seen it fail, though I don't know if I have the latest and greatest Inline::Perl5
22:53 skids oh, p5, maybe I need to update the mod.
23:02 Tonik joined #perl6
23:04 cpage_ joined #perl6
23:08 Ven joined #perl6
23:17 grondilu joined #perl6
23:23 notviki skids: did it work?
23:27 kyan joined #perl6
23:28 Ven joined #perl6
23:33 dugword I'm getting this error and I'm not sure why: "Cannot unbox a type object (int) to an int" What does that mean?
23:34 dugword Are ints not ints? Or do the parens mean something
23:36 notviki :S what the...
23:36 notviki dugword: is that actually the error?
23:37 notviki or did you type it by hand
23:37 notviki What's the code that reproduces it?
23:37 rightfold the type object isn't an integer
23:37 rightfold it's a type object
23:37 notviki m: my int $x = int
23:37 camelia rakudo-moar 87fefa: OUTPUT«Cannot unbox a type object (int) to int.␤  in block <unit> at <tmp> line 1␤␤»
23:37 notviki Ah, right you can repro it that way
23:37 dugword That is a copy paste
23:37 geekosaur dugword, a type object is a typed undef
23:38 geekosaur so no, it doesn't fit into a native int
23:38 notviki m: my $x = int; dd $x
23:38 camelia rakudo-moar 87fefa: OUTPUT«int $x = int␤»
23:38 notviki neat
23:38 geekosaur (this is a bit of a corner case for native types)
23:38 notviki m: my $x = int; dd $x.new: 42
23:38 camelia rakudo-moar 87fefa: OUTPUT«42␤»
23:38 notviki anyway
23:38 dugword Okay, so my code must be passing in a type object instead of a value... that could be
23:39 notviki dugword: right, ints can't take type objects
23:39 notviki well no natives can
23:39 dugword That really helps, thanks
23:48 Ven joined #perl6
23:52 notviki skids: weird... t/spec/S01-perl-5-integration/import.t just failed for me, but succeeded when I re-ran it on its own :(
23:56 Ven joined #perl6
23:56 clasclin joined #perl6

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

Perl 6 | Reference Documentation | Rakudo