»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
nevada1 Hey, is there any truth to some kind of unified language iteration called Perl 11? Or is that some kind of running joke. 01:17
hythm how to execute one of two operations randomly? like ( $a + $b ) or ($a - $b ) ? 03:15
hythm p6: given (^1).roll { say 1 + 1 when 0; say 1 - 1 when 1 } 03:20
evalable6 2
hythm p6: given (0 .. 1).roll { say 1 + 1 when 0; say 1 - 1 when 1 } # somethin like this but in more concise way 03:22
evalable6 0
masak m: say Bool.roll ?? 1 + 1 !! 1 - 1 04:34
evalable6 0
masak hythm: maybe like that?
works unless you're planning to expand beyond two operators later, I guess 04:35
or, if you prefer `if`: 04:36
m: say do if Bool.roll { 1 + 1 } else { 1 - 1 }
evalable6 2
masak (though `?? !!` reads better to my eyes than `do if`)
masak oh, parens work too: 04:36
m: say (if Bool.roll { 1 + 1 } else { 1 - 1 })
evalable6 0 04:37
hythm That works, Thanks masak
masak (note that the space after `say` is essential: the parens denote a sub-statement, not an argument list) 04:37
hythm noted 04:38
discord6 <Tyler (Aearnus)> hey all, trying to figure out a bit of a mystery here. what writes to $*MAIN_CTX on this line? github.com/perl6/nqp/blob/01da9b07...er.nqp#L98 06:26
nine AlexDaniel: commented on the Inline::Python issue 06:46
hythm m: class A { method TOP ( $/ ) { make ($/<x>.Int, $<y>.Int) } } ;grammar G { token TOP { $<x>=<.digit>+ <space> $<y>=<.digit>+ } }; my $actions = A; say G.parse('42 77', :$actions).ast; 07:24
evalable6 (2 2)
hythm m: class A { method TOP ( $/ ) { make ($/<x>.join.Int, $<y>.join.Int) } } ;grammar G { token TOP { $<x>=<.digit>+ <space> $<y>=<.digit>+ } }; my $actions = A; say G.parse('42 77', :$actions).ast; 07:25
evalable6 (42 77)
hythm have to .join to get the correct matched numbers, is ther a way to make $<x> holds all <digit> values, and return this as one number, '42' instead of '4, 2'? I though using <.digit> will do that 07:28
hythm Aah, I need brackets around $<x> 07:49
m: class A { method TOP ( $/ ) { make ($/<x>.Int, $<y>.Int) } } ;grammar G { token TOP { $<x>=[<.digit>+] <space> $<y>=[<.digit>+] } }; my $actions = A; say G.parse('42 77', :$actions).ast;
evalable6 (42 77)
jmerelo geth is down again... 08:06
discord6 <timotimo> @Tyler (Aearnus) it gets set by the ctxsave method which gets called by a part of the code that alwyas gets compiled in; check out perl6 --target=ast -e' say "hi"' to see it 09:13
antoniogamiz o/ 10:14
timotimo o/
jmerelo hi! 10:19
pistacchio_ if I remember correctly, someone has a page where he's been running daily benchmarks of Rakudo's releases using the same algorithm everyday. can you given the link? 10:58
antoniogamiz github.com/japhb/perl6-bench this? 11:03
timotimo oh, that's tux's stuff
tux.nl/Talks/CSV6/speed4.html 11:04
antoniogamiz github.com/japhb/perl6-bench this 11:05
antoniogamiz sorry for the repeated message 11:07
jmerelo antoniogamiz: that one apparently benchmarks perl5 vs perl6 implementation. But thanks for the link... 11:16
timotimo it also benchmarks different perl6 implementations and different versions of the same perl6 implementation 11:17
jmerelo timotimo: the speed increase is really amazing... 100x increase, a 2x increase in the last year... 11:18
timotimo well, we started rather extremely slow 11:19
240 at the beginning ... i mean, wow
jmerelo timotimo: still, 2 seconds is not great. There's a lot of room for improvement. 11:20
timotimo yeah
jmerelo timotimo: hope your profiler helps find out more bottlenecks...
timotimo tux has been saying for years that making "next" faster would be a big help
jmerelo timotimo: what would you say about that? 11:21
timotimo that sounds likely 11:22
unfortunately it's also tricky
jmerelo timotimo: no other incremental path to improvement? 11:25
timotimo if somebody wants to manually rewrite some code in there to turn "next" into basically "loop { beginning of loop body ...; if not $condition-for-next { rest of the loop body } }" we could probably get an estimation of the potential speed improvement
i haven't looked into a profile or spesh log of that library for a while 11:26
right now i'm adding stats to the profiler that will tell you what objects die young, not quite as young, or old
i.e. for every gc run it'll tell you how many objects it freed of any given type and splits the count into "freed from nursery", "freed from nursery, but with the 'already seen in nursery' bit set", and "freed in the gen2" (which only happens in major collections) 11:27
jmerelo timotimo: would be useful for what? Early gc? Objects that are not really used? 11:28
timotimo one of the most expensive things you can have is an object that lives just barely long enough to reach the gen2, and then immediately becomes garbage
timotimo other than that, objects that die young can be potential candidates for scalar replacement, but of course only if they are allocated and become garbage in the same frame, and don't escape 11:33
jmerelo It's already April's fools in StackOverflow. Go and check it out now. I guarantee 100% that's an accurate reflection of what it tries to reflect. 12:21
AlexDaniel oh well, and here's an April's fools joke from the weather: imgur.com/a/f3ZDdKy 13:31
AlexDaniel hehe there's a guest book :) 13:34
timotimo feelin' that long rakudo compile times; doubly so because i set --optimize=0 17:21
hurm. i should really have some random go-to nqp profilable code 17:27
so i don't have to build rakudo all the time to test changes in nqp 17:28
kybr timotimo: i am up for trying moarperf. sure. 18:33
AlexDaniel kawaii: hello 18:42
kawaii: fyi github.com/rakudo/rakudo/issues/2805
antoniogamiz some guide to publish new modules 19:02
?
sena_kun antoniogamiz, are you interested in module structure or making a module public/available? 19:07
antoniogamiz making a module public yep 19:08
sena_kun antoniogamiz, right now there are at least two popular options: CPAN and github. Unfortunately, I am not familiar with CPAN, so maybe someone else can tell more. As far as I know, you have to make an account, prepare your module distribution and upload it, but again, not my thing. The easier thing is to just make a PR for github.com/perl6/ecosystem <- you have to add url to your `META6.json` file and once it's accepted that's it. 19:09
antoniogamiz ah ok, that's what I needed to know! thanks :) 19:10
I already have the repo done: github.com/antoniogamiz/Math-ConvergenceMethods 19:11
I will make the pr then
sena_kun just an edit of META.list file with one more URL. You want a link to raw file in your repo, but in any case it is pretty tested and people are checking this repo, so if there will be any issues, you'll get help. :)
antoniogamiz, also, you can check if that's installable locally using `zef install .` in the module directory. Saves time if there are any immediate issues like wrong paths and the like. 19:12
antoniogamiz ok, I will check that :)
Geth ecosystem: antoniogamiz++ created pull request #444:
New Math::ConvergenceMethods module
19:14
sena_kun antoniogamiz, now we only have to wait for travis to be ok and I'll merge it. ;) 19:16
antoniogamiz yep :)
I can already merge it :D
but I prefer to make a pr and check everything is ok 19:17
I can merge it too*****
Geth ecosystem: 2a7bf3d283 | Antonio++ (committed using GitHub Web editor) | META.list
Update META.list
ecosystem: ad9028d64d | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #444 from antoniogamiz/master

New Math::ConvergenceMethods module
sena_kun oh wow, new checker is really fast 19:17
antoniogamiz :oo 19:17
sena_kun antoniogamiz, now a couple of hours for caches to be updated and it'll be installable. \o/ 19:18
antoniogamiz sena_kun: \o/ 19:19
timotimo # github source github.com/antoniogamiz/Math-ConvergenceMethods needs to end in .git 20:32
oh?
sena_kun how did it pass the travis then? 20:37
travis-ci.org/perl6/ecosystem/buil...tification <- seems like a suggestion, not an error 20:38
but, anyway, antoniogamiz ^
guifa cheers for Object not being a taken name 20:42
antoniogamiz mmmmm I thought it had passed the Test::Meta 20:45
mmm Test::Meta is passing correctly :/ 20:48
sena_kun it is, just gives a suggestion, I guess 20:49
antoniogamiz ah ok, I will change it then :) 20:50
Xliff Oh... ghod. 21:46
StackOverflow's tribute to the Fool is... a tad overdone. 21:47
Think Unicorns and Rainbows.
Where the pointer is the unicorn.
You. Have. Been. Warned.
timotimo i liked it 21:55
and maybe it'll be better soon. after all, it's still Under Construction™
Xliff LOL 22:10
I shudder to think of how it could be made "better"