»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:02 cognominal left, cognominal joined 00:15 leont left
ugexe How do I get access to post on the advent blog? 00:15
SmokeMachine gfldex: do you think that it would work everywhere to get all builtin types? 00:25
m: say $*REPO.writeable-path.child("doc/Type").dir.grep(*.extension eq "pod6").map({::(.basename.subst(/".pod6"/, ""))})
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␤␤»
SmokeMachine wrong version... 00:26
m: say $*REPO.writeable-path.child("doc/Type").dir.grep(*.extension eq "pod6").map({try {::(.basename.subst(/".pod6"/, ""))}})
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 wamba left
SmokeMachine :( 00:26
00:26 rindolf left
SmokeMachine every perl6 installation have all type documentation on this path? $*REPO.writeable-path.child("doc/Type") 00:27
00:28 donaldh left, KotH joined
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:30
00:31 wamba joined
SmokeMachine ok, that would be better if every type had a method .generate-values() 00:32
00:32 cognominal left
SmokeMachine or .generate-samples() 00:32
00:33 cognominal joined
SmokeMachine oh! that really is a good idea! 00:35
thanks!
00:37 dataf3l joined
geekosaur .oO { role Arbitrary { ... } } 00:38
00:38 espadrine joined, dataf3l left, jdmmmmm left 00:40 hank left 00:42 cibs left 00:43 aborazmeh joined, aborazmeh left, aborazmeh joined 00:44 cibs joined
timotimo ugexe: you need to have a wordpress account and tell someone with admin privileges your username 00:45
00:46 djbkd_ left, djbkd joined 00:51 djbkd left
ugexe timotimo: thanks... know anyone with admin privs? 00:52
00:56 araujo left 00:57 araujo joined, araujo left, araujo joined 01:02 aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined, aborazmeh left, aborazmeh_ is now known as aborazmeh 01:14 Actualeyes joined, canopus left 01:17 maxp_ left 01:20 canopus joined
timotimo i have to look if i have it, ugexe 01:21
what's your user name? best to just put it here in irc and see if someone stops by who can Do It
yes, i should be able to give you access 01:22
01:24 wamba left
MasterDuke timotimo: are you familiar with writing QAST nodes? 01:38
01:39 espadrine left
samcv hello all. how is everybody 01:40
SmokeMachine what does this means? 01:45
===SORRY!===
STable conflict detected during deserialization.
(Probable attempt to load two modules that cannot be loaded together).
why 2 modules could not be loaded together?
I got it!!! I was running .^compose at compile time! 01:54
02:02 cognominal left, kalkin- left, kalkin-_ joined, cognominal joined 02:06 Ven left 02:12 itcharlie_linux joined
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
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␤␤»
SmokeMachine is that expected? 02:17
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-perl6/perl6.moarvm:<dependencies+deserialize>)␤
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␤␤
MasterDuke s: Failure, ? 02:24
SourceBaby MasterDuke, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Prefix ? requires an argument, but no valid term found␤at -e:6␤------> put sourcery( Failure, ? ⏏)[1];␤ expecting any of:␤ prefix␤
MasterDuke s: Failure, ?foo 02:29
SourceBaby MasterDuke, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ foo used at line 6␤␤
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 left, itcharlie_linux joined 02:45 ilbot3 left 02:47 ilbot3 joined 02:50 khw left 02:59 kalkin- joined
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:02 kalkin-_ left 03:06 BenGoldberg joined 03:07 noganex_ joined 03:10 noganex left 03:16 Actualeyes left
ugexe timotimo: ugexe on wordpress 03:18
dudz 41hours to go: www.kickstarter.com/projects/14228...ing-perl-6 03:42
03:47 labster left 03:48 cdg left 03:52 labster joined
astj I just backed the kickstarter project :+1: 03:54
04:02 MasterDuke_ joined 04:04 MasterDuke left 04:09 MasterDuke_ is now known as MasterDuke 04:11 aborazmeh left 04:12 Herby_ joined
Herby_ o/ 04:13
04:17 kurahaupo__ joined 04:19 noganex joined 04:22 noganex_ left
Herby_ i'm getting tripped up trying to implement something similar to python's re.findall 04:27
04:34 itcharlie_linux left
SmokeMachine What's the python re.findall? 04:36
04:38 Herby_ left
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
since there's no guides out there at all
if anybody is curious github.com/perl6/atom-language-per...IBUTING.md
04:44 Actualeyes joined 04:46 Actualeyes1 joined 04:48 Actualeyes left
kurahaupo__ SmokeMachine: in P5 @results = $str =~ /pattern/g; 04:52
05:11 astj left
dalek osystem: f42dab0 | samcv++ | META.list:
Publish IRC::TextColor, style/color for IRC & ANSI color->IRC color

With this module you can add color and style to text for IRC.
You can also take output from the command line which uses ANSI color and convert it to IRC color and styling.
05:15
05:15 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
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:17 BenGoldberg left 05:19 BenGoldberg joined
samcv readme coming in like 15 mins 05:23
readme added 05:32
05:33 bjz joined 05:39 bjz left 05:40 beatdown left 05:41 bjz joined
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:45
05:46 beatdown joined, Cabanossi left, bjz left 05:48 Cabanossi joined 05:50 kurahaupo__ left, kurahaupo__ joined 05:58 beatdown left 06:00 bjz joined 06:07 dataf3l joined 06:11 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek href="https://perl6.org:">perl6.org: 5acd6dd | samcv++ | source/whatever/index.html:
Fix link to Atom syntax highlighter. I used a link to

atom-perl6-editor-tools by accident
06:17
06:23 domidumont joined 06:32 dataf3l left 06:36 aq_ joined, domidumont left 06:37 aq_ left 06:38 BenGoldberg left
samcv u: U+2015 06:43
unicodable6 samcv, U+2015 HORIZONTAL BAR [Pd] (―)
06:47 cognominal left 06:48 Tonik joined 06:50 RabidGravy joined, cognominal joined, cpage__ joined 06:52 cpage left, cpage__ is now known as cpage 06:54 domidumont joined 06:55 darutoko joined 07:00 domidumont left 07:01 domidumont joined 07:02 TEttinger left 07:04 Tonik left
[ptc] morning * 07:07
samcv morning [ptc] 07:08
07:17 aborazmeh left
[ptc] :-) 07:20
07:20 timeless left 07:21 timeless joined
RabidGravy good morning 07:22
07:32 abraxxa joined 07:42 wamba joined 07:43 cpage_ left 07:48 bjz_ joined 07:50 bjz left 07:51 Possum joined, kurahaupo_ joined 07:55 kurahaupo__ left 07:57 kurahaupo__ joined 08:00 kurahaupo_ left 08:02 kurahaupo__ left
andrzejku :) 08:02
RabidGravy, hi
08:03 cognominal left 08:05 cognominal joined 08:18 cognominal left, pyrimidine left 08:20 pyrimidine joined 08:23 zakharyas joined 08:24 cognominal joined 08:35 thayne joined 08:39 thayne left 08:41 cpage_ joined, dakkar joined 08:47 sftp joined 08:56 Actualeyes1 left 09:04 jonas1 joined
lizmat hmmm.... perhaps blogs.perl.org/users/pawel_bbkr_pab...-roll.html should not be listed on pl6anet.org ? 09:05
09:08 wamba left 09:12 rurban joined 09:18 cognominal left 09:20 cognominal joined 09:21 skids joined
lizmat so, it was my understanding that .sprintf is sorta deprecated in favour of .fmt ? 09:35
if so, why is the documentation of .fmt referring to sprintf for more information ?
09:37 Actualeyes joined 09:38 user9 joined, g4 joined 09:42 thayne joined
Xliff Is there a way to force a substitution regexp to ignore whitespace in the substituting part? 09:46
m: my $a = 'inches'; $a ~~ s/ inches / in /; say $a;
camelia rakudo-moar 1b3a00: OUTPUT« in ␤»
Xliff I just want "in".
m: my $a = 'inches'; $a ~~ s/ inches / 'in' /; say $a;
camelia rakudo-moar 1b3a00: OUTPUT« 'in' ␤»
moritz m: my $a = 'inches'; $a ~~ s/ inches /in/; say $a 09:49
camelia rakudo-moar 1b3a00: OUTPUT«in␤»
moritz Xliff: the replacement part is not a regex :-)
m: my $a = 'inches'; $a ~~ s[ inches ] = 'in'; say $a
camelia rakudo-moar 1b3a00: OUTPUT«in␤»
masak I keep wanting to reply to Xliff, but moritz keeps pre-empting me and stealing my lines... :P 09:50
moritz++
Xliff Hmmm... that might work. Thanks morits++
Don't worry. I appreciate you too, masak++
masak whee 09:51
Xliff m: my $a = (s[ inches ] = 'in');
camelia rakudo-moar 1b3a00: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in block <unit> at <tmp> line 1␤␤»
Xliff Damn.
masak it's destructive
it acts on $_
m: my $_ = "inches"; s[ inches ] = 'in'; say $_
camelia rakudo-moar 1b3a00: OUTPUT«Potential difficulties:␤ Redeclaration of symbol '$_'␤ at <tmp>:1␤ ------> 3my $_7⏏5 = "inches"; s[ inches ] = 'in'; say $_␤in␤»
Xliff Yeah. I was hoping to store that tranformation to be used later. 09:52
masak m: $_ = "inches"; s[ inches ] = 'in'; say $_
camelia rakudo-moar 1b3a00: OUTPUT«in␤»
masak Xliff: then you need to put it in a lambda.
lizmat m: say |"A".."F" # unexpected and quiet about it
camelia rakudo-moar 1b3a00: OUTPUT«1.."F"␤»
lizmat I wonder whether |"A" should warn or not
masak m: my &xform = -> { s[ inches ] = 'in' }; say xform("here are all my inches")
camelia rakudo-moar 1b3a00: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
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␤␤»
masak m: my &xform = -> $_ is copy { s[ inches ] = 'in'; $_ }; say xform("here are all my inches")
camelia rakudo-moar 1b3a00: OUTPUT«here are all my in␤»
masak Xliff: there ya go :)
Xliff masak++
09:54 rindolf joined
lizmat m: say |"A".."F" # masak opinions? 09:54
camelia rakudo-moar 1b3a00: OUTPUT«1.."F"␤»
masak lizmat: my reaction is "...what?" 09:58
lizmat yeah.. I had something similar
jnthn |"A" binds tigher than .. 10:00
I guess the range them is like "wtf do I do this a Slip...eh, let's .Numeric it!" :) 10:01
10:01 pmurias joined
jnthn *with a 10:01
arnsholt Operator precedence strikes again!
pmurias jnthn: question in regards with repossession, some ops change stuff without triggering repossession? is that intended or NYI? 10:02
jnthn: push triggers it, pop doesn't
masak oh, it's about operator precedence
then I'm less likely to want a change
arnsholt I have some sympathy for the Smalltalk position of "everything's the same precedence and left-associative"
masak unless we feel that this one deserves a compiler warning 10:03
jnthn pmurias: It's been added on stuff that needs it... :)
masak but tbh it feels more like a linter thing
jnthn pmurias: Which isn't the most consistent answer, I agree :)
masak arnsholt: I have some sympathy for the Lisp position of "precedence? what's that?"
arnsholt Yeah, that too. It's just a shame that the syntax of Lisp drives me nuts =) 10:05
lizmat well, just wondering whether it would warrant a ticket for a warning ? 10:10
10:16 ufobat joined
jnthn IMHO it's just not a common enough thing to run into to warrant it 10:17
So, for linters, I think
lizmat this was actually from an example in a new Perl 6 book
for "a".."f", "k", "l" -> $letter { .say $letter } 10:18
m: for "a".."f", "k", "l" -> $letter { .say $letter }
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…»
lizmat m: for "a".."f", "k", "l" -> $letter { say $letter }
camelia rakudo-moar 1b3a00: OUTPUT«"a".."f"␤k␤l␤»
lizmat m: for |"a".."f", "k", "l" -> $letter { say $letter }
camelia rakudo-moar 1b3a00: OUTPUT«1.."f"␤k␤l␤»
lizmat m: for |("a".."f", "k", "l") -> $letter { say $letter }
camelia rakudo-moar 1b3a00: OUTPUT«"a".."f"␤k␤l␤»
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␤»
jnthn for flat "a".."f", "k", "l" -> $letter { say $letter }
m: for flat "a".."f", "k", "l" -> $letter { say $letter }
camelia rakudo-moar 1b3a00: OUTPUT«a␤b␤c␤d␤e␤f␤k␤l␤»
lizmat yeah, that too :-)
ufobat good morning :D
lizmat (running one more spectest)
jnthn Making the mistake in a book would be one good way to make it common enough to warrant a compiler warning, though :P
I just didn't see it before, is all, while I know we had people trip over ^5.pick a bunch 10:20
lizmat perhaps the book should mention it as a gotcha :-) 10:21
10:23 AlexDaniel joined 10:24 wamba joined
lizmat jnthn: fix pushed 10:24
10:24 [particle] left
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 10:33 skids left, Vynce joined 10:37 Actualeyes left 10:47 cibs left 10:48 cognominal left 10:49 cognominal joined, cibs joined 10:50 Ven joined 10:52 SHODAN joined 10:55 protium left 10:56 andrzejku left 10:57 protium joined, andrzejku joined 11:00 wamba left 11:09 grondilu joined 11:10 labster left 11:17 wamba joined
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:17
11:18 donaldh joined
jnthn pmurias: Potentially, yes 11:21
Feel free to add tests if you can trigger some :) 11:23
11:34 [particle]1 joined, [particle] left
Xliff Is there any way to create constants at runtime? 11:47
Or at least something that acts like such?
Dynamic sigil-less vars?
11:47 rurban left
moritz lexically scoped: my \x = 42; say x 11:48
m: my \x = 42; say x
camelia rakudo-moar b28604: OUTPUT«42␤»
moritz they are assign-once
Xliff Got that, but can it be done via symbol table manipulation?
Because I will only know the proper name at run-time. 11:49
jnthn m: my \x = 42; say ::('x')
camelia rakudo-moar b28604: OUTPUT«42␤»
11:49 sena_kun joined
jnthn Can use that to look them up dynamically 11:49
Xliff Right, but I need to set them dynamically, too.
jnthn Then use a hash or a package instead 11:50
The set of lexical symbols is always settled at compile time in Perl 6.
Xliff kk
jnthn (That's how we can do nice things like detect typo'd sub calls :))
11:51 aindilis left 11:52 lukaramu joined
masak .oO( this is why we can have nice things ) 11:57
12:04 dogbert17_ joined, Vynce left, andrzeju_ joined 12:05 dj_goku_ joined, dogbert17 left, andrzejku left, dj_goku left, donaldh left
AlexDaniel unicodable6: hi 12:06
unicodable6 AlexDaniel, U+000E SHIFT OUT [Cc] (control character)
AlexDaniel, U+000F SHIFT IN [Cc] (control character)
AlexDaniel, U+008E SINGLE SHIFT TWO [Cc] (control character)
AlexDaniel, gist.github.com/7549c3cadc5374ed98...7deaf82c93
12:06 Spot__ left, mrsolo left, w4and0er96_ joined
AlexDaniel hehe, unicodable at 11GB right now :) 12:07
12:07 unicodable6 left, flaviusb left, tadzik left 12:08 unicodable6 joined, w4and0er96 left, solarbunny left, w4and0er96_ is now known as w4and0er96, dalek left 12:09 mrsolo joined 12:15 bjz_ left, bjz joined 12:20 tadzik joined 12:29 rindolf left 12:33 pyrimidine left 12:42 rindolf joined 12:43 pyrimidine joined 12:47 pyrimidine left, rurban joined 12:50 dalek joined, ChanServ sets mode: +v dalek, solarbunny joined
mniip how do I express haskell's ($ value) with perl6's partial application? 12:51
I was expecting (*("hi"))(*.ords) to work but it does something else apparently 12:58
sena_kun mniip, what exatcly you want to do? 13:01
mniip a function that takes a function as argument and applies it to a fixed value 13:02
sena_kun mniip, map?
arnsholt m: say ({ .("hi") })(&ords)
camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
arnsholt That's as close as I've gotten so far 13:03
*.("hi") doesn't parse the way I need it to
13:03 cognominal left
mniip huh, what does that syntax even mean 13:03
{ . <...> } 13:04
13:04 evalable6 left, benchable6 left, committable6 left, unicodable6 left, bisectable6 left, cognominal joined, benchable6 joined, evalable6 joined, committable6 joined, ChanServ sets mode: +v committable6, bisectable6 joined, unicodable6 joined, ChanServ sets mode: +v bisectable6
arnsholt { } is a block, so that creates a closure 13:04
.(...) invokes the value in $_, which is the argument passed in, in this case 13:05
More explicit would be
m: say ({ $^fun.("hi") })(&ords)
camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
arnsholt Or
m: say (-> $fun { $fun.("hi") })(&ords)
camelia rakudo-moar b28604: OUTPUT«(104 105)␤»
mniip naw that is too explicit
13:06 spebern joined, spebern left, spebern joined, spebern left, spebern joined, pyrimidine joined
mniip huh? f.(x) = f(x)? I need to recheck perl6's syntax 13:07
AlexDaniel m: say ((~*)("hi")).map(*.ords)
camelia rakudo-moar b28604: OUTPUT«((104 105))␤»
arnsholt No, that's not it 13:09
That stringifies "hi" and then calls map on it
AlexDaniel yea, well, I did not really understand the question :)
arnsholt m: say (*.foo).WHAT 13:10
camelia rakudo-moar b28604: OUTPUT«(WhateverCode)␤»
arnsholt m: say (*.("hi")).WHAT
camelia rakudo-moar b28604: OUTPUT«No such method 'CALL-ME' for invocant of type 'Whatever'␤ in block <unit> at <tmp> line 1␤␤»
arnsholt I *think* that might be a parser bug
Or maybe just an unfortunate limitation of how the grammar decides between a Whatever term and a WhateverCode 13:11
m: say (*("hi")).WHAT
camelia rakudo-moar b28604: OUTPUT«No such method 'CALL-ME' for invocant of type 'Whatever'␤ in block <unit> at <tmp> line 1␤␤»
jnthn At least it's consistent between the two :) 13:12
AlexDaniel eval: say ‘hi
evalable6 AlexDaniel, Full output: gist.github.com/33015507858e12dccd...79be28af7f
AlexDaniel, rakudo-moar b286048: OUTPUT«(exit code 1) 04===SORRY!04=== Error while compiling /tmp/ie1255R6iS␤Unable to p…»
AlexDaniel samcv++
arnsholt jnthn: There is that =) 13:13
13:14 canopus left
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
(I have no idea how a WhateverCode is constructed, rather than just a Whatever)
jnthn Dobut it 13:16
*doubt
After all...
m: say (*<a>)({ a => 42 }) 13:17
camelia rakudo-moar b28604: OUTPUT«42␤»
jnthn that works, and there's no sub postcircumfix:['< >'] either :)
13:18 dogbert17 joined 13:19 itcharlie_linux joined 13:22 canopus joined 13:24 thayne left
arnsholt Hmm 13:29
13:30 abraxxa left
arnsholt jnthn: Looks like postcircumfix:<( )> isn't in the list of postcircumfixes allowed by the code to be whatever-curried 13:35
Not clear to me if it's intentional or an oversight though
13:36 lizmat left
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:37
dalek c/coke/levenshtein: 68d2c37 | coke++ | doc/Language/operators.pod6:
fix typo
13:47
AlexDaniel [Coke]: wrong branch? 13:48
13:50 perlpilot joined
[Coke] yup, but that's already on master, 'sfine. 13:50
(I think)
13:53 khw joined 13:55 stmuk_ joined 13:57 stmuk left 13:59 Ven left 14:04 Spot__ joined 14:08 cdg joined 14:10 cdg left, cdg_ joined 14:15 Guest59158 left
[Coke] 's panda-behind-the-firewall&proxy is failing to get a JSON file again. bah. 14:17
14:20 zakharyas left 14:21 pierre_ joined 14:22 dataf3l joined
[Coke] which is weird, because I can download the file myself. panda just complains about empty metadata. :| 14:23
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
14:24 giraffe joined
[Coke] ... and now it worked. wtf? 14:24
14:24 giraffe is now known as Guest71260
jnthn m: class f { has @.s }; say f.new(s => [1,2,3]).s 14:26
camelia rakudo-moar b28604: OUTPUT«[1 2 3]␤»
jnthn tbrowder: Like that?
14:27 Actualeyes joined
tbrowder jnthn: thank you! 14:27
14:27 skids joined 14:28 thayne joined 14:29 dataf3l left
[Coke] jnthn: with latest, rakudo, in the doc repo, I now get: 14:31
perl6 htmlify.p6 --parallel=3
===SORRY!===
unlock when we're not locked!
14:31 Actualeyes left
[Coke] Could that use a golf? 14:31
(actually has 3 different failure modes, one of which is a segv) 14:32
jnthn [Coke]: Yes...that suggests some quite impressive screw-up
(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 left, cognominal joined 14:37 dataf3l joined
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
14:44 lizmat joined 14:49 cognominal left 14:51 pmurias left 14:53 lizmat left, cognominal joined 14:55 lizmat joined 14:56 spebern left 14:57 pmurias joined 15:00 pyrimidine left, pyrimidine joined 15:01 lizmat left, Actualeyes joined, Perl6Robot joined
Perl6Robot OHAI! 15:01
15:01 Perl6Robot left 15:02 pierre_ left 15:03 r joined 15:04 cognominal left, r is now known as Guest65126 15:06 cognominal joined 15:07 sufrostico left 15:09 sufrostico joined
moritz \o/ more robots! 15:12
15:18 sufrostico left 15:19 cognominal left, cognominal joined 15:20 sufrostico joined 15:23 user9 left, user9 joined 15:29 n0tjack joined 15:30 jonas1 left
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:31
jnthn use lib 'lib' instead, perhaps? 15:32
n0tjack I tried that, and tried having bar.pm6 in the same dir as foo. No joy. I'm doing something wrong. 15:33
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.
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 Guest65126 left
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
moritz *facepalm* 15:37
n0tjack my confusion stemmed from the fact that I thought I could spread modules out across files in p6
15:42 ufobat left 15:44 pierre_ joined 15:49 bpmedley left 15:50 khw left
ugexe or just write the proper mapping in META6.json? 15:58
n0tjack ugexe: Not familiar with that, but on a quick google, looks like it's what I need, I'll dig into it, thanks 15:59
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
n0tjack aha, I thought I wasn't constrained to module name ~~ file name
ugexe github.com/Leont/tap-harness6/blob.../META.info 16:01
16:01 wamba left
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:01
ugexe: yes, that link is exactly what I need 16:02
16:08 lichtkind joined 16:10 sufrostico left 16:11 pyrimidine left 16:12 pyrimidine joined, dataf3l left
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:13
16:14 andrzejku joined, dataf3l joined 16:15 dataf3l left 16:16 pyrimidine left 16:19 wamba joined 16:20 tony-o_ is now known as tony-o, donaldh joined 16:22 sufrostico joined 16:23 pyrimidine joined, aindilis joined 16:26 thayne left 16:27 pyrimidine left 16:29 Actualeyes left 16:32 pierre__ joined 16:34 cognominal left 16:35 cognominal joined, pyrimidine joined 16:36 pierre_ left, domidumont left
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
16:43 djbkd_ joined 16:44 zakharyas joined
SmokeMachine How do I use $?RESOURCES without installing the module? 16:45
16:46 pyrimidine left, Actualeyes joined, pyrimidine joined, andrzejku left 16:47 khw joined
b2gills m: dd Array[Numeric](+«1234.comb) 16:47
camelia rakudo-moar 9a3c35: OUTPUT«Array[Numeric].new(1, 2, 3, 4)␤»
n0tjack b2gills++ 16:50
I always forget which way the pointy end is supposed to point...
b2gills m: dd 1234.comb»[0] 16:51
camelia rakudo-moar 9a3c35: OUTPUT«("1", "2", "3", "4")␤»
b2gills It points towards the smaller thing 16:52
m: say 1,2,3,4 »+» 2
camelia rakudo-moar 9a3c35: OUTPUT«1236␤»
n0tjack b2gills: Is there some sense in which the + operation is smaller than the array 1 2 3 4?
b2gills s/smaller/fewer/ 16:53
n0tjack I mean unary +, not binary +
in the case of +<< ["1","2","3","4"]
perlpilot n0tjack: I always remember it by thinking about which way the blunt end should point.
yoleaux 02:38Z <SmokeMachine> perlpilot: Now Test::Fuzz has generators "pluggable" it uses the method generate-samples(::?CLASS:U:) on the object type...
b2gills there is only one &prefix:<+> shown, but 4 strings. at least thats how I remember
n0tjack perlpilot: what is your intuition about the blunt end in that example? 16:54
b2gills: yeah, I can see that, maybe it'll work as a mnemonic for me
16:55 g4 left, andrzejku joined
perlpilot n0tjack: the blunt end always points to the side that is listy (or that has more things to process) 16:55
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 :)
n0tjack as in "hey, you elements, get in my operator!"
TimToady it's a megaphone for the operator to shout at the many operands 16:57
n0tjack ha! 16:58
well, now that's a mnemonic
donaldh o/
TimToady or a telescope and a microscope, in the case of 1,2,3,4 »+» 2
donaldh I created a Perl 6 keyboard layout for macOS - github.com/donaldh/Perl6-macOS-keyboard 16:59
Just sharing in case anyone finds it useful.
n0tjack I was just thinking about how to type Unicode >> right before you sent that/
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:00
17:01 dataf3l joined
[Coke] donaldh++ 17:02
perlpilot n0tjack: compact expression is the main benefit. There's also visual distinction sometimes. 17:03
17:04 telex left 17:06 telex joined 17:07 susmus left 17:08 susmus joined
sena_kun rt.perl.org/Public/Bug/Display.html?id=130211 can be closed. 17:09
[Coke] sena_kun: need a pointer to tests first.
sena_kun [Coke], github.com/perl6/roast/commit/a9fd...b598cb624a 17:10
[Coke] looks like zoffix just added it.
and closed the ticket.
sena_kun Ah, I'm too slow. :) 17:11
17:16 nebuchadnezzar left
n0tjack what's the best resource, ideally tutorial rather than reference, for understanding typecasting and coercion? 17:17
17:18 nebuchadnezzar joined 17:21 TEttinger joined 17:22 domidumont joined 17:26 lizmat joined 17:27 bdmatatu joined
bdmatatu p6: say <a1 a2 a3>.map({S/a/x/}).perl 17:30
camelia rakudo-moar 9a3c35: OUTPUT«("x3", "x3", "x3").Seq␤»
17:30 dakkar left
bdmatatu I was expecting x1 x2 x3 17:30
AlexDaniel bdmatatu: interesting… looks like there's something wrong with .perl? 17:35
bisect: say <a1 a2 a3>.map({S/a/x/}).perl
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
AlexDaniel, Output on both points: ("x3", "x3", "x3").Seq
AlexDaniel commit: all say <a1 a2 a3>.map({S/a/x/}).perl
committable6 AlexDaniel, gist.github.com/e5004d10ec77d2addd...0d6f1a6771
17:37 donaldh left
bdmatatu p6: say <a1 a2 a3>.map({ S/a/x/ })[0] 17:39
camelia rakudo-moar 9a3c35: OUTPUT«x1␤»
bdmatatu p6: say <a1 a2 a3>.map({ S/a/x/ }).eager[0]
camelia rakudo-moar 9a3c35: OUTPUT«x3␤»
AlexDaniel m: say <a1 a2 a3>.map({S/huh//}) 17:40
camelia rakudo-moar 9a3c35: OUTPUT«(a1 a2 a3)␤»
AlexDaniel m: say eager <a1 a2 a3>.map({S/huh//})
camelia rakudo-moar 9a3c35: OUTPUT«(a3 a3 a3)␤»
AlexDaniel huggable: bug report 17:41
huggable AlexDaniel, nothing found
AlexDaniel huggable: bug
huggable AlexDaniel, nothing found
AlexDaniel huggable: report bug
huggable AlexDaniel, nothing found
AlexDaniel meh
bdmatatu: anyway, this looks like a bug, can you submit a ticket?
bdmatatu Okay, sure, thanks
17:43 domidumont left
AlexDaniel how can I get the size of some file? 17:49
ugexe .IO.s 17:50
i *think* 17:51
AlexDaniel ugexe: right… the docs are wrong :-/ 17:52
“Returns Bool::True if the invocant is a path and the size is bigger then 0.” – yeah… well…
ugexe at the very least s/is a path/is a regular file/ 17:57
17:57 rurban left
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␤␤»
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␤␤»
AlexDaniel m: say ‘.bashrc’.IO.s
camelia rakudo-moar 9a3c35: OUTPUT«35␤»
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␤␤»
ugexe m: my $file = $*TMPDIR.child("foo.tmp"); $file.open(:c); say $file.s 18:02
camelia rakudo-moar 9a3c35: OUTPUT«0␤»
18:04 cognominal left 18:05 Actualeyes left 18:06 cognominal joined 18:11 lizmat left
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
looks good :)
AlexDaniel ?
the color thing? 18:18
samcv evalable6, say '
evalable6 samcv, Full output: gist.github.com/00e1cdf695fcf9f9aa...03bc9af04e
samcv, rakudo-moar 9a3c350: OUTPUT«(exit code 1) 04===SORRY!04=== Error while compiling /tmp/b8CQTcOdxx␤Unable to p…»
samcv yeah
18:18 wamba left
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
also good morning everyone
Xliff \o 18:20
Mornings are never good, samcv. Just tolerable.
<- Night Owl
AlexDaniel samcv: I don't think I like that part with a Str being rw there
I was expecting a new string to be returned
Xliff: I agree :-| 18:21
Xliff AlexDaniel++ # Owls together, man!
samcv AlexDaniel, there's one that returns a new string and one that doesn't
that work the same way
AlexDaniel mornings are only good if you had like 11 hours to sleep… which is what I did today
samcv irc-text returns a new string, irc-style does the action on the string you give it 18:22
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)
samcv good question. lol. i could remove one of them :P
18:24 sena_kun left, loveperl joined
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
or even some other routine name even i guess
AlexDaniel 🤷
18:28 lucasb joined 18:29 pyrimidine left, pyrimidine joined
samcv AlexDaniel, ? 18:33
AlexDaniel samcv: I'm only using ansi-to-irc right now :) 18:34
samcv yeah but which name is better though
18:34 pyrimidine left 18:35 jjido joined
AlexDaniel “style-irc-text”? This is the only one that sounds like a verb :) 18:35
18:36 bdmatatu left
AlexDaniel I dunno really, I don't feel like coming up with good names today 18:37
lucasb don't blame yourself, that's one of the hardest problems in computer science 18:41
...naming 18:42
samcv i'll have all the things return a copy 18:45
gonna go with style-irc-text
maybe. i wish it were shorter tho. could make it irc-style… hmm
18:52 loveperl left 18:53 domidumont joined 18:54 dataf3l left 18:55 ridofself joined
ridofself Failed to open file /home/ridofself/.perl6/precomp/4F2986EC86EC577C7E9279547564C2E1 18:56
A9E9E5A9.1481806511.89096/C7/C712FE6969F786C9380D643DF17E85D06868219E.repo-id: perm
ission denied
sorry, didn't mean to send that yet 18:57
18:58 loveperl joined
ridofself I'm unable to run test files using the command perl6 t/whatever.t -- i recieve that error 18:58
receive*
18:58 jjido left
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?
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
the user for that file that is. 19:01
ridofself is rakudo the user or something like that?
gfldex s/user/owner/
gfldex .oO( ENOTEA )
lucasb you are the user 19:02
19:02 n0tjack left
ridofself running the command sudo chmod 775 precomp/ -R does nothing, is that because I'm using sudo? 19:04
if I omit it, the operation's not permitted
19:04 cognominal left
lucasb you can just 'rm -rf .perl' and start over 19:06
ridofself oh! okay!
lucasb oops, type 'rm -rf ~/.perl6'
19:06 jjido joined
lucasb hopes this is harmless :) 19:07
19:07 lizmat joined
gfldex ridofself: chmod will only produce output on error 19:07
19:07 cognominal joined
ridofself when i make install, should i I do it as sudo? 19:08
gfldex well, unless you provide -v
no
ridofself the instructions at perl6.org/downloads says to install at /opt/rakudo-star-2016.11 19:10
and I can't seem to do that as a normal user without sudo
19:11 sufrostico left
gfldex the # at the beginning of the line indicates that you need root permissions for that step 19:12
i'm not sure that those instructions are well tested 19:13
lucasb the instructions are not very clear 19:14
and I wouldn't recommend to install on the system dirs, but rather under your home dir
ridofself all right, I'm going to run them as root and we'll see
oops
gfldex i strongly doubt that works 19:15
star will install a few modules as root under $HOME
you will at least need a root login shell to run Configure.pl
lucasb ridofself: try with this: perl Configure.pl --gen-moar --prefix ~/rakudo-star 19:16
and then put "$HOME/rakudo-star/bin" in your PATH env var
ridofself okay -- it will take a bit to install but I'll let you know how it goes, thanks!
19:17 darutoko left
ridofself no good -- Configure.pl at ~/rakudo-star FAILed -- permission denied when 19:23
19:23 wamba joined
ridofself "generating src/gen/config/c" 19:23
config.c
19:27 n0tjack joined
n0tjack How can I do this my Numeric @a = +<< $m.made; return @a; without the intermediate assignment to a throw-away name? 19:28
19:29 setty1 left, pyrimidine joined, jjido left, setty1 joined
gfldex n0tjack: that's not enough context for proper advice 19:30
19:30 setty1 left
AlexDaniel gfldex: why not? He wants to turn an Array into Array[Numeric] 19:31
19:32 setty1 joined
AlexDaniel m: my @b = 1, 5, 9; say WHAT Array[Numeric].new(@b) 19:32
camelia rakudo-moar 9a3c35: OUTPUT«(Array[Numeric])␤»
AlexDaniel n0tjack: what about this? ↑
19:32 jjido joined
n0tjack AlexDaniel: Thanks, that will work. Not super clean, syntactically, but an improvement. 19:33
AlexDaniel n0tjack: oh, you can drop .new
19:34 perlpilot left
AlexDaniel m: my @b = 1, 5, 9; say WHAT Array[Numeric](@b) 19:34
camelia rakudo-moar 9a3c35: OUTPUT«(Array[Numeric])␤»
AlexDaniel m: my @b = 1, 5, 9; say Array[Numeric](@b)
camelia rakudo-moar 9a3c35: OUTPUT«[1 5 9]␤»
19:34 labster joined
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
n0tjack Now that's what I'm after.
I don't need it cleaner than that; that's what I wanted.
thank you 19:35
19:35 cdg_ left
AlexDaniel n0tjack: np, I didn't know about this too 19:35
19:35 pierre__ left 19:36 pierre_ joined
AlexDaniel (I just tried it and it worked :) ) 19:36
n0tjack my problem is I don't know how to look this stuff up
AlexDaniel n0tjack: no idea either
n0tjack so I have to (a) bother everybody and (b) out myself as a moron
AlexDaniel please bother us, we like it 19:37
19:37 mr_ron joined
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 :)
gfldex n0tjack: most holes that where plugged in the docs started as a question 19:38
AlexDaniel so, we have this: docs.perl6.org/language/list#index...d_array%29
mr_ron nine: ping
AlexDaniel but it does not mention that you can omit .new
m: my @b := Array[Int].new(1, 2, 3); say @b
camelia rakudo-moar 9a3c35: OUTPUT«[1 2 3]␤»
AlexDaniel m: my @b := Array[Int](1, 2, 3); say @b
camelia rakudo-moar 9a3c35: OUTPUT«[1 2 3]␤» 19:39
AlexDaniel m: my @b := Array[Int](1, 2, 3); say WHAT @b
camelia rakudo-moar 9a3c35: OUTPUT«(Array[Int])␤»
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.
AlexDaniel 「is export」 ?
n0tjack yeah, did that
this is giving me an error in my script grammar J {rule TOP {^ (<J::Parser::Numeric::J-NUMERIC-LITERAL> | <J-CHARACTER-LITERAL>)* $};.... 19:40
I tried bald J-NUMERIC-LITERAL without the J::Parser::Numeric:: but nope
gfldex you may do something nobody ever did before
19:40 pierre_ left
n0tjack surely people have exported grammars from modules before 19:40
just for code organization purposes 19:41
gfldex can you name one such module? :->
n0tjack no, that's why I said "surely" ;)
gfldex Perl 6 is less then 1 year old.
n0tjack or more than 14, depending on how you count
AlexDaniel n0tjack: I have created a doc ticket for the previous issue: github.com/perl6/doc/issues/1056 19:42
n0tjack AlexDaniel: Awesome!
gfldex I count the same way then I do with humans. I start after birth.
AlexDaniel I never liked this way of counting 19:43
and what is the age before birth? Some random bits in the memory? NaN? A negative number?
samcv in asian countries age used to be ~1 year old when birth was given 19:44
and then at the end of the year you add one to your age
AlexDaniel cool
samcv so you are 1 year old when born, and at the newyears you become 2 19:45
even if you were born in december
AlexDaniel well, that's a bit inaccurate…
samcv they have done away with that system though, but that's the traditional form of counting ages
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 gist.github.com/ronaldxs/031181332...-source-pl . Could you check when you get a chance? Thanks.
yoleaux mr_ron: I'll pass your message to nine.
gfldex We usually start with conception and reset the counter at birth. What makes sence because the length pregnancy can vary quite a bit.
samcv which makes more sense why they have such a big deal on the new years celebrations
gfldex AlexDaniel: did you check roast for #1056? 19:46
19:47 girafe joined
AlexDaniel gfldex: I didn't, let's see… 19:47
19:49 sufrostico joined, loveperl left
AlexDaniel gfldex: yea, nothing 19:49
19:49 loveperl joined
gfldex m: my $i = Int(42); dd $i; 19:50
19:50 ridofself left
camelia rakudo-moar 9a3c35: OUTPUT«Int $i = 42␤» 19:50
shadowpaste "loveperl" at 217.168.150.38 pasted "hashes" (5 lines) at fpaste.scsys.co.uk/540231
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␤␤»
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? fpaste.scsys.co.uk/540231?tx=on&...rmat+it%21
gfldex I believe to remember a discussion of coercion of buildins that remained inconclusive.
19:53 jjido left
gfldex loveperl: there is a least a comma missing 19:54
what did I win?
AlexDaniel u: PILE
unicodable6 AlexDaniel, U+1F4A9 PILE OF POO [So] (💩)
Xliff I think I will write a compose rule for that. 19:55
<RAlt>&poo
19:55 pyrimidine left
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.
Xliff If you squint really hard...?
[Coke]++ : Thanks!
19:56 pyrimidine joined
AlexDaniel Xliff: why not use existing compose file? 19:57
shadowpaste "loveperl" at 217.168.150.38 pasted "hashes" (17 lines) at fpaste.scsys.co.uk/540232
19:57 lucasb left
AlexDaniel Xliff: this one, for example: github.com/kragen/xcompose 19:57
Xliff: it has most of the common stuff (like poo)
19:57 jjido joined
loveperl What is the error? fpaste.scsys.co.uk/540232?tx=on&...rmat+it%21 19:57
AlexDaniel loveperl: that does not look like an error :) 19:58
19:58 andrzejku left
AlexDaniel loveperl: but yes, { } is a code block instead of a hash in this case 19:58
loveperl: here: buttons => { } 19:59
not sure what you meant there
20:00 pyrimidine left
gfldex m: my \hoh = buttons => { foo => 42, bar => 0 }; dd hoh 20:00
camelia rakudo-moar 9a3c35: OUTPUT«:buttons({:bar(0), :foo(42)})␤»
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) ... })]␤»
gfldex loveperl: do you see the problem?
20:02 dataf3l joined
gfldex {} may create a anon Hash but does not have to 20:03
it's context sensitive in Perl 6
20:03 jjido left
gfldex one of the few things I don't like in Perl 6 20:03
AlexDaniel I hate this fact, by the way
give me different unicode characters for code blocks and hashes and I'll start using them right away… 20:04
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
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␤␤»
RabidGravy well it's not what you want
gfldex %{} is the texas form of that new literal :)
20:06 jjido joined, zakharyas left
AlexDaniel m: say %{} 20:06
camelia rakudo-moar 9a3c35: OUTPUT«{}␤»
AlexDaniel m: say &{}
camelia rakudo-moar 9a3c35: OUTPUT«{}␤»
AlexDaniel m: say WHAT &{}
camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
AlexDaniel :S
gfldex m: say WHAT &%{} 20:07
camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
Xliff AlexDaniel: I'm using WinCompose. Not XCompose.
AlexDaniel Xliff: oh well…
gfldex m: say WHAT &&&&&&&&&%{}
camelia rakudo-moar 9a3c35: OUTPUT«(Hash)␤»
gfldex :->
Xliff πoo
gfldex that's a nice answer to a trick question
Xliff Whups! 20:08
loveperl No, that's what I want, is to put in a key two hash? fpaste.scsys.co.uk/540232?tx=on&...rmat+it%21
RabidGravy but you're getting something else
gfldex you need to store the two Hashes in a list first or use a module that provides multi value hashes 20:09
loveperl how would it be? 20:10
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)}),]␤»
gfldex , is the list constructor in Perl 6. () is just for precedence. 20:12
20:12 Tonik joined
TimToady m: say ().WHAT 20:13
camelia rakudo-moar 9a3c35: OUTPUT«(List)␤»
TimToady well, mostly
20:13 domidumont left, andrzejku joined, flaviusb joined
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 gist.github.com/ronaldxs/031181332...-source-pl . Could you check when you get a chance? Thanks.
gfldex I can never remember where I put my empty list.
m: say (,).WHAT # the mostly applies to , too
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:15 lizmat left
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 20:21 dataf3l left 20:22 n0tjack left 20:23 djbkd joined 20:24 dataf3l joined
AlexDaniel just named one of the variables “$let's-save” 20:24
20:26 Ven left 20:27 djbkd_ left
loveperl How can I multihash? 20:29
AlexDaniel multihash?
20:31 rindolf left
gfldex loveperl: actually, you could use Hash.append, see docs.perl6.org/type/Hash#method_append 20:31
20:34 cfa joined, cognominal left 20:35 jjido left
cfa afternoon all 20:36
20:37 cognominal joined
cfa regarding group captures in p6, is there a form that's generally considered idiomatic? 20:39
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?
i ask because the ().list requirement seems a little too much like boilerplate for a bread and butter operation like this.
20:39 dataf3l left
moritz cfa: in both p5 and p6 you shouldn't use captures withotu checking if the match was successful 20:41
20:41 rindolf joined
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
moritz IMHO it depends o the compleit of the regex
for simple things, positional is fine
cfa moritz: sure, but i use the above expression in an if condition
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)␤»
gfldex is this a newbug?
cfa moritz: i can use*
moritz it's rather if 'str' ~ rx/.../ { my ($foo, $bar) = $/.list }
RabidGravy I don't think type smileys work on variables
cfa oh, that's pretty nice
gfldex they do
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␤␤»
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
gfldex I know because I complained until TimToady agreed. :->
RabidGravy ooh so they do 20:45
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␤␤»
gfldex how do I introspect a contraint?
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…»
RabidGravy m: my Any:D $f = "xx"; say $f.VAR.of
camelia rakudo-moar 9a3c35: OUTPUT«(Any:D)␤»
gfldex use variables :D; my ($foo, $bar) = ('ab' ~~ /(c)(d)/).list; say $foo, $bar; 20:48
m: use variables :D; my ($foo, $bar) = ('ab' ~~ /(c)(d)/).list; say $foo, $bar;
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␤␤»
gfldex looks like the contraint isn't set in the inline case
cfa i guess if 'foo bar' ~~ /$<foo>=(foo) \s+ $<bar>=(bar)/ { ... } seems nicer in that instance though
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)␤»
gfldex yep, not set
gfldex fills a rakudobug form
cfa although the expression itself reads more noisly i suppose; depends on whether you find $<>= helps document the regex in place or not 20:51
moritz: anyway, thanks for your $/.list example 20:52
moritz cfa: you're welcome 20:53
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:54
cfa as in docs.perl6.org/language/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> }
camelia rakudo-moar 9a3c35: OUTPUT«No such method 'identifier' for invocant of type 'Cursor'␤ in block <unit> at <tmp> line 1␤␤»
moritz cfa: right; I might have written most of that section :-) 20:56
cfa nice :) 20:57
oh, hunh, i can use <foo> instead of $<foo>= ?
a lot of these examples employ the latter
jnthn m: if 'foo bar' ~~ /(foo) \s+ (bar)/ { say @() } # another way
camelia rakudo-moar 9a3c35: OUTPUT«(「foo」 「bar」)␤»
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>
cfa aha, gotcha
moritz gfldex: even zero-width successful matches are true in boolean context
gfldex: though with certainly isn't wrong either
gfldex did we doc the definedness of Match? 20:59
moritz gfldex: it just inherits the definedness from Mu 21:00
that is, defined for instances, undefined for type object
gfldex with/if refer to the result of ~~ anyways 21:01
21:01 pierre_ joined
gfldex and /type/Match#(Capture)_method_Bool seams to be wrong (for Match) if the empty match can be True 21:02
21:02 rurban joined
gfldex moritz: my rx-foo is no match for yours. Could you provide me with a zero-match example please? 21:04
zero-with even
21:05 pyrimidine joined
moritz m: say 'abc' ~~ /^/; say $/.from, ' ', $/.to, ' ', ?$/ 21:05
camelia rakudo-moar 9a3c35: OUTPUT«「」␤0 0 True␤»
moritz gfldex: ^^ 21:06
gfldex tyvm
21:06 cdg joined
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 fpaste.scsys.co.uk/540234 21:07
RabidGravy ccntrq, the space between the function name and the ( is important 21:10
it works if you don't have that 21:11
moritz or leave out the parens altogether
open 'filename', :w;
RabidGravy indeed
21:11 andrzejku left
gfldex /type/Match is pretty anaemic 21:12
dalek c: a43c65e | gfldex++ | doc/Type/Match.pod6:
doc Match.Bool
synopsebot6 Link: doc.perl6.org/type/Match
ccntrq RabidGravy thanks alot... that mustbe the third time since i started looking at perl6 that this happened to me... 21:13
RabidGravy it's never bugged me as I have never put spaces there :) 21:14
gfldex m: $*OUT = ‚lala.out‘.IO.open(:w);
camelia ( no output )
RabidGravy probably should by "my $*OUT" but hey 21:15
21:15 zakharyas joined
gfldex m: $*OUT = ‚lala.out‘.IO.open(:w); say ‚Camelia sweety, shouldn't you complain?‘; 21:16
camelia ( no output )
ccntrq it is. i just made up this example
RabidGravy wasn't there some discussion the other day about this 21:17
gfldex where is camelias repo? 21:19
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:20
21:21 Ven joined, kurahaupo joined
gfldex as long as $*OUT spills into modules, this form is at least correct 21:21
21:22 araujo left 21:23 araujo joined 21:24 espadrine joined
gfldex m: 'see-irclog.perlgeek.de\perl6\2016-12-15#i_13749102'.IO.open(:w).say(‚Or I'm gonna fill your harddrive!‘); 21:25
camelia ( no output )
gfldex stops being evil 21:26
21:26 pmurias left
skids ergh, there is *no* visible difference between ‚ and , on my terminal font. 21:29
moritz .uni ‚,
gfldex i will use them more carefully then
moritz unicodable6: ‚,
unicodable6 moritz, U+002C COMMA [Po] (,)
moritz, U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
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 …»
gfldex skids: how does „“ look for you? 21:31
21:32 zakharyas left
skids Easier to tell apart, commas cannot be that close on a fixed width font. 21:32
Plainly it is the font at fault. 21:33
Though there probably should an xkcb about the power of unicode falling into the wrong hands :-) 21:34
21:36 loveperl left 21:46 dataf3l joined, jjido joined, geraud1 left
AlexDaniel what do you mean by wrong hands? 21:47
21:47 geraud joined
AlexDaniel people have been using ‚‘ to quote stuff for years 21:47
and nobody died…
mainly because commas are », and quotes are ‚« 21:49
TimToady yes, terms and infixes are far away from each other most of the time 21:52
21:53 rurban left 21:54 kurahaupo left
skids I wasn't referring to anyone here. 21:54
Just joking.
21:55 lizmat joined, jjido left 21:57 Tonik left
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
(or may be it's just me)
22:00 pierre_ left
kalkin- r/perl6 looks so dead. Mostly the posts are weekly summaries and for now the advent stuff 22:00
22:00 labster left 22:01 girafe left, jjido joined, jjido left, bjz left, cibs left
AlexDaniel skids: maybe you will also like this nick: dataf3l 22:02
(it is not 31)
22:03 sufrostico left, cibs joined
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:04
Same with I and l 22:05
gfldex .uni dataf3l
AlexDaniel u: # dataf3l 22:07
unicodable6 AlexDaniel, U+0023 NUMBER SIGN [Po] (#)
AlexDaniel, U+0020 SPACE [Zs] ( )
AlexDaniel, U+0064 LATIN SMALL LETTER D [Ll] (d)
AlexDaniel, gist.github.com/6e90fdf8f8ea5eeffe...70ed1caede
22:07 sufrostico joined
dataf3l yes? 22:08
AlexDaniel dataf3l: sorry! We were discussing characters that look alike
dataf3l I look like a character?
AlexDaniel dataf3l: n… no… but your nickname…
dataf3l lol i get it now 22:09
I some times uppercase it in order to avoid ambiguity
22:09 skids left
dataf3l this L and 1 ambiguity is just useless, in a digital world. 22:09
AlexDaniel I'm not sure if it is a font problem 22:10
it's just that <:Ll>+\d+ pattern is so common that brain kinda expects it
22:12 sufrostico left
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:13
22:13 ilbelkyr left, susmus left, nebuchadnezzar left 22:14 sufrostico joined, nebuchadnezzar joined
geekosaur (funny thing, computers don't like it much...) 22:14
22:14 jjido joined 22:15 loveperl joined
loveperl How to add an array to a hash? 22:15
22:16 jjido left
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 left, pyrimidine joined, DANtheBEASTman joined 22:20 susmus joined 22:21 ilbelkyr joined, bjz joined
[Coke] my (Any:D $a, Any:D $b) = (Any, Any); 22:22
m: my (Any:D $a, Any:D $b) = (Any, Any); # don't need a match
camelia ( no output )
gfldex [Coke]: I know. (RT#130356) 22:23
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130356
[Coke] gfldex: sorry, just didn't see it mentioned in backscroll.
my bad.
gfldex np 22:24
loveperl How to insert in a hash position? 22:27
geekosaur o.O
AlexDaniel m: my @a = <a b c>; my %h = ‘a’ => 42, ‘b’ => 90; %h<c> = @a; dd %h
camelia rakudo-moar 9a3c35: OUTPUT«Hash %h = {:a(42), :b(90), :c($["a", "b", "c"])}␤»
RabidGravy Oooh, segfault
22:28 bjz left
gfldex loveperl: have you considered to read docs.perl6.org/type/Hash ? 22:28
22:30 bjz joined 22:36 wictory[m] joined, bjz left
cfa hmm, is it possible to convert a block to a sub in a straightforward way? 22:38
e.g., say i have a composition: &foo o &bar
gfldex there are different control exceptions for blocks and routines
AlexDaniel cfa: what do you mean by “convert” ?
cfa rather than assigning to a scalar and calling with (), i'd like to define a new sub
AlexDaniel run time? 22:39
cfa compile time, ideally
i want to statically say: function baz is the composition of functions foo and bar
not: scalar $baz is the block composition of functions (subs) foo and bar
gfldex cfa: docs.perl6.org/type/Callable#index...combinator 22:40
cfa > my &baz = &foo o &bar
-> |args is raw { #`(Block|140732936055672) ... }
> baz.WHAT
(Block)
i used infix:<o> above in my example above, note 22:41
AlexDaniel ok, so what is wrong with this?
m: sub f($p){ say ‘f’; $p / 2 }; sub g($p){ say ‘g’; $p * 2 }; sub baz($x) { f(g($x)) }; say baz(2)
camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
cfa well sure 22:42
i'm asking about composition though
(i don't mind the answer being 'no')
but conceptually i want to compose two subs to get a sub
RabidGravy but it doesn't matter if it's a block, just whether it's a Callable
cfa well it does
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)
camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
cfa because it can't be used as a list op 22:43
baz(10), but not baz 10
AlexDaniel cfa: what about “my sub” ? Maybe that's what you want?
gfldex you will need macros for that and they are experimental for very good reason
cfa gfldex: hmm, okay 22:44
AlexDaniel: looking
AlexDaniel: but that'll just lexicalise the sub, no? 22:45
AlexDaniel cfa: yes. I just thought that maybe that it could help you
cfa also, i presume in your last example to camelia each invocation of baz will recompute the composition?
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)
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)
camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
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
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
camelia rakudo-moar acece7: OUTPUT«g␤f␤2␤»
22:47 rindolf left
cfa thanks for your examples 22:47
gfldex initialiser expressions of constant are evaluated at compile time 22:48
cfa nods
gfldex you may want to do some benchmarking before you use it in a tight loop 22:49
22:51 cpage_ left 22:52 RabidGravy left 22:59 labster joined 23:08 lukaramu left 23:09 mr_ron left 23:10 wamba left 23:13 Ven left 23:28 espadrine left
dalek osystem: d4e5257 | samcv++ | META.list:
Update metafile location for IRC::TextColor
23:32
23:39 bpmedley joined 23:42 kcodrgkimd joined, _28_ria left 23:43 skids joined 23:44 _28_ria joined
ugexe anyone able to give wordpress username ugexe permissions to the advent? 23:52
AlexDaniel Hey everyone! Say hello to our new bot! 23:56
23:56 statisfiable6 joined
AlexDaniel \o/ 23:56
statisfiable6: CORE.setting size
statisfiable6 AlexDaniel, OK! Working on it…
AlexDaniel it has all the data cached, actually, but it still takes quite some time to draw a graph and gist it…
statisfiable6 AlexDaniel, gist.github.com/1a9e3b8a2afdd53346...d55734c8ff 23:57
AlexDaniel but I hope people won't need that data so urgently
23:58 labster left