Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-07-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 canopus joined #perl6
00:05 telex joined #perl6
00:10 kurahaupo Zoffix: qualitatively yes, quantitatively no
00:11 kurahaupo faster is more actions per unit of time
00:12 Zoffix which is equivalent to one action per smaller unit of time ¯\_(ツ)_/¯
00:13 kurahaupo Zoffix: numerically no
00:13 kurahaupo that's why you got a negative answer initially
00:14 Zoffix I got a negative answer because I was too lazy to type abs() for relative difference formula :) [one of] which is abs($a-$b)/max(abs($a), abs($b))
00:15 Zoffix m: my $a  = 1 + 28.933/60; my $b = 2 + 1.467/60; say "{abs($a-$b)/max(abs($a), abs($b))*100}% faster"
00:15 camelia rakudo-moar e9019e: OUTPUT«26.7842295% faster␤»
00:15 kurahaupo no, you actually got the right answer -- the change in time was -26%
00:16 Zoffix After I rearranged the formula to not need abs/max, sure.
00:17 timotimo Zoffix: you may prefer infix:<max> over &max in this case
00:17 timotimo although it doesn't bind tighter than / does
00:17 timotimo so you'll need parens either way :\
00:20 kurahaupo Zoffix: if minutes-per-run decreases by 26% (less time), then runs-per-minute increases by 36% (faster)
00:21 kurahaupo Zoffix: leaving out the abs was not a mistake
00:22 Zoffix m: my $x  = 1 + 28.933/60; my $y = 2 + 1.467/60; my \Δ = $x - $y; say "{Δ/$y*100}% faster"
00:22 camelia rakudo-moar e9019e: OUTPUT«-26.7842295% faster␤»
00:22 Zoffix kurahaupo, I give you "if minutes-per-run decreases by 26% (less time), then runs-per-minute increases by 36% (more runs)"
00:22 kurahaupo Zoffix: s/faster/more time/
00:23 Zoffix But "faster" is an ambiguous word here
00:23 Zoffix https://xkcd.com/309/
00:23 * Zoffix leaves to play Far Cry 4
00:23 timotimo have fun!
00:25 kurahaupo :-)
00:26 ShimmerFairy joined #perl6
00:26 * kurahaupo goes back to lurking for another year
00:37 sortiz \o #perl6
00:47 Actualeyes joined #perl6
00:49 cpage__ joined #perl6
01:01 rgrinberg joined #perl6
01:05 canopus joined #perl6
01:14 dalek doc: cfffec8 | (Daniel Green)++ | doc/Type/IO/Path.pod6:
01:14 dalek doc: IO::Path.mode doesn't belong in the timestamp section
01:14 dalek doc: review: https://github.com/perl6/doc/commit/cfffec8bee
01:14 dalek doc: 5e90e17 | (Daniel Green)++ | doc/Language/5to6-perlfunc.pod6:
01:14 dalek doc: Fix link in 5to6-perlfunc.pod6. AlexDaniel++
01:14 dalek doc: review: https://github.com/perl6/doc/commit/5e90e17ff2
01:14 dalek doc: 0a788a8 | (Zoffix Znet)++ | doc/ (2 files):
01:14 dalek doc: Merge pull request #655 from MasterDuke17/IOPath_cleanup
01:14 dalek doc:
01:14 dalek doc: IO::Path.mode doesn't belong in the timestamp section
01:14 dalek doc: review: https://github.com/perl6/doc/commit/0a788a854e
01:15 kalkin-_ joined #perl6
01:16 Zoffix .tell moritz I recall you mentioning to point out contributors who might use a commit bit. Here's a candidate: https://github.com/MasterDuke17?​tab=overview&amp;period=monthly
01:16 yoleaux Zoffix: I'll pass your message to moritz.
01:25 telex joined #perl6
01:36 wisti joined #perl6
01:36 pRiVi joined #perl6
01:36 inokenty joined #perl6
01:36 john51 joined #perl6
01:36 gtodd joined #perl6
01:36 dg joined #perl6
01:36 jdv79 joined #perl6
02:01 vendethiel- joined #perl6
02:05 molaf joined #perl6
02:09 noganex_ joined #perl6
02:11 alienzj joined #perl6
02:15 AlexDaniel Zoffix: it feels like we need shotgun: instead of bisect: :)
02:16 AlexDaniel you can't really use bisect if something was broken/fixed several times
02:16 AlexDaniel so why bother with bisection when you can simply run something on every commit…
02:18 AlexDaniel let's see
02:18 AlexDaniel bisect: class Foo { method new { self.bless: *, :foo<bar> } }.new
02:18 bisectable AlexDaniel: (2016-06-12) https://github.com/rakudo/rakudo/commit/4179bdc
02:19 AlexDaniel bisect: good=2016.01.1 class Foo { method new { self.bless: *, :foo<bar> } }.new
02:19 bisectable AlexDaniel: no build for such “good” revision
02:19 AlexDaniel um, fine
02:19 AlexDaniel bisect: good=2016.02 class Foo { method new { self.bless: *, :foo<bar> } }.new
02:19 bisectable AlexDaniel: (2016-06-12) https://github.com/rakudo/rakudo/commit/4179bdc
02:20 AlexDaniel bisect: good=2d9202c class Foo { method new { self.bless: *, :foo<bar> } }.new
02:20 bisectable AlexDaniel: no build for such “good” revision
02:20 Zoffix That was just a measurement error. It wasn't actually broken in 2016.01
02:21 AlexDaniel ah, okay
02:22 AlexDaniel there's still a problem though
02:22 AlexDaniel bisect: use REPL; say 1
02:22 bisectable AlexDaniel: exit code is 1 on both starting points, bisecting by using the output
02:22 bisectable AlexDaniel: (2015-12-25) https://github.com/rakudo/rakudo/commit/07fecb5
02:22 AlexDaniel why!
02:22 Zoffix m: use REPL
02:22 camelia rakudo-moar e9019e: OUTPUT«===SORRY!===␤REPL is a builtin type. You can use it without loading a module.␤»
02:27 Sgeo joined #perl6
02:30 AlexDaniel .tell psch so the reason why it points to 2015-12-25 is because it says “Could not find REPL in:” and then it prints paths…
02:30 yoleaux AlexDaniel: I'll pass your message to psch.
02:34 AlexDaniel omg SVG favicons are only supported in firefox
02:42 AlexDaniel bisect: EVAL “use REPL” if 1; CATCH { exit 0 if $_ ~~ /builtin/; exit 1 }
02:42 bisectable AlexDaniel: exit code on a “good” revision is 1 (which is bad), bisecting with inverted logic
02:42 bisectable AlexDaniel: (2016-03-24) https://github.com/rakudo/rakudo/commit/f7d1c4b
02:42 aindilis joined #perl6
02:42 AlexDaniel .tell psch You probably wanted something like this: bisect: EVAL “use REPL” if 1; CATCH { exit 1 if $_ ~~ /builtin/; exit 0 }
02:42 yoleaux AlexDaniel: I'll pass your message to psch.
02:42 AlexDaniel oops, if 1 :D
02:51 dalek ecosystem: e338a9a | (Andy Weidenbaum)++ | META.list:
02:51 dalek ecosystem: Add module File::Presence
02:51 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e338a9a0da
02:51 dalek ecosystem: d2696e9 | (Zoffix Znet)++ | META.list:
02:51 dalek ecosystem: Merge pull request #225 from atweiden/file-presence
02:51 dalek ecosystem:
02:51 dalek ecosystem: Add module File::Presence: https://github.com/atweiden/file-presence
02:51 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d2696e9546
02:52 aindilis joined #perl6
02:55 inokenty joined #perl6
03:06 skids joined #perl6
03:39 huggable joined #perl6
03:42 Xliff m: say (1|2|3).type
03:42 camelia rakudo-moar e9019e: OUTPUT«Method 'type' not found for invocant of class 'Int'␤  in any  at gen/moar/m-Metamodel.nqp line 3138␤  in block <unit> at <tmp> line 1␤␤»
03:42 Xliff m: say (1|2|3).^name
03:42 camelia rakudo-moar e9019e: OUTPUT«Junction␤»
03:42 Xliff AARGH!
03:42 Xliff Y'all need to warn C ppl about that!
03:43 TEttinger m: say (1 ^ 2)
03:43 camelia rakudo-moar e9019e: OUTPUT«one(1, 2)␤»
03:44 TEttinger m: say (1^2)
03:44 camelia rakudo-moar e9019e: OUTPUT«one(1, 2)␤»
03:44 TEttinger m: say (1^2^3)
03:44 camelia rakudo-moar e9019e: OUTPUT«one(1, 2, 3)␤»
03:44 TEttinger what does ^ do? not xor apparently
03:45 Zoffix TEttinger, no, it creates a one Junction
03:45 Zoffix huggable, Junction
03:45 huggable Zoffix, Logical superposition of values: https://docs.perl6.org/type/Junction
03:46 TEttinger neat
03:46 Zoffix m: say 1 xor 2
03:46 camelia rakudo-moar e9019e: OUTPUT«1␤»
03:46 Zoffix m: say 0b10001 +^ 0b111111
03:46 AlexDaniel m: say (1+^2+^3)
03:46 camelia rakudo-moar e9019e: OUTPUT«46␤»
03:46 camelia rakudo-moar e9019e: OUTPUT«0␤»
03:47 Zoffix m: say 0b10001 xor 0b111111
03:47 camelia rakudo-moar e9019e: OUTPUT«17␤»
03:47 * Zoffix expected both to give same values :S
03:47 Zoffix m: say (0b10001 xor 0b111111).base: 2
03:47 camelia rakudo-moar e9019e: OUTPUT«Nil␤»
03:48 Zoffix m: say (0b10001 xor 0b111111)
03:48 camelia rakudo-moar e9019e: OUTPUT«Nil␤»
03:48 Zoffix mkay
03:49 Zoffix m: say (False xor True)
03:49 camelia rakudo-moar e9019e: OUTPUT«True␤»
03:49 Zoffix (it's Boolean)
03:56 ShimmerFairy xor is lower-precedence ^^ , btw.
03:56 dalek doc: 90cb587 | (Zoffix Znet)++ | doc/Language/traps.pod6:
03:56 dalek doc: Include bitwise ops in traps
03:56 dalek doc: review: https://github.com/perl6/doc/commit/90cb587285
03:57 Zoffix Doesn't seem to be documented
03:57 ShimmerFairy Zoffix: how about the other lower-prec ones, and and or? :)
03:58 Zoffix They are
03:58 ShimmerFairy weird, then.
03:59 dalek doc: cad79c4 | (Zoffix Znet)++ | doc/Language/traps.pod6:
03:59 dalek doc: Fix typo
03:59 dalek doc: review: https://github.com/perl6/doc/commit/cad79c4cd0
03:59 cooper_ joined #perl6
04:00 ShimmerFairy Zoffix: your addition on bitwise ops accidentally calls +& a boolean op, instead of ?&
04:01 dalek doc: 7477803 | (Zoffix Znet)++ | doc/Language/traps.pod6:
04:01 dalek doc: Fix typo
04:01 dalek doc:
04:01 dalek doc: ShimmerFairy++
04:01 dalek doc: review: https://github.com/perl6/doc/commit/74778032a3
04:01 Zoffix Proof that it's time to go to bed \o
04:02 ShimmerFairy o/
04:09 ugexe install perl6 module from .tar.gz archive with CURI extracting each individual file as needed with 0 perl6 dependencies: https://gist.github.com/ugexe/2​ca5464cd440ab651f9409f575ec3dac
04:11 cooper joined #perl6
04:11 cooper joined #perl6
04:24 cpage_ joined #perl6
04:28 cooper joined #perl6
04:48 cooper joined #perl6
04:59 Cabanossi joined #perl6
05:03 alienzj joined #perl6
05:07 alienzj joined #perl6
05:07 alienzj joined #perl6
05:22 wisti joined #perl6
05:50 telex joined #perl6
05:52 wisti joined #perl6
05:58 firstdayonthejob joined #perl6
06:00 moritz Zoffix: thanks, I've invited MasterDuke17
06:00 yoleaux 01:16Z <Zoffix> moritz: I recall you mentioning to point out contributors who might use a commit bit. Here's a candidate: https://github.com/MasterDuke17?​tab=overview&amp;period=monthly
06:10 _mg_ joined #perl6
06:18 abraxxa joined #perl6
06:22 CIAvash joined #perl6
06:25 domidumont joined #perl6
06:31 dalek doc: 446d434 | (Matt Oates)++ | doc/Language/traps.pod6:
06:31 dalek doc: Change string not iterable example
06:31 dalek doc:
06:31 dalek doc: This example is really bad since .flip on a string is the best way to reverse a string, so this document is really just introducing another trap for the user. I've changed it instead to sorting characters which I don't believe there is a string method for?
06:31 dalek doc: review: https://github.com/perl6/doc/commit/446d434de6
06:33 Ulti turns out I have a commit bit... might be worth nerfing early adopter sloths like me
06:34 AlexDaniel +1 for .sort
06:36 brrt joined #perl6
06:43 Woodi morning #perl6 :)
06:49 domidumont joined #perl6
06:50 Woodi finally I got to installing R2016.06. and must say that it is very paintfull to be user of something which is in fast development mode ;)  that speedups just *after* the release... at least 2016.06 catched some, lizmat++ ; jnthn++ :)
06:52 domidumont joined #perl6
06:56 moritz is "paintful" the same as "colorful"? :-)
06:57 Woodi moritz: no :)
07:01 abraxxa Hi ;)
07:03 Woodi o/
07:13 darutoko joined #perl6
07:18 wamba joined #perl6
07:23 araujo_ joined #perl6
07:38 dj_goku_ joined #perl6
07:38 dj_goku_ joined #perl6
07:39 huggable joined #perl6
07:39 dalek bisectbot: 55a10e8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bot.pl:
07:40 dalek bisectbot: Allow bot name as a prefix
07:40 dalek bisectbot:
07:40 dalek bisectbot: Given that people still try to do 「bisectable: somecodehere」, it is time to
07:40 dalek bisectbot: allow it.
07:40 dalek bisectbot:
07:40 dalek bisectbot: Note that 「bisectable: bisect: somecodehere」 is still not valid. If you do
07:40 dalek bisectbot: that, it will run fine because “bisect:” will be treated as a Perl 6 label,
07:40 dalek bisectbot: but that's still misuse.
07:40 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/55a10e86dc
07:42 dalek bisectbot: 166dd5a | (Aleks-Daniel Jakimenko-Aleksejev)++ | bot.pl:
07:42 dalek bisectbot: Remove debug output (oops)
07:42 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/166dd5a006
07:43 bisectable joined #perl6
07:44 AlexDaniel bisectable: for ‘q b c d’.words -> $a, $b { };
07:44 bisectable exit code on a “good” revision is 1 (which is bad), bisecting with inverted logic
07:44 bisectable AlexDaniel: (2016-03-01) https://github.com/rakudo/rakudo/commit/1b6c901
07:44 AlexDaniel ok
07:48 moritz nice!
07:49 zakharyas joined #perl6
07:57 rindolf joined #perl6
08:04 gfldex joined #perl6
08:14 g4 joined #perl6
08:24 Woodi so, in my baby-perl6 "benchmark" R*2016.04 was 24.25, R2016.05 was 23.25, same for R2016.06 and R2016.07.01 is 21.25  where 1 is some Perl5 script (a bit deoptimized with HOP...)
08:24 moritz so, the trend is good
08:25 Woodi yes, but we got long spring to recover after xmass :)
08:27 AlexDaniel in other words, 21 months to go? :)
08:29 Woodi now possibly it would be nice to look for holes/niches in "production environments"... maybe something like generating C code. or somethingsomething virtualization ? :)
08:29 Woodi AlexDaniel: you are so optimistic :)
08:30 AlexDaniel Woodi: not really, just a bit linear :)
08:30 * moritz wonders why this "compiling to C" meme never dies
08:30 Woodi moritz: becouse it's close to CPU and we have kind of CPU that we have :)\
08:31 AlexDaniel Woodi: in fact, it is 22 months till global catastrophe due to artificial intelligence
08:31 Woodi AlexDaniel: 2012 was worse perspective :)
08:33 Woodi do we Still faster then Moose ? what about comparing to other Moo'ses ?
08:34 AlexDaniel https://docs.perl6.org/language/fa​q#Is_Perl_6_fast_enough_for_me%3F
08:34 AlexDaniel no idea
08:34 AlexDaniel I guess that we have to run these snippets to find out :D
08:49 vendethiel joined #perl6
08:50 moritz Woodi: still, it's a fallacy. MoarVM is also written in C, so we already get the speed that C can give us
08:53 RabidGravy joined #perl6
08:54 ShimmerFairy moritz: actually, I'd argue ultimately compiling to your CPU's native assembler is better than that of a VM built on top of your CPU :P
08:55 Woodi moritz: but PMCs are not native types...
08:59 moritz ShimmerFairy: but the need for the VM features doesn't go away by compiling Perl 6 to C
08:59 moritz you still need garbage collecition, multi dispatch, named arguments and all that stuff
08:59 Woodi AlexDaniel: Mojo 2.96s; Moose 9.68; Perl6 17,36s; Moose (mutable classes) 142,92s
09:00 ShimmerFairy moritz: that feels like an overly-literal approach to what's basically source translation; you wouldn't need e.g. named arguments if my P6 script never uses them.
09:04 neuron joined #perl6
09:05 Woodi moritz: my use case is: some portal using 100 (sorry, late 90s numbers ;) ) Intel servers doing PHP apps like postcards.portal.com/news/sport/music/.... and no money to buy more servers; moust apps are same PHP code with different content. I think that if that apps will be in C it would be like 50 unused servers...
09:06 sno joined #perl6
09:07 Woodi ...so HLL is good for prototyping but when it is working it needs to be rewrited into something generating native code...
09:07 jkramer joined #perl6
09:07 jkramer Ahoy
09:07 Woodi eg. sysV init scripts was too long a "scripts" ;)
09:07 Woodi hi jkramer :)
09:08 jkramer I'm not sure if I'm doing something wrong or if I might have found a bug. I have this line: my %short-flags <== map { $_.short => $_ } <== grep { $_.short } <== @!options;
09:08 jkramer It works fine, but if I put linebreaks in front of the <=='s, I get a syntax error
09:08 jkramer About a missing '>'
09:09 bjz joined #perl6
09:09 pmurias joined #perl6
09:10 pmurias re compiling to C, why would be that better than what MoarVM is currently doing and compiling to machine code?
09:12 ShimmerFairy pmurias: the only big plus that comes to my mind is "way more portable source" (as in, someone's far more likely to have a spare gcc on hand than a spare rakudo)
09:13 ShimmerFairy pmurias: but yeah, making it somehow possible to do mbc->asm would be of comparable usefulness.
09:13 gfldex m: https://gist.github.com/gfldex/d​083f6925f0472ee8a1fab7817d45910
09:13 camelia rakudo-moar e9019e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:5␤------> 3    <== @options;7⏏5<EOL>␤    expecting any of:␤        postfix␤        quote words␤       …»
09:14 gfldex m: https://gist.github.com/gfldex/d​083f6925f0472ee8a1fab7817d45910
09:14 camelia rakudo-moar e9019e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Shaped variable declarations not yet implemented. Sorry. ␤at <tmp>:3␤------> 3    <== map { $_.uc =>7⏏5 $_ }\␤»
09:15 gfldex jkramer: feed operators are not propery implemented yet, the error message is LTA tho
09:16 jkramer gfldex: Ok, thanks
09:18 pmurias ShimmerFairy: the runtime is needed, so we would need to bundle up a rakudo
09:19 Actualeyes joined #perl6
09:19 ShimmerFairy pmurias: for what, the C idea? Not for a sufficiently clever translator :P
09:21 abraxxa joined #perl6
09:26 pmurias If you get someone to rewrite in program in C it likely won't need the Rakudo runtime
09:28 ShimmerFairy Well sure, humans usually count as sufficiently clever translators :)
09:28 pmurias only ones I can imagine
09:28 ShimmerFairy pmurias: I think at minimum it should dynamically link what it wants (e.g. libmoar.so). Bundling a static library into it, or otherwise forcing someone to cart around the runtime with the program, would be quite LTA.
09:31 pmurias ShimmerFairy: isn't carting around everything that's needed what people want when they package around things as an executable for linux?
09:32 ShimmerFairy pmurias: not really. Windows, yeah, but on Linux the magic is that you _don't_ have to package up all the libraries you need :)
09:36 moritz static linking and fat-packaging still has advantages on linux
09:36 Woodi pmurias: just tested: strace nqpSayA  401 syscals; strace cSayA 28...
09:37 pmurias Woodi: ?
09:38 Woodi pmurias: so execution time is 20+ times shorter...
09:38 Woodi m: say 401/28
09:38 camelia rakudo-moar e9019e: OUTPUT«14.321429␤»
09:38 Woodi ok, 14 :)
09:39 ShimmerFairy moritz: I've personally never run into a situation where that's genuinely helpful. .so's are just too nice :)
09:39 pmurias Woodi: we are not at hand written performance yet
09:40 Woodi pmurias: but it's not about us, just how things generally are...
09:40 Woodi and of coursse making C code is harder then HLL but it's why HLL is for ptototyping and then "evaluating" :)
09:41 pmurias Woodi: there is nothing forcing things to be that way
09:43 jjido_ joined #perl6
09:44 pmurias Woodi: if I wanted to waste the time I could make NQP emit hand written quality C code for hello world programs
09:45 pmurias or other stupid benchmark of the month
09:50 wamba joined #perl6
10:01 jkramer Another question: why does this work: my @foo = grep { ... }, @stuff; my $bar = @foo.first; But not: my $bar = first grep { ... }, @stuff ?
10:02 tbrowder morning #perl6
10:02 jkramer Oh nevermind, I get it. When called as a sub the first argument is a matcher.
10:02 jkramer Ha, that's genious actually, saves me a grep :)
10:03 tbrowder what's the policy on leaving debug code in source for at least a while?
10:14 gregf_ jkramer: grep is a global function, whereas first is a method
10:15 gregf_ m: say ([1..10].grep: { $_ %% 3 }).first
10:15 camelia rakudo-moar e9019e: OUTPUT«3␤»
10:15 vendethiel joined #perl6
10:16 gregf_ well, there i guess, grep is a method call :| #confusing
10:17 ShimmerFairy lots of things are provided in both sub and method form for convenience and preferred programming style.
10:20 pmurias tbrowder: you mean leaving in commented out debugging comment in rakudo source code?
10:20 tbrowder yes
10:20 psch tbrowder: if it's generally useful and meaningful and hidden behind an env var, i'd say go ahead
10:20 yoleaux 02:30Z <AlexDaniel> psch: so the reason why it points to 2015-12-25 is because it says “Could not find REPL in:” and then it prints paths…
10:20 yoleaux 02:42Z <AlexDaniel> psch: You probably wanted something like this: bisect: EVAL “use REPL” if 1; CATCH { exit 1 if $_ ~~ /builtin/; exit 0 }
10:21 jjido_ joined #perl6
10:21 kaare_ joined #perl6
10:23 tbrowder pmurias: okay, thanks, i don't want to abuse it but i'm preparing a PR that might need some retries before being accepted and might need more debugging
10:24 timotimo i've probably done it differently in the past, but it's favorable to not leave debug output around for bisectability and such. though it's probably no big deal
10:25 psch right, the big thing is that you have to work for it to come out
10:25 psch like, we have RAKUDO_MODULE_DEBUG around for what, a year?
10:25 psch but that's fine, cause without the env var it doesn't get in the way
10:25 timotimo ah, well, if you put it behind an env var, that's probably fine
10:25 timotimo i wonder if the checks for rakudo module debug are optimized at all, or if they are a performance drain
10:25 dalek doc: 628efba | (Jan-Olof Hendig)++ | doc/Type/Date.pod6:
10:25 dalek doc: Expanded the doc for Date.Str
10:25 dalek doc: review: https://github.com/perl6/doc/commit/628efba759
10:25 psch that's an interesting question, yeah
10:26 psch iirc $RMD is lexical everywhere its used..?
10:28 timotimo i haven't looked at all
10:28 timotimo just a random thought that came to my mind
10:29 timotimo like how if you have a benchmark with a while loop that compares an int against @*ARGS[0], it'll be a million times slower than if you .Int it once and put it into a variable, or even into a native variable
10:30 psch 41 lines with $RMD
10:30 psch well, two are from CUR::Perl5
10:30 psch the rest is PrecompRepo, World, RepoRegistry, in descent amount
10:31 timotimo descent was a great game
10:31 psch +ing
10:31 psch :|
10:31 psch well, descending /o\
10:33 tlvb joined #perl6
10:34 abraxxa joined #perl6
10:35 nine I'm quite sure that $RMD costs some performance and I'm very much looking forward to a time when we can remove it. Will also make the code nicer.
10:35 timotimo yay
10:36 timotimo *sigh*, the thing about my virtual desktop setup is that i don't have enough virtual desktops right next to my irc/browser/jabber desktop :P
10:37 DrForr Enlightenment splits desktops per display, default of 4 each.
10:38 psch well, the naive benchmark i whipped up here is actually half a second slower without $RMD :S
10:38 timotimo i want both my displays to switch at the same time
10:38 timotimo haha, that's great :D
10:39 psch ah shucks, now i tossed a change i had been working on :|
10:39 psch well, not too bad
10:40 psch cause it also would need some design input anyway
10:40 psch #127924 that is
10:40 nine tossed?
10:40 psch yeah, checkout .
10:41 psch 'cause i wanted to get rid of the comment-out-$RMD changes but forgot there was other changes around
10:41 psch no big deal though, it didn't really work yet anyway and i still recall what i did do :)
10:41 timotimo oof
10:41 timotimo do you know of git checkout -p ?
10:41 psch yeah
10:42 psch i might eventually learn to always do confirm-y stuff, but apparently not yet :)
10:44 timotimo i suppose you have to get hurt often enough in order to really build that habit :\
10:45 psch anyway, the thing with the ticket above is, that if &return inside an 'is rw' Routine is what we have &return-rw for now, (1) is return-rw still allowed in a not-'is rw' Routine? (2) do we actually still need &return-rw if not (1)?
10:46 psch https://rt.perl.org/Public/​Bug/Display.html?id=127924 # because synopsebot is on vacation apparently
10:54 nine I lost an evening of playing Diablo II this week due to a git checkout .
10:54 nine Recovered the progress in a speedrun though :)
10:55 psch Diablo II is something i will never start playing again :P
11:01 jkramer Is there some syntax sugar to avoid having to type long namespaces/class/enum paths too often? Something like this would help: enum Foo <A B>; Need::These::Values::{A,B}
11:01 sjn \o
11:01 timotimo importing should help
11:02 jkramer I mean Need::These::Values::Foo::{A,B} of course
11:02 jkramer I'm actually in the same module
11:02 timotimo m: enum Foo::Bar::Baz <A B C>; say Foo::Bar::Baz::<A B C>.perl
11:02 camelia rakudo-moar e9019e: OUTPUT«(Foo::Bar::Baz::A, Foo::Bar::Baz::B, Foo::Bar::Baz::C)␤»
11:02 jkramer Although the enum is in a different class
11:03 jkramer Ah neat, thanks a bunch!
11:04 sjn what's the idiomatic way of sorting a hash by key (or by value, for that matter)?
11:05 psch m: my \CURI = CompUnit::Repository::Installation; say CURI.perl
11:05 camelia rakudo-moar e9019e: OUTPUT«CompUnit::Repository::Installation␤»
11:05 psch jkramer: an alternative i suppose ^^^
11:05 psch m: my %h = :2b, :1c, :3a; say %h.sort; say %h.sort: *.value
11:05 camelia rakudo-moar e9019e: OUTPUT«(a => 3 b => 2 c => 1)␤(c => 1 b => 2 a => 3)␤»
11:06 sjn psch: thanks! :)
11:07 * sjn tried with %h.sort(:value) and that didn't do anything
11:07 psch right, sort takes a positional Callable
11:07 sjn I now see the errors of may ways :)
11:08 sjn should nonsensical parameters to sort give a warning?
11:08 ShimmerFairy not nonsensical named params to methods :D
11:08 psch no nonsensical named parameter will every give a warning
11:08 psch well, to methods, yes, ShimmerFairy++
11:09 ShimmerFairy (it's the ~totally sensible~ magic of *%_ that ~definitely~ deserves to be a part of P6)
11:13 jjido_ joined #perl6
11:14 sjn m: my %h = :2b, :1c, :3a; for %h.sort.kv -> $nums, $letters { say $letters };
11:14 camelia rakudo-moar e9019e: OUTPUT«a => 3␤b => 2␤c => 1␤»
11:14 sjn doesn't .kv actually return the key?
11:14 sjn seems it returns a pair
11:14 ShimmerFairy m: say {:2b,:1c:3a}.kv.perl
11:14 camelia rakudo-moar e9019e: OUTPUT«("a", 3, "c", 1, "b", 2).Seq␤»
11:15 ShimmerFairy m: for {:2b,:1c:3a}.kv { say $_ }
11:15 camelia rakudo-moar e9019e: OUTPUT«a␤3␤c␤1␤b␤2␤»
11:15 ShimmerFairy m: for {:2b,:1c:3a}.kv -> ($nums, $letters) { say $letters }
11:15 camelia rakudo-moar e9019e: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at <tmp> line 1␤␤»
11:15 ShimmerFairy m: for {:2b,:1c:3a}.kv -> $nums, $letters { say $letters }
11:15 camelia rakudo-moar e9019e: OUTPUT«3␤1␤2␤»
11:15 psch m: my %h = :2b, :1c, :3a; %h.sort.WHAT.say
11:15 camelia rakudo-moar e9019e: OUTPUT«(List)␤»
11:15 psch m: my %h = :2b, :1c, :3a; %h.sort[0].say
11:15 camelia rakudo-moar e9019e: OUTPUT«a => 3␤»
11:16 psch .kv on a List gives you ($index, $value)
11:16 ShimmerFairy psch: oh, I think I get it
11:16 ShimmerFairy yeah, that
11:16 psch .sort returns a sorted list of Pairs
11:16 ShimmerFairy sjn: I mean
11:16 psch m: my %h = :2b, :1c, :3a; for %h.sort.kv -> $, (:$key, :$value) { say "$key: $value" };
11:16 camelia rakudo-moar e9019e: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:17 sno joined #perl6
11:17 sjn that looks a little cludgey.. :-(
11:17 psch sjn: well, a Hash itself cannot be sorted :)
11:17 psch so the result must be something that retains order
11:18 psch m: my %h = :2b, :1c, :3a; for %h.sort -> (:$key, :$value) { say "$key: $value" };
11:18 camelia rakudo-moar e9019e: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:18 psch you can just drop the .kv though
11:18 sjn right
11:18 psch 'cause the k in kv is just the index anyway vOv
11:19 lizmat Woodi: I feel your pain, but some optimizations are not without risk to the ecosystem out there
11:20 lizmat Woodi: so we like to get them out just after the release, so that we have a month for fixing any ecosystem breakage
11:21 Woodi lizmat: of course, just like no software upgrades on Friday :)
11:23 sjn funny, psch's example doesn't work on my rakudo build (a few weeks old).
11:23 sjn has there been any work on things like that lately?
11:23 psch star-m: my %h = :2b, :1c, :3a; for %h.sort -> (:$key, :$value) { say "$key: $value" };
11:23 camelia star-m 2016.04: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:23 andreoss joined #perl6
11:24 psch sjn: what's your $*PERL.compiler?
11:24 sjn psch: currently under recompilation :)
11:24 psch heh :)
11:24 psch well, it's fine in 2016.04 and it's fine now
11:24 sjn lots of build warnings though
11:24 psch might have been something intermittenly weird, no idea
11:28 timotimo https://twitter.com/rpy/status/622291301002670080  <3
11:32 sjn m: my %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$letters
11:32 camelia rakudo-moar e9019e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3a; for %h.sort -> (:$numbers, :$letters7⏏5<EOL>␤    expecting any of:␤        constraint␤»
11:33 sjn m: my %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$lettersmy %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$letters
11:33 camelia rakudo-moar e9019e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3; for %h.sort -> (:$numbers, :$lettersmy7⏏5 %h = :2b, :1c, :3a; for %h.sort -> (:$n␤    expecting any of:␤        constraint␤»
11:33 jjido_ joined #perl6
11:33 sjn dammit
11:34 psch sjn: that's not gonna work.  (:$key, :$value) is an unpacking sub-signature
11:34 sjn m: my %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$letters) { say "$numbers: $letters" } # should work
11:34 camelia rakudo-moar e9019e: OUTPUT«2 unexpected named arguments passed (key,value) in sub-signature␤  in block <unit> at <tmp> line 1␤␤»
11:34 psch m: (a => 1).^attributes.say
11:34 camelia rakudo-moar e9019e: OUTPUT«(Mu $!key Mu $!value)␤»
11:34 sjn hm
11:35 psch m: class A { has $.frobniz; }; with A.new(:1frobniz) -> (:$frobniz) { say $frobniz }
11:35 camelia rakudo-moar e9019e: OUTPUT«1␤»
11:36 lizmat m: my %h = :2b, :1c, :3a; for %h.sort -> (:key($numbers), :value($letters)) { say "$numbers: $letters" }  # must use key/value names
11:36 camelia rakudo-moar e9019e: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:36 sjn ok, so I have a hash, I'd like the pairs of them to end up in two variable I've named, and I'd like to have it done in a sorted way, so I can iterate over it
11:37 sjn lizmat: has the way :)
11:37 lizmat sort generates Pair, Pairs attributes are "key" and "value"
11:37 lizmat hence you *must* use :key / :value
11:37 timotimo i'd describe it as "sort uses .List, which on a hash gives you a list of Pair objects"
11:38 lizmat :$key is just short for :key($key)
11:38 sjn ok
11:39 sjn and you have to use the paranthesis around those, because we're "unpacking" the Pairs?
11:39 lizmat that's my understanding, yes
11:39 lizmat it's basically a signature
11:39 timotimo aye, the thing after -> is a signature
11:39 timotimo right
11:39 timotimo if you have :$key, :$value, you expect two named arguments
11:40 timotimo when you have (:$key, :$value), you expect a single argument
11:40 timotimo and that gets unpacked
11:40 sjn right
11:40 sjn a signature
11:40 sjn sjn's brain is going all bendy from this
11:41 gfldex https://docs.perl6.org/type/Sig​nature#Destructuring_Parameters <-- we even got tha doced!
11:41 sjn bendy-warpy
11:41 gfldex i wonder if we should put /type/Signature at the front page :)
11:41 sjn or wendy-barpy? o_O
11:41 timotimo :P
11:42 lizmat .oO( bendy-warpy salvetion )
11:43 sjn :)
11:44 sjn anyhoo, thanks for the help!
11:45 * DrForr waves to lizmat. *hug*
11:45 * lizmat waves back to DrForr :-)
11:53 skids joined #perl6
11:55 wamba joined #perl6
11:56 AlexDaniel joined #perl6
12:02 depy joined #perl6
12:02 iH2O joined #perl6
12:03 iH2O hello perl6ers
12:04 depy left #perl6
12:04 timotimo hey
12:04 iH2O hmm
12:06 loren joined #perl6
12:09 jkramer How can I get the message/string from a Failure without the "(HANDLED)" prefix?
12:10 timotimo m: sub test { fail "oh no" }; test().^methods.say
12:10 camelia rakudo-moar e9019e: OUTPUT«(DESTROY AT-POS AT-KEY defined handled Int Num Numeric mess sink CALL-ME FALLBACK STORE new Bool Str gist perl exception backtrace AT-POS AT-KEY BIND-POS ASSIGN-KEY STORE iterator sink unshift chrs FALLBACK gist Numeric Str BIND-KEY new ords push ASSIGN-PO…»
12:10 DrForr Hee.
12:10 timotimo m: sub test { fail "oh no" }; test().^attributes.say
12:10 camelia rakudo-moar e9019e: OUTPUT«(Mu $!exception Mu $!backtrace int $!handled)␤»
12:10 andreoss masak: in 007 there's no way to access object properties through a sub stored in this object?
12:10 timotimo hmm.
12:10 loren m: say "substr1: " ~ ("a" x 3 ~ "b" x 5).substr(1), " substr2: " ~ ("a" x 3 ~ "b" x 5).substr(2);
12:11 camelia rakudo-moar e9019e: OUTPUT«substr1: aabbbbb substr2: aabbbb␤»
12:11 timotimo loren: old bug :(
12:11 lizmat jkramer: probably $failure.exception.message
12:11 timotimo indeed, lizmat
12:11 loren ...oh, ..
12:11 timotimo m: sub test { fail "oh no" }; test().exception.perl.say
12:11 camelia rakudo-moar e9019e: OUTPUT«X::AdHoc.new(payload => "oh no")␤»
12:11 jkramer lizmat: Yup, thanks!
12:11 loren So quickly ...
12:12 timotimo i'm too dumb to fix it; it's in our implementation of ropes
12:14 lizmat loren: which is why concatenated strings are not actually always contiguous in memory in MoarVM
12:14 gfldex isn't `fail` a control flow thing?
12:14 gfldex m: dd &fail
12:14 camelia rakudo-moar e9019e: OUTPUT«Sub fail = sub fail (| is raw) { #`(Sub|46380296) ... }␤»
12:14 timotimo yeah, it causes the routine it's used in to return
12:15 * gfldex fires up vim
12:15 loren lizmat, en, i see
12:16 timotimo m: my $thing = "a" x 3 ~ "b" x 5; say "substr1: " ~ $thing.substr(1), " substr2: " ~ $thing.substr(2);
12:16 camelia rakudo-moar e9019e: OUTPUT«substr1: aabbbbb substr2: aabbbb␤»
12:16 timotimo m: my $thing = "a" x 3 ~ "b" x 5; $thing ~~ /../; say "substr1: " ~ $thing.substr(1), " substr2: " ~ $thing.substr(2);
12:16 camelia rakudo-moar e9019e: OUTPUT«substr1: aabbbbb substr2: abbbbb␤»
12:17 timotimo ^- running a regex on a string is one of the operations that forces a rope to collapse into a contiguous piece of memory
12:17 timotimo that's why those two behave differently
12:21 lizmat timotimo: is there a way to programmatically force a rope collapse ?
12:21 timotimo nqp::flattenrope
12:21 lizmat could make debugging easier / faster ?
12:21 DrForr Take away its via... never mind :)
12:22 dalek doc: 98ef33c | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
12:22 dalek doc: add fail to Control Flow
12:22 dalek doc: review: https://github.com/perl6/doc/commit/98ef33c8dd
12:22 jnthn I don't think we expose the flattenrope op as an nqp:: op...
12:22 jnthn The regex code-gen just spits out out
12:23 jnthn The simplest way now is just the $str ~~ /<?>/ :)
12:23 iH2O left #perl6
12:24 colomon joined #perl6
12:24 jkramer How can I split a string into single characters? I only found .ords and that gives me codepoints. Do I need to do something like .split(//) like in P5 or is there a nicer way?
12:24 timotimo use .comb
12:25 jkramer Thanks, that seems to work. Still getting used to all the new/"unusual" method names :)
12:25 loren timotimo, lizmat  thanks, learned a lot ..
12:25 timotimo you ain't never heard of "spurt" before? ;)
12:26 timotimo spurt ain't no method i ever heard of. they speak I/O in spurt?
12:28 jkramer Is it like spit/spew in some P5 slurp modules? :D
12:31 kid51 joined #perl6
12:33 rahogaboom joined #perl6
12:36 dalek joined #perl6
12:37 lizmat comments welcome on https://github.com/rakudo/r​akudo/commit/516b997a4a26d
12:38 user9 joined #perl6
12:40 Juerd lizmat: I use the REPL to show mostly the here-mark in error messages to people, every time LTA error messages in other languages come up at the hackerspace
12:40 lizmat well, I would like to keep the HERE mark, but was too lazy to dive into keeping it
12:41 lizmat but I think we can agree on the <unknown file> nonsense not being needed ?
12:42 grondilu joined #perl6
12:44 rgrinberg joined #perl6
12:45 rahogaboom_ joined #perl6
12:45 rahogaboom_ left #perl6
12:48 lizmat Juerd: fix coming up
12:50 rahogaboom_ joined #perl6
12:52 sufrostico joined #perl6
12:54 ab6tract joined #perl6
12:55 ab6tract o/ #perl6
12:55 kurahaupo_ joined #perl6
12:56 Juerd lizmat: Unknown file isn't just unneeded, it's wrong :)
13:00 mcmillhj joined #perl6
13:01 ab6tract i seem to remember reading something about a 400x performance improvement recently courtesy of jnthn++
13:01 ab6tract but can't seem to find a reference to it anymore
13:04 lizmat Juerd: https://github.com/rakudo/rakudo/commit/12f12a5869
13:04 kurahaupo joined #perl6
13:05 Juerd lizmat: Yay. Would like to retain the line number if it's not 1 though. Haven't done it yet with p6, but in p5 I sometimes generate code and shove that in stdin
13:05 Juerd But it's a weird use case. Not sure if it's worth any effort.
13:06 kurahaupo` joined #perl6
13:07 llfourn_ joined #perl6
13:08 Khisanth joined #perl6
13:12 canopus joined #perl6
13:12 lizmat Juerd: https://github.com/rakudo/rakudo/commit/8a2ffacdb9
13:13 Juerd Looks great!
13:13 Juerd Not annoying anymore in the common use cases, still awesome in the less common use case.
13:14 lizmat fg
13:14 lizmat oops
13:25 wisti joined #perl6
13:26 vendethiel- joined #perl6
13:31 * masak jumps to the foreground!
13:32 skids joined #perl6
13:33 lizmat .oO( finally :-)
13:35 masak sorry, I've been backgrounded lately
13:36 Guest85881 joined #perl6
13:40 dalek doc: b694438 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
13:40 dalek doc: fix fail example
13:40 dalek doc: review: https://github.com/perl6/doc/commit/b6944382dd
13:48 pdcawley joined #perl6
14:02 jjido joined #perl6
14:23 kid511 joined #perl6
14:32 mr-foobar joined #perl6
14:32 inokenty joined #perl6
14:43 DarthGandalf joined #perl6
14:43 * AlexDaniel trying to get some more eyes on some old doc issues
14:48 ptolemarch joined #perl6
14:50 jjido joined #perl6
14:54 Zoffix nqp-m: grammar Foo { token TOP { <meow>+ }; token meow { . } }; Foo.HOW.trace-on(Foo); Foo.parse('fobar');
14:54 camelia nqp-moarvm: OUTPUT«Calling parse␤  Calling TOP␤    Calling meow␤    Calling meow␤    Calling meow␤    Calling meow␤    Calling meow␤    Calling meow␤»
14:54 Zoffix m: grammar Foo { token TOP { <meow>+ }; token meow { . } }; Foo.HOW.trace-on(Foo); Foo.parse('fobar');
14:54 camelia rakudo-moar 1d4c11: OUTPUT«Method 'trace-on' not found for invocant of class 'Perl6::Metamodel::GrammarHOW'␤  in block <unit> at <tmp> line 1␤␤»
14:55 * Zoffix is a bit surprised that feature is unavailable in P6, since it's very handy
14:55 Zoffix Or is it just a case of NIY?
14:56 psch Zoffix: it's in Grammar::Debugger i think
14:56 Zoffix psch, it implements it's own meta object
14:57 psch Zoffix: yeah, it still supplies that exact feature, doesn't it?
14:57 psch Zoffix: i'm also assuming that if we could have had that from nqp easily, it probably would've come from there
14:58 psch Zoffix: further, i also think that we only have it in nqp to help develop rakudo
14:58 psch Zoffix: that's not to say that you couldn't take it as NYI and try and get it working in CORE, i just don't know how necessary it is to ship by default
14:59 psch nqp-m: grammar G { }; nqp::say(G.HOW(G))
14:59 camelia nqp-moarvm: OUTPUT«cannot stringify this␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1505  (/home/camelia/rakudo-m-inst-1/sh​are/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQP…»
14:59 psch nqp-m: grammar G { }; nqp::say(G.HOW.name(G))
14:59 camelia nqp-moarvm: OUTPUT«G␤»
14:59 psch nqp-m: grammar G { }; nqp::say(nqp::how(G))
14:59 camelia nqp-moarvm: OUTPUT«cannot stringify this␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1505  (/home/camelia/rakudo-m-inst-1/sh​are/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQP…»
14:59 psch eh, that's not gonna help...
15:00 psch anyway, the method seems to sit on NQPClassHOW, which makes it not grammar-specific
15:01 Zoffix ok
15:01 psch nqp-m: grammar G { }; nqp::say(G.HOW.HOW.name(G.HOW)) # that's what i was looking for :|
15:01 camelia nqp-moarvm: OUTPUT«NQPClassHOW␤»
15:01 AlexDaniel bisect: my $p1 = start die "I’m dead"; my $p2 = start ~"I’m alive"; try await Promise.allof($p1, $p2); say .result for grep { .status ~~ ‘Kept’}, $p1, $p2;
15:01 bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
15:01 AlexDaniel meh
15:02 kerframil joined #perl6
15:03 psch Zoffix: what i'm mostly trying to say is that it exists in nqp as a debugging aid for developing rakudo, but it's never been speculated as a CORE feature for Perl 6
15:03 psch Zoffix: i'm not sure that was clear, and i'm also a bit worried i came of too harsh... :)
15:06 Zoffix I got it. Thanks.
15:06 Zoffix left #perl6
15:09 mcmillhj joined #perl6
15:13 wamba joined #perl6
15:13 dogbert17 m: say "Womble"
15:13 camelia rakudo-moar 1d4c11: OUTPUT«Womble␤»
15:14 dogbert17 o/ does anyone have time to give my latest doc gist a once over? https://gist.github.com/dogbert17​/2b669457ea9e4e3203f050222350323d
15:15 as joined #perl6
15:15 jervo joined #perl6
15:21 autarch joined #perl6
15:23 khw joined #perl6
15:25 moritz dogbert17: looks good, the only odd thing is the useage of Baggy:_
15:26 dogbert17 moritz: it's from the src
15:26 moritz dogbert17: it's redundant nonetheless
15:27 moritz method ACCEPTS($other)
15:27 dogbert17 moritz: ok, should I remove it?
15:27 moritz just as precise
15:27 moritz yes, please
15:27 dogbert17 moritz: consider it done :)
15:27 * moritz does
15:27 moritz dogbert17++
15:28 dogbert17 only two more methods to go in Baggy, categorize-list and classify-list, arrrgh
15:29 AlexDaniel dogbert17++
15:30 AlexDaniel actually, ++ everyone working on the docs. The graph here is awesome: https://github.com/perl6/doc/graphs/contributors
15:31 * [Coke] drinks hotel coffee
15:34 jdv79 is there an p6 event somewhere?
15:34 dalek doc: ae2951b | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod6:
15:34 dalek doc: Added docs for Baggy.ACCEPTS. moritz++
15:34 dalek doc: review: https://github.com/perl6/doc/commit/ae2951bd5c
15:35 * moritz doesn't write nearly as much docs as he wishes these days
15:37 michiamodiego joined #perl6
15:37 [Coke] jdv79: nope, just a family trip. today is a chill day.
15:38 dalek doc: 84b55f6 | coke++ | t/pod6.t:
15:38 dalek doc: no pod, just pod6
15:38 dalek doc: review: https://github.com/perl6/doc/commit/84b55f6f92
15:38 jjido joined #perl6
15:38 jdv79 o
15:39 huggable joined #perl6
15:45 [Coke] when bisectable finds a difference in outputs, does it save it? that might be useful.
15:49 AlexDaniel [Coke]: no, but we should probably think about merging bisectable with camelia
15:50 iH2O joined #perl6
15:50 [Coke] anyone looking to help out core developers, there are 28 tickets that need perl6 tests written for them.
15:52 [Coke] https://i.imgur.com/e3z4aWq.jpg #perl
16:03 kyclark joined #perl6
16:03 kyclark Given my $bag = <a b b c>.Bag, how would I find the item with the highest count (b)?
16:04 araujo joined #perl6
16:06 setty1 joined #perl6
16:08 [Coke] m: my $bag = <a b b c>.Bag; ($bag.sort: *.value).reverse[0].key.say
16:08 camelia rakudo-moar 1d4c11: OUTPUT«b␤»
16:09 [Coke] m: my $bag = <a b b c>.Bag; ($bag.sort: *.value)[*-1].key.say
16:09 camelia rakudo-moar 1d4c11: OUTPUT«b␤»
16:09 [Coke] do we have a list of ways to get things into search from .pod6 files on doc?
16:09 kurahaupo_ joined #perl6
16:12 kyclark Thanks, [Coke]
16:12 jcallen joined #perl6
16:17 [Coke] zoffix: what's de23b7c  on perl6/doc ?
16:17 dalek Heuristic branch merge: pushed 253 commits to doc/makefile by coke
16:19 cbk joined #perl6
16:25 psch m: my $bag = <a b b c>.Bag; ($bag.sort: -*.value).first.key.say
16:25 camelia rakudo-moar 1d4c11: OUTPUT«b␤»
16:25 travis-ci joined #perl6
16:25 travis-ci Doc build failed. Will "Coke" Coleda 'Merge branch 'master' into makefile'
16:25 travis-ci https://travis-ci.org/perl6/doc/builds/141661878 https://github.com/perl6/doc/com​pare/1bfdaf28bafd...e8ef3e10636b
16:25 travis-ci left #perl6
16:26 jjido joined #perl6
16:28 iH2O left #perl6
16:29 addison joined #perl6
16:35 pr1 joined #perl6
16:36 pr1 left #perl6
16:38 rindolf joined #perl6
16:39 Zoffix joined #perl6
16:40 Zoffix [Coke], it's a commit that lets us use SASS (http://sass-lang.com/), which is CSS superset that makes it easier to write CSS code. It's the same thing we use on perl6.org and modules.perl6.org and the dev app can automatically generate the CSS from SASS (also part of that commit).
16:41 [Coke] danke. was trying to suss it out from way too little info (the .gitignore). :)
16:45 timotimo .o( it's developed by Dr Suass )
16:46 Zoffix The .gitignore stuff are files generated by the Mojolicious::Plugin::AssetPack plugin that converts SASS. It's basically a cache, so it doesn't have to convert them each time the app is started (if there weren't any changes) and those files are not needed in the repo.
16:46 [Coke] seeing a ton of Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub extract-pod at htmlify.p6 line 189 again in doc build.
16:51 nebg hello everyone... can somebody suggest me a good software to do UML schemes which works on linux ?
16:53 lostinfog joined #perl6
16:54 [Coke] I did not realize UML was still a thing.
16:55 timotimo i used to use an eclipse plugin if i'm remembering correctly
16:56 yqt joined #perl6
16:56 AlexDaniel nebg: about a year ago I had to deal with UML and found nothing
16:56 AlexDaniel well, there was something, but it was very buggy and was crashing every five minutes
16:56 timotimo there's potentially a web app that's better than every single desktop app out there :P
16:57 nebg timotimo, ok tell me
16:57 AlexDaniel … which is a good indication of how popular UML is…
16:57 timotimo i have no idea. it was just a guess
16:57 addison joined #perl6
16:57 nebg timotimo, are you a professor ?
16:57 timotimo i am not
16:58 timotimo i'm just as unhelpful as one
16:58 AlexDaniel I think that I ended up drawing something in https://www.draw.io/ … which is not primarily an UML thing, but believe me it works better than other UML software
16:58 AlexDaniel the drawback is that it is not free software
17:00 AlexDaniel … but at least you don't have to install proprietary crap on your computer, which is what UML is about…
17:00 * AlexDaniel is getting emotional
17:08 kyclark joined #perl6
17:09 zostay the last time i used real UML was 2000 when it was required for course work by a prof that also thought that cocomo and tracking daily LOC were valuable practices...
17:10 jjido joined #perl6
17:11 stmuk its just stick figures isn't it?
17:11 AlexDaniel stmuk: a bit more than that, but yeah
17:11 stmuk I even bought a book on it once years back
17:11 stmuk when it was all the rage
17:11 AlexDaniel how many pages in that book?
17:12 geekosaur ...and how much semantic content per page?
17:12 stmuk it was the quite slim one
17:13 stmuk UML Distilled!
17:14 AlexDaniel “More than 300,000 developers have benefited from past editions of UML Distilled”
17:14 AlexDaniel how do they know that they actually benefited?
17:14 Zoffix left #perl6
17:15 firstdayonthejob joined #perl6
17:15 labster joined #perl6
17:17 gfldex AlexDaniel: they asked the head of marketing
17:17 AlexDaniel why not 1 million then?
17:18 gfldex hard to tell. I'm not really into marketing.
17:19 AlexDaniel timotimo: OK, some time ago you said (I believe it was you) that I should probably move bisectable to hack
17:19 kyclark joined #perl6
17:19 AlexDaniel timotimo: which is a great idea because I have a rather small ssd on my server… :)
17:19 AlexDaniel timotimo: so what's the process? I should send someone my pub key, right?
17:22 timotimo yup
17:28 rindolf joined #perl6
17:30 wisti joined #perl6
17:44 kyclark I have a list of files that should all have the same number of lines.  I'd like to read one line from each file until I've exhausted all of them.  Is that a Supply or a Channel?  What's the most elegant Perl 6 way to do this?
17:46 domidumont joined #perl6
17:46 timotimo well, .lines() on the .IO gives you a lazy Seq, you should be able to turn that into either a Channel or a Supply with .Channel and .Supply
17:46 timotimo but it's not really async I/O that way
17:47 timotimo but for supplies there's a zip combinator
17:47 AlexDaniel why does it have to be a channel or a supply?
17:47 timotimo really, i'd just [Z] @filenames>>.IO>>.lines
17:48 timotimo that doesn't actually run the stuff in parallel, but your bottleneck is probably I/O here, so there's not terribly much to win
17:52 ribasushi joined #perl6
17:53 kyclark It doesn't have to be a Supply, but I'm exploring here and was wondering if that is an appropriate solution.  The zipper is cool.  Just checking, to loop this idea, I'd basically do "for [Z] @files>>.IO>>.lines -> @values {}"?
17:53 timotimo aye
17:54 kyclark What's bad ass is that I can guess at about half of this and get it right.  Also, cool that I can -> $values and it works, too.
17:55 timotimo right, having a $ vs an @ in a signature only makes a difference if you have an @foo and you don't get passed something Positional
17:58 itaipu joined #perl6
18:10 lostinfog joined #perl6
18:33 kyclark joined #perl6
18:37 molaf joined #perl6
18:39 Zoffix joined #perl6
18:39 Zoffix Does NQP have a dd analogue for data dumping? I really need one and rather not reinvent wheels
18:39 timotimo some things support .DUMP
18:40 timotimo qast trees have a .dump, i think
18:40 Zoffix nqp-m: my %h := nqp::hash('foo', 'bar', 'ber', 'bor'); say(%h.DUMP)
18:40 camelia nqp-moarvm: OUTPUT«Cannot find method 'DUMP': no method cache and no .^find_method␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1505  (/home/camelia/rakudo-m-inst-2/sh​are/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708  (/home…»
18:42 timotimo yeah, not those
18:42 timotimo you have to for over a hash to output it
18:47 cyphase joined #perl6
18:47 mcmillhj joined #perl6
18:54 DarthGandalf joined #perl6
19:11 kyclark joined #perl6
19:14 jjido joined #perl6
19:18 dalek doc: ffeab7e | (Zoffix Znet)++ | doc/Language/grammars.pod6:
19:18 dalek doc: Clarify specialness of TOP token
19:18 dalek doc:
19:18 dalek doc: It's special only insofar as it's the default values
19:18 dalek doc: of the :rule parameter in parse methods.
19:18 dalek doc: review: https://github.com/perl6/doc/commit/ffeab7ed74
19:21 wamba joined #perl6
19:24 jjido joined #perl6
19:24 dalek doc: 24c6013 | (Zoffix Znet)++ | doc/Language/grammars.pod6:
19:24 dalek doc: Document use of methods in a Grammar
19:24 dalek doc: review: https://github.com/perl6/doc/commit/24c6013d11
19:27 addison joined #perl6
20:05 ilbot3 joined #perl6
20:05 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
20:07 sortiz joined #perl6
20:07 sortiz \o #perl6
20:08 lizmat timotimo: ah, perhaps not....
20:08 lizmat I probably shouldn't talk about things I don't know enough about  :-)
20:09 timotimo tbh, i don't know much about this particular area either
20:09 pmurias_ left #perl6
20:10 kyclark left #perl6
20:12 pmurias I seems it might be changed by nqp::bindattr when compiling and replacing a stub at runtime, will have to play around with that tommorow
20:12 timotimo could be. for some reason i thought it might perhaps be changed via boxing
20:13 pmurias I recently discovered that me trying to pass the invocant as javascript this was a stupid idea
20:13 abruanese joined #perl6
20:14 pmurias as the calling convention when compiled to js needs to be obj.foo(CTX, NAMED, obj, pos1, pos2) rather than obj.foo(CTX, NAMED, pos1, pos2)
20:34 pr1 joined #perl6
20:42 addison joined #perl6
20:47 pecastro joined #perl6
20:49 addison joined #perl6
20:51 yqt joined #perl6
20:52 jnthn pmurias: There's also .wrap that can change $!do, iirc
21:01 spider-mario joined #perl6
21:14 Possum joined #perl6
21:16 jjido joined #perl6
21:20 addison joined #perl6
21:24 dalek doc: 8c4a8b8 | (Zoffix Znet)++ | doc/Language/grammars.pod6:
21:24 dalek doc: Document always succeed assertion
21:24 dalek doc: review: https://github.com/perl6/doc/commit/8c4a8b8fac
21:25 Zoffix (couldn't think of a less stupid example)
21:28 rgrinberg joined #perl6
21:34 dalek doc: a0f174e | (Zoffix Znet)++ | doc/Language/grammars.pod6:
21:34 dalek doc: Use a better example for always succeed assertion
21:34 dalek doc: review: https://github.com/perl6/doc/commit/a0f174e641
21:35 jjido joined #perl6
21:48 paraboli` joined #perl6
21:50 cosimo joined #perl6
21:51 BinGOs_ joined #perl6
21:51 lnx_ joined #perl6
21:53 avalenn joined #perl6
21:53 Timbus_ joined #perl6
21:53 zzzzzzzzz joined #perl6
21:53 [Coke] f
21:54 [Coke] wow, this window is still connected! :)
21:55 cgfbee joined #perl6
21:55 dalek doc: 48758be | (Zoffix Znet)++ | doc/Language/grammars.pod6:
21:55 dalek doc: Fix unwanted display of X<>
21:55 dalek doc: review: https://github.com/perl6/doc/commit/48758beef2
22:00 Zoffix m: grammar Args { rule TOP { $<op>=<[+-]> <mode: $<op>> }; token mode ($mode) { { say "Mode is $mode"; } } }.parse('+(255, 435, 777)');
22:00 camelia rakudo-moar 5bd5a5: OUTPUT«Use of Nil in string context  in block  at <tmp> line 1␤Mode is ␤»
22:00 Zoffix Is there a way to pass a matched thing as an argument to another token? Like above, I'd want $mode to be $<op>
22:01 dalek Heuristic branch merge: pushed 125 commits to doc/tws-test by coke
22:02 BinGOs joined #perl6
22:08 TEttinger joined #perl6
22:10 [Coke] What is the purpose of the $(NULL) in the makefile on doc? just to avoid not having a backslash on the last line in case we add more?
22:11 [Coke] (by Josh Soref)
22:11 Zoffix [Coke], did anyone sign up to do the release on the 15th?
22:16 [Coke] nope
22:16 jjido joined #perl6
22:17 Zoffix [Coke], I'd like to do it, if there's an opening for a volunteer.
22:17 canopus joined #perl6
22:18 addison joined #perl6
22:18 [Coke] there are only spots left for volunteers at this point!
22:18 [Coke] yes, please, thank you
22:18 lizmat ++Zoffix
22:18 Zoffix Sweet.
22:32 jjido joined #perl6
22:33 [Coke] tbrowder: if you tell me your RT id, I can assign you as the owner of 128221
22:37 tbrowder not sure of the ID but my user name (ID?) is <tom.browder@gmail.com> (have I saidRT is the pits?)
22:37 tbrowder nickname tbrowder
22:40 [Coke] that doesn't appear to be the email address tied to your nick, btw. assigned the ticket to you
22:42 tbrowder i just added the nickname a bit ago, it may not have taken effect yet
22:42 tbrowder and thanks, [Coke]
22:43 rgrinberg Is perl6 better than perl for writing 1 liners in the cli?
22:44 rgrinberg Wondering if it's worth the time to replace perl for that use case.
22:46 AlexDaniel rgrinberg: it depends
22:47 parabolize m: my token foo { \d+ }; my token bar { <foo> \w+ }; '123yarp?' ~~ / <bar> { say $<bar><foo> } /;
22:47 camelia rakudo-moar ff8362: OUTPUT«「123」␤»
22:47 AlexDaniel rgrinberg: for example, performance and startup time may be important to you in some cases
22:47 AlexDaniel rgrinberg: in which case perl 5 is going to perform much better
22:48 AlexDaniel but other times, yeah, perl 6 works nicely. Try it and see if it works for you
22:48 parabolize Zoffix: ^ Something like that?
22:48 rgrinberg I've read over https://github.com/dnmfarrell/Perl6-One-Liners and it does seem like some things were polished.
22:49 rgrinberg don't see anything particularly compelling
22:53 TakinOver joined #perl6
22:54 AlexDaniel hugg
22:54 AlexDaniel huggable: dunno
22:54 huggable AlexDaniel, ¯\_(ツ)_/¯
22:55 jjido joined #perl6
22:56 ugexe good error messages are a pretty good reason
22:57 timotimo for a one-liner, the better regex syntax may not be such a big deal
22:57 timotimo it's easier to write and read, but if you only write it once, read it never again ...
23:02 kurahaupo joined #perl6
23:02 timotimo rgrinberg: the fact that perl6 uses rats by default for mathematics can help in unexpected ways
23:03 timotimo also, we're the only ones - besides Swift - who do unicode right
23:03 timotimo arguably
23:03 psch "arguably besides swift" or "arguably right"?
23:03 psch i honestly don't know, fwiw
23:04 timotimo arguably right
23:04 timotimo if you consider having graphemes as the basic unit of strings as the default being the only right way to have unicode
23:06 psch so just to confirm, swift thinks the right way to do it is the same thing we (...probably jnthn++) decided to do it?
23:06 psch s/thing/way/
23:08 psch Zoffix: re: http://irclog.perlgeek.de/p​erl6/2016-07-01#i_12771601
23:08 psch m: grammar G { token TOP { (.) {} <foo($0)> }; token foo($a) { "$a" ** 2 } }; G.parse("aaa").say
23:08 camelia rakudo-moar ff8362: OUTPUT«「aaa」␤ 0 => 「a」␤ foo => 「aa」␤»
23:08 psch Zoffix: note though that it suffers from a (already ticketed afaik) bug which doesn't update the captures in time
23:08 psch as per the following
23:09 psch m: grammar G { token TOP { (.) <foo($0)> }; token foo($a) { "$a" ** 2 } }; G.parse("aaa").say
23:09 camelia rakudo-moar ff8362: OUTPUT«Use of Nil in string context  in regex foo at <tmp> line 1␤Use of Nil in string context  in regex foo at <tmp> line 1␤Nil␤»
23:09 psch Zoffix: without the sequence point we apparently don't have $0 yet, which iirc is something we have ticketed already
23:10 * timotimo created a few tickets on the perl6-one-liners repo
23:10 timotimo it'd be cool if someone could review them
23:12 [Coke] GAH DOC SO SLOOOOW
23:12 timotimo .seen mouq
23:12 yoleaux I saw Mouq 7 Jan 2016 04:12Z in #perl6: <Mouq> Juerd++ regardless :) even reading good code sucks
23:13 Zoffix m: grammar Args { rule TOP { $<op>=<[+-]> {} <mode: $<op>> }; token mode ($mode) { { say "Mode is $mode"; } } }.parse('+(255, 435, 777)');
23:13 camelia rakudo-moar ff8362: OUTPUT«Mode is +␤»
23:13 Zoffix psch++ sweet, thanks.
23:14 Zoffix parabolize, pretty much yeah. It's just the bug that bit me apparently. I didn't realize we could use tokens outside a grammar too. Neat.
23:16 psch timotimo: the issues (on https://github.com/dnmfarrell/Perl6-One-Liners/, right?) look appropriate to me at least
23:16 jjido joined #perl6
23:16 psch though i'm a sucker for using % instead of %% at least occasionally vOv
23:16 timotimo :)
23:16 timotimo i think it's good to show off that all operators can be metaop-negated
23:16 timotimo (well, not all, of course)
23:17 timotimo (all iffy ones, at least)
23:17 psch i'm really bad at keeping in mind which ones aren't iffy; i only recall list and item assignment
23:18 psch ...which reminds me of the somewhat embarrassing bug we still have there :(
23:18 psch m: say 3 !=3
23:18 camelia rakudo-moar ff8362: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
23:19 timotimo m: say 4 !+ 4
23:19 camelia rakudo-moar ff8362: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot negate + because additive operators are not iffy enough␤at <tmp>:1␤------> 3say 4 !7⏏5+ 4␤    expecting any of:␤        infix␤        infix stopper␤»
23:20 AlexDaniel [Coke]: I feel your pain
23:20 Zoffix not... iffy enough? HAH
23:22 * Zoffix isn't even sure how to parse that
23:22 Zoffix Only those that go sour can be used? XD
23:22 timotimo it must be sufficiently if-like
23:23 timotimo like ==/eq/eqv, or %%, ...
23:24 Zoffix :)
23:24 Zoffix http://www.dictionary.com/browse/iffy
23:25 Zoffix left #perl6
23:25 timotimo it's a pun :)
23:26 psch well, a cursory glance says the !=1 issue is somewhere in EXPR
23:26 psch which probably explains why it's been around so long :P
23:26 AlexDaniel https://docs.perl6.org/language/glossary#iffy meh
23:27 * psch goes back to not-programming for now
23:27 psch that probably means sleep soon o/
23:29 AlexDaniel psch: what about programming in your dreams? :)
23:35 Actualeyes joined #perl6
23:35 timotimo the != 1 issue?
23:35 freezerburnv joined #perl6
23:36 psch AlexDaniel: i probably wouldn't remember if i did any of that... :)
23:36 psch timotimo: not the != 1 issue, the !=1 issue :S
23:36 psch m: say 1 !=1
23:36 camelia rakudo-moar ff8362: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
23:36 psch m: say 1 != 1
23:36 camelia rakudo-moar ff8362: OUTPUT«False␤»
23:36 psch timotimo: that ^^^
23:37 psch timotimo: as mentioned, i'm pretty sure it's something in EXPR makes us misparse the latter as meta op ! to infix:<=>
23:37 psch +that
23:39 timotimo oh, huh
23:39 psch it's ticketed for like 3 years or so i think...
23:39 psch but it's also deep in the guts that no one wants to touch, soooo... :)
23:39 timotimo wow
23:39 timotimo yeah :D
23:39 huggable joined #perl6
23:41 psch well,just about two and a half years
23:41 psch and apparently *i* ticketed it /o\
23:41 psch https://rt.perl.org/Public/​Bug/Display.html?id=121108
23:42 timotimo hah
23:42 psch this does *not* mean i have to fix it :P
23:43 psch i honestly just get more scared that STD already did that wrong
23:43 psch 'cause i'm pretty sure the STD author is a better programmer than me :S
23:46 timotimo :)
23:55 ShimmerFairy m: say 1!= 1
23:55 camelia rakudo-moar ff8362: OUTPUT«False␤»
23:56 geekosaur "better programmer" does not mean "infallible". it might not even mean "more infallible"
23:56 cpage_ joined #perl6
23:59 ShimmerFairy psch: apparently the bad one parses != as an "infix_prefix_meta_operator", for more info
23:59 psch ShimmerFairy: i did look at --target=parse
23:59 psch ShimmerFairy: it still just points at EXPR as the point of divergence

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

Perl 6 | Reference Documentation | Rakudo