Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-15

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 cognominal joined #perl6
00:15 leont left #perl6
00:15 ugexe How do I get access to post on the advent blog?
00:25 SmokeMachine gfldex: do you think that it would work everywhere to get all builtin types?
00:25 SmokeMachine m: say $*REPO.writeable-path.child("d​oc/Type").dir.grep(*.extension eq "pod6").map({::(.basename.subst(/".pod6"/, ""))})
00:25 camelia rakudo-moar 7345e0: OUTPUT«No such symbol 'nativeInt'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:26 SmokeMachine wrong version...
00:26 SmokeMachine m: say $*REPO.writeable-path.child("d​oc/Type").dir.grep(*.extension eq "pod6").map({try {::(.basename.subst(/".pod6"/, ""))}})
00:26 camelia rakudo-moar 7345e0: OUTPUT«Proc is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method gist at src/RESTRICTED.setting line 33␤  in block <unit> at <tmp> line 1␤␤»
00:26 SmokeMachine :(
00:27 SmokeMachine every perl6 installation have all type documentation on this path? $*REPO.writeable-path.child("doc/Type")
00:28 KotH joined #perl6
00:30 SmokeMachine just wondering: that would be great if every type's documentation have examples of possible values and possibly samples of edge cases to I use on Test::Fuzz's generators...
00:31 wamba joined #perl6
00:32 SmokeMachine ok, that would be better if every type had a method .generate-values()
00:32 SmokeMachine or .generate-samples()
00:33 cognominal joined #perl6
00:35 SmokeMachine oh! that really is a good idea!
00:35 SmokeMachine thanks!
00:37 dataf3l joined #perl6
00:38 geekosaur .oO { role Arbitrary { ... } }
00:38 espadrine joined #perl6
00:43 aborazmeh joined #perl6
00:43 aborazmeh joined #perl6
00:44 cibs joined #perl6
00:45 timotimo ugexe: you need to have a wordpress account and tell someone with admin privileges your username
00:46 djbkd joined #perl6
00:52 ugexe timotimo: thanks... know anyone with admin privs?
00:57 araujo joined #perl6
00:57 araujo joined #perl6
01:02 aborazmeh_ joined #perl6
01:02 aborazmeh_ joined #perl6
01:14 Actualeyes joined #perl6
01:20 canopus joined #perl6
01:21 timotimo i have to look if i have it, ugexe
01:21 timotimo what's your user name? best to just put it here in irc and see if someone stops by who can Do It
01:22 timotimo yes, i should be able to give you access
01:38 MasterDuke timotimo: are you familiar with writing QAST nodes?
01:40 samcv hello all. how is everybody
01:45 SmokeMachine what does this means?
01:45 SmokeMachine ===SORRY!===
01:45 SmokeMachine STable conflict detected during deserialization.
01:45 SmokeMachine (Probable attempt to load two modules that cannot be loaded together).
01:45 SmokeMachine why 2 modules could not be loaded together?
01:54 SmokeMachine I got it!!! I was running .^compose at compile time!
02:02 kalkin-_ joined #perl6
02:02 cognominal joined #perl6
02:12 itcharlie_linux joined #perl6
02:16 itcharlie_linux thank you to whoever added libssl-dev in the prerequisite documentation for Rakudobrew in Ubuntu
02:16 SmokeMachine m: Int.?bla; Failure.?bla
02:16 camelia rakudo-moar 7345e0: OUTPUT«Invocant requires an instance of type Failure, but a type object was passed.  Did you forget a .new?␤  in any  at gen/moar/Metamodel.nqp line 3070␤  in block <unit> at <tmp> line 1␤␤»
02:17 SmokeMachine is that expected?
02:21 SmokeMachine s: .?, Failure, ""
02:21 SourceBaby SmokeMachine, Something's wrong: ␤ERR: Unhandled exception: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp' (from 'gen/moar/main.nqp')␤   at <unknown>:1  (/home/zoffix/services/sourceable/building-pe​rl6/perl6.moarvm:<dependencies+deserialize>)␤
02:23 MasterDuke s: Failure, '?'
02:23 SourceBaby MasterDuke, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
02:24 MasterDuke s: Failure, ?
02:24 SourceBaby MasterDuke, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Prefix ?  requires an argument, but no valid term foundâ�¤at -e:6â�¤------> [32m    put sourcery( Failure, ? [33mâ��[31m)[1];[0mâ�¤    expecting any of:â�¤        prefixâ�¤
02:29 MasterDuke s: Failure, ?foo
02:29 SourceBaby MasterDuke, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Undeclared routine:â�¤    foo used at line 6â�¤â�¤
02:38 SmokeMachine .tell perlpilot Now Test::Fuzz has generators "pluggable" it uses the method generate-samples(::?CLASS:U:) on the object type...
02:38 yoleaux SmokeMachine: I'll pass your message to perlpilot.
02:42 itcharlie_linux joined #perl6
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:59 kalkin- joined #perl6
02:59 MasterDuke s: Failure, '?foo'
02:59 SourceBaby MasterDuke, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
03:06 BenGoldberg joined #perl6
03:07 noganex_ joined #perl6
03:16 Actualeyes left #perl6
03:18 ugexe timotimo: ugexe on wordpress
03:42 dudz 41hours to go: https://www.kickstarter.com/proj​ects/1422827986/learning-perl-6
03:52 labster joined #perl6
03:54 astj I just backed the kickstarter project :+1:
04:02 MasterDuke_ joined #perl6
04:12 Herby_ joined #perl6
04:13 Herby_ o/
04:17 kurahaupo__ joined #perl6
04:19 noganex joined #perl6
04:27 Herby_ i'm getting tripped up trying to implement something similar to python's re.findall
04:34 itcharlie_linux left #perl6
04:36 SmokeMachine What's the python re.findall?
04:39 samcv i've made a pretty extensive contributing page for the atom syntax highlighter. i hope that it will make it much easier for people to learn from all that i've learned since starting work on it.
04:39 samcv since there's no guides out there at all
04:39 samcv if anybody is curious https://github.com/perl6/atom-langua​ge-perl6/blob/master/CONTRIBUTING.md
04:44 Actualeyes joined #perl6
04:46 Actualeyes1 joined #perl6
04:52 kurahaupo__ SmokeMachine: in P5 @results = $str =~ /pattern/g;
05:15 dalek ecosystem: f42dab0 | samcv++ | META.list:
05:15 dalek ecosystem: Publish IRC::TextColor, style/color for IRC & ANSI color->IRC color
05:15 dalek ecosystem:
05:15 dalek ecosystem: With this module you can add color and style to text for IRC.
05:15 dalek ecosystem:
05:15 dalek ecosystem: You can also take output from the command line which uses
05:15 dalek ecosystem: ANSI color and convert it to IRC color and styling.
05:15 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f42dab0b8a
05:15 Ben_Goldberg joined #perl6
05:15 samcv .tell AlexDaniel added that to the modules. to convert ANSI color to irc color, or style or color for irc
05:15 yoleaux samcv: I'll pass your message to AlexDaniel.
05:19 BenGoldberg joined #perl6
05:23 samcv readme coming in like 15 mins
05:32 samcv readme added
05:33 bjz joined #perl6
05:41 bjz joined #perl6
05:45 samcv now SourceBaby and evalable6 will be able to print rakdudo colors properly :) and be able to maybe add some fancy colors or something. depending on what their authors want
05:46 beatdown joined #perl6
05:48 Cabanossi joined #perl6
05:50 kurahaupo__ joined #perl6
06:00 bjz joined #perl6
06:07 dataf3l joined #perl6
06:11 aborazmeh joined #perl6
06:11 aborazmeh joined #perl6
06:17 dalek perl6.org: 5acd6dd | samcv++ | source/whatever/index.html:
06:17 dalek perl6.org: Fix link to Atom syntax highlighter. I used a link to
06:17 dalek perl6.org:
06:17 dalek perl6.org: atom-perl6-editor-tools by accident
06:17 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/5acd6dd515
06:23 domidumont joined #perl6
06:36 aq_ joined #perl6
06:43 samcv u: U+2015
06:43 unicodable6 samcv, U+2015 HORIZONTAL BAR [Pd] (―)
06:48 Tonik joined #perl6
06:50 RabidGravy joined #perl6
06:50 cognominal joined #perl6
06:50 cpage__ joined #perl6
06:54 domidumont joined #perl6
06:55 darutoko joined #perl6
07:01 domidumont joined #perl6
07:07 [ptc] morning *
07:08 samcv morning [ptc]
07:20 [ptc] :-)
07:21 timeless joined #perl6
07:22 RabidGravy good morning
07:32 abraxxa joined #perl6
07:42 wamba joined #perl6
07:48 bjz_ joined #perl6
07:51 Possum joined #perl6
07:51 kurahaupo_ joined #perl6
07:57 kurahaupo__ joined #perl6
08:02 andrzejku :)
08:02 andrzejku RabidGravy, hi
08:05 cognominal joined #perl6
08:20 pyrimidine joined #perl6
08:23 zakharyas joined #perl6
08:24 cognominal joined #perl6
08:35 thayne joined #perl6
08:41 cpage_ joined #perl6
08:41 dakkar joined #perl6
08:47 sftp joined #perl6
08:56 Actualeyes1 left #perl6
09:04 jonas1 joined #perl6
09:05 lizmat hmmm.... perhaps http://blogs.perl.org/users/pawel_bbkr_pa​bian/2016/12/let-the-fake-times-roll.html should not be listed on pl6anet.org ?
09:12 rurban joined #perl6
09:20 cognominal joined #perl6
09:21 skids joined #perl6
09:35 lizmat so, it was my understanding that .sprintf is sorta deprecated in favour of .fmt ?
09:35 lizmat if so, why is the documentation of .fmt referring to sprintf for more information ?
09:37 Actualeyes joined #perl6
09:38 user9 joined #perl6
09:38 g4 joined #perl6
09:42 thayne joined #perl6
09:46 Xliff Is there a way to force a substitution regexp to ignore whitespace in the substituting part?
09:46 Xliff m: my $a = 'inches'; $a ~~ s/  inches  / in     /; say $a;
09:46 camelia rakudo-moar 1b3a00: OUTPUT« in     ␤»
09:46 Xliff I just want "in".
09:46 Xliff m: my $a = 'inches'; $a ~~ s/  inches  / 'in'     /; say $a;
09:46 camelia rakudo-moar 1b3a00: OUTPUT« 'in'     ␤»
09:49 moritz m: my $a = 'inches'; $a ~~ s/  inches  /in/; say $a
09:49 camelia rakudo-moar 1b3a00: OUTPUT«in␤»
09:49 moritz Xliff: the replacement part is not a regex :-)
09:49 moritz m: my $a = 'inches'; $a ~~ s[ inches ] = 'in'; say $a
09:49 camelia rakudo-moar 1b3a00: OUTPUT«in␤»
09:50 masak I keep wanting to reply to Xliff, but moritz keeps pre-empting me and stealing my lines... :P
09:50 masak moritz++
09:50 Xliff Hmmm... that might work. Thanks morits++
09:50 Xliff Don't worry. I appreciate you too, masak++
09:51 masak whee
09:51 Xliff m: my $a =  (s[ inches ] = 'in');
09:51 camelia rakudo-moar 1b3a00: OUTPUT«No such method 'match' for invocant of type 'Any'␤  in block <unit> at <tmp> line 1␤␤»
09:51 Xliff Damn.
09:51 masak it's destructive
09:51 masak it acts on $_
09:51 masak m: my $_ = "inches"; s[ inches ] = 'in'; say $_
09:51 camelia rakudo-moar 1b3a00: OUTPUT«Potential difficulties:␤    Redeclaration of symbol '$_'␤    at <tmp>:1␤    ------> 3my $_7⏏5 = "inches"; s[ inches ] = 'in'; say $_␤in␤»
09:52 Xliff Yeah. I was hoping to store that tranformation to be used later.
09:52 masak m: $_ = "inches"; s[ inches ] = 'in'; say $_
09:52 camelia rakudo-moar 1b3a00: OUTPUT«in␤»
09:52 masak Xliff: then you need to put it in a lambda.
09:52 lizmat m: say |"A".."F"   # unexpected and quiet about it
09:52 camelia rakudo-moar 1b3a00: OUTPUT«1.."F"␤»
09:52 lizmat I wonder whether |"A" should warn or not
09:52 masak m: my &xform = -> { s[ inches ] = 'in' }; say xform("here are all my inches")
09:52 camelia rakudo-moar 1b3a00: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
09:53 masak m: my &xform = -> $_ { s[ inches ] = 'in' }; say xform("here are all my inches")
09:53 camelia rakudo-moar 1b3a00: OUTPUT«Cannot assign to a readonly variable ($_) or a value␤  in block <unit> at <tmp> line 1␤␤»
09:53 masak m: my &xform = -> $_ is copy { s[ inches ] = 'in'; $_ }; say xform("here are all my inches")
09:53 camelia rakudo-moar 1b3a00: OUTPUT«here are all my in␤»
09:53 masak Xliff: there ya go :)
09:53 Xliff masak++
09:54 rindolf joined #perl6
09:54 lizmat m: say |"A".."F"   # masak opinions?
09:54 camelia rakudo-moar 1b3a00: OUTPUT«1.."F"␤»
09:58 masak lizmat: my reaction is "...what?"
09:58 lizmat yeah.. I had something similar
10:00 jnthn |"A" binds tigher than ..
10:01 jnthn I guess the range them is like "wtf do I do this a Slip...eh, let's .Numeric it!" :)
10:01 pmurias joined #perl6
10:01 jnthn *with a
10:01 arnsholt Operator precedence strikes again!
10:02 pmurias jnthn: question in regards with repossession, some ops change stuff without triggering repossession? is that intended or NYI?
10:02 pmurias jnthn: push triggers it, pop doesn't
10:02 masak oh, it's about operator precedence
10:02 masak then I'm less likely to want a change
10:02 arnsholt I have some sympathy for the Smalltalk position of "everything's the same precedence and left-associative"
10:03 masak unless we feel that this one deserves a compiler warning
10:03 jnthn pmurias: It's been added on stuff that needs it... :)
10:03 masak but tbh it feels more like a linter thing
10:03 jnthn pmurias: Which isn't the most consistent answer, I agree :)
10:03 masak arnsholt: I have some sympathy for the Lisp position of "precedence? what's that?"
10:05 arnsholt Yeah, that too. It's just a shame that the syntax of Lisp drives me nuts =)
10:10 lizmat well, just wondering whether it would warrant a ticket for a warning ?
10:16 ufobat joined #perl6
10:17 jnthn IMHO it's just not a common enough thing to run into to warrant it
10:17 jnthn So, for linters, I think
10:17 lizmat this was actually from an example in a new Perl 6 book
10:18 lizmat for "a".."f", "k", "l" -> $letter { .say $letter }
10:18 lizmat m: for "a".."f", "k", "l" -> $letter { .say $letter }
10:18 camelia rakudo-moar 1b3a00: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3for "a".."f", "k", "l" -> $letter { .say7⏏5 $letter }␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statem…»
10:18 lizmat m: for "a".."f", "k", "l" -> $letter { say $letter }
10:18 camelia rakudo-moar 1b3a00: OUTPUT«"a".."f"␤k␤l␤»
10:18 lizmat m: for |"a".."f", "k", "l" -> $letter { say $letter }
10:18 camelia rakudo-moar 1b3a00: OUTPUT«1.."f"␤k␤l␤»
10:18 lizmat m: for |("a".."f", "k", "l") -> $letter { say $letter }
10:18 camelia rakudo-moar 1b3a00: OUTPUT«"a".."f"␤k␤l␤»
10:19 lizmat m: for |("a".."f"), "k", "l" -> $letter { say $letter }
10:19 camelia rakudo-moar 1b3a00: OUTPUT«a␤b␤c␤d␤e␤f␤k␤l␤»
10:19 jnthn for flat "a".."f", "k", "l" -> $letter { say $letter }
10:19 jnthn m: for flat "a".."f", "k", "l" -> $letter { say $letter }
10:19 camelia rakudo-moar 1b3a00: OUTPUT«a␤b␤c␤d␤e␤f␤k␤l␤»
10:19 lizmat yeah, that too  :-)
10:19 ufobat good morning :D
10:19 lizmat (running one more spectest)
10:19 jnthn Making the mistake in a book would be one good way to make it common enough to warrant a compiler warning, though :P
10:20 jnthn I just didn't see it before, is all, while I know we had people trip over ^5.pick a bunch
10:21 lizmat perhaps the book should mention it as a gotcha  :-)
10:23 AlexDaniel joined #perl6
10:24 wamba joined #perl6
10:24 lizmat jnthn: fix pushed
10:25 AlexDaniel thank you, samcv
10:25 yoleaux 05:15Z <samcv> AlexDaniel: added that to the modules. to convert ANSI color to irc color, or style or color for irc
10:30 [particle] joined #perl6
10:33 Vynce joined #perl6
10:49 cognominal joined #perl6
10:49 cibs joined #perl6
10:50 Ven joined #perl6
10:52 SHODAN joined #perl6
10:57 protium joined #perl6
10:57 andrzejku joined #perl6
11:09 grondilu joined #perl6
11:17 wamba joined #perl6
11:17 pmurias jnthn: If repossession is also used by user code (when a module loads a module and messes around in BEGIN time) don't the missing scwb calls cause bugs?
11:18 donaldh joined #perl6
11:21 jnthn pmurias: Potentially, yes
11:23 jnthn Feel free to add tests if you can trigger some :)
11:34 [particle]1 joined #perl6
11:47 Xliff Is there any way to create constants at runtime?
11:47 Xliff Or at least something that acts like such?
11:47 Xliff Dynamic sigil-less vars?
11:48 moritz lexically scoped: my \x = 42; say x
11:48 moritz m: my \x = 42; say x
11:48 camelia rakudo-moar b28604: OUTPUT«42␤»
11:48 moritz they are assign-once
11:48 Xliff Got that, but can it be done via symbol table manipulation?
11:49 Xliff Because I will only know the proper name at run-time.
11:49 jnthn m: my \x = 42; say ::('x')
11:49 camelia rakudo-moar b28604: OUTPUT«42␤»
11:49 sena_kun joined #perl6
11:49 jnthn Can use that to look them up dynamically
11:49 Xliff Right, but I need to set them dynamically, too.
11:50 jnthn Then use a hash or a package instead
11:50 jnthn The set of lexical symbols is always settled at compile time in Perl 6.
11:50 Xliff kk
11:50 jnthn (That's how we can do nice things like detect typo'd sub calls :))
11:52 lukaramu joined #perl6
11:57 * masak .oO( this is why we can have nice things )
12:04 dogbert17_ joined #perl6
12:04 andrzeju_ joined #perl6
12:05 dj_goku_ joined #perl6
12:06 AlexDaniel unicodable6: hi
12:06 unicodable6 AlexDaniel, U+000E SHIFT OUT [Cc] (control character)
12:06 unicodable6 AlexDaniel, U+000F SHIFT IN [Cc] (control character)
12:06 unicodable6 AlexDaniel, U+008E SINGLE SHIFT TWO [Cc] (control character)
12:06 unicodable6 AlexDaniel, https://gist.github.com/7549​c3cadc5374ed980dab7deaf82c93
12:06 w4and0er96_ joined #perl6
12:07 AlexDaniel hehe, unicodable at 11GB right now :)
12:08 unicodable6 joined #perl6
12:09 mrsolo joined #perl6
12:15 bjz joined #perl6
12:20 tadzik joined #perl6
12:42 rindolf joined #perl6
12:43 pyrimidine joined #perl6
12:47 rurban joined #perl6
12:50 dalek joined #perl6
12:50 solarbunny joined #perl6
12:51 mniip how do I express haskell's  ($ value) with perl6's partial application?
12:58 mniip I was expecting (*("hi"))(*.ords) to work but it does something else apparently
13:01 sena_kun mniip, what exatcly you want to do?
13:02 mniip a function that takes a function as argument and applies it to a fixed value
13:02 sena_kun mniip, map?
13:02 arnsholt m: say ({ .("hi") })(&ords)
13:02 camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
13:03 arnsholt That's as close as I've gotten so far
13:03 arnsholt *.("hi") doesn't parse the way I need it to
13:03 mniip huh, what does that syntax even mean
13:04 mniip { . <...> }
13:04 cognominal joined #perl6
13:04 benchable6 joined #perl6
13:04 evalable6 joined #perl6
13:04 committable6 joined #perl6
13:04 bisectable6 joined #perl6
13:04 unicodable6 joined #perl6
13:04 arnsholt { } is a block, so that creates a closure
13:05 arnsholt .(...) invokes the value in $_, which is the argument passed in, in this case
13:05 arnsholt More explicit would be
13:05 arnsholt m: say ({ $^fun.("hi") })(&ords)
13:05 camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
13:05 arnsholt Or
13:05 arnsholt m: say (-> $fun { $fun.("hi") })(&ords)
13:05 camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
13:05 mniip naw that is too explicit
13:06 spebern joined #perl6
13:06 spebern joined #perl6
13:06 spebern joined #perl6
13:06 pyrimidine joined #perl6
13:07 mniip huh? f.(x) = f(x)? I need to recheck perl6's syntax
13:07 AlexDaniel m: say ((~*)("hi")).map(*.ords)
13:07 camelia rakudo-moar b28604: OUTPUT«((104 105))␤»
13:09 arnsholt No, that's not it
13:09 arnsholt That stringifies "hi" and then calls map on it
13:09 AlexDaniel yea, well, I did not really understand the question :)
13:10 arnsholt m: say (*.foo).WHAT
13:10 camelia rakudo-moar b28604: OUTPUT«(WhateverCode)␤»
13:10 arnsholt m: say (*.("hi")).WHAT
13:10 camelia rakudo-moar b28604: OUTPUT«No such method 'CALL-ME' for invocant of type 'Whatever'␤  in block <unit> at <tmp> line 1␤␤»
13:10 arnsholt I *think* that might be a parser bug
13:11 arnsholt Or maybe just an unfortunate limitation of how the grammar decides between a Whatever term and a WhateverCode
13:11 arnsholt m: say (*("hi")).WHAT
13:11 camelia rakudo-moar b28604: OUTPUT«No such method 'CALL-ME' for invocant of type 'Whatever'␤  in block <unit> at <tmp> line 1␤␤»
13:12 jnthn At least it's consistent between the two :)
13:12 AlexDaniel eval: say ‘hi
13:12 evalable6 AlexDaniel, Full output: https://gist.github.com/3301​5507858e12dccdec5279be28af7f
13:12 evalable6 AlexDaniel, rakudo-moar b286048: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/ie1255R6iS␤Unable to p…»
13:12 AlexDaniel samcv++
13:13 arnsholt jnthn: There is that =)
13:14 arnsholt jnthn: One thing I did notice is that there's no Perl 6-level postcircumfix:<( )>, only token postcircumfix:sym<( )> in Grammar.nqp. Could that be a cause?
13:14 arnsholt (I have no idea how a WhateverCode is constructed, rather than just a Whatever)
13:16 jnthn Dobut it
13:16 jnthn *doubt
13:16 jnthn After all...
13:17 jnthn m: say (*<a>)({ a => 42 })
13:17 camelia rakudo-moar b28604: OUTPUT«42␤»
13:17 jnthn that works, and there's no sub postcircumfix:['< >'] either :)
13:18 dogbert17 joined #perl6
13:19 itcharlie_linux joined #perl6
13:22 canopus joined #perl6
13:29 arnsholt Hmm
13:35 arnsholt jnthn: Looks like postcircumfix:<( )> isn't in the list of postcircumfixes allowed by the code to be whatever-curried
13:35 arnsholt Not clear to me if it's intentional or an oversight though
13:37 arnsholt timotimo: Looks like you worked on this (in 2013 and 2014...), do you remember if there's a reason postcircumfix:<( )> isn't whatever-curried?
13:47 dalek doc/coke/levenshtein: 68d2c37 | coke++ | doc/Language/operators.pod6:
13:47 dalek doc/coke/levenshtein: fix typo
13:47 dalek doc/coke/levenshtein: review: https://github.com/perl6/doc/commit/68d2c378ae
13:48 AlexDaniel [Coke]: wrong branch?
13:49 perlpilot joined #perl6
13:50 [Coke] yup, but that's already on master, 'sfine.
13:50 [Coke] (I think)
13:53 khw joined #perl6
13:55 stmuk_ joined #perl6
14:04 Spot__ joined #perl6
14:08 cdg joined #perl6
14:10 cdg_ joined #perl6
14:17 * [Coke] 's panda-behind-the-firewall&proxy is failing to get a JSON file again. bah.
14:21 pierre_ joined #perl6
14:22 dataf3l joined #perl6
14:23 [Coke] which is weird, because I can download the file myself. panda just complains about empty metadata. :|
14:24 tbrowder ref  class construction: i have a class f { has @.s ;} and i would like to instantiate it with an array or values to fill the @.s. Is there a way to do that without defining a custom new method?
14:24 giraffe joined #perl6
14:24 [Coke] ... and now it worked. wtf?
14:26 jnthn m: class f { has @.s }; say f.new(s => [1,2,3]).s
14:26 camelia rakudo-moar b28604: OUTPUT«[1 2 3]␤»
14:26 jnthn tbrowder: Like that?
14:27 Actualeyes joined #perl6
14:27 tbrowder jnthn: thank you!
14:27 skids joined #perl6
14:28 thayne joined #perl6
14:31 [Coke] jnthn: with latest, rakudo, in the doc repo, I now get:
14:31 [Coke] perl6 htmlify.p6 --parallel=3
14:31 [Coke] ===SORRY!===
14:31 [Coke] unlock when we're not locked!
14:31 [Coke] Could that use a golf?
14:32 [Coke] (actually has 3 different failure modes, one of which is a segv)
14:32 jnthn [Coke]: Yes...that suggests some quite impressive screw-up
14:33 jnthn (The lock thing)
14:33 [Coke] the third is " such method 'level' for invocant of type 'Pod::Block::Para'" which looks like another weird screw up
14:34 cognominal joined #perl6
14:37 dataf3l joined #perl6
14:44 Xliff Does anyone know how to stop atom from adding in the closing bracket/quote/brace when typing in its corresponting open character?
14:44 lizmat joined #perl6
14:53 cognominal joined #perl6
14:55 lizmat joined #perl6
14:57 pmurias joined #perl6
15:00 pyrimidine joined #perl6
15:01 Actualeyes joined #perl6
15:01 Perl6Robot joined #perl6
15:01 Perl6Robot OHAI!
15:03 r joined #perl6
15:06 cognominal joined #perl6
15:09 sufrostico joined #perl6
15:12 moritz \o/ more robots!
15:19 cognominal joined #perl6
15:20 sufrostico joined #perl6
15:23 user9 joined #perl6
15:29 n0tjack joined #perl6
15:31 n0tjack Basic question on modules. I have a script foo.pl6 and a module bar.pm6. My folder structure is project/foo.pl6 and project/lib/bar.pm6. In foo.pl6 I say   use lib '.'; use bar;  But I get an error running foo.pl6 saying it can't find bar. What should I change?
15:32 jnthn use lib 'lib' instead, perhaps?
15:33 n0tjack I tried that, and tried having bar.pm6 in the same dir as foo. No joy. I'm doing something wrong.
15:35 moritz n0tjack: use lib 'lib' is relative to the working directory, so it won't work if you call it from somewhere else
15:35 n0tjack yeah, lib is a subdir of the dir the script is in.
15:36 n0tjack I found it; it is not enough to have module "bar" in bar.pm6, you have to name the file literally bar.pm6
15:36 moritz use lib $?FILE.IO.parent.child("lib").Str
15:36 moritz didn't you say it was named bar.pm6?
15:36 n0tjack yes, but that was a lie because I didn't think it was relevant and I wanted to simplify
15:37 * moritz *facepalm*
15:37 n0tjack my confusion stemmed from the fact that I thought I could spread modules out across files in p6
15:44 pierre_ joined #perl6
15:58 ugexe or just write the proper mapping in META6.json?
15:59 n0tjack ugexe: Not familiar with that, but on a quick google, looks like it's what I need, I'll dig into it, thanks
16:00 n0tjack at the moment I'm trying to figure out how to coerce a Seq into an Array[Numeric] with an intermediate assignment.
16:00 ugexe if there is no META6.json it will use perl5 like module loading schematics where lib/Module/Name.pm6 has to exists
16:00 n0tjack aha, I thought I wasn't constrained to module name ~~ file name
16:01 ugexe https://github.com/Leont/tap-h​arness6/blob/master/META.info
16:01 n0tjack in my primary language I'm not, so I've got a bit of an accent in perl6, and that's not helping
16:02 n0tjack ugexe: yes, that link is exactly what I need
16:08 lichtkind joined #perl6
16:12 pyrimidine joined #perl6
16:13 jnthn For anyone who uses Test::Mock, it got some improvements this week that make it useful in a wider range of scenarios (you can provide a fake implementation for a mocked method, as well as having a thunked return value)
16:14 andrzejku joined #perl6
16:14 dataf3l joined #perl6
16:19 wamba joined #perl6
16:20 donaldh joined #perl6
16:22 sufrostico joined #perl6
16:23 pyrimidine joined #perl6
16:23 aindilis joined #perl6
16:32 pierre__ joined #perl6
16:35 cognominal joined #perl6
16:35 pyrimidine joined #perl6
16:43 n0tjack I have a Match, $m, and $m.made returns a Seq. I tried coercing it to an Array[Numeric] with Numeric @ $m.made but that didn't work, nor did +>>$m.made (because I got the syntax for hyperoperation wrong). What's the idiomatic way to convert a Seq to Array[Numeric]?
16:43 djbkd_ joined #perl6
16:44 zakharyas joined #perl6
16:45 SmokeMachine How do I use $?RESOURCES without installing the module?
16:46 Actualeyes joined #perl6
16:46 pyrimidine joined #perl6
16:47 khw joined #perl6
16:47 b2gills m: dd Array[Numeric](+«1234.comb)
16:47 camelia rakudo-moar 9a3c35: OUTPUT«Array[Numeric].new(1, 2, 3, 4)␤»
16:50 n0tjack b2gills++
16:50 n0tjack I always forget which way the pointy end is supposed to point...
16:51 b2gills m: dd 1234.comb»[0]
16:51 camelia rakudo-moar 9a3c35: OUTPUT«("1", "2", "3", "4")␤»
16:52 b2gills It points towards the smaller thing
16:52 b2gills m: say 1,2,3,4 »+» 2
16:52 camelia rakudo-moar 9a3c35: OUTPUT«1236␤»
16:52 n0tjack b2gills: Is there some sense in which the + operation is smaller than the array 1 2 3 4?
16:53 b2gills s/smaller/fewer/
16:53 n0tjack I mean unary +, not binary +
16:53 n0tjack in the case of +<< ["1","2","3","4"]
16:53 perlpilot n0tjack: I always remember it by thinking about which way the blunt end should point.
16:53 yoleaux 02:38Z <SmokeMachine> perlpilot: Now Test::Fuzz has generators "pluggable" it uses the method generate-samples(::?CLASS:U:) on the object type...
16:53 b2gills there is only one &prefix:<+> shown, but 4 strings. at least thats how I remember
16:54 n0tjack perlpilot: what is your intuition about the blunt end in that example?
16:54 n0tjack b2gills: yeah, I can see that, maybe it'll work as a mnemonic for me
16:55 andrzejku joined #perl6
16:55 perlpilot n0tjack: the blunt end always points to the side that is listy (or that has more things to process)
16:56 n0tjack so the smaller end either points towards the smaller list / scalar, or towards the operator?
16:56 * perlpilot should stop talking about blunt ends pointing anywhere as they don't really point :)
16:56 n0tjack as in "hey, you elements, get in my operator!"
16:57 TimToady it's a megaphone for the operator to shout at the many operands
16:58 n0tjack ha!
16:58 n0tjack well, now that's a mnemonic
16:58 donaldh o/
16:58 TimToady or a telescope and a microscope, in the case of 1,2,3,4 »+» 2
16:59 donaldh I created a Perl 6 keyboard layout for macOS - https://github.com/donaldh/Perl6-macOS-keyboard
16:59 donaldh Just sharing in case anyone finds it useful.
16:59 n0tjack I was just thinking about how to type Unicode >> right before you sent that/
17:00 n0tjack Personally, I trust ASCII a lot more than Unicode still, and I don't see a lot of benefit in the Unicode symbols over the ASCII ones
17:01 dataf3l joined #perl6
17:02 [Coke] donaldh++
17:03 perlpilot n0tjack: compact expression is the main benefit.  There's also visual distinction sometimes.
17:06 telex joined #perl6
17:08 susmus joined #perl6
17:09 sena_kun https://rt.perl.org/Public/​Bug/Display.html?id=130211 can be closed.
17:09 [Coke] sena_kun: need a pointer to tests first.
17:10 sena_kun [Coke], https://github.com/perl6/roast/commit/a​9fd375b930e64b293cc650e0b101fb598cb624a
17:10 [Coke] looks like zoffix just added it.
17:10 [Coke] and closed the ticket.
17:11 sena_kun Ah, I'm too slow. :)
17:17 n0tjack what's the best resource, ideally tutorial rather than reference, for understanding typecasting and coercion?
17:18 nebuchadnezzar joined #perl6
17:21 TEttinger joined #perl6
17:22 domidumont joined #perl6
17:26 lizmat joined #perl6
17:27 bdmatatu joined #perl6
17:30 bdmatatu p6: say <a1 a2 a3>.map({S/a/x/}).perl
17:30 camelia rakudo-moar 9a3c35: OUTPUT«("x3", "x3", "x3").Seq␤»
17:30 bdmatatu I was expecting x1 x2 x3
17:35 AlexDaniel bdmatatu: interesting… looks like there's something wrong with .perl?
17:35 AlexDaniel bisect: say <a1 a2 a3>.map({S/a/x/}).perl
17:36 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=9a3c350) the exit code is 0 and the output is identical as well
17:36 bisectable6 AlexDaniel, Output on both points: ("x3", "x3", "x3").Seq
17:36 AlexDaniel commit: all say <a1 a2 a3>.map({S/a/x/}).perl
17:36 committable6 AlexDaniel, https://gist.github.com/e500​4d10ec77d2addd00e40d6f1a6771
17:39 bdmatatu p6: say <a1 a2 a3>.map({ S/a/x/ })[0]
17:39 camelia rakudo-moar 9a3c35: OUTPUT«x1␤»
17:39 bdmatatu p6: say <a1 a2 a3>.map({ S/a/x/ }).eager[0]
17:39 camelia rakudo-moar 9a3c35: OUTPUT«x3␤»
17:40 AlexDaniel m: say <a1 a2 a3>.map({S/huh//})
17:40 camelia rakudo-moar 9a3c35: OUTPUT«(a1 a2 a3)␤»
17:40 AlexDaniel m: say eager <a1 a2 a3>.map({S/huh//})
17:40 camelia rakudo-moar 9a3c35: OUTPUT«(a3 a3 a3)␤»
17:41 AlexDaniel huggable: bug report
17:41 huggable AlexDaniel, nothing found
17:41 AlexDaniel huggable: bug
17:41 huggable AlexDaniel, nothing found
17:41 AlexDaniel huggable: report bug
17:41 huggable AlexDaniel, nothing found
17:41 AlexDaniel meh
17:41 AlexDaniel bdmatatu: anyway, this looks like a bug, can you submit a ticket?
17:41 bdmatatu Okay, sure, thanks
17:49 AlexDaniel how can I get the size of some file?
17:50 ugexe .IO.s
17:51 ugexe i *think*
17:52 AlexDaniel ugexe: right… the docs are wrong :-/
17:52 AlexDaniel “Returns Bool::True if the invocant is a path and the size is bigger then 0.” – yeah… well…
17:57 ugexe at the very least s/is a path/is a regular file/
17:57 rurban left #perl6
17:58 ugexe m: $*CWD.s
17:58 camelia rakudo-moar 9a3c35: OUTPUT«'/home/camelia' is not a regular file while trying to do '.s'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:59 AlexDaniel m: say ‘evalbot.pl’.IO.s
17:59 camelia rakudo-moar 9a3c35: OUTPUT«Failed to find 'evalbot.pl' while trying to do '.s'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:59 AlexDaniel m: say ‘.bashrc’.IO.s
17:59 camelia rakudo-moar 9a3c35: OUTPUT«35␤»
18:01 ugexe m: my $file = $*TMPDIR.child("foo.tmp"); $file.open(:w).close; say $file.s # not bigger than 0
18:01 camelia rakudo-moar 9a3c35: OUTPUT«Failed to find '/tmp/foo.tmp' while trying to do '.s'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:02 ugexe m: my $file = $*TMPDIR.child("foo.tmp"); $file.open(:c); say $file.s
18:02 camelia rakudo-moar 9a3c35: OUTPUT«0␤»
18:06 cognominal joined #perl6
18:17 Xliff multi method operator<*> (Int, Obj) <- For this to work properly, I'd need to define multi method operator<*> (Obj, Int) too, right?
18:17 samcv :) AlexDaniel
18:17 samcv looks good :)
18:17 AlexDaniel ?
18:18 AlexDaniel the color thing?
18:18 samcv evalable6, say '
18:18 evalable6 samcv, Full output: https://gist.github.com/00e1​cdf695fcf9f9aabc5003bc9af04e
18:18 evalable6 samcv, rakudo-moar 9a3c350: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/b8CQTcOdxx␤Unable to p…»
18:18 samcv yeah
18:19 samcv code is ok but i need to write tests before i change anything. because background colors are working for ansi-to-irc atm. so don't want to break that cause i remember that being annoying to get working
18:19 samcv also good morning everyone
18:20 Xliff \o
18:20 Xliff Mornings are never good, samcv. Just tolerable.
18:20 Xliff <- Night Owl
18:20 AlexDaniel samcv: I don't think I like that part with a Str being rw there
18:20 AlexDaniel I was expecting a new string to be returned
18:21 AlexDaniel Xliff: I agree :-|
18:21 Xliff AlexDaniel++ # Owls together, man!
18:21 samcv AlexDaniel, there's one that returns a new string and one that doesn't
18:21 samcv that work the same way
18:21 AlexDaniel mornings are only good if you had like 11 hours to sleep… which is what I did today
18:22 samcv irc-text returns a new string, irc-style does the action on the string you give it
18:23 AlexDaniel and the reason for that is…?
18:23 Xliff AlexDaniel: Ooo... I get my chance tomorrow. After I see the Rogue One late-early-show. 8)
18:23 samcv good question. lol. i could remove one of them :P
18:24 loveperl joined #perl6
18:26 samcv what should the routine be named? irc-text or irc-style? and have it return a new string, and get rid of the other one
18:27 samcv or even some other routine name even i guess
18:27 AlexDaniel 🤷
18:28 lucasb joined #perl6
18:29 pyrimidine joined #perl6
18:33 samcv AlexDaniel, ?
18:34 AlexDaniel samcv: I'm only using ansi-to-irc right now :)
18:34 samcv yeah but which name is better though
18:35 jjido joined #perl6
18:35 AlexDaniel “style-irc-text”? This is the only one that sounds like a verb :)
18:37 AlexDaniel I dunno really, I don't feel like coming up with good names today
18:41 lucasb don't blame yourself, that's one of the hardest problems in computer science
18:42 lucasb ...naming
18:45 samcv i'll have all the things return a copy
18:45 samcv gonna go with style-irc-text
18:45 samcv maybe. i wish it were shorter tho. could make it irc-style… hmm
18:53 domidumont joined #perl6
18:55 ridofself joined #perl6
18:56 ridofself Failed to open file /home/ridofself/.perl6/precomp/4​F2986EC86EC577C7E9279547564C2E1
18:56 ridofself A9E9E5A9.1481806511.89096/C7/C712FE6969​F786C9380D643DF17E85D06868219E.repo-id: perm
18:56 ridofself ission denied
18:57 ridofself sorry, didn't mean to send that yet
18:58 loveperl joined #perl6
18:58 ridofself I'm unable to run test files using the command perl6 t/whatever.t -- i recieve that error
18:58 ridofself receive*
18:59 lucasb hm... can you type 'ls -l /home/ridofself/.perl6/precomp/4F....' ?
18:59 gfldex ridofself: did you check if the file permissions are borked?
19:00 ridofself i went to precomp and did chmod 775 -R, but it didnt make a difference
19:00 gfldex that wont help if the user is wrong
19:01 gfldex the user for that file that is.
19:01 ridofself is rakudo the user or something like that?
19:01 gfldex s/user/owner/
19:01 * gfldex .oO( ENOTEA )
19:02 lucasb you are the user
19:04 ridofself running the command sudo chmod 775 precomp/ -R does nothing, is that because I'm using sudo?
19:04 ridofself if I omit it, the operation's not permitted
19:06 lucasb you can just 'rm -rf .perl' and start over
19:06 ridofself oh! okay!
19:06 lucasb oops, type 'rm -rf ~/.perl6'
19:06 jjido joined #perl6
19:07 * lucasb hopes this is harmless :)
19:07 lizmat joined #perl6
19:07 gfldex ridofself: chmod will only produce output on error
19:07 cognominal joined #perl6
19:08 ridofself when i make install, should i I do it as sudo?
19:08 gfldex well, unless you provide -v
19:08 gfldex no
19:10 ridofself the instructions at perl6.org/downloads says to install at /opt/rakudo-star-2016.11
19:10 ridofself and I can't seem to do that as a normal user without sudo
19:12 gfldex the # at the beginning of the line indicates that you need root permissions for that step
19:13 gfldex i'm not sure that those instructions are well tested
19:14 lucasb the instructions are not very clear
19:14 lucasb and I wouldn't recommend to install on the system dirs, but rather under your home dir
19:14 ridofself all right, I'm going to run them as root and we'll see
19:14 ridofself oops
19:15 gfldex i strongly doubt that works
19:15 gfldex star will install a few modules as root under $HOME
19:15 gfldex you will at least need a root login shell to run Configure.pl
19:16 lucasb ridofself: try with this: perl Configure.pl --gen-moar --prefix ~/rakudo-star
19:16 lucasb and then put "$HOME/rakudo-star/bin" in your PATH env var
19:16 ridofself okay -- it will take a bit to install but I'll let you know how it goes, thanks!
19:23 ridofself no good -- Configure.pl at ~/rakudo-star FAILed -- permission denied when
19:23 wamba joined #perl6
19:23 ridofself "generating src/gen/config/c"
19:23 ridofself config.c
19:27 n0tjack joined #perl6
19:28 n0tjack How can I do this    my Numeric @a = +<< $m.made; return @a;   without the intermediate assignment to a throw-away name?
19:29 pyrimidine joined #perl6
19:29 setty1 joined #perl6
19:30 gfldex n0tjack: that's not enough context for proper advice
19:31 AlexDaniel gfldex: why not? He wants to turn an Array into Array[Numeric]
19:32 setty1 joined #perl6
19:32 AlexDaniel m: my @b = 1, 5, 9; say WHAT Array[Numeric].new(@b)
19:32 camelia rakudo-moar 9a3c35: OUTPUT«(Array[Numeric])␤»
19:32 AlexDaniel n0tjack: what about this? ↑
19:32 jjido joined #perl6
19:33 n0tjack AlexDaniel: Thanks, that will work. Not super clean, syntactically, but an improvement.
19:33 AlexDaniel n0tjack: oh, you can drop .new
19:34 AlexDaniel m: my @b = 1, 5, 9; say WHAT Array[Numeric](@b)
19:34 camelia rakudo-moar 9a3c35: OUTPUT«(Array[Numeric])␤»
19:34 AlexDaniel m: my @b = 1, 5, 9; say Array[Numeric](@b)
19:34 camelia rakudo-moar 9a3c35: OUTPUT«[1 5 9]␤»
19:34 labster joined #perl6
19:34 gfldex AlexDaniel: you don't need the return if it's the last statement
19:34 AlexDaniel n0tjack: I don't think it will ever get any cleaner than this. You want Array[Numeric], so you'll have to type it out
19:34 n0tjack Now that's what I'm after.
19:34 n0tjack I don't need it cleaner than that; that's what I wanted.
19:35 n0tjack thank you
19:35 AlexDaniel n0tjack: np, I didn't know about this too
19:36 pierre_ joined #perl6
19:36 AlexDaniel (I just tried it and it worked :) )
19:36 n0tjack my problem is I don't know how to look this stuff up
19:36 AlexDaniel n0tjack: no idea either
19:36 n0tjack so I have to (a) bother everybody and (b) out myself as a moron
19:37 AlexDaniel please bother us, we like it
19:37 mr_ron joined #perl6
19:37 n0tjack ha, thanks
19:37 AlexDaniel n0tjack: once you get a hang of perl6 reasonably, you'll probably “feel” where you should poke stuff to make it work :)
19:38 gfldex n0tjack: most holes that where plugged in the docs started as a question
19:38 AlexDaniel so, we have this: https://docs.perl6.org/language/list#​index-entry-%5B_%5D_%28typed_array%29
19:38 mr_ron nine: ping
19:38 AlexDaniel but it does not mention that you can omit .new
19:38 AlexDaniel m: my @b := Array[Int].new(1, 2, 3); say @b
19:38 camelia rakudo-moar 9a3c35: OUTPUT«[1 2 3]␤»
19:38 AlexDaniel m: my @b := Array[Int](1, 2, 3); say @b
19:38 camelia rakudo-moar 9a3c35: OUTPUT«[1 2 3]␤»
19:39 AlexDaniel m: my @b := Array[Int](1, 2, 3); say WHAT @b
19:39 camelia rakudo-moar 9a3c35: OUTPUT«(Array[Int])␤»
19:39 n0tjack ok, so another question. I was able to get my module references working thanks to the channel's help earlier, but now I can't seem to reference a grammar in my module inside a grammar in my script.
19:39 AlexDaniel 「is export」 ?
19:39 n0tjack yeah, did that
19:40 n0tjack this is giving me an error in my script grammar J {rule TOP {^ (<J::Parser::Numeric::J-NUMERIC-LITERAL> | <J-CHARACTER-LITERAL>)* $};....
19:40 n0tjack I tried bald J-NUMERIC-LITERAL without the J::Parser::Numeric:: but nope
19:40 gfldex you may do something nobody ever did before
19:40 n0tjack surely people have exported grammars from modules before
19:41 n0tjack just for code organization purposes
19:41 gfldex can you name one such module? :->
19:41 n0tjack no, that's why I said "surely" ;)
19:41 gfldex Perl 6 is less then 1 year old.
19:41 n0tjack or more than 14, depending on how you count
19:42 AlexDaniel n0tjack: I have created a doc ticket for the previous issue: https://github.com/perl6/doc/issues/1056
19:42 n0tjack AlexDaniel: Awesome!
19:42 gfldex I count the same way then I do with humans. I start after birth.
19:42 AlexDaniel I never liked this way of counting
19:43 AlexDaniel and what is the age before birth? Some random bits in the memory? NaN? A negative number?
19:44 samcv in asian countries age used to be ~1 year old when birth was given
19:44 samcv and then at the end of the year you add one to your age
19:44 AlexDaniel cool
19:45 samcv so you are 1 year old when born, and at the newyears you become 2
19:45 samcv even if you were born in december
19:45 AlexDaniel well, that's a bit inaccurate…
19:45 samcv they have done away with that system though, but that's the traditional form of counting ages
19:45 mr_ron .tell nine Learning Perl 6 website Tip #30 uses a gist by "niner" ( guessing you) to get some module paths.  The code seems out of date and doesn't run with recent Rakudo.  With limited knowledge I created clone of gist that I think DRT https://gist.github.com/ronaldxs/0311813323e​2465321dd27d4eda286af#file-module-source-pl .  Could you check when you get a chance?  Thanks.
19:45 yoleaux mr_ron: I'll pass your message to nine.
19:45 gfldex We usually start with conception and reset the counter at birth. What makes sence because the length pregnancy can vary quite a bit.
19:45 samcv which makes more sense why they have such a big deal on the new years celebrations
19:46 gfldex AlexDaniel: did you check roast for #1056?
19:47 girafe joined #perl6
19:47 AlexDaniel gfldex: I didn't, let's see…
19:49 sufrostico joined #perl6
19:49 AlexDaniel gfldex: yea, nothing
19:49 loveperl joined #perl6
19:50 gfldex m: my $i = Int(42); dd $i;
19:50 camelia rakudo-moar 9a3c35: OUTPUT«Int $i = 42␤»
19:50 shadowpaste "loveperl" at 217.168.150.38 pasted "hashes" (5 lines) at http://fpaste.scsys.co.uk/540231
19:51 gfldex m: my $i = Int.CALL-ME(42); dd $i;
19:51 camelia rakudo-moar 9a3c35: OUTPUT«No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
19:53 Xliff <Xliff> multi method operator<*> (Int, Obj) <- For this to work properly, I'd need to define multi method operator<*> (Obj, Int) too, right?
19:53 loveperl What is the error? http://fpaste.scsys.co.uk/540231?tx=​on&amp;wr=on&amp;submit=Format+it%21
19:53 gfldex I believe to remember a discussion of coercion of buildins that remained inconclusive.
19:54 gfldex loveperl: there is a least a comma missing
19:54 gfldex what did I win?
19:54 AlexDaniel u: PILE
19:54 unicodable6 AlexDaniel, U+1F4A9 PILE OF POO [So] (💩)
19:55 Xliff I think I will write a compose rule for that.
19:55 Xliff <RAlt>&poo
19:55 Xliff The & looks like a pileOpoo, doesn't it?
19:55 [Coke] Xliff: positional arguments are ordered, yes. so you need to specify both orders if you want.
19:55 Xliff If you squint really hard...?
19:55 Xliff [Coke]++ : Thanks!
19:56 pyrimidine joined #perl6
19:57 AlexDaniel Xliff: why not use existing compose file?
19:57 shadowpaste "loveperl" at 217.168.150.38 pasted "hashes" (17 lines) at http://fpaste.scsys.co.uk/540232
19:57 AlexDaniel Xliff: this one, for example: https://github.com/kragen/xcompose
19:57 AlexDaniel Xliff: it has most of the common stuff (like poo)
19:57 jjido joined #perl6
19:57 loveperl What is the error? http://fpaste.scsys.co.uk/54023​2?tx=on&amp;submit=Format+it%21
19:58 AlexDaniel loveperl: that does not look like an error :)
19:58 AlexDaniel loveperl: but yes, { } is a code block instead of a hash in this case
19:59 AlexDaniel loveperl: here: buttons => { }
19:59 AlexDaniel not sure what you meant there
20:00 gfldex m: my \hoh = buttons => { foo => 42, bar => 0 }; dd hoh
20:00 camelia rakudo-moar 9a3c35: OUTPUT«:buttons({:bar(0), :foo(42)})␤»
20:02 gfldex m: my @loh; @loh.push: (buttons => {{ foo => 42, bar => 0 }}); dd @loh
20:02 camelia rakudo-moar 9a3c35: OUTPUT«Array @loh = [:buttons(-> ;; $_? is raw { #`(Block|71101912) ... })]␤»
20:02 gfldex loveperl: do you see the problem?
20:02 dataf3l joined #perl6
20:03 gfldex {} may create a anon Hash but does not have to
20:03 gfldex it's context sensitive in Perl 6
20:03 gfldex one of the few things I don't like in Perl 6
20:03 AlexDaniel I hate this fact, by the way
20:04 AlexDaniel give me different unicode characters for code blocks and hashes and I'll start using them right away…
20:05 loveperl No, that's what I want, is to put in a key two haches
20:05 gfldex m: my @loh; @loh.push: (buttons => %{ { foo => 42, bar => 0 } } ); dd @loh
20:05 camelia rakudo-moar 9a3c35: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: -> ;; $_? is raw { #`(Block|82226488) ... }␤  in block <unit> at <tmp> line 1␤␤»
20:05 RabidGravy well it's not what you want
20:05 gfldex %{} is the texas form of that new literal :)
20:05 jjido joined #perl6
20:06 AlexDaniel m: say %{}
20:06 camelia rakudo-moar 9a3c35: OUTPUT«{}␤»
20:06 AlexDaniel m: say &{}
20:06 camelia rakudo-moar 9a3c35: OUTPUT«{}␤»
20:06 AlexDaniel m: say WHAT &{}
20:06 camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
20:06 AlexDaniel :S
20:07 gfldex m: say WHAT &%{}
20:07 camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
20:07 Xliff AlexDaniel: I'm using WinCompose. Not XCompose.
20:07 AlexDaniel Xliff: oh well…
20:07 gfldex m: say WHAT &&&&&&&&&%{}
20:07 camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
20:07 gfldex :->
20:07 Xliff πoo
20:07 gfldex that's a nice answer to a trick question
20:08 Xliff Whups!
20:08 loveperl No, that's what I want, is to put in a key two hash? http://fpaste.scsys.co.uk/54023​2?tx=on&amp;submit=Format+it%21
20:08 RabidGravy but you're getting something else
20:09 gfldex you need to store the two Hashes in a list first or use a module that provides multi value hashes
20:10 loveperl how would it be?
20:11 gfldex m: my @loh; @loh.push: (buttons => %{ foo => 42}, %{ bar => 0 } ); dd @loh
20:11 camelia rakudo-moar 9a3c35: OUTPUT«Array @loh = [(:buttons({:foo(42)}), {:bar(0)}),]␤»
20:12 gfldex , is the list constructor in Perl 6. () is just for precedence.
20:12 Tonik joined #perl6
20:13 TimToady m: say ().WHAT
20:13 camelia rakudo-moar 9a3c35: OUTPUT«(List)␤»
20:13 TimToady well, mostly
20:13 andrzejku joined #perl6
20:13 flaviusb joined #perl6
20:14 nine mr_ron: pong
20:14 yoleaux 19:45Z <mr_ron> nine: Learning Perl 6 website Tip #30 uses a gist by "niner" ( guessing you) to get some module paths.  The code seems out of date and doesn't run with recent Rakudo.  With limited knowledge I created clone of gist that I think DRT https://gist.github.com/ronaldxs/0311813323e​2465321dd27d4eda286af#file-module-source-pl .  Could you check when you get a chance?  Thanks.
20:14 gfldex I can never remember where I put my empty list.
20:14 gfldex m: say (,).WHAT # the mostly applies to , too
20:14 camelia rakudo-moar 9a3c35: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix , instead␤at <tmp>:1␤------> 3say (,7⏏5).WHAT # the mostly applies to , too␤»
20:17 nine .tell mr_ron Your gist matches what I have lying around here locally
20:17 yoleaux nine: I'll pass your message to mr_ron.
20:18 Ven joined #perl6
20:23 djbkd joined #perl6
20:24 dataf3l joined #perl6
20:24 * AlexDaniel just named one of the variables “$let's-save”
20:29 loveperl How can I multihash?
20:29 AlexDaniel multihash?
20:31 gfldex loveperl: actually, you could use Hash.append, see https://docs.perl6.org/type/Hash#method_append
20:34 cfa joined #perl6
20:36 cfa afternoon all
20:37 cognominal joined #perl6
20:39 cfa regarding group captures in p6, is there a form that's generally considered idiomatic?
20:39 cfa i.e., where in p5 i might write `my ($foo, $bar) = 'foo bar' =~ /(foo) \s+ (bar)/x', ought i use  `my ($foo, $bar) = ('foo bar' ~~ /(foo) \s+ (bar)/).list' in p6, or are named captures considered more appropriate?
20:39 cfa i ask because the ().list requirement seems a little too much like boilerplate for a bread and butter operation like this.
20:41 moritz cfa: in both p5 and p6 you shouldn't use captures withotu checking if the match was successful
20:41 rindolf joined #perl6
20:42 moritz in fact, in p5 it's outright dangerous, because the values of $1, $2. after a failed matched can be just about anything
20:42 RabidGravy I'm tending to think that named captures are the way to go in p6
20:42 moritz IMHO it depends o the compleit of the regex
20:42 moritz for simple things, positional is fine
20:42 cfa moritz: sure, but i use the above expression in an if condition
20:43 gfldex m: my (Any:D $foo, Any:D $bar) = ('ab' ~~ /(c)(d)/).list; say $foo, $bar;
20:43 camelia rakudo-moar 9a3c35: OUTPUT«(Any)(Any)␤»
20:43 gfldex is this a newbug?
20:43 cfa moritz: i can use*
20:43 moritz it's rather   if 'str' ~ rx/.../ { my ($foo, $bar) = $/.list }
20:43 RabidGravy I don't think type smileys work on variables
20:43 cfa oh, that's pretty nice
20:43 gfldex they do
20:44 gfldex m: my Any:D $foo = Any;
20:44 camelia rakudo-moar 9a3c35: OUTPUT«Type check failed in assignment to $foo; expected Any:D but got Any (Any)␤  in block <unit> at <tmp> line 1␤␤»
20:44 moritz gfldex: dunno; my with signature-like lists is something I tend to avoid, since I can never get their semantics straight on the first attempt
20:44 gfldex I know because I complained until TimToady agreed. :->
20:45 RabidGravy ooh so they do
20:46 gfldex m: my (Any:D $foo, Any:D $bar) = ('ab' ~~ /(c)(d)/).list; say $foo.^constraint
20:46 camelia rakudo-moar 9a3c35: OUTPUT«No such method 'constraint' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
20:46 gfldex how do I introspect a contraint?
20:47 RabidGravy m: y Any:D $f = "xx"; say $f.VAR.of
20:47 camelia rakudo-moar 9a3c35: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3y Any:D7⏏5 $f = "xx"; say $f.VAR.of␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statem…»
20:47 RabidGravy m: my Any:D $f = "xx"; say $f.VAR.of
20:47 camelia rakudo-moar 9a3c35: OUTPUT«(Any:D)␤»
20:47 gfldex use variables :D; my ($foo, $bar) = ('ab' ~~ /(c)(d)/).list; say $foo, $bar;
20:48 gfldex m: use variables :D; my ($foo, $bar) = ('ab' ~~ /(c)(d)/).list; say $foo, $bar;
20:48 camelia rakudo-moar 9a3c35: OUTPUT«Type check failed in assignment to $foo; expected type Any:D cannot be itself (perhaps Nil was assigned to a :D which had no default?)␤  in block <unit> at <tmp> line 1␤␤»
20:48 gfldex looks like the contraint isn't set in the inline case
20:48 cfa i guess  if 'foo bar' ~~ /$<foo>=(foo) \s+ $<bar>=(bar)/ { ... }  seems nicer in that instance though
20:49 gfldex m: my (Any:D $foo, Any:D $bar) = ('ab' ~~ /(c)(d)/).list; say $foo.VAR.of
20:49 camelia rakudo-moar 9a3c35: OUTPUT«(Any)␤»
20:49 gfldex yep, not set
20:49 * gfldex fills a rakudobug form
20:51 cfa although the expression itself reads more noisly i suppose; depends on whether you find $<>= helps document the regex in place or not
20:52 cfa moritz: anyway, thanks for your $/.list example
20:53 moritz cfa: you're welcome
20:54 moritz cfa: things become clearer if you move out some of the named captures into separate, named regexes, though of course that only pays off for more complex stuff
20:55 cfa as in https://docs.perl6.org/lang​uage/regexes#Keep_it_small?
20:55 moritz m: my token identifer { <.alpha> \w* }; my token number { \d+ }; if 'foo=42' ~~ / <identifier> '=' <number> / { say ~$<identifier>; say ~$<number> }
20:55 camelia rakudo-moar 9a3c35: OUTPUT«No such method 'identifier' for invocant of type 'Cursor'␤  in block <unit> at <tmp> line 1␤␤»
20:56 moritz cfa: right; I might have written most of that section :-)
20:57 cfa nice :)
20:57 cfa oh, hunh, i can use <foo> instead of $<foo>= ?
20:57 cfa a lot of these examples employ the latter
20:57 jnthn m: if 'foo bar' ~~ /(foo) \s+ (bar)/ { say @() } # another way
20:57 camelia rakudo-moar 9a3c35: OUTPUT«(「foo」 「bar」)␤»
20:58 gfldex I somehow want to use ‚with‘ instead of ‚if‘ in that case.
20:58 moritz cfa: <foo> calls a rule named foo and captures it as $<foo>
20:58 cfa aha, gotcha
20:58 moritz gfldex: even zero-width successful matches are true in boolean context
20:58 moritz gfldex: though with certainly isn't wrong either
20:59 gfldex did we doc the definedness of Match?
21:00 moritz gfldex: it just inherits the definedness from Mu
21:00 moritz that is, defined for instances, undefined for type object
21:01 gfldex with/if refer to the result of ~~ anyways
21:01 pierre_ joined #perl6
21:02 gfldex and /type/Match#(Capture)_method_Bool seams to be wrong (for Match) if the empty match can be True
21:02 rurban joined #perl6
21:04 gfldex moritz: my rx-foo is no match for yours. Could you provide me with a zero-match example please?
21:04 gfldex zero-with even
21:05 pyrimidine joined #perl6
21:05 moritz m: say 'abc' ~~ /^/; say $/.from, ' ',  $/.to, ' ', ?$/
21:05 camelia rakudo-moar 9a3c35: OUTPUT«「」␤0 0 True␤»
21:06 moritz gfldex: ^^
21:06 gfldex tyvm
21:06 cdg joined #perl6
21:07 shadowpaste "ccntrq" at 217.168.150.38 pasted "Hey guys. I am trying to redirect stdout a file. it works in perl5 but i cannot figur out how to do it in perl6. can you help me out?" (12 lines) at http://fpaste.scsys.co.uk/540234
21:10 RabidGravy ccntrq, the space between the function name and the ( is important
21:10 RabidGravy it works if you don't have that
21:11 moritz or leave out the parens altogether
21:11 moritz open 'filename', :w;
21:11 RabidGravy indeed
21:12 gfldex /type/Match is pretty anaemic
21:12 dalek doc: a43c65e | gfldex++ | doc/Type/Match.pod6:
21:12 dalek doc: doc Match.Bool
21:12 dalek doc: review: https://github.com/perl6/doc/commit/a43c65ebb3
21:12 synopsebot6 Link: http://doc.perl6.org/type/Match
21:13 ccntrq RabidGravy thanks alot... that mustbe the third time since i started looking at perl6 that this happened to me...
21:14 RabidGravy it's never bugged me as I have never put spaces there :)
21:14 gfldex m: $*OUT = ‚lala.out‘.IO.open(:w);
21:14 camelia rakudo-moar 9a3c35: ( no output )
21:15 RabidGravy probably should by "my $*OUT" but hey
21:15 zakharyas joined #perl6
21:16 gfldex m: $*OUT = ‚lala.out‘.IO.open(:w); say ‚Camelia sweety, shouldn't you complain?‘;
21:16 camelia rakudo-moar 9a3c35: ( no output )
21:16 ccntrq it is. i just made up this example
21:17 RabidGravy wasn't there some discussion the other day about this
21:19 gfldex where is camelias repo?
21:20 RabidGravy it was more along the lines of shouldn't  the global $*OUT be immutable and you should have to declare a new lexical one
21:21 Ven joined #perl6
21:21 kurahaupo joined #perl6
21:21 gfldex as long as $*OUT spills into modules, this form is at least correct
21:23 araujo joined #perl6
21:24 espadrine joined #perl6
21:25 gfldex m: 'see-irclog.perlgeek.de\perl6\2016-1​2-15#i_13749102'.IO.open(:w).say(‚Or I'm gonna fill your harddrive!‘);
21:25 camelia rakudo-moar 9a3c35: ( no output )
21:26 * gfldex stops being evil
21:29 skids ergh, there is *no* visible difference between ‚ and , on my terminal font.
21:29 moritz .uni ‚,
21:29 gfldex i will use them more carefully then
21:29 moritz unicodable6: ‚,
21:29 unicodable6 moritz, U+002C COMMA [Po] (,)
21:29 unicodable6 moritz, U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
21:30 gfldex m: ‚‘ is the german (and quite a few other contries) equivalent of ''
21:30 camelia rakudo-moar 9a3c35: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3‚‘7⏏5 is the german (and quite a few other co␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement …»
21:31 gfldex skids: how does „“ look for you?
21:32 skids Easier to tell apart, commas cannot be that close on a fixed width font.
21:33 skids Plainly it is the font at fault.
21:34 skids Though there probably should an xkcb about the power of unicode falling into the wrong hands :-)
21:46 dataf3l joined #perl6
21:46 jjido joined #perl6
21:47 AlexDaniel what do you mean by wrong hands?
21:47 geraud joined #perl6
21:47 AlexDaniel people have been using ‚‘ to quote stuff for years
21:47 AlexDaniel and nobody died…
21:49 AlexDaniel mainly because commas are », and quotes are ‚«
21:52 TimToady yes, terms and infixes are far away from each other most of the time
21:54 skids I wasn't referring to anyone here.
21:54 skids Just joking.
21:55 lizmat joined #perl6
21:59 kalkin- btw would be nice if people posting perl6 stuff to r/perl would also post it to r/perl6. I imagine a lot of people who haven't worked with perl, but are interested in perl6 read only r/perl6
21:59 kalkin- (or may be it's just me)
22:00 kalkin- r/perl6 looks so dead. Mostly the posts are weekly summaries and for now the advent stuff
22:01 jjido joined #perl6
22:02 AlexDaniel skids: maybe you will also like this nick: dataf3l
22:02 AlexDaniel (it is not 31)
22:03 cibs joined #perl6
22:04 skids Oh I already kicked away every font where 1 and l looked the same.  Whenever I see one I go straight for the options tab.
22:05 skids Same with I and l
22:05 gfldex .uni dataf3l
22:07 AlexDaniel u: # dataf3l
22:07 unicodable6 AlexDaniel, U+0023 NUMBER SIGN [Po] (#)
22:07 unicodable6 AlexDaniel, U+0020 SPACE [Zs] ( )
22:07 unicodable6 AlexDaniel, U+0064 LATIN SMALL LETTER D [Ll] (d)
22:07 unicodable6 AlexDaniel, https://gist.github.com/6e90​fdf8f8ea5eeffe6c6b70ed1caede
22:07 sufrostico joined #perl6
22:08 dataf3l yes?
22:08 AlexDaniel dataf3l: sorry! We were discussing characters that look alike
22:08 dataf3l I look like a character?
22:08 AlexDaniel dataf3l: n… no… but your nickname…
22:08 dataf3l lol i get it now
22:09 dataf3l I some times uppercase it in order to avoid ambiguity
22:09 dataf3l this L and 1 ambiguity is just useless, in a digital world.
22:10 AlexDaniel I'm not sure if it is a font problem
22:10 AlexDaniel it's just that <:Ll>+\d+ pattern is so common that brain kinda expects it
22:13 * geekosaur learned typing Back In The Day. 0/O and 1/I is not usually a typing error I make, but one I tend to gloss over when reading because you had to with typewritten text >.>
22:14 sufrostico joined #perl6
22:14 nebuchadnezzar joined #perl6
22:14 geekosaur (funny thing, computers don't like it much...)
22:14 jjido joined #perl6
22:15 loveperl joined #perl6
22:15 loveperl How to add an array to a hash?
22:17 AlexDaniel m: my @a = <a b c>; my %h = ‘a’ => 42, ‘b’ => 90, ‘c’ => @a; dd %h
22:17 camelia rakudo-moar 9a3c35: OUTPUT«Hash %h = {:a(42), :b(90), :c($["a", "b", "c"])}␤»
22:18 pyrimidine joined #perl6
22:18 DANtheBEASTman joined #perl6
22:20 susmus joined #perl6
22:21 ilbelkyr joined #perl6
22:21 bjz joined #perl6
22:22 [Coke] my (Any:D $a, Any:D $b) = (Any, Any);
22:22 [Coke] m: my (Any:D $a, Any:D $b) = (Any, Any); # don't need a match
22:22 camelia rakudo-moar 9a3c35: ( no output )
22:23 gfldex [Coke]: I know. (RT#130356)
22:23 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130356
22:23 [Coke] gfldex: sorry, just didn't see it mentioned in backscroll.
22:23 [Coke] my bad.
22:24 gfldex np
22:27 loveperl How to insert in a hash position?
22:27 geekosaur o.O
22:27 AlexDaniel m: my @a = <a b c>; my %h = ‘a’ => 42, ‘b’ => 90; %h<c> = @a; dd %h
22:27 camelia rakudo-moar 9a3c35: OUTPUT«Hash %h = {:a(42), :b(90), :c($["a", "b", "c"])}␤»
22:27 RabidGravy Oooh, segfault
22:28 gfldex loveperl: have you considered to read https://docs.perl6.org/type/Hash ?
22:30 bjz joined #perl6
22:36 wictory[m] joined #perl6
22:38 cfa hmm, is it possible to convert a block to a sub in a straightforward way?
22:38 cfa e.g., say i have a composition:  &foo o &bar
22:38 gfldex there are different control exceptions for blocks and routines
22:38 AlexDaniel cfa: what do you mean by “convert” ?
22:38 cfa rather than assigning to a scalar and calling with (), i'd like to define a new sub
22:39 AlexDaniel run time?
22:39 cfa compile time, ideally
22:39 cfa i want to statically say: function baz is the composition of functions foo and bar
22:39 cfa not: scalar $baz is the block composition of functions (subs) foo and bar
22:39 gfldex cfa: https://docs.perl6.org/type/Callable#in​dex-entry-%E2%88%98_function_combinator
22:40 cfa > my &baz = &foo o &bar
22:40 cfa -> |args is raw { #`(Block|140732936055672) ... }
22:40 cfa > baz.WHAT
22:40 cfa (Block)
22:41 cfa i used infix:<o> above in my example above, note
22:41 AlexDaniel ok, so what is wrong with this?
22:41 AlexDaniel m: sub f($p){ say ‘f’; $p / 2 }; sub g($p){ say ‘g’; $p * 2 }; sub baz($x) { f(g($x)) }; say baz(2)
22:41 camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
22:42 cfa well sure
22:42 cfa i'm asking about composition though
22:42 cfa (i don't mind the answer being 'no')
22:42 cfa but conceptually i want to compose two subs to get a sub
22:42 RabidGravy but it doesn't matter if it's a block, just whether it's a Callable
22:42 cfa well it does
22:42 AlexDaniel m: sub f($p){ say ‘f’; $p / 2 }; sub g($p){ say ‘g’; $p * 2 }; sub baz($x) { (&f ∘ &g)($x) }; say baz(2)
22:42 camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
22:43 cfa because it can't be used as a list op
22:43 cfa baz(10), but not baz 10
22:43 AlexDaniel cfa: what about “my sub” ? Maybe that's what you want?
22:43 gfldex you will need macros for that and they are experimental for very good reason
22:44 cfa gfldex: hmm, okay
22:44 cfa AlexDaniel: looking
22:45 cfa AlexDaniel: but that'll just lexicalise the sub, no?
22:45 AlexDaniel cfa: yes. I just thought that maybe that it could help you
22:45 cfa also, i presume in your last example to camelia each invocation of baz will recompute the composition?
22:46 cfa basically i just wanted to define foo, bar, then a sub baz as their composition
22:46 AlexDaniel well, hopefully not (depends on how it optimizes it)
22:46 gfldex m: sub f($p){ say ‘f’; $p / 2 }; sub g($p){ say ‘g’; $p * 2 }; sub baz($x) { constant &c = &f ∘ &g; c($x) }; say baz(2)
22:46 camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
22:47 cfa if i need to do sub baz($x) { ... } i might as well just call directly
22:47 gfldex i'm not sure if Rakudo is cleaver enough yet to do the inlining correctly
22:47 gfldex m: sub f($p){ say ‘f’; $p / 2 }; sub g($p){ say ‘g’; $p * 2 }; sub baz($x) { constant &c = &f ∘ &g; c($x) }; say baz 2
22:47 camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
22:47 cfa thanks for your examples
22:48 gfldex initialiser expressions of constant are evaluated at compile time
22:48 * cfa nods
22:49 gfldex you may want to do some benchmarking before you use it in a tight loop
22:59 labster joined #perl6
23:09 mr_ron left #perl6
23:32 dalek ecosystem: d4e5257 | samcv++ | META.list:
23:32 dalek ecosystem: Update metafile location for IRC::TextColor
23:32 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d4e5257a4a
23:39 bpmedley joined #perl6
23:42 kcodrgkimd joined #perl6
23:42 skids joined #perl6
23:44 _28_ria joined #perl6
23:52 ugexe anyone able to give wordpress username ugexe permissions to the advent?
23:56 AlexDaniel Hey everyone! Say hello to our new bot!
23:56 statisfiable6 joined #perl6
23:56 AlexDaniel \o/
23:56 AlexDaniel statisfiable6: CORE.setting size
23:56 statisfiable6 AlexDaniel, OK! Working on it…
23:56 AlexDaniel it has all the data cached, actually, but it still takes quite some time to draw a graph and gist it…
23:57 statisfiable6 AlexDaniel, https://gist.github.com/1a9e​3b8a2afdd533460d65d55734c8ff
23:57 AlexDaniel but I hope people won't need that data so urgently

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

Perl 6 | Reference Documentation | Rakudo