»ö« 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:00 cpage_ joined
Zoffix Don't seem to have any package related to that on ubuntu fork that I use, sorry :/ No idea what that error is about. 00:00
When you figure out, maybe open a ticket for an LTA (Less Than Awesome) error message. There may be a way to make it more helpful.
huggable, rakudobug
huggable Zoffix, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
00:02 nadim left 00:12 skids joined 00:13 mvorg left
timotimo atweiden: your error comes from trying to Something::Something[$foo] where Something::Something isn't a role 00:26
m: Foo::Bar[1] 00:28
camelia rakudo-moar a4cc1c: OUTPUT«Could not find symbol '&Bar'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use NativeCall Foo::Bar[1]
camelia rakudo-moar a4cc1c: OUTPUT«===SORRY!===␤Could not find symbol '&Bar'␤»
timotimo m: use NativeCall; NativeCall[1] 00:29
camelia rakudo-moar a4cc1c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤NativeCall cannot be parameterized␤at <tmp>:1␤------> 3use NativeCall; NativeCall[1]7⏏5<EOL>␤»
timotimo hm
00:37 pierre_ joined 00:40 bioduds left, bioduds joined
bioduds Im checking custom operators 00:40
very cool
so, I don't like the concatenation operator ~
I can have a custom operator that does the same as the ~ , right? 00:41
00:41 canopus left
bioduds would that be simple to do? or would I need to rewrite the whole ~ operator? 00:41
timotimo no, you can just re-use the ~ operator to define your custom operator 00:44
m: my &infix:<++> = &infix:<~>; say "hello" ++ "world"
camelia rakudo-moar 547fc5: OUTPUT«helloworld␤»
timotimo here's an example 00:45
BBL
00:46 canopus joined
atweiden timotimo: the Something::Something[$foo] pattern DNE in my code 00:54
i'm unable to do this for instance `has TXN::Parser::AST::Entry::Posting @.posting is required;`
timotimo OK, how is Posting declared? and imported? 00:55
atweiden `use TXN::Parser::AST::Entry::Posting;`
which is a unit class
timotimo what's the unit class called exactly?
atweiden separate file
this is Entry.pm bitbucket.org/atweiden/txn-parser-...ew-default
Posting.pm bitbucket.org/atweiden/txn-parser-...ew-default
timotimo hm, interesting 00:56
00:56 leont joined
timotimo m: class Foo { }; class Foo::Bar { }; class test { has Foo $.foo } 00:57
camelia ( no output )
timotimo m: class Foo::Bar { }; class Foo { }; class test { has Foo $.foo }
camelia ( no output )
timotimo m: class Foo::Bar::Baz { }; class Foo::Bar { }; class Foo { }; class test { has Foo::Bar $.foo }
camelia ( no output )
timotimo m: class Foo::Bar::Baz { }; class Foo::Bar { }; class Foo { }; class test { has Foo::Bar::Baz $.foo }
camelia ( no output )
timotimo strange 00:58
but i'll go to bed now, can't be of further assistance :(
01:00 cognominal joined 01:05 grondilu joined, pierre_ left, [Coke] left, [Coke] joined 01:07 pierre_ joined 01:15 pierre_ left 01:16 Zoffix left 01:17 leont left 01:21 pierre_ joined 01:22 pierre_ left
dalek ateverable: 76a72a3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Oops
01:23
ateverable: 0868027 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Oops
01:23 pierre_ joined, cognominal left 01:25 mst left 01:34 bisectable6 joined, bisectable6 left 01:35 bisectable6 joined, committable6 joined
BenGoldberg m: enum <A B C>; say 3 * C; 01:41
camelia rakudo-moar 547fc5: OUTPUT«6␤»
01:41 rkazak left
BenGoldberg m: enum <A B C>; say 4 +| C; 01:41
camelia rakudo-moar 547fc5: OUTPUT«6␤»
01:45 ilbot3 left 01:46 TimToady left 01:47 ilbot3 joined 01:48 TimToady joined 01:49 rkazak joined 02:02 erdic joined
SmokeMachine____ m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); @a.grep(*.type ~~ Str) 02:04
camelia rakudo-moar 547fc5: OUTPUT«Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
SmokeMachine____ hi! whats wrong with that?
MasterDuke m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); @a.grep({ .type ~~ Str }) 02:08
camelia ( no output )
MasterDuke m: class Bind{has $.type}; my @a = Bind.new(:type(Int)), Bind.new(:type(Str)); say @a.grep({ .type ~~ Str })
camelia rakudo-moar 547fc5: OUTPUT«(Bind.new(type => Str))␤»
02:09 mst joined
SmokeMachine____ but whats wrong with the * version? 02:09
bioduds thanks timotimo, youre the best
SmokeMachine____ m: my @a = ^10; say @a.grep: * %% 2 02:10
camelia rakudo-moar 547fc5: OUTPUT«(0 2 4 6 8)␤»
SmokeMachine____ m: my @b = Int, Str; say @b.grep: * ~~ Str 02:12
camelia rakudo-moar 547fc5: OUTPUT«((Str))␤»
02:12 k-man joined
SmokeMachine____ m: my @c = :type(Int), :type(Str); say @c.grep: *<type> ~~ Str 02:13
camelia rakudo-moar 547fc5: OUTPUT«Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
02:23 Actualeyes left 02:24 rkazak left
dalek ateverable: 687c840 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (3 files):
Have only one list of releases

Changed 2016.07 to 2016.07.1. Also added 2016.08.1 which should be available shortly.
02:25
02:25 mcmillhj left 02:27 cpage_ left 02:33 rkazak joined, ggherdov joined, wamba joined
BenGoldberg m: sub foo($bar) { constant $baz = $bar; say $baz }; foo(1); foo(2); 02:39
camelia rakudo-moar 547fc5: OUTPUT«(Mu)␤(Mu)␤»
BenGoldberg m: enum abc <a b c>; constant bca = {abc.enums}.invert; bca{1}.say;
camelia rakudo-moar 547fc5: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while…»
BenGoldberg m: enum abc <a b c>; constant cba = {abc.enums}.invert; say cba; 02:40
camelia rakudo-moar 547fc5: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while…»
BenGoldberg m: enum abc <a b c>; constant cba = abc.enums; say cba;
camelia rakudo-moar 547fc5: OUTPUT«Map.new((:a(0),:b(1),:c(2)))␤»
BenGoldberg m: enum abc <a b c>; constant cba = abc.enums; say cba.invert; 02:41
camelia rakudo-moar 547fc5: OUTPUT«(0 => a 2 => c 1 => b)␤»
02:41 Actualeyes joined
BenGoldberg m: enum abc <a b c>; constant cba = abc.enums.invert; say cba{2}; 02:42
camelia rakudo-moar 547fc5: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: enum abc <a b c>; constant cba = abc.enums.invert.Map; say cba{2};
camelia rakudo-moar 547fc5: OUTPUT«c␤»
BenGoldberg m: enum abc <a b c>; sub foo { constant cba = abc.enums.invert.Map; say cba.WHERE }; foo() for ^20; 02:44
camelia rakudo-moar 547fc5: OUTPUT«139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤139966692521064␤1399…»
02:48 noganex_ joined 02:51 noganex left
dalek ateverable: 326c44a | (Aleks-Daniel Jakimenko-Aleksejev)++ | Whateverable.pm6:
Restore SLIGHTLY-RESTRICTED setting

Guess what, we kinda lost it during the transition to Perl 6 bots.
In fact, now I see that not all of the things were restricted. Whoops!
Hopefully we will be able to get rid of it soon. See issue #25.
02:57
02:58 canopus left 03:04 SmokeMachine____ joined, Actualeyes left, Actualeyes joined 03:07 canopus joined 03:09 bisectable6 left 03:10 committable6 left, committable6 joined, bisectable6 joined
timotimo pff. yet another sleepless night apparently 03:13
03:14 BuildTheRobots joined
avuserow_ is there a way to cast an integer to an int8 or similar? `$my-int.int8` doesn't seem to do it, any other ideas? 03:15
timotimo jnthn: i was wondering about exception handling with regards to a react/supply + whenever; if i have something like "whenever $socket.Supply -> { ... }" and the thing that creates the values throws an exception - like when it can't decode a string - how is the user supposed to signify she wants to catch/handle that exception?
m: my Int $foo = 999; say (my int8 $ = $foo)
camelia rakudo-moar 547fc5: OUTPUT«-25␤»
timotimo m: my Int $foo = 999; say (my uint8 $ = $foo) 03:16
camelia rakudo-moar 547fc5: OUTPUT«231␤»
timotimo m: await start { next };
camelia rakudo-moar 547fc5: OUTPUT«===SORRY!===␤next without loop construct␤»
timotimo m: await start { next }; CONTROL { default { .say } }
camelia rakudo-moar 547fc5: OUTPUT«===SORRY!===␤next without loop construct␤»
timotimo aaw
03:18 pierre_ left
avuserow_ m: my Int $foo = 999; my $t = int8; say (my $t $ = $foo); # can I do the type indirectly? 03:18
camelia rakudo-moar 547fc5: OUTPUT«5===SORRY!5===␤Two terms in a row␤at <tmp>:1␤------> 3Int $foo = 999; my $t = int8; say (my $t7⏏5 $ = $foo); # can I do the type indirect␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤ postfix…»
timotimo types of lexicals are compile-time constructs
m: my Int $foo = 999; constant $t = int8; say (my ::($t) $ = $foo); 03:19
camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: my Int $foo = 999; say (my int8 $ = $foo);
camelia rakudo-moar 547fc5: OUTPUT«-25␤»
timotimo hum.
03:19 zacts joined
geekosaur well. that was "fun" 03:20
m: my Int $foo = 999; my $t = int8; say (my ::($t) $ = $foo);
camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
geekosaur m: my Int $foo = 999; constant $t = int8; say (my ::($t) $ = $foo);
camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
geekosaur m: my Int $foo = 999; BEGIN my $t = int8; say (my ::($t) $ = $foo); 03:21
camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
geekosaur oh, hm, that wouldn't work anyway
m: my Int $foo = 999; BEGIN my $t = 'int8; say (my ::($t) $ = $foo);
camelia rakudo-moar 547fc5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3my $t = 'int8; say (my ::($t) $ = $foo);7⏏5<EOL>␤ expecting any of:␤ single quotes␤ …»
geekosaur er
m: my Int $foo = 999; BEGIN my $t = 'int8'; say (my ::($t) $ = $foo);
camelia rakudo-moar 547fc5: OUTPUT«X::TypeCheck::Assignment exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
geekosaur feh
I get the idea, but that seems a bit LTA 03:22
avuserow_ okay. I'll investigate if this makes sense later. I'll work on the more interesting bit first :) 03:25
03:25 pierre_ joined 03:28 simcop2387 joined 03:30 pierre_ left
geekosaur well, as mentioned, it's compile time. but I do wonder if the compile time variants I tried should work 03:30
...in any case that exception kinda sucked; taking note, will rakudobug later when it doesn't take me 4 tries to type rakudo >.> 03:31
03:35 kyclark_ joined 03:40 harmil_ joined, harmil_ left
harmil Ah, I had another browser! :) 03:41
Anyone know why this never finishes the second "say" but the first works fine? my @N = 0..*; say @N.grep({.is-prime})[^20]; say @N.grep({(2**$_-1).is-prime})[^20] 03:42
Also, is there a timeout on the evalbot?
timotimo there is, yes
03:43 wamba left
timotimo m: sleep 100; say "haha" 03:43
camelia rakudo-moar 547fc5: OUTPUT«(timeout)»
harmil m: my @N = 0..*; say @N.grep({.is-prime})[^20]; say @N.grep({(2**$_-1).is-prime})[^20]
camelia rakudo-moar 547fc5: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71)␤(2 3 5 7 13 17 19 31 61 89 107 127 521 607 1279 2203 2281 3217 4253 4423)␤»
timotimo well, that seems to work
harmil Oh! So I need to update it seems
03:43 pierre_ joined
timotimo i can hardly believe 2 ** 71 - 1 is just 4423 03:44
03:44 zacts left
timotimo m: say 2 ** 71 - 1 03:44
camelia rakudo-moar 547fc5: OUTPUT«2361183241434822606847␤»
timotimo it's ... not :)
harmil No, I think that's the 20th mersien (sp?) prime
timotimo oh, haha, you're not using the first list for the second %) 03:45
harmil No, just proving the first worked
geekosaur mersenne? 03:47
timotimo yeah, mersenne primes
harmil geekosaur: Probably. I'm as good at spelling as Perl is at ... okay, Perl is good at everything, but I had a point, dagnabbit! 03:48
timotimo harmil: if you want it to spit out new results until the timeout hits, you can ".say for" instead of "say (...)[^20]"
03:48 pierre_ left, pierre_ joined
harmil In my install it was just hanging on the second one forever 03:49
rebuilding now
Nope, after rebuild (2016.08.1-21-g547fc51) the second expression still hangs... grrr 03:53
timotimo huh. i claimed json parsing took half of the time it takes to start gtk::simple, but now i'm only measuring about 10%?!? 03:55
03:59 rkazak left 04:02 atweiden left
timotimo OK, threw out some of the debug output and i'm back to the same measurement i had before 04:03
*phew*
oh, no, the difference is whether it's the first time after installing or a subsequent run
m: say 4 / 27 04:04
camelia rakudo-moar 547fc5: OUTPUT«0.148148␤»
timotimo 15% is still significant, though. on the first run, 50% of the start-up time can melt down bo about 1% of what it was, after that, 15% can melt down to about 1/37th of what it was 04:05
timotimo tries to sleep
04:07 khw left 04:08 rkazak joined, zacts joined
geekosaur precomp? 04:10
04:12 Cabanossi left 04:13 Cabanossi joined 04:20 cognominal joined 04:23 kyclark_ left, khw joined 04:25 bjz left 04:26 rkazak left 04:31 bjz joined 04:40 notbenh joined 04:42 movlex joined 04:44 cognominal left, pierre_ left 04:47 itaipu joined 04:49 khw left 04:53 pierre_ joined 04:58 pierre_ left 04:59 skids left 05:02 lizmat left 05:04 rkazak joined, woolfy left 05:11 pierre_ joined 05:15 pierre_ left 05:18 nadim joined 05:20 brrt joined 05:24 itaipu left 05:29 zacts left, pierre_ joined 05:33 Kaffe joined, pierre_ left 05:44 zacts joined 05:47 nadim left, pierre_ joined 05:50 lizmat joined 05:52 pierre_ left 05:54 zengargoyle left 05:55 zengargoyle joined 05:59 pierre_ joined 06:05 nadim joined 06:07 labster joined, BenGoldberg left 06:08 firstdayonthejob joined 06:10 lizmat left, harmil left 06:12 brrt left, brrt joined
Woodi m: say 24 / 7 06:18
camelia rakudo-moar 597052: OUTPUT«3.428571␤»
06:19 brrt left 06:21 rindolf joined, lizmat joined 06:31 VnrycepuxO left 06:32 pyrimidi_ joined, CIAvash joined 06:37 firstdayonthejob left 06:43 rba_ left 06:44 brrt joined 06:49 leont joined, movlex left 06:50 movl joined, domidumont joined 06:54 domidumont left, domidumont joined 06:56 bjz left 06:58 brrt left 06:59 Actualeyes left 07:01 Actualeyes joined 07:04 kjs_ joined 07:09 kjs_ left
nadim Morning, I have to install a module by hand, rakudo/install/share/perl6/site seems to be the place (one o them) is there a need for a lib sub directory below that ? 07:11
07:11 darutoko joined 07:12 bjz joined
lizmat would be surprised if there would need to be 07:14
nadim just tried doesn't work better than putting it there without the lib directory. I assume that module A::B would be installed under one of the 'paths P6 searches '/A/B.pm 07:16
07:24 RabidGravy joined 07:25 zakharyas joined 07:27 leont left 07:28 mrsolo joined 07:31 leont joined 07:34 bjz left 07:40 cognominal joined 07:41 rba_ joined 07:46 bjz joined 07:57 lizmat left 08:01 leont left 08:02 bjz left 08:03 cognominal left 08:04 leont joined 08:06 g4 joined, g4 left, g4 joined 08:08 kjs_ joined 08:09 bjz joined
dalek line-Perl5: 9828e67 | niner++ | / (2 files):
Add --test and --install options to configure.pl6

With this one can install Inline::Perl5 without any dependencies and without a module manager.
08:13
nine mst: ^^^
mst ooooo 08:14
masak m: grammar G { regex TOP { <blip>* }; regex blip { "b" (\d) } }; class Act { method TOP($/) { make $<blip>>>.ast }; method blip($/) { my $name = ~$0; make $name } }; G.parse("b1b2", :actions(Act.new)); .say for $/.ast
camelia rakudo-moar 945b91: OUTPUT«1␤2␤»
masak so far so good, but...
m: grammar G { regex TOP { <blip>* }; regex blip { "b" (\d) } }; class Act { method TOP($/) { make $<blip>>>.ast }; method blip($/) { my $name = ~$0; make class :: { method foo { $name } } } }; G.parse("b1b2", :actions(Act.new)); say .foo for $/.ast
camelia rakudo-moar 945b91: OUTPUT«2␤2␤»
masak I know there are some gotchas with creating classes inside routines, but... "2\n2\n"? 08:15
nine mst: hope this makes your work easier :) 08:17
08:19 rkazak left
masak I need to make this code not "stick" in the above way: github.com/masak/007/blob/18c61f17...#L253-L256 08:20
08:23 mcmillhj joined
masak who would've thought that creating an anonymous class with an overridden ^name meta-method would come back to bite me in any way? :P 08:23
nine masak: you don't say?
masak I was very happy when I tried it an it solved all my problems 08:24
but yes, it was probably a nuclear chainsaw, in retrospect 08:25
what I really need is to lift 007 onto a proper MOP
08:26 lizmat joined 08:27 mcmillhj left
mst masak: this is one of those times when my brain goes "y'know, string eval might've actually been less horrible" 08:28
masak mst: it was one of those "do I stop here and refactor, or do I just carve a peg of the exact shape that will work in this particular case?" kind of moments 08:30
so, yes, I have a MOP-overriding anonymous class in my code as a kind of technical debt
I seem to recall I started down the virtuous refactoring path first, but gave up because it was a lot of work 08:31
masak tries string EVAL
08:33 lizmat left, pierre_ left, leont left
masak hey, that worked 08:33
m: say EVAL "42" 08:34
camelia rakudo-moar 945b91: OUTPUT«42␤»
masak also nice that constant strings can be EVAL'd now without hysterics :D
08:35 lizmat joined 08:36 mvorg joined 08:37 mcmillhj joined 08:39 pierre_ joined 08:41 TEttinger left 08:42 domidumont left, mcmillhj left 08:43 domidumont joined 08:49 mcmillhj joined 08:51 Skarsnik joined 08:54 mcmillhj left
jnthn masak: From backlog: classes ain't closures. Just add an attribute to your anon class and throw a .new after it? :) 09:00
09:01 zakharyas left
masak jnthn: aye, but I needed it to be a type object... 09:02
(for silly reasons)
jnthn oh
Then do a parametric role and pass it in is a parameter
masak hm :) 09:03
also need it to be a class, not a role... :P
(and please don't ask why, or I'll be ashamed)
09:03 nadim left
masak anyway, that would have been a nice idea in a less debt-laden situation 09:04
09:04 nadim joined, leont joined, pierre_ left
jnthn masak: So call .^pun on the thing? :) 09:05
masak that... might work. 09:06
but I think it's time to gradually work my way out of the mess I created, instead of adding to it :P
jnthn Sounds like, yes :P :P
.oO( Can I offer you a technical mortgage? )
09:07
09:07 zakharyas joined 09:08 pierre_ joined
masak learns that closing a mortgage, either naturally bit by bit, or with a lump sum, is called "redemption" 09:09
time for some technical redemption...
El_Che I think DrForr is the next talk at yapc eu 09:10
is preparing is laptop
masak ooh
El_Che h
nadim nine: Hi, could we meet for 5 mn around lunch time, I need your help
masak watches the live stream at www.youtube.com/watch?v=A3ZSt5QKEAg 09:11
El_Che He jumped on the vim-as-slides bandwagon :) 09:12
he now pointing to #perl6 :) 09:13
masak waves back 09:14
El_Che (Danmark) 09:16
"Someone would correct me" :)
09:19 mls joined, newcomer25 joined 09:21 newcomer25 left
tadzik oh wow, an actual livestream :) 09:24
mst row, row, row your bloat, gently up the streeeeeam 09:27
jast down the stream is easier, though
masak .oO( please feel free to watch with me, but do *not* cross the streams )
jast and in my experience bloat takes the path of least resistance 09:29
09:30 perlawhirl joined 09:31 zakharyas left 09:38 mcmillhj joined 09:42 bjz left 09:43 mcmillhj left 09:47 smls joined, leont left 09:50 kjs_ left
masak interesting that DrForr++ lumps chaining comparison operators together with comparisons with junctions in them 09:50
09:52 nadim left 09:56 Skarsnik left
masak oh, later the junctions show up. probably just a mis-slide, then 10:04
El_Che I hate the inbetween laptop setups
we've been mostly lucky at fosdem
10:06 lizmat left 10:09 melezhik joined
melezhik HI all! 10:10
masak hi melezhik!
melezhik Does perl6 allow to have a conditional expressions which retrun a value? Like in ruby?
$a = if $b > 1 { 10 } else { 20 }
something like that ... 10:11
jnthn sure, though $a = $b > 1 ?? 10 !! 20 is a neater way
masak m: my $b = 5; my $a = do if $b > 1 { 10 } else { 20 }; say $a
camelia rakudo-moar 9ccd84: OUTPUT«10␤»
jnthn But they way you had it will parse if you stick "do2 before the if
*"do"
masak like that ^^^
melezhik jnthn, masak thanks, will try 10:12
masak melezhik: but yes, what jnthn++ said. ?? !! is the conditional operator. so unless you're doing something very funny, that's the one you want
melezhik yeah, I need really not a conditional operator
but let me try ... 10:13
masak m: say 1 R?? 2 !! 3
camelia rakudo-moar 9ccd84: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot reverse the args of because conditional operators are too fiddly␤at <tmp>:1␤------> 3say 1 R?? 2 !!7⏏5 3␤»
masak looks like we have a regression in that error message...
masak submits rakudobug
jnthn regression or was it ever right? :) 10:15
masak or never right, right. 10:16
10:17 melezhik_ joined, melezhik left, lizmat joined
melezhik_ "do" operator this is what I looked for, thanks 10:18
10:19 lizmat left 10:20 mcmillhj joined 10:21 melezhik_ is now known as melezhik
masak goodie. 10:21
though it's more of a statement prefix than an operator :) 10:22
along with `gather` and `once` and a few others
melezhik masak: sure
I just sometimes need a short way to evaluate some things depending on others ... was pretty sure that Perl has a syntax for this )))) 10:23
meant Perl6 of course 10:24
10:25 mcmillhj left
masak melezhik: currently fighting the impulse to tell you "yes, but experience tells me you probably do want ?? !!" 10:25
melezhik: I'll let you make your own choices ;)
10:26 cpage joined 10:27 telex left
melezhik masak: if "?? !!" allow me have a sequential statements like $a = ( ... ) ?? foo; bar; baz; !! foo; bar; baz 10:27
I am not sure 10:28
10:28 telex joined
melezhik so this is why I am going to use $a = do if ... {} else {} 10:28
10:29 melezhik left 10:30 melezhik joined
perlawhirl can I create a Subset type that does a Role? I know I can sub-Class an existing type, but I am being difficult :D 10:30
jnthn No.
perlawhirl ok 10:31
jnthn Subset types don't really "do" things, they're just meant as constraints.
perlawhirl yep, got it
trying to be too tricky for my own good
jnthn Note that an enum type can have extra roles applied :)
perlawhirl how's that go. short example, please? 10:32
jnthn enum Foo does SomeRole <Bar Baz>;
10:32 nadim joined
jnthn Something like that, iirc :) 10:32
perlawhirl ok, thanks i'll look into tit
er, *it
jnthn Pretty sure you can do that
Dunno if it's relevant to your problem :)
perlawhirl no, probably not, but interesting non-the-less 10:33
10:38 labster left 10:45 pierre_ left 10:47 zakharyas joined
TimToady m: say infix:<X>() 10:48
camelia rakudo-moar 9ccd84: OUTPUT«(((Any)))␤»
TimToady someone should rakudobug that; really should return Empty instead of Any 10:49
m: say infix:<Z>() 10:50
camelia rakudo-moar 9ccd84: OUTPUT«()␤»
TimToady or it should just return that
10:50 mcmillhj joined, CIAvash left
DrForr masak: I know that chaining operators and junctions are differen, I just forgot to mention the proper names in the heat of the moment. 10:51
10:51 kaare_ joined, pierre_ joined, lizmat joined, pierre_ left 10:54 ilmari[m] joined 10:55 mcmillhj left
DrForr Did anyone else spot major problems in the talk? I'm going to use that kind of for the basis for my OSCON online training session. 10:55
(I'm also going to make sure I can wedge multiprocessing in - I'm going to take some time to actually learn the multiprocessing side. I want to throw that into talks, but I don't yet feel comfortable.) 10:59
10:59 gnull left, cognominal joined
perlawhirl DrForr: I didn't catch it all, my only minor crit is that I could feel the silence between your sentences... a little stilted. I'd suggest using some form of notes/flash cards ( if you don't already) which would also help out with forgetting the metion the proper names of things in the heat of the moment. 11:00
11:01 aries_liuxueyang left
perlawhirl Content-wise, tho, I think it was good. 11:01
DrForr I was hoping to be able to split screens to have notes on my laptop, I have notes in a separate vim file.
11:02 aries_liuxueyang joined, mcmillhj joined
DrForr Thanks. 11:03
perlawhirl ahh, projector setup woes can be a real pain 11:04
11:05 aries_liuxueyang left
DrForr But yes, I should have flashcards or something. 11:05
11:05 aries_liuxueyang joined
DrForr The big part is I'm done, so I don't have to stress. 11:06
11:07 mcmillhj left 11:09 ab6tract joined
ab6tract o/ #perl6 11:09
DrForr Afternoon.
ab6tract .ask TimToady do you by any chance have the notes for your ballistic programming talk(s) online? 11:10
yoleaux ab6tract: I'll pass your message to TimToady.
ab6tract I cannot find anything but references to the dates of the talks.
But I remember joining #perl6 in 2008 or 2009, asking after the 'State of the Onion', and receiving a link to a video where you were already using this metaphor 11:11
This video is also, unfortunately, not possible to find now. Perhaps it was hosted on Google Videos back in the day.. 11:12
hi DrForr :D
for a talk on ballistics, it has left very little trace of itself 11:15
11:18 xinming_ joined 11:19 bjz joined 11:23 cognominal left
melezhik HI! Given a file path - "/foo/bar/baz/file.txt", how can I get directory name for this path? 11:26
I am sure there is a core module for this in perl6 ?
11:27 awwaiid left
lizmat "foo/bar/baz".IO.dirname 11:30
melezhik lizmat: thanks!
sounds good - perl6 -e '"/foo/bar/baz".IO.dirname.say' ; I love when Perl6 has a foo-bar-baz.say to easy dump thing into console, it's very handy indeed! 11:32
)))
11:34 rudolfochrist joined
dalek line-Perl5: 7586745 | niner++ | / (3 files):
Separate configure.pl6 and make install

Now it's a sort of standardish: perl6 configure.pl6 make make test make install
11:34
ab6tract it's really unfortunate that all iterations of the talk are missing, because I think the metaphor is just really awesome 11:37
11:47 lizmat left, bjz left 11:49 lizmat joined, zakharyas left 11:53 mcmillhj joined 11:55 smls_ joined, smls left, lizmat left
grondilu looked at create-moar-runner.pl and found $fh.print(sprintf(...)) kind of embarassing. 11:57
11:58 mcmillhj left
ab6tract also: I've got a sweet heisenbug but no time to golf it 11:59
does anyone have any pointers to resolving "pointer being freed was not allocated" (moarvm explosion) 12:00
pun intended
jnthn valgrind 12:02
12:05 leont joined, kamran joined 12:06 kamran is now known as Guest81243
dalek line-Perl5: 80d4ed3 | niner++ | .travis.yml:
Add new build step to travis config
12:09
12:09 pierre_ joined
ab6tract jnthn: hmmm.. valgrind does not provide any additional information in the crash case 12:12
12:13 lizmat joined, mcmillhj joined 12:17 [Coke]_ joined, [Coke]_ left 12:18 n1lp7r joined, mcmillhj left 12:19 nowan left, cyphase left 12:20 japhb joined, dsp_ left, dsp_ joined 12:21 bpmedley joined, mtj_ joined, nowan joined, DrParis joined 12:22 Skarsnik joined 12:23 kshannon joined, alnewkirk joined 12:24 TheLemonMan joined
melezhik anybody knows how to split long lines of code in perl6? 12:24
[Coke] finds coffee
12:24 xiaomiao left
melezhik 'foo' ~ 'bar' ~ .................... many many chunks ... ~ 'bar' 12:25
12:25 cyphase joined
melezhik need to split it somehow and still keep it as single line 12:25
12:25 mcmillhj joined 12:26 dylanwh left, Fleurety joined
arnsholt Somehow, $work had a task where my work on NativeCall is super-relevant 12:27
arnsholt is more than a little surprised at this development
12:27 zakharyas joined
smls_ melezhik: Not sure what you mean. Can't just add newlines in between operators / method calls? 12:27
12:28 xiaomiao joined
arnsholt Yeah, just add breaks where you want them 12:29
melezhik so, "/" is break symbol ?
smls_ no
arnsholt If you're coming from Python this may be odd, but since Perl has explicit statement terminators (the semicolons), you don't need to mark line continuations
12:30 mcmillhj left
smls_ statements don't end at newlines, they end at semicolon or closing bracket 12:30
arnsholt Or rather, explicit statement terminators that aren't newlines
melezhik arnsholt: got you, just add a new line where I need ... ok 12:31
arnsholt Yup! 12:32
melezhik thanks!
ab6tract melezhik: only caveat is -- you can't add a newline between an object and a method call, unless you use '\'
12:34 cygx joined
cygx o/ 12:34
smls_ say "foo"␤ .chars 12:35
m: say "foo"␤ .chars
camelia rakudo-moar 9ccd84: OUTPUT«3␤»
smls_ ab6tract: ^^ You can, since shortly before the 6.c release I think.
ab6tract well, i guess Tux was happy about that :)
smls_ You just can't mix that with method calls that *don't* have whitespace before them, in the same method chain
for precedence reasons that I don't quite understand 12:36
So that's the one case where you still need to escape the newline (and other whitespace) with \ 12:37
cygx m: (-10). abs .log . exp.say
camelia rakudo-moar 9ccd84: OUTPUT«10␤»
smls_ huh 12:38
did that change too?
12:38 bjz joined
smls_ nice :) 12:39
12:39 mcmillhj joined 12:40 leont left
jnthn m: say [~] 'omg', 'wtf', 'bbq' # you can also reduce on ~ rather than putting it between all the things, which may be neater. 12:40
camelia rakudo-moar 9ccd84: OUTPUT«omgwtfbbq␤»
12:40 wamba joined
melezhik ab6tract: got you 12:41
12:41 smls_ is now known as smls
ab6tract melezhik: well, it turns out I'm wrong according to the released version :) 12:42
melezhik ab6tract: not going to use with methods calls, so it's ok ;)))
12:42 ab6tract left 12:44 mcmillhj left
melezhik one simple question 12:44
I use sub MAIN to handle command line args, it's ok 12:45
12:45 rudolfochrist left
melezhik but I want to pass args like --foo bar 12:45
12:45 rudolfoc` joined
melezhik now I only have a choice to --foo=bar 12:45
and my tab completion becomes useless ))); 12:46
adrusi .
12:47 rudolfoc` is now known as rudolfochrist
Xliff melezhik: You aren't forced to use signatures in MAIN. You can use @*ARGV 12:47
perl6maven.com/parsing-command-line...ents-perl6
melezhik Xliff: not sure If I get you ... 12:48
Xliff Actually it's ARGS, not ARGV.
melezhik: vv
perl6 -e 'say @*ARGS.perl' --one two 3
["--one", "two", "3"]
melezhik ok, let me show my code then ... 12:49
sub MAIN (
Str :$host!,
Str :$http_proxy,
Str :$https_proxy,
Str :$ssh_user,
Str :$ssh_private_key,
Int :$ssh_port = 22,
Bool :$verbose = False,
Xliff Ack! NOOO
melezhik Bool :$bootstrap = False,
Str :$module_run
)
what?
Xliff melezhik, please use fpaste or a gist
Do NOT spam channel with code.
melezhik ah, ok, sorry
why it is a spam? only a small code snippet
ok I will give you a link then 12:50
Xliff Anything more than 4 lines is a spam.
12:50 mcmillhj joined
melezhik ah, ok 12:50
tadzik it makes reading the backlog less nice
melezhik no problem, sure
Xliff Use fpaste.scsys.co.uk
melezhik github.com/melezhik/sparrowdo/blob...wdo#L5-L18
this is my MAIN sub 12:51
and it works fine
but as I told I can't use --foo bar notation
tadzik anyway, I think you'll need a custom MAIN helper to allow the form that you're used to
Xliff Yeah, but if you want the "--foo bar" form of argument, you will need to handle @*ARGS on your own.
tadzik there are a few modules that do wacky stuff with MAIN and getopt-like things, maybe one of them does that already
melezhik so it can't be adjusted out of the box by MAIN means?
tadzik I don't think my one does 12:52
Xliff I do understand about tab completion, though. Using "=" kills it.
melezhik ah, ok
sure
= is the problem
12:52 ab6tract joined, leont joined 12:53 dylanwh joined 12:54 Sgeo left, mcmillhj left
Xliff melezhik, there is this -> github.com/Leont/getopt-long6 12:56
But it is not documented very well. Use with care.
melezhik Xliff: thanks for sharing info
generally code perl6 MAIN is fine foe me, but it don't respect spaces for parameters 12:57
tadzik MAIN feels to me like one of those things that should've evolved in module space first, and after a while a particular implementation ought to be spec...ulated 12:59
12:59 bjz left
Xliff tadzik: Yeah. It would be nice to be able to add to the auto-generated usage output. Or have a mechanism to bypass it altogether. 13:00
tadzik it seems like MAIN was designed to to replace dozens of different getopt handlers that people used in perl 5, but in practice ends up being mostly good for prototyping cli apps, and eventually being replaced with something that puts more focus on the shell calling conventions than perl6's
Xliff: I think you may be able to do that with some callsame magic
have your own USAGE call back to the original USAGE 13:01
Xliff Hmmm...
Is it a hidden sub USAGE {} ?
Don't mind me and my fancy parens.
tadzik not really hidden
Xliff Well... auto generated? Part of CORE:: ? 13:02
I'll have to look into the possibilities. Thanks, tadzik++
tadzik github.com/rakudo/rakudo/blob/nom/...in.pm#L163
I'm not sure if it's part of the official API 13:03
so to say
but you can totally call it yourself, override etc
Xliff LOL
"TODO: ... Make $?USAGE available globally" 13:04
So it might Not Be There, Yet.
13:04 cdg joined
tadzik hm 13:04
Xliff At any rate, stomach is complaining. Time to lie back down. 13:05
13:05 bjz joined
tadzik I'm afraid you may be right 13:06
13:10 g4 left 13:12 mcmillhj joined 13:13 Guest81243 left 13:22 zakharyas left 13:24 harmil joined, kyclark_ joined
dalek osystem: 17987ad | (Alexey Melezhik)++ | META.list:
Fetch remote file using http.
13:25
osystem: 1b8fa92 | (Zoffix Znet)++ | META.list:
Merge pull request #242 from melezhik/master

Add Sparrowdo::RemoteFile to ecosystem.
Fetch remote file using http: github.com/melezhik/remote-file/
13:26 cygx left 13:30 kyclark_ left, skids joined 13:33 perlawhirl left 13:35 ab6tract left, rudolfochrist left 13:41 rudolfochrist joined 13:42 arw joined
arw hi all. beginners question, why does this just output (Any) instead of a parse tree? pbot.rmdir.de/lY8MazWC7NZHfyROEtSuig 13:43
timotimo because it didn't parse correctly :) 13:44
have you tried either perl6-debug-m (after installing the necessary user interface module) or Grammar::Tracer or Grammar::Debugger? 13:45
arw not yet, but I was going to ask for something like that. thanks alot!
timotimo ah, your key and value tokens would blow things up
you see, token won't backtrack, as the default for "token" is to have :ratchet set to "on" 13:46
m: say "schlonz='fooooo'" ~~ / \w* /
camelia rakudo-moar 9ccd84: OUTPUT«「schlonz」␤»
timotimo oh, sorry, \w won't match a =
so that's not a problem
13:47 kyclark_ joined
timotimo .o( es gibt ja so viel wissenswertes über erlangen ) 13:47
13:48 zakharyas joined
smls arw: The Grammar::Debugger module is useful for finding out why a grammar doesn't match 13:49
TheLemonMan hmm, can you use that to debug rakudo's grammar too ? 13:50
smls just install it with zef or panda, and the call your script with «perl6 -MGrammar::Debugger script.p6»»
TheLemonMan: dunno
leont Xliff, melezhik: haven't touched it in a while, but it should work and if it doesn't I will fix it
smls arw: It's super simple to use... just keep pressing enter when you run it, and it'll take you through the parse step by step. 13:51
timotimo TheLemonMan: unfortunately, rakudo's grammar is NQP code, which the Grammar::Debugger doesn't support
and we don't have something like perl6-debug-m for nqp
13:52 rudolfochrist left 13:54 lizmat left
TheLemonMan eh, that's unfortunate 13:54
timotimo it's possible to build, but probably quite finnicky
what with nqp being "not quite" perl6 13:55
13:55 bdmatatu joined, lizmat joined 13:56 lizmat left 13:57 lizmat joined
bdmatatu Hi all. I'm having trouble adding actions to a slang. Here's a simple case trying to make a synonym for 'do' -- git.io/v6Fic 13:58
14:04 lucasb_ joined 14:05 lizmat left 14:06 lizmat joined
smls arw: (Sorry for the delay, was afk) In this case, the problem is the \n at the end of rule empty_line and rule key_value rannot match, because the newline was already eaten by the <ws> (implicit whitespace matching in rules) 14:07
14:07 khw joined
nine nadim: have a look at github.com/rakudo/rakudo/commit/6a...89ea7d6968 14:08
smls And yes, writing Perl 6 grammars for line-base (or partially line-based) formats is more cumbersome than it IMO should be.
14:09 lizmat left
nine nadim: raccoon is really a baby raccoon now :) 14:09
smls I think it shows that the grammars feature was for years mainly tested (and refined in a feedback loop with) Rakudo itself, and thus is best at matching free-form languages. 14:10
jnthn It's easy enough to redefine ws :) 14:11
We even provide ww if you want that part of the semantics and then different whitespace
smls jnthn: Not *that* easy actually, to recreate what <ws> does for boundaries between word vs non-word characters 14:12
oh? tell me more about ww
p6doc search doesn't find it 14:13
jnthn ww means "between two words"
m: say 'ab' ~~ /. <ww> ./ 14:14
camelia rakudo-moar 6ae6ec: OUTPUT«「ab」␤ ww => 「」␤»
jnthn m: say 'a+b' ~~ /. <ww> ./
camelia rakudo-moar 6ae6ec: OUTPUT«Nil␤»
14:14 zakharyas left
jnthn So you could do something like token ws { <!ww> | \h+ } 14:14
smls ah, that does make it easier to write a horizontal-only <ws>
jnthn Could do with being doc'd too, apparently :) 14:15
smls yeah
arw smls: ah, thx. 14:17
smls Hm, is it possible that p6doc does not document built-in tokens other than <ws> at all?
arw smls: i'm currently still waiting for rakudobrew to build.
smls alnum gets no hits either
14:19 cognominal joined
arw smls: but shouldn't my redefinition of <ws> take care of that? 14:20
14:20 awwaiid joined
ugexe strange, i could have swore they were because I remembering seeing <dot> documented but not implemented but I dont see anything but <ws> either 14:20
smls arw: Oh, I missed that. Hm.
14:24 kyclark_ left, lizmat joined
smls arw: Oh, it's the <comment> rule that eats the whitespace on the following empty line 14:25
14:25 leont left
smls Because <ws> matches after the \n in rule comment 14:26
14:26 leont joined
smls That means that having each rule that represents a line start with ^^ and end with \n is no good 14:28
[Coke] DrForr: can you verify if #125290 is still an issue for you?
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125290
timotimo nine: do we have some semblance of a solution for deciding resources during Build.pm run time?
smls arw: because the implicit <ws> after the \n of one rule will eat indentation of the next line and prevent the ^^ from matching in the next rule 14:29
14:31 MilkmanDan left
smls arw: Removing all the ^^ makes it match 14:32
Of course it's kinda weird to have each "line" match also contain the indentation of the line that follows it 14:33
14:33 MilkmanDan joined
arw smls: would that also happen if everything were token {} instead of rule? 14:33
smls no, <ws> does not implicitly match in tokens, only rules 14:34
but then you'd have to manually match whitespaces inside of lines
arw hm, yes. but i've got it to work at least: pbot.rmdir.de/CTHRqJBM_1foixfNP1WaOA 14:37
thanks to everybody :) 14:39
14:39 nebuchadnezzar joined, rmmm left, sjn left, arnsholt left, arnsholt joined, sjn joined 14:40 rmmm joined
smls I think I once managed to parse a line-based format using a token TOP { [ <line_a> | <line_b> ]+ %% [\n|$] } 14:40
or similar 14:41
but it required some tinkering too, 'til it worked
timotimo i, too, would prefer moving the end-of-line stuff out of the individual line pieces
smls and it's no good if the format is only partailly line-based
timotimo arw: you can have parenthesis around your stuff and just put :s at the beginning
that way you don't have to put <.ws> everywhere, but by snuggling the closing parethesis against the last bit of the regex, you can prevent an additional unwanted <.ws> from being auto-generated there 14:42
alternatively
lizmat tadzik: it's not too late:
$ perl6 -e 'sub MAIN($a) { say "$a" }' foo
foo
timotimo use rule and put (:!s '}')} or something at the end
14:42 cognominal left
timotimo tbh, i tend to use a loop over .lines for line-based formats more often than i maybe should ... 14:43
arw yes, but for that I could have used perl5 :) 14:44
timotimo with perl6, the code inside the for loop is much nicer, still :P 14:45
smls timotimo: putting the closing paren right after the \n is really ugly though
timotimo smls: yes
smls if unspace worked in regexes, one could write \n\
timotimo you can still match individual lines against perl6 regexes, of course
smls but it doesn't
timotimo oh, that'd be nice if it did, though
14:45 tomboy65 joined
smls jnthn: ^^ see preceding descussion... it's not just the default <ws> alone that makes it difficult to get a working grammar for (partially) line-based formats 14:47
arw and I guess special rules for trailing whitespace or indentation would make things even more ugly 14:48
(regarding the magically inferred <ws> in rules)
TheLemonMan talking of <ws>...
m: say (sub (\ ) { }).signature
camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
timotimo on a somewhat related note, i wonder if we'll find a developer who's interested in making :P5 work a bit better
TheLemonMan here the \<space> is eliminated even before reaching the grammar 14:49
smls TheLemonMan: that's how unspace is supposed to work, isn't it? 14:50
timotimo well, sub (\ ) is fine
what isn't fine is when you have something unspace-looking and it thinks it's an un-named sigil-less variable 14:51
TheLemonMan I was wondering if this behaviour is the intended one
timotimo unless ... maybe that's a feature?
TheLemonMan it becomes a problem if you add a return type annotation as it becomes sub(\ --> Mu) 14:52
[Coke] anyone who knows how wordpress works who can address RT #128664 14:54
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128664
[Coke] I can't find where the template for the page that has the linked image is; I only see posts (which are just the body of each page, not including the header), and the media images, which are just pngs.
TheLemonMan m: say +(sub (\) { }).signature.params == +(sub (\ --> Int) { }).signature.params
camelia rakudo-moar 6ae6ec: OUTPUT«False␤»
timotimo m: say (sub (\ --> Int) { }).signature 14:55
camelia rakudo-moar 6ae6ec: OUTPUT«( --> Int)␤»
timotimo m: say (sub (\ --> Int) { }).signature.params.perl
camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
timotimo m: say (sub (\) { }).signature.params.perl
camelia rakudo-moar 6ae6ec: OUTPUT«($ is raw,)␤»
timotimo m: say (sub (\ ) { }).signature.params.perl
camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
timotimo well, with (\) you get the nameless sigil-less variable
m: say (sub (\--> Int) { }).signature.params.perl
camelia rakudo-moar 6ae6ec: OUTPUT«($ is raw,)␤»
timotimo and for some reason that also happens with \--> 14:56
14:56 ab6tract joined
ab6tract when trying to run perl6-valgrind-m, I get an error saying: Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.dylib' 14:59
tony-o timotimo: making :P5 work better in what way?
ab6tract latest rakudo installed just a few hours ago via rakudobrew
timotimo tony-o: make it more compatible with pcre
15:00 kurahaupo joined
tony-o i haven't looked at this in a while but HTTP::Server::Async is working 100% as expected and awesome 15:01
timotimo great!
tony-o timotimo: ah - that's probably not me :-)
15:01 pierre_ left
timotimo jnthn has recently been putting in work in the reliability department 15:01
tony-o jnthn++
ab6tract tony-o: I looked into using Green recently, but it seems that it hasn't been upgraded to use the new Supplier/Supply style
15:01 zacts left
tony-o ab6tract: i think i fixed it last week, someone entered a bug. i'll take a look right now though 15:01
15:02 Actualeyes left
tony-o well, in 4 minutes when siege is complete 15:02
timotimo doesn't even know what Green is
all i know is it's not easy being green
15:02 Actualeyes joined
TheLemonMan timotimo, I suspect the '\ ' is being treated as it is in "\ " 15:02
ab6tract timotimo: tony-o's snazzy parallel testing framework
tony-o timotimo: ugexe.com/parallel-testing-and-a-pe...ilgrimage/ 15:03
repo is here: github.com/tony-o/perl6-green
TheLemonMan I suspected <ws> to be too greedy but it seems it's not the culprit
ab6tract tony-o: looks like it is passing the test suite and installing now. rad!
timotimo oh, that thing!
TheLemonMan: quoted strings are an entirely different language, though 15:04
15:05 leont left 15:06 canopus left
tony-o any idea what this means?: Internal error: zeroed target thread ID in work pass 15:06
TheLemonMan timotimo, I tried tracking the grammar states during the parse and it seems to get from the opening ( to the closing ) without reaching the <parameter> state
it goes <signature> -> <ws> -> <before> -> <param_sep> -> <ws> 15:07
arw hm, strange. shouldn't rule foo {<ws><something>} be the same as rule foo { <something>}? 15:08
tony-o hiker is another project that i want to work on but i need some feedback other than 'i dont like mojolicious so i won't like that either' 15:09
timotimo tony-o: i never even used mojolicious :\
arw because somehow this leading whitespace in rule seems to be different: pbot.rmdir.de/2AEU1VcRz0WImbmd3yDNrQ 15:10
nadim nine: racoon++
15:11 leont joined, ptolemarch joined
smls arw: No,I think the space before the first thing in a rule does not call <ws> 15:11
nadim raccoon++ I mean, it's not so small we can remove letters out of it.
smls only spaces in between tokens, and after the last
timotimo what is raccoon?
tony-o timotimo: you probably wouldn't like it :-p
smls arw: See design.perl6.org/S05.html#line_1147
specifically, the "it ignores whitespace #1" 15:12
tony-o also interested in what raccoon is 15:13
15:13 canopus joined
arw smls: feels buggy somehow. or at least non-symmetric with the not-ignored trailing whitespace. 15:14
smls Yeah, I'm not a fan of the trailing <ws> either 15:16
15:16 TheLemonMan left
nine timotimo: raccoon is nadim++'s alias for install-dist.pl. Because it's a bit like panda but much smaller ;) 15:21
timotimo oh, ok! 15:22
15:22 aries_liuxueyang left
nine timotimo: you mean some declarative way to build native libraries? 15:22
timotimo not quite
have you seen what GTK::Simple does?
smls Besides making life hard for line-based grammars, the trailing <ws> also causes lots of repeated calls to <ws> which can't be good for performance
nine is having a look 15:23
15:24 perlawhirl joined, aries_liuxueyang joined
timotimo smls: ah, because you tend to have calls to other things at the end of your regex, which may also have a <ws> at their end 15:24
perlawhirl hi perlers... oh good, we're talking regexen.
smls timotimo: That, and "<foo> <bar>" when foo has trailing <ws>
perlawhirl trying to match a symbol at left word boundary and it ain't working 15:25
m: say 'what about !this thing' ~~ m:g/ « '!' /;
camelia rakudo-moar 6ae6ec: OUTPUT«()␤»
timotimo ah, right
perlawhirl m: say 'what about !this thing' ~~ m:g/ « 't' /; # this works
camelia rakudo-moar 6ae6ec: OUTPUT«(「t」 「t」)␤»
perlawhirl m: say 'what about !this thing' ~~ m:g/ \s <( '!' /; # so does this
camelia rakudo-moar 6ae6ec: OUTPUT«(「!」)␤»
perlawhirl why not the first thing?
smls perlawhirl: Because there' no word boundary between the space and the ! 15:26
nine timotimo: WTF?
timotimo nine: exactly
15:27 jdoege joined
timotimo nine: if the non-windows path wouldn't touch those .dll paths, installation would fail because file not found 15:27
if the dll paths were not in resources, windows wouldn't work because file not in resources
perlawhirl smld: so whats the best globally match '!here and !here' ? 15:28
m: '!here and !here' ~~ m:g/ [ ^ | \s <( ] '!' / # like this, i suppose ?
camelia ( no output )
perlawhirl m: say '!here and !here' ~~ m:g/ [ ^ | \s <( ] '!' / # like this, i suppose ?
camelia rakudo-moar 6ae6ec: OUTPUT«(「!」 「!」)␤»
nine timotimo: so we'd need some optional resources?
timotimo that'd be one way to make it work
another would be to allow Build.pm to change the info in Meta.json 15:29
15:29 canopus left
timotimo which ... could be problematic, or maybe not 15:29
smls perlawhirl: <after [^|' ']> '!' should also work
perlawhirl smls: good-o. thanks
dalek ecs: 151d791 | (Zoffix Znet)++ | v6d.pod:
Revert "Forbid Bare C<\b> in Regexes"

This reverts commit b14828bb01abb7e659b9f1a4d43ba572d3a4f173. Per discussion with pmichaud++, this can be added right now, without waiting for 6.d:
  github.com/perl6/specs/commit/b148...t-18777938
15:30
smls perlawhirl: Or maybe <!after \S> i.e. "not after a non-whitespace character"
nine timotimo: no, no, if anything we're moving towards declarative solutions. Anything that depends on the reader of meta data being able to run Perl 6 code is going to hurt us in the long run
15:31 lostinfog joined
timotimo that's true 15:31
perlawhirl smls: Ah! yes, that looks to be a better fit
smls++
15:33 canopus joined
hoelzro o/ #perl6 15:40
nine timotimo: there's certainly a simpler hack for Gtk::Simple: just ship it with empty .dll files and only on Windows fill them with the downloaded content. That way installing them everywhere does no harm. 15:41
hoelzro that's what I do for my modules! 15:42
leont mauke++ # funny lightning talks are important too 15:50
kyclark Where does a regex modifier go to make the whole thing case-insensitive? 15:53
Wait, got it. 15:54
leont (wrong channel)
kyclark FWIW, for use in my MAIN signature this works: 15:56
subset SortBy of Str where * ~~ /:i ^keys?|values?$/;
but this does not:
subset SortBy of Str where * ~~ m:i/^keys?|values?$/;
Skarsnik timotimo, why it's not up to the module manager to download extra ressources? 15:57
15:57 rba_ left
nine Skarsnik: yes, that's what I'm getting at. With a declarative way of specifying those resources, it would be the module manager's job. 15:58
skids kyclark: use /:i to embed the case sensitivity in the rx. m: is more a procedural style, and for carrying options that cannot go inside.
Skarsnik and for stuff like extern lib (in binding module) it should be an information in the meta file, as an extern dep or something, like to inform the user installing the module that will need something else x) 16:00
16:01 domidumont left
Skarsnik and Hello btw 16:01
16:01 zacts joined
nine Skarsnik: definitely. That's something even Perl 5 is still missing. I'd love to see a native-depends: ['freetype', 'gdk-3-0', ...] and smart module managers that know how to find them or download them for your system. 16:05
16:08 bob777 left 16:09 kjs_ joined 16:11 mcmillhj left, lizmat left 16:15 leont left 16:16 lizmat joined 16:17 tbrowder joined
timotimo kyclark: m/foo/ is a command "execute this match right now", and then you smart match against the result of the match against $_ 16:17
kyclark: you could have used rx:i/.../ because that's just "a regex literal"
kyclark Ah, thanks for the clarification.
timotimo kyclark: but you don't need the * ~~, because the where clause is already applied by smart matching
kyclark ORLY? 16:18
timotimo so it'd end up doing $value ~~ (* ~~ /regex/) for you
yup
16:18 mcmillhj joined
timotimo similar to the way "when" works. it also smart-matches for you 16:18
kyclark Heckin' sweet. 16:19
dalek c: 14e4a10 | (Tom Browder)++ | doc/Type/Signature.pod6:
correct grammat
16:19 lizmat left
tbrowder s/grammat/grammar/ 16:19
kyclark So I'm trying to show lots of different ways to accomplish the same idea (TIMTOWTDI and all), so can this be made better/shorter? 16:21
subset SortBy of Str where * (elem) <key value keys values>.Bag;
I also show the Unicode operator cuz that's cool
subset SortBy of Str where * ∈ <key value keys values>.Bag;
My favorite so far is: 16:22
subset SortBy of Str where * ∈ <key value keys values>.Bag;
oops
subset SortBy of Str where * ~~ /:i ^keys?|values?$/;
Because it's case-insensitive and handles singular/plural
Wait:
timotimo yes, smart matching against a Bag should give the same as * (elem) $the-bag
kyclark subset SortBy of Str where /:i ^keys?|values?$/;
16:23 mcmillhj left
kyclark m: 'key' ~~ <key value keys values>.Bag; 16:24
camelia ( no output )
kyclark m: say 'key' ~~ <key value keys values>.Bag;
camelia rakudo-moar 7fa2ba: OUTPUT«False␤»
kyclark m: say 'key' (elem) <key value keys values>.Bag;
camelia rakudo-moar 7fa2ba: OUTPUT«True␤»
timotimo huh 16:25
so i'm rong
nadim timotimo: it all boils down to pthreads which is called by libuv, so it's down to libc, except if we want to stop using libuv ;) 16:26
jnthn We don't.
nadim jnthn: that was understood :)
16:26 jdoege left
kyclark BTW, what's the name of ∈? 16:26
jnthn And even if we did we'd *still* need working threads :S
Do we have a workable workaround yet, fwiw? 16:27
nadim jnthn: build glibc with elision off
timotimo flip all tables.
jnthn nadim: I guess that's what other similarly affected projects are saying?
hoelzro timotimo: I tried your slang trick - works like a charm =)
nadim jnthn: there's an ubuntu request to be able to do that at run time, will probably not happen though 16:29
jnthn: other projects are saying nothing most of the time, so users are just rebuilding glibc. I would if the debian package system had broken dependencies 16:30
timotimo hoelzro: oh god what have i done! ;)
16:30 bdmatatu left
hoelzro sometimes I think that "use nqp;" should become "use magic;" =P 16:30
timotimo well, it's MONKEY-GUTS
16:31 mcmillhj joined 16:32 kentnl joined, kentnl left, kentnl joined
timotimo i wonder if i can get some new performance opts into JSON::Fast 16:33
inspired by seeing how liz does it in the core code
16:34 kent\n left, kentnl is now known as kent\n
timotimo nine: how do you feel about giving CU::R::Installation a little cache of json text to objects? it never modifies the objects that come out of the parse, right? 16:34
16:34 zacts left
dalek c: a0fcd69 | (Tom Browder)++ | doc/Type/Signature.pod6:
correct grammar
16:35
16:36 mcmillhj left
hoelzro timotimo: ah, true 16:38
16:39 setty1 joined
dalek c: 0022a87 | (Tom Browder)++ | doc/Type/Signature.pod6:
not sure what was intended, but rendered char looks wrong
16:41
timotimo nine: because it reads basically the same file over and over and over again when "use GTK::Simple"; the first time after installation it's responsible for 50% of the start-up time, after that it's a noticable bit less, but still a bunch 16:42
16:42 nadim left
tbrowder kyclark: from wikipedia: 'The relation "is an element of", also called set membership' 16:47
perlawhirl is there an elegant way to delete an item from an array completely, ie, leave no empty container behind
m: my @a = <one two three>; @a[1] = |@; say @a;
camelia rakudo-moar 7fa2ba: OUTPUT«[one () three]␤»
perlawhirl i know i can do @a[*;*] or @a.map(|*)... but can i do while deleting? 16:48
16:48 mcmillhj joined
timotimo you need to use the splice method 16:48
perlawhirl timotimo++
timotimo for most cases, that is 16:49
perlawhirl i did know that... but had conveniently forgot it
timotimo happens :)
perlawhirl timotimo: btw, re: smartmatching on Bag/Set... it's works on Hashes, so... maybe it should work on Bags/Sets too?... but i'm not a language designer 16:51
m: my $b = Bag.new(<larry curly moe>); say 'moe' ~~ $b; say 'moe' ~~ $b.Hash
camelia rakudo-moar 7fa2ba: OUTPUT«False␤True␤»
perlawhirl I guess it encourages use of the set op's
16:52 iH2O joined 16:53 domidumont joined
timotimo m: say 'key'.Bag ~~ <key keys value values>.Bag 16:53
camelia rakudo-moar 7fa2ba: OUTPUT«False␤»
timotimo mhh
16:53 mcmillhj left 16:54 webstrand left 16:56 webstrand joined
arw ok, now i've got something parsed from my grammar. how do I get a nice usable data structure from that? 16:56
is .make the right thing to do? is there any documentation for that? 16:57
timotimo yup, make and .make are the right thing
it just sets the value of .made (aka .ast) on the result you've matched
harmil_wk arw: there are some sample grammars in the examples sections of the docs... sec... 16:58
examples.perl6.org/categories/parsers.html and especially examples.perl6.org/categories/parse...rings.html which demonstrates actions in a trivial case 16:59
16:59 mcmillhj joined
smls arw: Here's a grammar I wrote that should hopefully be self-explanatory: www.reddit.com/r/dailyprogrammer/c...ma/cxyvo1r 17:00
timotimo JSON::Tiny also has a grammar + actions
arw thx, i'll read through it
smls arw: docs.perl6.org/language/grammars also has explanations 17:01
harmil_wk arw: However, in these cases, the parsed thing is a "value" In most real grammars you're going to want to build a real AST that represents expressions of operators of values and the like.
17:01 iH2O left
arw harmil_wk: yes. and sometimes I want to name a node of the ast after a value two levels down and stuff like that. 17:03
timotimo you can recursively access match objects
no need for every single object to have a .made
arw timotimo: yes, but i have difficulties getting further than the first level $stuff<foo>, and neither $stuff.perl nor $stuff.say are very helpful. 17:05
timotimo you can get their .keys and such if you want
arw ah
timotimo oh
best advice:
get Data::Dump::Tiny 17:06
no, wait
Data::Dump::Tree
17:06 brrt joined
harmil_wk timotimo: I think we're burying arw in examples... 17:06
17:07 mempko joined
arw maybe. and in general I think I don't know perl6 sufficiently to understand some of them. 17:07
timotimo D:D:T isn't meant as an example 17:08
it's perfect for outputting match objects
arw hm, yes, the test cases scrolling by look great :)
far better than perl5 Data::Dumper even
17:09 nemo joined
timotimo probably not far better than perl5 Data::Dumper::Tree, though :) 17:09
17:09 nemo is now known as Guest94111, Guest94111 is now known as nemo
smls arw: Just use the hash subscript operator { } or < > on a Match object, to get the Match of one of its names subrules. 17:11
arw: If you have something like [<a> | <b>]+ and you need matches of a and b in the order they occured, use $/.caps (docs.perl6.org/type/Match#method_caps).
That's the gist of it :)
17:16 firstdayonthejob joined
timotimo BBL 17:17
17:18 MilkmanDan left 17:21 MilkmanDan joined 17:31 mvorg left 17:32 infina joined, infina left, infina joined
arw is there any equivalent to cpan.perl.org regarding the POD display for perl6 modules? 17:35
somehow modules.perl6.org only links to sources for stuff. 17:36
El_Che arw: not yet (work in progressI though). The best best is the README.md or the pods in the source 17:37
17:39 cognominal joined, wamba left 17:45 PaleZebra joined
PaleZebra arw: modules.zef.pm/modules 17:45
arw PaleZebra: thx 17:47
seems like Data::Dump::Tree simply has no documentation.
17:47 brrt left
PaleZebra arw: it's right there: github.com/nkh/P6-Data-Dump-Tree#usage 17:48
El_Che nice!
PaleZebra And it does show up here: modules.zef.pm/modules/Nadim%20Khem...Dump::Tree
arw PaleZebra: no, I mean "See lib/Data/Dump/Tree.pod for a complete documentation.". that just points to a useless pod
PaleZebra arw: well, it's this: gist.github.com/zoffixznet/552ca46...710ea1c327 17:49
arw: it's just GitHub doesn't know how to handle P6 pod. You might get docs with p6doc utility 17:50
modules.perl6.org/repo/p6doc
arw hm, okay, then its just github being weird.
smls m: dd; 17:51
camelia rakudo-moar 7fa2ba: OUTPUT«block <unit>␤»
smls ^^ I think that's new
(i.e. used to throw an error)
PaleZebra It dumps $?BLOCK now 17:52
m: sub foo { say "meow"; dd }()
camelia rakudo-moar 7fa2ba: OUTPUT«meow␤sub foo␤»
PaleZebra m: sub foo { say $?BLOCK }()
smls ah
camelia rakudo-moar 7fa2ba: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?BLOCK' is not declared. Did you mean 'Block'?␤at <tmp>:1␤------> 3sub foo { say 7⏏5$?BLOCK }()␤»
PaleZebra or $?ROUTINE or whatever it is
smls m: sub foo { say &?BLOCK }()
camelia rakudo-moar 7fa2ba: OUTPUT«sub foo () { #`(Sub|60607664) ... }␤»
PaleZebra s: &dd 17:53
SourceBaby PaleZebra, Sauce is at github.com/rakudo/rakudo/blob/7fa2...ny.pm#L532
17:53 riatre joined
PaleZebra It's note .name ?? "{lc .^name} {.name}" !! "({lc .^name})" with callframe(1).code; 17:53
s: BagHash.new, "append", \(:42bar) 17:55
SourceBaby PaleZebra, Something's wrong: ␤ERR: Could not find candidate that can do \(:bar(42))␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤ in block <unit> at -e line 6␤␤
PaleZebra timotimo: ^ there's no candidate for it. But the issue you were having is giving a type object as the first argument so if the method is expecting an instance, it wouldn't be found
SourceBaby: help
SourceBaby PaleZebra, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
17:56 PaleZebra left 17:57 mohae_ joined 17:58 perlawhirl left 17:59 mohae left 18:03 cognominal left 18:04 mohae joined
arw somehow Data::Dump::Tree hates me: pbot.rmdir.de/QGFqF4zmBFL2BQgKIFWXbw 18:06
18:06 mohae_ left
arw and without the role its useles because it shows only the first matching string... 18:07
18:15 n1lp7r left 18:19 riatre left, bioduds left 18:22 riatre joined 18:23 MilkmanDan left
[Coke] arw: that error makes sense to me; what is DDTR::MatchDetails ? 18:25
18:27 idiosyncrat_ joined
idiosyncrat_ Audrey Tang, who was so influential in both the Perl6 and Marpa communities is now a Minister of Digital in the Taiwanese government: focustaiwan.tw/news/aipl/201608250036.aspx 18:29
Officially it looks like she's a "minister without portfolio" 18:30
mspo mm perl packer
speaking of static linking and perl6 :)
18:31 kjs_ left
idiosyncrat_ Surprising, but based on the link, no hoax, no joke. 18:32
arw [Coke]: according to the documentation a role for Data::Dump::Tree one should apply to change the output 18:33
Xliff m: say '\'' 18:34
camelia rakudo-moar 7fa2ba: OUTPUT«'␤»
arw [Coke]: see e.g. here: gist.github.com/zoffixznet/552ca46...p6-p6-L594 18:35
18:38 gfldex joined 18:39 cdg left 18:40 TEttinger joined 18:44 AndyBotwin left 18:45 AndyBotwin joined, darutoko left 18:46 AndyBotwin left
Xliff RabidGravy, you there? 18:50
RabidGravy I might be
Xliff I have X11, PanteraC and Crayola colors converted. :) 18:51
RabidGravy coolio
Xliff If you have other color options, let me know. Otherwise I will start getting this ready for the ecosystem.
There are some p6-isms I might need to take care of, too. 18:52
Just a heads up. I got your "DO EET" message in scrollback. I was already in the process of "doing it" when I got it. =)
smls m: say [Z] (<a b>, <x y>, <1 2>) 18:54
camelia rakudo-moar 7fa2ba: OUTPUT«((a x 1) (b y 2))␤»
smls m: say [Z] (<a b>, <x y>)
camelia rakudo-moar 7fa2ba: OUTPUT«((a x) (b y))␤»
smls m: say [Z] (<a b>,)
camelia rakudo-moar 7fa2ba: OUTPUT«((a b))␤»
smls ^^ TimToady, is that correct? 18:55
that edge-case means I can't use [Z] to transpose an array
18:56 rba_ joined, rba_ left, rba_ joined 18:57 rba_ left
smls because it doesn't return ((a) (b)) in the last, single-row case 18:58
19:00 rba_ joined
gfldex smls: that's by design. Any reduction operator returns the single element given a single element list 19:00
smls gfldex: Even if the operator has a single-element overload?
gfldex m: say <a b> Z (); 19:01
camelia rakudo-moar 7fa2ba: OUTPUT«()␤»
19:02 kyclark_ joined
[Coke] arw - that's a random gist by zoffix. 19:02
shouldn't you be looking at the Data::Dump::Tree docs?
gfldex m: say <a b> Z Empty;
camelia rakudo-moar 7fa2ba: OUTPUT«((a) (b))␤»
ugexe m: say reduce { $^a Z $^b }, (<a b>,) 19:03
camelia rakudo-moar 7fa2ba: OUTPUT«(a b)␤»
smls m: say &infix:<Z>( <a b> )
camelia rakudo-moar 7fa2ba: OUTPUT«((a b))␤»
[Coke] I don't see any reference to it here: github.com/nkh/P6-Data-Dump-Tree
and I suspect it was an abbreviation for Data Dump Tree that was not meant to compile.
smls m: say &infix:<Z>( (<a b>,) ) 19:04
camelia rakudo-moar 7fa2ba: OUTPUT«((a) (b))␤»
smls ^^ gfldex
gfldex smls: the zip operator on uneven lists is questionable to start with
smls If reduce called that, it would work out
arw committable6: the docs are raw.githubusercontent.com/nkh/P6-D...p/Tree.pod 19:05
committable6 arw, ¦«the»: Cannot find this revision
arw [Coke]: raw.githubusercontent.com/nkh/P6-D...p/Tree.pod
same docs from github
smls gfldex: Yeah, but the n=1 case is special - see the matrix transposition use-case I showed above
19:06 domidumont left
[Coke] arw: ok, that helps. that is defined in P6-Data-Dump-Tree/lib/Data/Dump/Tree/ExtraRoles.pm 19:07
arw [Coke]: the unabbreviated form gives the same error. and the examples use 'does DDTR::...': github.com/nkh/P6-Data-Dump-Tree/b...filter1.pl
[Coke] then try adding this to your script:
use Data::Dump::Tree::ExtraRoles;
19:08 zakharyas joined 19:09 domidumont joined
arw [Coke]: works, thanks 19:10
19:11 domidumont left, kyclark_ left
[Coke] I think having 2 top level namespaces there where one is an obv. abbr. of the other. 19:13
... is not a good idea. but I don't care enough to open a ticket there.
19:14 MilkmanDan joined 19:15 kjs_ joined
smls gfldex, TimToady: I've used [Z] or `zip` to transpose n list of m lists before, and seen other people do so (e.g. on rosettacode). 19:16
I guess that means quite a few bugs out in the wild.
19:17 labster joined
smls One wouldn't expect the n=1 case to fail while all other cases (including m=1 and n=m=0) work fine. 19:17
Would anything break if reduce were taught to call &infix:<op>( $a, ) if it supports being called with one arg? 19:18
hoelzro is there a way to ask a CallFrame if it's a "low-level" (as in from rakudo code) one? 19:20
smls m: say &infix:<+>(4)
camelia rakudo-moar 7fa2ba: OUTPUT«4␤»
19:20 jonas1 left, heatsink joined
smls looks like basic math operator handle it fine 19:20
19:21 idiosyncrat_ left
smls If it couldn't be done for `reduce &foo, ...` in general, maybe just for those cases where &foo is an operator? 19:22
Those are already special-cased anyway, for the associativity and identity stuff 19:23
19:24 kyclark_ joined
smls "couldn't be done" because of backwards compatibility concerns, I mean. 19:25
19:27 kyclark_ left 19:35 kyclark_ joined 19:43 heatsink left 19:45 mcsnolte joined
[Coke] arw: thank you for being patient with me, by the way, as I caught up to where you were. 19:45
timotimo i've been AFK for a long time, how's things with arw going? 19:46
[Coke] timotimo: he needed a 'use' that was missing in the docs.
timotimo oh
[Coke] otherwise that extra role wasn't ins cope
so, unstuck for a bit, I thikn. 19:47
19:51 zakharyas left 19:53 mcmillhj left 19:58 mcmillhj joined 20:07 mcmillhj left, kaare_ left 20:11 ajr_ joined
ajr_ This code is wrong: say "or edited, " ~ sprintf("D6.2", $circ); but it produces an interesting result 20:13
The circumference of a 12.5mm tuit is 78.5398163397448 Your printf-style directives specify 0 arguments, but 1 argument was supplied in any at /home/guru/rakudo/rakudo-star-2016.07/install/share/perl6/runtime/CORE.setting.moarvm line 1 in any panic at /home/guru/rakudo/rakudo-star-2016.07/install/share/nqp/lib/NQPHLL.moarvm line 1
The more nearly correct I get the mask, the more elaborate the message. 20:14
20:14 mcmillhj joined, cdg joined
ajr_ The "panic" makes me wonder if I've found a bug? 20:14
The "circumference" line is from a previous, valid, statement. 20:16
harmil_wk m: say "foo {sprintf "D6.2", pi}" 20:17
camelia rakudo-moar 7fa2ba: OUTPUT«Your printf-style directives specify 0 arguments, but 1 argument was supplied␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in any panic at /home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm line 1…»
harmil_wk Yep, that looks like something to rakudobug 20:18
20:18 mcmillhj left
harmil_wk But it's really just an error message generation issue. The initial error is correct. 20:18
20:25 ab6tract left 20:30 pecastro joined 20:31 mcmillhj joined
ajr_ bug report sent. 20:31
20:32 ajr_ left 20:34 domidumont joined, lizmat joined 20:36 mcmillhj left 20:38 pecastro left 20:40 pecastro joined 20:42 khw left, mcmillhj joined 20:45 kyclark_ left 20:46 domidumont left, mcmillhj left 20:48 kyclark_ joined, khw joined
timotimo i don't get it, what's wrong about the error? 20:54
20:55 kyclark_ left
nine timotimo: actually I do have ideas that would allow us to skip parsing the JSON altogether unless someone really accessed the meta data through $comp-unit.distribution. 20:55
geekosaur for one, I see only mentions of internal locations...
jnthn nine: What operations need parsing JSON these days? 20:57
harmil_wk Just FYI: getting Internal error: Unwound entire stack and missed handler in some code that's mixing Promises and catching errors from tests. Not sure if it's trivial to reproduce, though...
20:57 mvorg joined
jnthn harmil_wk: Hm, it should usually manage better than that. The one case I know of that fails that way is in nativecall callbacks. 20:58
20:58 Celelibi joined 20:59 cognominal joined, skids left
harmil_wk It's not reliable right now, but I can try to isolate a repeater later 20:59
nine jnthn: we already have :ver, :auth: and :api in the short name lookup files. Ironically the one piece missing is the name of the source file which would be ridiculously simple to add :)
jnthn: we also parse the JSON when someone accesses %?RESOURCES
21:00 mcmillhj joined
geekosaur remembers to file LTA for last night's fun 21:03
21:04 n1lp7r joined
jnthn nine: ah, OK :) 21:06
21:06 kyclark_ joined, mempko left
jnthn nine: Was gonna say, I hope the common case didn't need it :) 21:06
21:08 kyclark_ left
nine jnthn: still does. Doesn't actually need to. Maybe if tomorrow my brane is still not up to debugging the remaining lexical_module_load failures, I'll give it some love. 21:09
I've already done a bunch of LHF for that reason today and it's not exactly a disadvantage :)
21:12 n1lp7r left
jnthn :) 21:12
But of the whole reason for the short files was to not need to parse JSON in the common cases :) 21:13
s/But of//
21:13 kyclark_ joined
nine To not have to parse the JSON of all the dists to find the right one. At least I didn't read it as going one step further and not having to read the JSON for the winning dist :) 21:16
21:17 mcmillhj left, kyclark_ left
jnthn Ah, that's what I'd originally intended :) 21:18
21:21 kyclark_ joined 21:22 cognominal left 21:23 kyclark_ left
nine Better late than never ;) And I'm glad there's still sooo low hanging fruit around for speeding up module loading :) 21:23
21:23 kjs_ left 21:26 sjoshi joined 21:29 kyclark_ joined
dalek c: c81cb65 | (Tom Browder)++ | doc/Language/quoting.pod6:
add example of an interpolating heredoc
21:29
21:30 kyclark_ left 21:31 cognominal joined
Hotkeys tfw discord doesn't have perl6 highlighting 21:33
dalek c: 0762134 | (Tom Browder)++ | doc/Language/quoting.pod6:
add missing 's'
21:41
21:41 smls left
harmil_wk Looks like CompUnit::Util has rotted I'm getting "Method 'sink' not found for invocant of class 'NQPMu'" trying to install it. 21:44
Is there a different way to re-export an imported module's exportables? 21:45
Strangely it shows as currently passing on the modules list 21:46
21:50 nicq20 joined 21:51 nicq20 left 21:52 bjz left 21:54 cognominal left, firstdayonthejob left 21:56 kurahaupo_ joined 21:58 firstdayonthejob joined, kurahaupo left 22:00 setty1 left, n1lp7r joined 22:03 kurahaupo_ left 22:10 sjoshi left
hoelzro awwaiid++ # REPL fixes 22:15
awwaiid hoelzro: github.com/rakudo/rakudo/pull/847 uses the special return value to handle 'last' in REPL. Had to do some weird things
heh
profan is there any lib to use for p6 today that just lets you set up a really simple webserver which .. works? basic routing, etc
just went through one which the examples in it don't run on the latest perl6 22:16
awwaiid profan: I used bailador previously, but haven't recently, and it came with something. Might have been single-threaded though 22:17
profan it's ok if it's single threaded as long as there's something that works :p
bailador looks promising, thanks :) 22:18
22:22 rkazak joined 22:23 Skarsnik left, kyclark_ joined 22:26 rkazak left 22:28 cibs left 22:30 kyclark_ left, cibs joined 22:31 kyclark_ joined
dalek c: c328b06 | (Tom Browder)++ | doc/Language/quoting.pod6:
correct chars which are known to need escaping
22:37
22:38 bioduds joined 22:39 Sgeo joined 22:42 gfldex left 22:45 lostinfog left 22:56 firstdayonthejob left
MasterDuke .tell kyclark /:i ^ keys?|values? $ / may not do what you want. the '^' and '$' don't distribute to the different values in an alternation. i suspect you want /:i ^ [key|value]s? $ / 22:57
yoleaux MasterDuke: I'll pass your message to kyclark.
23:03 khw left 23:08 RabidGravy left 23:11 leont joined 23:17 mvorg left, khw joined 23:24 rindolf left 23:28 leont left 23:33 canopus left 23:37 kyclark_ left 23:38 mcmillhj joined 23:40 canopus joined 23:53 MilkmanDan left 23:55 canopus left 23:59 mcmillhj left