»ö« 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 canopus joined 00:05 telex joined
kurahaupo Zoffix: qualitatively yes, quantitatively no 00:10
faster is more actions per unit of time 00:11
Zoffix which is equivalent to one action per smaller unit of time ¯\_(ツ)_/¯ 00:13
kurahaupo Zoffix: numerically no
that's why you got a negative answer initially
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:14
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␤»
kurahaupo no, you actually got the right answer -- the change in time was -26%
Zoffix After I rearranged the formula to not need abs/max, sure. 00:16
timotimo Zoffix: you may prefer infix:<max> over &max in this case 00:17
although it doesn't bind tighter than / does
so you'll need parens either way :\
00:18 mcsnolte left 00:19 rgrinberg left
kurahaupo Zoffix: if minutes-per-run decreases by 26% (less time), then runs-per-minute increases by 36% (faster) 00:20
Zoffix: leaving out the abs was not a mistake 00:21
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␤»
Zoffix kurahaupo, I give you "if minutes-per-run decreases by 26% (less time), then runs-per-minute increases by 36% (more runs)" 00:23
kurahaupo Zoffix: s/faster/more time/
Zoffix But "faster" is an ambiguous word here
xkcd.com/309/
Zoffix leaves to play Far Cry 4
timotimo have fun!
kurahaupo :-) 00:25
00:25 yqt left 00:26 ShimmerFairy joined
kurahaupo goes back to lurking for another year 00:26
sortiz \o #perl6 00:37
00:37 grondilu left 00:43 tlvb left 00:47 Actualeyes joined 00:49 cpage__ joined 00:50 cpage_ left, cpage__ is now known as cpage_ 00:51 jcallen_ is now known as jcallen 00:59 canopus left 01:01 rgrinberg joined 01:02 sufrostico left 01:05 kurahaupo left, canopus joined
dalek c: cfffec8 | (Daniel Green)++ | doc/Type/IO/Path.pod6:
IO::Path.mode doesn't belong in the timestamp section
01:14
c: 5e90e17 | (Daniel Green)++ | doc/Language/5to6-perlfunc.pod6:
Fix link in 5to6-perlfunc.pod6. AlexDaniel++
c: 0a788a8 | (Zoffix Znet)++ | doc/ (2 files):
Merge pull request #655 from MasterDuke17/IOPath_cleanup

IO::Path.mode doesn't belong in the timestamp section
01:15 kalkin-_ joined, kalkin- left
Zoffix .tell moritz I recall you mentioning to point out contributors who might use a commit bit. Here's a candidate: github.com/MasterDuke17?tab=overvi...od=monthly 01:16
yoleaux Zoffix: I'll pass your message to moritz.
01:17 telex left 01:25 telex joined 01:35 rgrinberg left 01:36 wisti joined, pRiVi joined, inokenty joined, john51 joined, gtodd joined, dg joined, jdv79 joined 01:44 kerframil left 01:53 molaf left 02:01 vendethiel- joined 02:02 vendethiel left 02:05 molaf joined 02:09 noganex_ joined 02:11 alienzj joined 02:12 noganex left
AlexDaniel Zoffix: it feels like we need shotgun: instead of bisect: :) 02:15
you can't really use bisect if something was broken/fixed several times 02:16
so why bother with bisection when you can simply run something on every commit…
let's see 02:18
bisect: class Foo { method new { self.bless: *, :foo<bar> } }.new
bisectable AlexDaniel: (2016-06-12) github.com/rakudo/rakudo/commit/4179bdc
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
AlexDaniel um, fine
bisect: good=2016.02 class Foo { method new { self.bless: *, :foo<bar> } }.new
bisectable AlexDaniel: (2016-06-12) github.com/rakudo/rakudo/commit/4179bdc
AlexDaniel bisect: good=2d9202c class Foo { method new { self.bless: *, :foo<bar> } }.new 02:20
bisectable AlexDaniel: no build for such “good” revision
Zoffix That was just a measurement error. It wasn't actually broken in 2016.01
AlexDaniel ah, okay 02:21
there's still a problem though 02:22
bisect: use REPL; say 1
bisectable AlexDaniel: exit code is 1 on both starting points, bisecting by using the output
AlexDaniel: (2015-12-25) github.com/rakudo/rakudo/commit/07fecb5
AlexDaniel why!
Zoffix m: use REPL
camelia rakudo-moar e9019e: OUTPUT«===SORRY!===␤REPL is a builtin type. You can use it without loading a module.␤»
02:27 Sgeo joined 02:29 Sgeo_ left
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.
AlexDaniel omg SVG favicons are only supported in firefox 02:35
02:40 inokenty left
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
AlexDaniel: (2016-03-24) github.com/rakudo/rakudo/commit/f7d1c4b
02:42 aindilis joined
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.
AlexDaniel oops, if 1 :D 02:43
02:47 wisti left
dalek osystem: e338a9a | (Andy Weidenbaum)++ | META.list:
Add module File::Presence
02:51
osystem: d2696e9 | (Zoffix Znet)++ | META.list:
Merge pull request #225 from atweiden/file-presence

Add module File::Presence: github.com/atweiden/file-presence
02:52 aindilis left, aindilis joined, kid51 left 02:55 inokenty joined 03:06 skids joined 03:37 addison left 03:39 huggable left 03:40 huggable joined
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␤␤»
Xliff m: say (1|2|3).^name
camelia rakudo-moar e9019e: OUTPUT«Junction␤»
Xliff AARGH!
Y'all need to warn C ppl about that!
TEttinger m: say (1 ^ 2) 03:43
camelia rakudo-moar e9019e: OUTPUT«one(1, 2)␤»
TEttinger m: say (1^2) 03:44
camelia rakudo-moar e9019e: OUTPUT«one(1, 2)␤»
TEttinger m: say (1^2^3)
camelia rakudo-moar e9019e: OUTPUT«one(1, 2, 3)␤»
TEttinger what does ^ do? not xor apparently
Zoffix TEttinger, no, it creates a one Junction 03:45
huggable, Junction
huggable Zoffix, Logical superposition of values: docs.perl6.org/type/Junction
TEttinger neat 03:46
Zoffix m: say 1 xor 2
camelia rakudo-moar e9019e: OUTPUT«1␤»
03:46 cpage_ left
Zoffix m: say 0b10001 +^ 0b111111 03:46
AlexDaniel m: say (1+^2+^3)
camelia rakudo-moar e9019e: OUTPUT«46␤»
rakudo-moar e9019e: OUTPUT«0␤»
Zoffix m: say 0b10001 xor 0b111111 03:47
camelia rakudo-moar e9019e: OUTPUT«17␤»
Zoffix expected both to give same values :S
m: say (0b10001 xor 0b111111).base: 2
camelia rakudo-moar e9019e: OUTPUT«Nil␤»
Zoffix m: say (0b10001 xor 0b111111) 03:48
camelia rakudo-moar e9019e: OUTPUT«Nil␤»
Zoffix mkay
m: say (False xor True) 03:49
camelia rakudo-moar e9019e: OUTPUT«True␤»
Zoffix (it's Boolean)
03:55 MadcapJake left
ShimmerFairy xor is lower-precedence ^^ , btw. 03:56
dalek c: 90cb587 | (Zoffix Znet)++ | doc/Language/traps.pod6:
Include bitwise ops in traps
Zoffix Doesn't seem to be documented 03:57
ShimmerFairy Zoffix: how about the other lower-prec ones, and and or? :)
Zoffix They are 03:58
ShimmerFairy weird, then.
dalek c: cad79c4 | (Zoffix Znet)++ | doc/Language/traps.pod6:
Fix typo
03:59
03:59 cooper_ joined
ShimmerFairy Zoffix: your addition on bitwise ops accidentally calls +& a boolean op, instead of ?& 04:00
dalek c: 7477803 | (Zoffix Znet)++ | doc/Language/traps.pod6:
Fix typo

  ShimmerFairy++
04:01
Zoffix Proof that it's time to go to bed \o 04:02
ShimmerFairy o/
04:02 cooper left 04:05 cooper_ left
ugexe install perl6 module from .tar.gz archive with CURI extracting each individual file as needed with 0 perl6 dependencies: gist.github.com/ugexe/2ca5464cd440...f575ec3dac 04:09
04:11 cooper joined, cooper left, cooper joined 04:15 molaf left 04:19 cooper left, gfldex left 04:20 khw left 04:24 cpage_ joined 04:28 cooper joined 04:29 cooper left 04:43 fhorck left 04:48 cooper joined 04:53 skids left 04:57 Cabanossi left 04:59 Cabanossi joined 05:00 alienzj left 05:03 alienzj joined, sortiz left 05:07 alienzj left, alienzj joined, alienzj left, alienzj joined, alienzj left 05:22 wisti joined 05:48 telex left 05:50 wisti left, telex joined 05:52 wisti joined 05:53 wisti left 05:58 firstdayonthejob joined
moritz Zoffix: thanks, I've invited MasterDuke17 06:01
yoleaux 01:16Z <Zoffix> moritz: I recall you mentioning to point out contributors who might use a commit bit. Here's a candidate: github.com/MasterDuke17?tab=overvi...od=monthly
06:11 _mg_ joined 06:12 _mg_ left 06:18 abraxxa joined 06:22 CIAvash joined 06:25 domidumont joined 06:31 domidumont left
dalek c: 446d434 | (Matt Oates)++ | doc/Language/traps.pod6:
Change string not iterable example

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
Ulti turns out I have a commit bit... might be worth nerfing early adopter sloths like me 06:33
AlexDaniel +1 for .sort 06:34
06:36 brrt joined 06:41 firstdayonthejob left
Woodi morning #perl6 :) 06:43
06:49 domidumont joined
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:50
06:52 domidumont left, domidumont joined
moritz is "paintful" the same as "colorful"? :-) 06:56
Woodi moritz: no :) 06:57
abraxxa Hi ;) 07:01
Woodi o/ 07:03
07:13 darutoko joined 07:18 wamba joined 07:23 araujo_ joined 07:25 araujo left 07:29 araujo_ left 07:30 brrt left 07:38 dj_goku_ joined, dj_goku_ left, dj_goku_ joined 07:39 huggable left 07:40 huggable joined
dalek sectbot: 55a10e8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bot.pl:
Allow bot name as a prefix

Given that people still try to do 「bisectable: somecodehere」, it is time to allow it.
Note that 「bisectable: bisect: somecodehere」 is still not valid. If you do that, it will run fine because “bisect:” will be treated as a Perl 6 label, but that's still misuse.
07:40
07:40 dj_goku left
dalek sectbot: 166dd5a | (Aleks-Daniel Jakimenko-Aleksejev)++ | bot.pl:
Remove debug output (oops)
07:42
07:43 bisectable left, bisectable joined
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
AlexDaniel: (2016-03-01) github.com/rakudo/rakudo/commit/1b6c901
AlexDaniel ok
moritz nice! 07:48
07:49 zakharyas joined 07:57 rindolf joined 08:04 gfldex joined 08:14 g4 joined
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
Woodi yes, but we got long spring to recover after xmass :) 08:25
AlexDaniel in other words, 21 months to go? :) 08:27
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
AlexDaniel: you are so optimistic :)
AlexDaniel Woodi: not really, just a bit linear :) 08:30
moritz wonders why this "compiling to C" meme never dies
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
Woodi AlexDaniel: 2012 was worse perspective :)
do we Still faster then Moose ? what about comparing to other Moo'ses ? 08:33
AlexDaniel docs.perl6.org/language/faq#Is_Per..._for_me%3F 08:34
no idea
I guess that we have to run these snippets to find out :D
08:38 sno left 08:49 vendethiel joined
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:50
08:51 vendethiel- left, CIAvash left 08:52 AlexDaniel left 08:53 RabidGravy joined 08:54 abraxxa left
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...
moritz ShimmerFairy: but the need for the VM features doesn't go away by compiling Perl 6 to C 08:59
you still need garbage collecition, multi dispatch, named arguments and all that stuff
Woodi AlexDaniel: Mojo 2.96s; Moose 9.68; Perl6 17,36s; Moose (mutable classes) 142,92s
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:00
09:05 neuron joined
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:05
09:06 sno joined
Woodi ...so HLL is good for prototyping but when it is working it needs to be rewrited into something generating native code... 09:07
09:07 jkramer joined
jkramer Ahoy 09:07
Woodi eg. sysV init scripts was too long a "scripts" ;)
hi jkramer :)
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
It works fine, but if I put linebreaks in front of the <=='s, I get a syntax error
About a missing '>'
09:09 bjz joined, pmurias joined
pmurias re compiling to C, why would be that better than what MoarVM is currently doing and compiling to machine code? 09:11
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:12
pmurias: but yeah, making it somehow possible to do mbc->asm would be of comparable usefulness. 09:13
gfldex m: gist.github.com/gfldex/d083f6925f0...7817d45910
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␤ …»
gfldex m: gist.github.com/gfldex/d083f6925f0...7817d45910 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 labster left
gfldex jkramer: feed operators are not propery implemented yet, the error message is LTA tho 09:15
jkramer gfldex: Ok, thanks 09:16
pmurias ShimmerFairy: the runtime is needed, so we would need to bundle up a rakudo 09:18
09:18 Actualeyes left 09:19 Actualeyes joined
ShimmerFairy pmurias: for what, the C idea? Not for a sufficiently clever translator :P 09:19
09:21 abraxxa joined
pmurias If you get someone to rewrite in program in C it likely won't need the Rakudo runtime 09:26
ShimmerFairy Well sure, humans usually count as sufficiently clever translators :) 09:28
pmurias only ones I can imagine
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.
pmurias ShimmerFairy: isn't carting around everything that's needed what people want when they package around things as an executable for linux? 09:31
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:32
moritz static linking and fat-packaging still has advantages on linux 09:36
Woodi pmurias: just tested: strace nqpSayA 401 syscals; strace cSayA 28...
pmurias Woodi: ? 09:37
Woodi pmurias: so execution time is 20+ times shorter... 09:38
m: say 401/28
camelia rakudo-moar e9019e: OUTPUT«14.321429␤»
Woodi ok, 14 :)
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
Woodi pmurias: but it's not about us, just how things generally are... 09:40
and of coursse making C code is harder then HLL but it's why HLL is for ptototyping and then "evaluating" :)
pmurias Woodi: there is nothing forcing things to be that way 09:41
09:43 jjido_ joined
pmurias Woodi: if I wanted to waste the time I could make NQP emit hand written quality C code for hello world programs 09:44
or other stupid benchmark of the month 09:45
09:50 wamba left, wamba joined 09:55 wamba left
jkramer Another question: why does this work: my @foo = grep { ... }, @stuff; my $bar = @foo.first; But not: my $bar = first grep { ... }, @stuff ? 10:01
tbrowder morning #perl6 10:02
jkramer Oh nevermind, I get it. When called as a sub the first argument is a matcher.
Ha, that's genious actually, saves me a grep :)
tbrowder what's the policy on leaving debug code in source for at least a while? 10:03
10:08 abraxxa left
gregf_ jkramer: grep is a global function, whereas first is a method 10:14
10:14 jjido_ left, vendethiel left
gregf_ m: say ([1..10].grep: { $_ %% 3 }).first 10:15
camelia rakudo-moar e9019e: OUTPUT«3␤»
10:15 vendethiel joined
gregf_ well, there i guess, grep is a method call :| #confusing 10:16
10:17 psch_ is now known as psch
ShimmerFairy lots of things are provided in both sub and method form for convenience and preferred programming style. 10:17
pmurias tbrowder: you mean leaving in commented out debugging comment in rakudo source code? 10:20
tbrowder yes
psch tbrowder: if it's generally useful and meaningful and hidden behind an env var, i'd say go ahead
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…
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, kaare_ joined
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:23
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:24
psch right, the big thing is that you have to work for it to come out 10:25
like, we have RAKUDO_MODULE_DEBUG around for what, a year?
but that's fine, cause without the env var it doesn't get in the way
timotimo ah, well, if you put it behind an env var, that's probably fine
i wonder if the checks for rakudo module debug are optimized at all, or if they are a performance drain
dalek c: 628efba | (Jan-Olof Hendig)++ | doc/Type/Date.pod6:
Expanded the doc for Date.Str
psch that's an interesting question, yeah 10:26
iirc $RMD is lexical everywhere its used..?
timotimo i haven't looked at all 10:28
10:28 sno left
timotimo just a random thought that came to my mind 10:28
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:29
psch 41 lines with $RMD 10:30
well, two are from CUR::Perl5
the rest is PrecompRepo, World, RepoRegistry, in descent amount
timotimo descent was a great game 10:31
psch +ing
:|
well, descending /o\
10:33 tlvb joined 10:34 abraxxa joined
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
*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
DrForr Enlightenment splits desktops per display, default of 4 each. 10:37
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
haha, that's great :D
psch ah shucks, now i tossed a change i had been working on :| 10:39
well, not too bad
cause it also would need some design input anyway 10:40
#127924 that is
nine tossed?
psch yeah, checkout .
'cause i wanted to get rid of the comment-out-$RMD changes but forgot there was other changes around 10:41
no big deal though, it didn't really work yet anyway and i still recall what i did do :)
timotimo oof
do you know of git checkout -p ?
psch yeah
i might eventually learn to always do confirm-y stuff, but apparently not yet :) 10:42
timotimo i suppose you have to get hurt often enough in order to really build that habit :\ 10:44
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:45
rt.perl.org/Public/Bug/Display.html?id=127924 # because synopsebot is on vacation apparently 10:46
10:53 TEttinger left
nine I lost an evening of playing Diablo II this week due to a git checkout . 10:54
Recovered the progress in a speedrun though :)
psch Diablo II is something i will never start playing again :P 10:55
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
timotimo importing should help
jkramer I mean Need::These::Values::Foo::{A,B} of course 11:02
I'm actually in the same module
timotimo m: enum Foo::Bar::Baz <A B C>; say Foo::Bar::Baz::<A B C>.perl
camelia rakudo-moar e9019e: OUTPUT«(Foo::Bar::Baz::A, Foo::Bar::Baz::B, Foo::Bar::Baz::C)␤»
jkramer Although the enum is in a different class
Ah neat, thanks a bunch! 11:03
sjn what's the idiomatic way of sorting a hash by key (or by value, for that matter)? 11:04
psch m: my \CURI = CompUnit::Repository::Installation; say CURI.perl 11:05
camelia rakudo-moar e9019e: OUTPUT«CompUnit::Repository::Installation␤»
psch jkramer: an alternative i suppose ^^^
m: my %h = :2b, :1c, :3a; say %h.sort; say %h.sort: *.value
camelia rakudo-moar e9019e: OUTPUT«(a => 3 b => 2 c => 1)␤(c => 1 b => 2 a => 3)␤»
sjn psch: thanks! :) 11:06
11:06 jjido_ left
sjn tried with %h.sort(:value) and that didn't do anything 11:07
psch right, sort takes a positional Callable
sjn I now see the errors of may ways :)
should nonsensical parameters to sort give a warning? 11:08
ShimmerFairy not nonsensical named params to methods :D
psch no nonsensical named parameter will every give a warning
well, to methods, yes, ShimmerFairy++
ShimmerFairy (it's the ~totally sensible~ magic of *%_ that ~definitely~ deserves to be a part of P6) 11:09
11:13 jjido_ joined
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␤»
sjn doesn't .kv actually return the key?
seems it returns a pair
ShimmerFairy m: say {:2b,:1c:3a}.kv.perl
camelia rakudo-moar e9019e: OUTPUT«("a", 3, "c", 1, "b", 2).Seq␤»
ShimmerFairy m: for {:2b,:1c:3a}.kv { say $_ } 11:15
camelia rakudo-moar e9019e: OUTPUT«a␤3␤c␤1␤b␤2␤»
ShimmerFairy m: for {:2b,:1c:3a}.kv -> ($nums, $letters) { say $letters }
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␤␤»
ShimmerFairy m: for {:2b,:1c:3a}.kv -> $nums, $letters { say $letters }
camelia rakudo-moar e9019e: OUTPUT«3␤1␤2␤»
psch m: my %h = :2b, :1c, :3a; %h.sort.WHAT.say
camelia rakudo-moar e9019e: OUTPUT«(List)␤»
psch m: my %h = :2b, :1c, :3a; %h.sort[0].say 11:16
camelia rakudo-moar e9019e: OUTPUT«a => 3␤»
psch .kv on a List gives you ($index, $value)
ShimmerFairy psch: oh, I think I get it
yeah, that
psch .sort returns a sorted list of Pairs
ShimmerFairy sjn: I mean
psch m: my %h = :2b, :1c, :3a; for %h.sort.kv -> $, (:$key, :$value) { say "$key: $value" };
camelia rakudo-moar e9019e: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:17 sno joined
sjn that looks a little cludgey.. :-( 11:17
psch sjn: well, a Hash itself cannot be sorted :)
11:17 jjido_ left
psch so the result must be something that retains order 11:17
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␤»
psch you can just drop the .kv though
sjn right
psch 'cause the k in kv is just the index anyway vOv
lizmat Woodi: I feel your pain, but some optimizations are not without risk to the ecosystem out there 11:19
Woodi: so we like to get them out just after the release, so that we have a month for fixing any ecosystem breakage 11:20
Woodi lizmat: of course, just like no software upgrades on Friday :) 11:21
sjn funny, psch's example doesn't work on my rakudo build (a few weeks old). 11:23
has there been any work on things like that lately?
psch star-m: my %h = :2b, :1c, :3a; for %h.sort -> (:$key, :$value) { say "$key: $value" };
camelia star-m 2016.04: OUTPUT«a: 3␤b: 2␤c: 1␤»
11:23 andreoss joined
psch sjn: what's your $*PERL.compiler? 11:24
sjn psch: currently under recompilation :)
psch heh :)
well, it's fine in 2016.04 and it's fine now
sjn lots of build warnings though
psch might have been something intermittenly weird, no idea
timotimo twitter.com/rpy/status/622291301002670080 <3 11:28
sjn m: my %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␤------> 033a; for %h.sort -> (:$numbers, :$letters7⏏5<EOL>␤ expecting any of:␤ constraint␤»
sjn m: my %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$lettersmy %h = :2b, :1c, :3a; for %h.sort -> (:$numbers, :$letters
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
sjn dammit 11:33
11:33 jjido_ left
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
camelia rakudo-moar e9019e: OUTPUT«2 unexpected named arguments passed (key,value) in sub-signature␤ in block <unit> at <tmp> line 1␤␤»
psch m: (a => 1).^attributes.say
camelia rakudo-moar e9019e: OUTPUT«(Mu $!key Mu $!value)␤»
sjn hm
psch m: class A { has $.frobniz; }; with A.new(:1frobniz) -> (:$frobniz) { say $frobniz } 11:35
camelia rakudo-moar e9019e: OUTPUT«1␤»
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␤»
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
lizmat: has the way :) 11:37
lizmat sort generates Pair, Pairs attributes are "key" and "value"
hence you *must* use :key / :value
timotimo i'd describe it as "sort uses .List, which on a hash gives you a list of Pair objects"
lizmat :$key is just short for :key($key) 11:38
sjn ok
and you have to use the paranthesis around those, because we're "unpacking" the Pairs? 11:39
lizmat that's my understanding, yes
it's basically a signature
timotimo aye, the thing after -> is a signature
right
11:39 huggable left
timotimo if you have :$key, :$value, you expect two named arguments 11:39
when you have (:$key, :$value), you expect a single argument 11:40
and that gets unpacked
sjn right
a signature
sjn's brain is going all bendy from this 11:41
gfldex docs.perl6.org/type/Signature#Dest...Parameters <-- we even got tha doced!
sjn bendy-warpy
gfldex i wonder if we should put /type/Signature at the front page :)
sjn or wendy-barpy? o_O
timotimo :P
lizmat
.oO( bendy-warpy salvetion )
11:42
sjn :) 11:43
anyhoo, thanks for the help! 11:44
DrForr waves to lizmat. *hug* 11:45
lizmat waves back to DrForr :-)
11:46 mr-foobar left 11:53 skids joined 11:55 wamba joined, skids left 11:56 AlexDaniel joined 11:58 neuron left 12:02 depy joined, iH2O joined
iH2O hello perl6ers 12:03
12:04 depy left
timotimo hey 12:04
iH2O hmm
12:06 loren joined
jkramer How can I get the message/string from a Failure without the "(HANDLED)" prefix? 12:09
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…»
DrForr Hee.
timotimo m: sub test { fail "oh no" }; test().^attributes.say
camelia rakudo-moar e9019e: OUTPUT«(Mu $!exception Mu $!backtrace int $!handled)␤»
andreoss masak: in 007 there's no way to access object properties through a sub stored in this object?
timotimo hmm.
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␤»
timotimo loren: old bug :(
lizmat jkramer: probably $failure.exception.message
timotimo indeed, lizmat
loren ...oh, ..
timotimo m: sub test { fail "oh no" }; test().exception.perl.say
camelia rakudo-moar e9019e: OUTPUT«X::AdHoc.new(payload => "oh no")␤»
jkramer lizmat: Yup, thanks!
loren So quickly ...
timotimo i'm too dumb to fix it; it's in our implementation of ropes 12:12
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?
m: dd &fail
camelia rakudo-moar e9019e: OUTPUT«Sub fail = sub fail (| is raw) { #`(Sub|46380296) ... }␤»
timotimo yeah, it causes the routine it's used in to return
gfldex fires up vim 12:15
loren lizmat, en, i see
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␤»
timotimo m: my $thing = "a" x 3 ~ "b" x 5; $thing ~~ /../; say "substr1: " ~ $thing.substr(1), " substr2: " ~ $thing.substr(2);
camelia rakudo-moar e9019e: OUTPUT«substr1: aabbbbb substr2: abbbbb␤»
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
that's why those two behave differently
lizmat timotimo: is there a way to programmatically force a rope collapse ? 12:21
timotimo nqp::flattenrope
lizmat could make debugging easier / faster ?
DrForr Take away its via... never mind :)
dalek c: 98ef33c | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
add fail to Control Flow
12:22
jnthn I don't think we expose the flattenrope op as an nqp:: op...
The regex code-gen just spits out out 12:23
The simplest way now is just the $str ~~ /<?>/ :)
12:23 iH2O left 12:24 colomon joined
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
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 ..
timotimo you ain't never heard of "spurt" before? ;)
spurt ain't no method i ever heard of. they speak I/O in spurt? 12:26
jkramer Is it like spit/spew in some P5 slurp modules? :D 12:28
12:29 pmurias left 12:31 kid51 joined 12:33 rahogaboom joined, abraxxa left 12:35 dalek left 12:36 dalek joined, ChanServ sets mode: +v dalek 12:37 user9 left
lizmat comments welcome on github.com/rakudo/rakudo/commit/516b997a4a26d 12:37
12:38 user9 joined
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
but I think we can agree on the <unknown file> nonsense not being needed ? 12:41
12:42 grondilu joined 12:45 rgrinberg joined, rahogaboom_ joined, rahogaboom_ left
lizmat Juerd: fix coming up 12:48
12:50 DarthGandalf left, rahogaboom_ joined 12:53 sufrostico joined 12:54 ab6tract joined
ab6tract o/ #perl6 12:55
12:55 kurahaupo_ joined, Khisanth left
Juerd lizmat: Unknown file isn't just unneeded, it's wrong :) 12:56
12:59 tlvb left, rahogaboom_ left 13:00 mcmillhj joined
ab6tract i seem to remember reading something about a 400x performance improvement recently courtesy of jnthn++ 13:01
but can't seem to find a reference to it anymore
13:04 canopus left
lizmat Juerd: github.com/rakudo/rakudo/commit/12f12a5869 13:04
13:04 kurahaupo joined
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
But it's a weird use case. Not sure if it's worth any effort.
13:06 kurahaupo` joined, kurahaupo_ left 13:07 llfourn_ joined 13:08 kurahaupo left 13:09 Khisanth joined 13:11 kurahaupo` is now known as kurahaupo 13:12 canopus joined
lizmat Juerd: github.com/rakudo/rakudo/commit/8a2ffacdb9 13:12
Juerd Looks great! 13:13
Not annoying anymore in the common use cases, still awesome in the less common use case.
lizmat fg 13:14
oops
13:17 rahogaboom left 13:25 wisti joined 13:26 vendethiel- joined 13:27 vendethiel left
masak jumps to the foreground! 13:31
13:32 skids joined
lizmat
.oO( finally :-)
13:33
masak sorry, I've been backgrounded lately 13:35
13:36 Guest85881 joined
dalek c: b694438 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
fix fail example
13:40
13:48 pdcawley joined 13:49 pdcawley_ left 13:55 Guest85881 left 13:59 llfourn_ is now known as LLfournLaptop 14:02 jjido joined 14:17 inokenty left 14:23 kid511 joined 14:25 kid51 left 14:32 mr-foobar joined 14:33 inokenty joined 14:43 jjido left, DarthGandalf joined
AlexDaniel trying to get some more eyes on some old doc issues 14:43
14:49 ptolemarch joined 14:50 jjido joined
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␤»
Zoffix m: grammar Foo { token TOP { <meow>+ }; token meow { . } }; Foo.HOW.trace-on(Foo); Foo.parse('fobar');
camelia rakudo-moar 1d4c11: OUTPUT«Method 'trace-on' not found for invocant of class 'Perl6::Metamodel::GrammarHOW'␤ in block <unit> at <tmp> line 1␤␤»
Zoffix is a bit surprised that feature is unavailable in P6, since it's very handy 14:55
Or is it just a case of NIY?
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 wamba left
psch Zoffix: i'm also assuming that if we could have had that from nqp easily, it probably would've come from there 14:57
Zoffix: further, i also think that we only have it in nqp to help develop rakudo 14:58
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
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/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQP…»
psch nqp-m: grammar G { }; nqp::say(G.HOW.name(G))
camelia nqp-moarvm: OUTPUT«G␤»
psch nqp-m: grammar G { }; nqp::say(nqp::how(G))
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/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQP…»
psch eh, that's not gonna help...
anyway, the method seems to sit on NQPClassHOW, which makes it not grammar-specific 15:00
Zoffix ok 15:01
psch nqp-m: grammar G { }; nqp::say(G.HOW.HOW.name(G.HOW)) # that's what i was looking for :|
camelia nqp-moarvm: OUTPUT«NQPClassHOW␤»
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;
bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
AlexDaniel meh
15:02 kerframil joined
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
Zoffix: i'm not sure that was clear, and i'm also a bit worried i came of too harsh... :)
15:06 mcmillhj left
Zoffix I got it. Thanks. 15:06
15:06 Zoffix left 15:09 mcmillhj joined 15:12 domidumont left 15:13 wamba joined
dogbert17 m: say "Womble" 15:13
camelia rakudo-moar 1d4c11: OUTPUT«Womble␤»
dogbert17 o/ does anyone have time to give my latest doc gist a once over? gist.github.com/dogbert17/2b669457...222350323d 15:14
15:15 as joined, jervo joined 15:19 autarch left 15:21 autarch joined 15:23 khw joined
moritz dogbert17: looks good, the only odd thing is the useage of Baggy:_ 15:25
dogbert17 moritz: it's from the src 15:26
moritz dogbert17: it's redundant nonetheless
method ACCEPTS($other) 15:27
dogbert17 moritz: ok, should I remove it?
moritz just as precise
yes, please
dogbert17 moritz: consider it done :)
moritz does
dogbert17++
dogbert17 only two more methods to go in Baggy, categorize-list and classify-list, arrrgh 15:28
AlexDaniel dogbert17++ 15:29
15:29 g4 left
AlexDaniel actually, ++ everyone working on the docs. The graph here is awesome: github.com/perl6/doc/graphs/contributors 15:30
[Coke] drinks hotel coffee 15:31
15:33 jjido left
jdv79 is there an p6 event somewhere? 15:34
dalek c: ae2951b | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod6:
Added docs for Baggy.ACCEPTS. moritz++
moritz doesn't write nearly as much docs as he wishes these days 15:35
15:37 michiamodiego joined
[Coke] jdv79: nope, just a family trip. today is a chill day. 15:37
15:38 ab6tract left
dalek c: 84b55f6 | coke++ | t/pod6.t:
no pod, just pod6
15:38
15:38 jjido joined
jdv79 o 15:38
15:40 huggable joined
[Coke] when bisectable finds a difference in outputs, does it save it? that might be useful. 15:45
15:46 michiamodiego left 15:49 rindolf left
AlexDaniel [Coke]: no, but we should probably think about merging bisectable with camelia 15:49
15:50 iH2O joined
[Coke] anyone looking to help out core developers, there are 28 tickets that need perl6 tests written for them. 15:50
15:52 zakharyas left
[Coke] i.imgur.com/e3z4aWq.jpg #perl 15:52
15:53 DarthGandalf left 16:03 kyclark joined
kyclark Given my $bag = <a b b c>.Bag, how would I find the item with the highest count (b)? 16:03
16:04 araujo joined 16:05 loren left 16:06 setty1 joined
[Coke] m: my $bag = <a b b c>.Bag; ($bag.sort: *.value).reverse[0].key.say 16:08
camelia rakudo-moar 1d4c11: OUTPUT«b␤»
[Coke] m: my $bag = <a b b c>.Bag; ($bag.sort: *.value)[*-1].key.say 16:09
camelia rakudo-moar 1d4c11: OUTPUT«b␤»
[Coke] do we have a list of ways to get things into search from .pod6 files on doc?
16:10 kurahaupo_ joined, kurahaupo left, jcallen left
kyclark Thanks, [Coke] 16:12
16:12 jcallen joined 16:16 wamba left
[Coke] zoffix: what's de23b7c on perl6/doc ? 16:17
16:17 kurahaupo_ is now known as kurahaupo
dalek Heuristic branch merge: pushed 253 commits to doc/makefile by coke 16:17
16:19 cbk joined, jjido left
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
travis-ci Doc build failed. Will "Coke" Coleda 'Merge branch 'master' into makefile' 16:25
travis-ci.org/perl6/doc/builds/141661878 github.com/perl6/doc/compare/1bfda...ef3e10636b
16:25 travis-ci left 16:26 jjido joined 16:28 iH2O left 16:29 addison joined 16:35 pr1 joined 16:36 addison left 16:37 pr1 left 16:39 rindolf joined, Zoffix joined
Zoffix [Coke], it's a commit that lets us use SASS (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:40
[Coke] danke. was trying to suss it out from way too little info (the .gitignore). :) 16:41
timotimo .o( it's developed by Dr Suass ) 16:45
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.
nebg hello everyone... can somebody suggest me a good software to do UML schemes which works on linux ? 16:51
16:53 lostinfog joined, lostinfog left
[Coke] I did not realize UML was still a thing. 16:54
timotimo i used to use an eclipse plugin if i'm remembering correctly 16:55
16:56 yqt joined
AlexDaniel nebg: about a year ago I had to deal with UML and found nothing 16:56
well, there was something, but it was very buggy and was crashing every five minutes
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
AlexDaniel … which is a good indication of how popular UML is…
timotimo i have no idea. it was just a guess
16:57 addison joined
nebg timotimo, are you a professor ? 16:57
timotimo i am not
i'm just as unhelpful as one 16:58
AlexDaniel I think that I ended up drawing something in www.draw.io/ … which is not primarily an UML thing, but believe me it works better than other UML software
the drawback is that it is not free software
… 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:01 kyclark left 17:03 kurahaupo left 17:05 jjido left 17:08 kyclark joined
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:09
17:11 jjido joined
stmuk its just stick figures isn't it? 17:11
AlexDaniel stmuk: a bit more than that, but yeah
stmuk I even bought a book on it once years back
when it was all the rage
AlexDaniel how many pages in that book? 17:12
geekosaur ...and how much semantic content per page?
stmuk it was the quite slim one
UML Distilled! 17:13
AlexDaniel “More than 300,000 developers have benefited from past editions of UML Distilled” 17:14
how do they know that they actually benefited?
17:15 Zoffix left, firstdayonthejob joined, labster joined
gfldex AlexDaniel: they asked the head of marketing 17:17
AlexDaniel why not 1 million then? 17:18
17:18 kyclark left
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
AlexDaniel timotimo: which is a great idea because I have a rather small ssd on my server… :) 17:19
timotimo: so what's the process? I should send someone my pub key, right?
timotimo yup 17:22
17:24 rindolf left 17:27 Actualeyes left, addison left 17:28 wisti left, rindolf joined 17:30 wisti joined 17:43 jjido left 17:44 yqt left, ribasushi left
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:44
17:46 domidumont joined
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
but it's not really async I/O that way 17:47
but for supplies there's a zip combinator
AlexDaniel why does it have to be a channel or a supply?
timotimo really, i'd just [Z] @filenames>>.IO>>.lines
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:48
17:52 ribasushi joined
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
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:54
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:55
17:58 itaipu joined 17:59 mcmillhj left 18:10 lostinfog joined 18:20 kyclark left 18:28 domidumont left 18:33 kyclark joined 18:34 lostinfog left 18:37 molaf joined 18:39 Zoffix joined
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
qast trees have a .dump, i think 18:40
Zoffix nqp-m: my %h := nqp::hash('foo', 'bar', 'ber', 'bor'); say(%h.DUMP)
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/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708 (/home…»
18:42 cyphase left
timotimo yeah, not those 18:42
you have to for over a hash to output it
18:47 cyphase joined, mcmillhj joined 18:54 DarthGandalf joined 18:55 ufobat left 19:03 wisti left 19:08 kyclark left 19:11 kyclark joined 19:14 rgrinberg left 19:15 jjido joined 19:16 kid511 left 19:18 pecastro left
dalek c: ffeab7e | (Zoffix Znet)++ | doc/Language/grammars.pod6:
Clarify specialness of TOP token

It's special only insofar as it's the default values of the :rule parameter in parse methods.
19:18
19:20 abruanese left 19:21 darutoko left, jjido left, wamba joined 19:24 jjido joined
dalek c: 24c6013 | (Zoffix Znet)++ | doc/Language/grammars.pod6:
Document use of methods in a Grammar
19:24
19:27 addison joined 19:38 cpage__ joined 19:39 TreyHarr1 joined, huggable left 19:40 wisti joined, huggable joined, mattp__ joined, ilbot3 left 19:41 domidumont joined, charsbar_____ left, protium left, mcmillhj left, TreyHarris left, mindos left, jercos left 19:42 canopus left, KotH left, woodruffw left, japhb left, keix left, MilkmanDan left, sivoais left, Kaffe left, ruoso left, cpage__ is now known as cpage, ptolemarch left, buharin joined 19:43 mcmillhj joined, KotH joined, ruoso joined 19:44 sivoais joined, buharin left, girafe joined, Kaffe joined, buharin joined, awwaiid joined, mindos joined, BuildTheRobots joined, charsbar_____ joined 19:47 MilkmanDan joined, canopus joined 19:48 jercos joined, pmurias_ joined, pmurias joined 19:49 alnewkirk joined, japhb joined
pmurias jnthn: can I use the fact that the $!do of a NQPRoutine doesn't seem to change once the NQPRoutine has been used as part of a method cache? 19:49
19:49 skids left
pmurias jnthn: at least I think that's a fact 19:49
19:50 agentzh joined, protium joined 19:51 jjido left 19:53 woodruffw joined, woodruffw left 19:54 woodruffw joined 19:55 ingy joined
lizmat pmurias: I don't think you can, because there can be runtime augments on a class, which could cause a global deopt and thus invalidate all caches ? 19:56
19:56 ptolemarch joined 19:59 jjido joined
timotimo does that change the NQPRoutine's own $!do, though? 20:02
20:04 andreoss left 20:05 ilbot3 joined 20:06 rindolf left 20:07 sortiz joined
sortiz \o #perl6 20:07
lizmat timotimo: ah, perhaps not.... 20:08
I probably shouldn't talk about things I don't know enough about :-)
timotimo tbh, i don't know much about this particular area either 20:09
20:09 pmurias_ left 20:10 kyclark left
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
pmurias I recently discovered that me trying to pass the invocant as javascript this was a stupid idea 20:13
20:13 abruanese joined
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:14
20:21 jjido left 20:29 mcmillhj left 20:34 addison left, pr1 joined 20:38 pr1 left 20:42 addison joined 20:47 domidumont left, pecastro joined, addison left 20:49 addison joined 20:51 yqt joined
jnthn pmurias: There's also .wrap that can change $!do, iirc 20:52
21:01 spider-mario joined 21:14 Possum joined 21:16 jjido joined, addison left 21:20 addison joined 21:24 kaare_ left
dalek c: 8c4a8b8 | (Zoffix Znet)++ | doc/Language/grammars.pod6:
Document always succeed assertion
21:24
Zoffix (couldn't think of a less stupid example) 21:25
21:26 buharin left 21:28 rgrinberg joined, jjido left 21:31 itaipu left 21:33 setty1 left
dalek c: a0f174e | (Zoffix Znet)++ | doc/Language/grammars.pod6:
Use a better example for always succeed assertion
21:34
21:35 jjido joined 21:37 girafe left 21:48 paraboli` joined 21:49 paraboli` is now known as parabolize` 21:50 cosimo joined 21:51 BinGOs_ joined, lnx_ joined 21:53 lnx left, avalenn_ left, cosimo_ left, BinGOs left, zzzzzzzz1 left, Timbus left, avalenn joined, Timbus_ joined, zzzzzzzzz joined
[Coke] f 21:53
wow, this window is still connected! :) 21:54
21:55 cgfbee joined
dalek c: 48758be | (Zoffix Znet)++ | doc/Language/grammars.pod6:
Fix unwanted display of X<>
21:55
21:57 parabolize left 21:59 parabolize` is now known as parabolize
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 sufrostico left
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:00
22:01 BinGOs_ is now known as BinGOs
dalek Heuristic branch merge: pushed 125 commits to doc/tws-test by coke 22:01
22:02 BinGOs left, BinGOs joined 22:04 addison left 22:07 jjido left 22:08 TEttinger joined, cognominal left
[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:10
22:11 RabidGravy left
[Coke] (by Josh Soref) 22:11
22:11 grondilu left, wamba left
Zoffix [Coke], did anyone sign up to do the release on the 15th? 22:11
22:13 canopus left
[Coke] nope 22:16
22:16 jjido joined
Zoffix [Coke], I'd like to do it, if there's an opening for a volunteer. 22:17
22:17 canopus joined 22:18 addison joined
[Coke] there are only spots left for volunteers at this point! 22:18
yes, please, thank you
lizmat ++Zoffix
Zoffix Sweet. 22:19
22:19 ptolemarch left 22:22 firstdayonthejob left 22:26 jjido left 22:27 pmurias left 22:32 jjido joined
[Coke] tbrowder: if you tell me your RT id, I can assign you as the owner of 128221 22:33
tbrowder not sure of the ID but my user name (ID?) is [email@hidden.address] (have I saidRT is the pits?) 22:37
nickname tbrowder 22:38
[Coke] that doesn't appear to be the email address tied to your nick, btw. assigned the ticket to you 22:40
tbrowder i just added the nickname a bit ago, it may not have taken effect yet 22:42
and thanks, [Coke] 22:43
rgrinberg Is perl6 better than perl for writing 1 liners in the cli?
Wondering if it's worth the time to replace perl for that use case. 22:44
AlexDaniel rgrinberg: it depends 22:46
22:46 jjido left
parabolize m: my token foo { \d+ }; my token bar { <foo> \w+ }; '123yarp?' ~~ / <bar> { say $<bar><foo> } /; 22:47
camelia rakudo-moar ff8362: OUTPUT«「123」␤»
AlexDaniel rgrinberg: for example, performance and startup time may be important to you in some cases
rgrinberg: in which case perl 5 is going to perform much better
but other times, yeah, perl 6 works nicely. Try it and see if it works for you 22:48
parabolize Zoffix: ^ Something like that?
rgrinberg I've read over github.com/dnmfarrell/Perl6-One-Liners and it does seem like some things were polished.
don't see anything particularly compelling 22:49
22:53 TakinOver joined
AlexDaniel hugg 22:54
huggable: dunno
huggable AlexDaniel, ¯\_(ツ)_/¯
22:55 jjido joined
ugexe good error messages are a pretty good reason 22:56
timotimo for a one-liner, the better regex syntax may not be such a big deal 22:57
it's easier to write and read, but if you only write it once, read it never again ...
23:02 kurahaupo joined
timotimo rgrinberg: the fact that perl6 uses rats by default for mathematics can help in unexpected ways 23:02
also, we're the only ones - besides Swift - who do unicode right 23:03
arguably
psch "arguably besides swift" or "arguably right"?
i honestly don't know, fwiw
timotimo arguably right 23:04
if you consider having graphemes as the basic unit of strings as the default being the only right way to have unicode
23:05 spider-mario left
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
s/thing/way/
Zoffix: re: irclog.perlgeek.de/perl6/2016-07-01#i_12771601 23:08
m: grammar G { token TOP { (.) {} <foo($0)> }; token foo($a) { "$a" ** 2 } }; G.parse("aaa").say
camelia rakudo-moar ff8362: OUTPUT«「aaa」␤ 0 => 「a」␤ foo => 「aa」␤»
psch Zoffix: note though that it suffers from a (already ticketed afaik) bug which doesn't update the captures in time
as per the following 23:09
m: grammar G { token TOP { (.) <foo($0)> }; token foo($a) { "$a" ** 2 } }; G.parse("aaa").say
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␤»
psch Zoffix: without the sequence point we apparently don't have $0 yet, which iirc is something we have ticketed already
timotimo created a few tickets on the perl6-one-liners repo 23:10
it'd be cool if someone could review them
[Coke] GAH DOC SO SLOOOOW 23:12
timotimo .seen mouq
yoleaux I saw Mouq 7 Jan 2016 04:12Z in #perl6: <Mouq> Juerd++ regardless :) even reading good code sucks
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 +␤»
Zoffix psch++ sweet, thanks.
23:13 jjido left
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:14
psch timotimo: the issues (on github.com/dnmfarrell/Perl6-One-Liners/, right?) look appropriate to me at least 23:16
23:16 jjido joined
psch though i'm a sucker for using % instead of %% at least occasionally vOv 23:16
timotimo :)
i think it's good to show off that all operators can be metaop-negated
(well, not all, of course)
(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
...which reminds me of the somewhat embarrassing bug we still have there :( 23:18
m: say 3 !=3
camelia rakudo-moar ff8362: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at <tmp> line 1␤␤»
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␤»
AlexDaniel [Coke]: I feel your pain 23:20
Zoffix not... iffy enough? HAH
Zoffix isn't even sure how to parse that 23:22
Only those that go sour can be used? XD
timotimo it must be sufficiently if-like
like ==/eq/eqv, or %%, ... 23:23
23:23 Timbus_ left
Zoffix :) 23:24
www.dictionary.com/browse/iffy
23:25 Zoffix left
timotimo it's a pun :) 23:25
psch well, a cursory glance says the !=1 issue is somewhere in EXPR 23:26
which probably explains why it's been around so long :P
AlexDaniel docs.perl6.org/language/glossary#iffy meh
psch goes back to not-programming for now 23:27
that probably means sleep soon o/
23:27 cpage_ left
AlexDaniel psch: what about programming in your dreams? :) 23:29
23:33 yqt left 23:35 Actualeyes joined
timotimo the != 1 issue? 23:35
23:35 freezerburnv joined, jjido left
psch AlexDaniel: i probably wouldn't remember if i did any of that... :) 23:36
timotimo: not the != 1 issue, the !=1 issue :S
m: say 1 !=1
camelia rakudo-moar ff8362: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 1 != 1
camelia rakudo-moar ff8362: OUTPUT«False␤»
psch timotimo: that ^^^
timotimo: as mentioned, i'm pretty sure it's something in EXPR makes us misparse the latter as meta op ! to infix:<=> 23:37
+that
timotimo oh, huh 23:39
23:39 addison left
psch it's ticketed for like 3 years or so i think... 23:39
but it's also deep in the guts that no one wants to touch, soooo... :)
timotimo wow
yeah :D
23:39 huggable left 23:40 huggable joined
psch well,just about two and a half years 23:41
and apparently *i* ticketed it /o\
rt.perl.org/Public/Bug/Display.html?id=121108
timotimo hah 23:42
psch this does *not* mean i have to fix it :P
23:43 LLfournLaptop left
psch i honestly just get more scared that STD already did that wrong 23:43
'cause i'm pretty sure the STD author is a better programmer than me :S
timotimo :) 23:46
ShimmerFairy m: say 1!= 1 23:55
camelia rakudo-moar ff8362: OUTPUT«False␤»
geekosaur "better programmer" does not mean "infallible". it might not even mean "more infallible" 23:56
23:56 cpage_ joined 23:57 rgrinberg left
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
ShimmerFairy: it still just points at EXPR as the point of divergence