[Coke] if I were to guess that coerce_iu coerced an int to an unsigned int, would I be close? (in moarvm it actually seems to be spesh related) 01:05
dd: Int.How 01:14
tellable6 [Coke], I'll pass your message to dd
[Coke] m: dd Int.How
camelia No such method 'How' for invocant of type 'Int'. Did you mean 'HOW'?
in block <unit> at <tmp> line 1
[Coke] m: dd Int.^HOW
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use .^ on a non-identifier method call
at <tmp>:1
------> 3dd Int.^HOW7⏏5<EOL>
expecting any of:
method arguments
[Coke] m: dd Int.HOW
camelia Perl6::Metamodel::ClassHOW.new
[Coke] (sorry that took 3 tries) does renaming that to Raku have a ticket? 01:15
would be great if someone could document knowhow and knowhowattr opcodes. 01:26
Geth nqp/master: 5 commits pushed by Coke++ 01:44
[Coke] down to 217 failures. 01:45
if you do getattrref we get 4 for the price of 1!
also captureposarg is 4 for 1. 01:46
.tell bartolin there are some jvm specific opcodes at gist.github.com/coke/f87ab505c6cb8...b5cb6a8990 like "attrhintfor" that could use some dos. 01:47
tellable6 [Coke], I'll pass your message to bartolin
[Coke] .tell pmurias there are some js specific opcodes at gist.github.com/coke/f87ab505c6cb8...b5cb6a8990 like "attrhintfor" that could use some docs. 01:48
tellable6 [Coke], I'll pass your message to pmurias
[Coke] .tell pmurius I mean like asyncreadbyte 01:51
tellable6 [Coke], I haven't seen pmurius around, did you mean pmurias?
[Coke] .tell pmurias I mean like asyncreadbyte 01:52
tellable6 [Coke], I'll pass your message to pmurias
Geth nqp: ae3935dd86 | Coke++ | docs/ops.markdown
fix lstat_time's doc entry
01:58
nqp: e00848c102 | Coke++ | t/docs/opcodes.t
skip unless_i, not exposed to users
02:00
02:09 MasterDuke left
[Coke] 215 02:15
Geth nqp: 973c975d12 | Coke++ | docs/bootstrapping.pod
Fix broken IRC log reference

Closes #635
02:19
linkable6 NQP#635 [closed]: github.com/Raku/nqp/issues/635 IRC log ref in file "docs/bootstrapping.pod" is invalid
02:40 lucasb left 03:18 travis-ci joined
travis-ci NQP build passed. Coke 'Fix broken IRC log reference 03:18
travis-ci.org/Raku/nqp/builds/739160800 github.com/Raku/nqp/compare/e00848...3c975d1266
03:18 travis-ci left 06:53 Altai-man joined 07:37 MasterDuke joined 08:08 sena_kun joined 08:10 Altai-man left 08:38 domidumont joined
Geth roast: nwc10++ created pull request #693:
:enc(utf16) assumes host byte order if there is no BOM, so test accordingly.
08:40
09:11 frost-lab joined
MasterDuke m: my @a = ^1_000; my @b; my $s = now; @b = @a.head(*-1) for ^10_000; say now - $s; say @b.head, @b.tail 10:41
camelia 9.72548888
0998
10:42
MasterDuke m: use nqp; my @a = ^1_000; my $a := nqp::getattr(@a, List, q|$!reified|); my $b; my $s = now; $b = nqp::slice($a, 0, -2) for ^10_000; say now - $s; say $b.head, $b.tail
camelia 0.0732284
0998
MasterDuke ^^^ bigger difference than i was expecting
in the example above, why does github.com/rakudo/rakudo/blob/mast...m6#L27-L29 allocate 9991000 BOOTHash'es? 10:51
huh, and 9999 deallocs in github.com/rakudo/rakudo/blob/mast...#L433-L438 10:53
donaldh lizmat: The homebrew formula for rakudo-star is updated to 2020.10. I applied your ENV patch in the homebrew formula for this release. 11:14
MasterDuke *deopts 11:16
Geth rakudo: 089bd59069 | (Daniel Mita)++ (committed using GitHub Web editor) | 2 files
Add flag for creating symlinks without absolute path (#3980)

  * Add flag for creating symlinks without absolute path
This change is intended to allow the creation of relative symlinks via the `:!absolute` flag. This ensures that the .absolute method is not called on the given IO::Path, instead creating the symlink with the given path as-is.
11:55
linkable6 RAKUDO#3980 [closed]: github.com/rakudo/rakudo/pull/3980 Add flag for creating symlinks without absolute path
rakudo: 051e036113 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | src/core.c/array_slice.pm6
Implement binding of array-slices (#3970)

AKA @a[1,2,3] := <a b c> . For some reason, this was not implemented before, perhaps because of pre-GLR peculiarities making this difficult. Implementing turned out not to be such a big thing, so here goes.
This makes one spectest fail: S32-exceptions/misc2.t, 46 which tests for specific X::Bind::Slice throwage.
This does not make any spectest pass, suggesting we need more tests.
11:58
linkable6 RAKUDO#3970 [closed]: github.com/rakudo/rakudo/pull/3970 Implement binding of array-slices
rakudo: 87ef76ae30 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | src/core.c/hash_slice.pm6
Implement binding of hash-slices (#3969)

AKA %h<a b c> := 1,2,3 . For some reason, this was not implemented before, perhaps because of pre-GLR peculiarities making this difficult. Implementing turned out not to be such a big thing, so here goes.
This breaks 2 spectests that specifically test for throwing an ... (8 more lines)
11:59
linkable6 RAKUDO#3969 [closed]: github.com/rakudo/rakudo/pull/3969 Implement binding of hash-slices
12:07 Altai-man joined 12:10 sena_kun left
Geth roast: fc1c1e797c | (Elizabeth Mattijsen)++ | 3 files
Binding to hash/array slices is now possible
12:33
12:50 frost-lab left
Geth roast: 2094cac6f1 | (Elizabeth Mattijsen)++ | 13 files
Replace "hashref" concept relic by "hashitem"

This just changes the wording of variables and comments, no tests semantics were changed.
Raku does not know references of the type that were originally meant here, coming from Perl (which *does* know references).
13:04
[Coke] lizmat: down to 196 undocumented moar opcode variants, 19 more jvm/js only. 13:13
lizmat n:n
oops
13:17 Altai-man left, Altai-man joined
[Coke] moritz: Since you're the new grammar guru, can you take a stab at documenting the nfa* opcodes in nqp? :) 13:21
Geth roast: 34c41416f3 | (Elizabeth Mattijsen)++ | 24 files
Replace "arrayref" concept relic by "arrayitem"

This just changes the wording of variables and comments, no tests semantics were changed.
Raku does not know references of the type that were originally meant here, coming from Perl (which *does* know references).
13:25
nqp: f206fa953f | Coke++ | docs/ops.markdown
Document readlink
[Coke] nqp: nqp::say(nqp::fromI_I(3)) 13:30
camelia Arg count 1 doesn't equal required operand count 3 for op 'coerce_II'
at gen/moar/stage2/QAST.nqp:1568 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:compile_mastop)
from gen/moar/stage2/QAST.nqp:1781 (/home/camelia/rakudo-m-inst-2/share/nqp/…
[Coke] Curious as to why we have fromI_I which seems to be for coercing a bigint to a bigint
moritz [Coke]: sorry, but I have no idea about the nqp opcodes used in grammars 13:34
[Coke] moritz: but don't you WANT to? :) 13:38
moritz I do, in fact. But my want for a working washing maschine is one of the things ranking higher right now 13:39
(it seems my wife pulled too strongly on the door, and now the door won't open anymore :/)
[Coke] wonders why we have findmeth and findmethod opcodes.
moritz the second in case the first one is high?
[Coke] don't know her own strength!
nqp: nqp::say(nqp::const::CCLASS_ANY) 13:41
camelia 65535
[Coke] nqp: nqp::say(nqp::const_64::CCLASS_ANY)
camelia
[Coke] wonders what the difference is between const & const_64
nqp: nqp::say(nqp::const_n64::CCLASS_ANY)
camelia
[Coke] er, it's n64. (surprised the middle one didnt' return Mu)
moritz m: nqp::say(Mu) 14:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::say, did you forget 'use nqp;' ?
at <tmp>:1
------> 3nqp::say(Mu)7⏏5<EOL>
moritz nqp: nqp::say(Mu) 14:04
camelia
MasterDuke [Coke]: IIRC fromI_I is used to strip out mix-ins 14:16
yep github.com/rakudo/rakudo/blob/mast...m6#L34-L41 14:17
heh, thought it was familiar github.com/MoarVM/MoarVM/pull/737 14:21
Geth roast: mienaikage++ created pull request #694:
Add tests for relative symlinks
14:39
[Coke] MasterDuke: what's a mixin 15:26
?
in this context.. an extra role?
ok. I can lift that comment for the docs, anyway. Thanks!
MasterDuke yeah. `1 but "one"` type thing 15:27
m: say so 1; say so 1 but False 15:28
camelia True
False
MasterDuke m: my $a = 1 but False; say so $a; my $b = Int.new($a); say so $b
camelia False
True
Geth nqp: 4c9d0d2277 | Coke++ | docs/ops.markdown
Document js op add_i64
nqp: 9063dd7a04 | Coke++ | docs/ops.markdown
Document fromI_I

  MasterDuke++
nqp: c6080dc21a | Coke++ | docs/ops.markdown
add doc header
[Coke] MasterDuke++ thanks 15:30
MasterDuke np
[Coke] my followup question is, "why do we need that?" :)
but that's just curiousity, just trying to get things doc'd 15:34
(213 opcodes left, 195 moar specific) 15:35
Geth nqp: af323a47a2 | Coke++ | docs/ops.markdown
fix doc formatting
15:36
[Coke] (212 opcodes left, 194 moar specific) 15:38
nqp: nqp::say(nqp::freemem) 15:45
camelia 369102848
[Coke] I am amazed at how much slower the Raku version of this opcode test is 15:50
nwc10 than what? NQP? 15:52
[Coke] yes. in nqp repo, rewrote t/doc/opcode.t from NQP to Raku (so I could get some relief writing the test of the code)
it's gone from 1s of seconds to dozens. 15:53
Geth nqp: 3075a1ab22 | Coke++ | docs/ops.markdown
Document freemem
[Coke] 211 15:54
MasterDuke one help would be to add a `contains('string') and ` before some of those big regexes that have string literals
`@moar-ops.push: .words.head` *might* be faster than `my $op = .split(/\s+/, 2)[0]; @moar-ops.push: $op;` 15:57
16:08 sena_kun joined 16:10 Altai-man left
[Coke] MasterDuke: I feel like doing the contains check is cheating that the optimizer should be doing for me! :) 16:10
but yah, I just did similar cheating in App::Uni which sped things up considerably.
MasterDuke oh i agree, but as a practicality it doesn't yet...
[Tux] Rakudo v2020.10-11-g87ef76ae3 (v6.d) on MoarVM 2020.10-10-g2a98b8f3a
csv-ip5xs0.799 - 0.846
csv-ip5xs-207.861 - 7.884
csv-parser25.274 - 25.568
csv-test-xs-200.383 - 0.391
test7.761 - 7.819
test-t1.923 - 2.014
test-t --race0.903 - 0.912
test-t-2031.304 - 34.101
test-t-20 --race9.568 - 9.841
16:19
sena_kun releasable6, status 16:41
releasable6 sena_kun, Next release in ≈25 days and ≈2 hours. There are no known blockers. Changelog for this release was not started yet
sena_kun, Details: gist.github.com/3a492eeb923500883b...b802c5f06f
[Coke] MasterDuke: took 10s more with "contains" lines. :| 16:45
MasterDuke that doesn't make sense 16:46
lizmat perhaps a --profile would be useful ? 16:47
[Coke] sure, will run one and throw the html in a gist 16:50
where can I put it so it's rendered? 16:54
(or should I just put the source out and folks can DL it?
MasterDuke DL it is simplest i think 16:56
[Coke] gist.githubusercontent.com/coke/8d...ofile.html
20% GC is more than I was thinking.
MasterDuke lots of deopts 16:57
[Coke] can we tell which code has the deopts? 16:58
(line 109?)
that's $file.IO.lines -> $line { 16:59
getting rid of an "is copy" 17:02
lizmat hmmm... I wonder if ord-or-str can be made smarter, not having to roundtrip in the common case? 17:15
17:20 domidumont left
lizmat something like nqp::codes(nqp::substr($str,$idx,1) == 1 ?? nqp::ord($str,$idx) !! nqp::substr($str,$idx,$i) 17:23
aka, no variables
*temp variables
lizmat is in a different mindset right now to try that 17:24
17:27 travis-ci joined
travis-ci NQP build passed. Coke 'Document freemem' 17:27
travis-ci.org/Raku/nqp/builds/739338850 github.com/Raku/nqp/compare/af323a...75a1ab22fa
17:27 travis-ci left
Geth nqp: cb995c6e47 | Coke++ | t/docs/opcodes.t
Avoid an "is copy"
17:35
roast: 004a756f2b | (Daniel Mita)++ (committed using GitHub Web editor) | S32-io/io-path-symlink.t
Add tests for relative symlinks (#694)
18:35
linkable6 ROAST#694 [closed]: github.com/Raku/roast/pull/694 Add tests for relative symlinks
MasterDuke [Coke]: lines 210, 220, and 231 could have a `starts-with() and `. should be even better than `contains()` 18:38
18:40 donaldh left
MasterDuke i don't know if reusing `$match` is faster or not than just using a/the regex directly 18:40
in line 114 you're interpolating `@keywords` for every line of input. that seems a case where you should be pre-creating the regex and then just matching against that 18:45
[Coke] all good points. 18:51
MasterDuke oddly enough, i just made all of those changes (except for not reusing $match) plus making `@*vms` and `@*variants` non-dynamics and there was no speedup at all 18:56
[Coke] ... then I will hold off. :)
one thing switched coming from nqp to raku was getting rid of "split \n" and using .lines instead. 18:57
well, if you do find anything with substantial time savings that doesn't change the output, please push it. :) 18:59
it's running about 135-145s here consistently 19:02
MasterDuke 50s for me
m: my @n = 1, 3, 5, 7; my $r = / @n /; my $a; $a++ if $_ ~~ $r for ^10_000; say now - INIT now; say $a
camelia 1.9447962
8704
MasterDuke m: my @n = 1, 3, 5, 7; my $a; $a++ if $_ ~~ / @n / for ^10_000; say now - INIT now; say $a
camelia 1.9198736
8704
19:03
MasterDuke that's the problem
[Coke] testing... 19:06
MasterDuke m: my @n = 1, 3, 5, 7; my $a; $a++ if $_ ~~ / 1 | 3 | 5 | 7 / for ^10_000; say now - INIT now; say $a
camelia 0.159362
8704
MasterDuke it's the interpolation of @keywords that's the real slowdown. but i would have thought pulling it out ahead of time would have fixed that 19:07
but as my examples show, i'm not doing it right
[Coke] that made it worse.
by pulling out the re, i'm at 2+ minutes now. 19:08
weird.
MasterDuke timotimo, moritz, lizmat: ^^^ 19:10
[Coke] OH
by changing the / @keywords / to .contains(any(@keywords)), it's down to 5s.
holy crap.
let me make sure that's actually working. 19:11
MasterDuke nice 19:12
[Coke] (want to make sure output is identical - but I wasn't doing anything other than making sure that the text of one of those appeared in the string)
MasterDuke using a Junction is slow also. i wonder if the regex would be faster if done correctly 19:13
[Coke] not that slow! 19:14
yah. output is identical.
Geth nqp: d1b2c12d83 | Coke++ | t/docs/opcodes.t
switch from regex to keywords.

We were creating the regex too often, but caching it didn't help
Switching to contains(junction) brings runtime here from about 145s to about 5s.
19:15
[Coke] ... dammit, screwed up the first line of the commit. ah well
I would expect in an optimized Rakudo that those would be close in performance. 19:16
... and in nqp, the / @keywords / regex was that fast. 19:17
MasterDuke++ would have taken me longer to find the bottleneck.
MasterDuke my other changes, if applied after that one, take the time from 2.1s down to 2.0s. prob not worth the added complexity 19:18
i believe there's some hope that the rakuast branch might enable some optimizations to regex interpolation. but it likely won't be simple to implement... 19:19
[Coke] now just need to get people to document the remaining 211 opcodes! :)
lizmat, et al: let me know if you need me to try to benchmark that behavior to highlight the speed difference. 19:24
MasterDuke: interesting that it was *running* the regex that was the problem, not creating it (apparently) 19:25
MasterDuke seems like it is doing some sort of lazy creation, not compiling it 19:26
[Coke] ah, maybe. 19:27
MasterDuke because the literal version is fast
m: my $a; $a++ if $_ ~~ / 1 | 3 | 5 | 7 / for ^10_000; say now - INIT now; say $a 19:28
camelia 0.1726417
8704
timotimo i don't remember how exactly the cache works for interpolated stuff in regex
MasterDuke m: my @n = 1, 3, 5, 7; my $a; $a++ if $_.contains(any(@n)) for ^10_000; say now - INIT now; say $a
camelia 1.628312
8704
timotimo maybe it only works with <$foo> style interpolation
MasterDuke i couldn't get it to work even with EVAL
timotimo get it to work, or get it to work fast? 19:29
MasterDuke fast
m: my @n = 1, 3, 5, 7; my $r = EVAL q|/ @n /|; my $a; $a++ if $_ ~~ $r for ^10_000; say now - INIT now; say $a 19:33
camelia 1.9987268
8704
timotimo m: my @n = 1, 3, 5, 7; my $r = EVAL q|/ @n /|; say $r 19:41
camelia / @n /
timotimo m: my @n = 1, 3, 5, 7; my $r = EVAL q|/ | ~ @n.join("|") ~ q| /|; say $r
camelia 5===SORRY!5=== Error while compiling <tmp>
EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma
to override this error but only if you're VERY sure your data contains
no injection attacks).
at <tmp>:1
------> 3y $r = …
timotimo m: use MONKEY-SEE-NO-EVAL; my @n = 1, 3, 5, 7; my $r = EVAL q|/ | ~ @n.join("|") ~ q| /|; say $r
camelia / 1|3|5|7 /
timotimo m: use MONKEY-SEE-NO-EVAL; my @n = 1, 3, 5, 7; my $r = EVAL q|/ | ~ @n.join("|") ~ q| /|; my $a; $a++ if $_ ~~ $r for ^10_000; say now - INIT now; say $a
camelia 0.1807646
8704
timotimo you're compiling a regex that will still do an interpolation when it's run 19:42
MasterDuke ha
timotimo++ 19:45
well then. doing it correctly drops the runtime from 2.1s to 1.2s. interested in doing that [Coke] or leave at .contains?
timotimo doing the .join thing will not do proper escaping for you, though 19:50
so be careful about your input :) 19:51
20:07 Altai-man joined 20:10 sena_kun left
[Coke] contains is fine. 20:18
MasterDuke cool 20:22
20:30 Altai-man left 20:40 Altai-man joined 20:43 lucasb joined 20:44 Geth left 20:48 Altai-man left 20:58 chansen_ left, hoelzro left, hoelzro joined, chansen_ joined 21:35 Xliff left 23:17 nebuchadnezzar left