| MasterDuke | but the fail will still be created | 00:00 | |
| timotimo | it will? | 00:02 | |
| MasterDuke | you're talking about return value of val? | ||
| timotimo | i think s? | 00:03 | |
| or is this more about "val is too many-purpose"? | 00:05 | ||
| so we can't just use it for when we smartmatch against a number | 00:07 | ||
| MasterDuke | well, as i understand it, we're calling Str.Numeric -> val(:val-or-fail) -> fail | 00:08 | |
| github.com/rakudo/rakudo/blob/mast...#L219-L220 | |||
| so by the time val has returned the fail+backtrace have already been created | 00:09 | ||
| timotimo | ok so we would steal Str::Numeric and change nothing except for the use of val-or-fail | ||
| MasterDuke | or add an argument to Str.Numeric that it passes to val | 00:10 | |
| timotimo | btw we could perhaps maybe numify only a single time when there's multiple whens that try to match against numbers | ||
| possibly | |||
| MasterDuke | yeah, i was wondering about maybe creating QAST::Blocks and creating some variables to reuse | 00:11 | |
| timotimo | blocks you have to be careful with, because they have a scoping meaning | 00:12 | |
| m: given "0x1" { when 16 { say "yes" } } | |||
| camelia | ( no output ) | ||
| timotimo | m: given "0x1" { when 16 { say "yes" }; when Int { .say } } | ||
| camelia | ( no output ) | ||
| timotimo | m: say 0x1.Numeric | 00:13 | |
| camelia | 1 | ||
| timotimo | ahahaha | ||
| m: given "0x10" { when 16 { say "yes" } } | |||
| camelia | yes | ||
| MasterDuke | well, statement_control:sym<when> doesn't really know about the other whens, so that optimization would have to happen elsewhere, right? | ||
| timotimo | yeah | ||
| and you can put "when" in many different things | |||
| we'll want to do some pretty defensive checks at the beginning | 00:14 | ||
| MasterDuke | that might best belong in Optimize.pm6 | ||
| timotimo | true | ||
| MasterDuke | looks like we probably also need a new Failure.new. all the existing ones call nqp::create(self)!SET-SELF, and !SET-SELF is where the backtrace is created | 00:18 | |
| or more arguments to set | |||
| ugh, i also don't see a restart button for travis travis-ci.org/github/rakudo/rakudo.../743501497 | 00:19 | ||
| timotimo | why do we want a failure without backtraces? | 00:20 | |
| MasterDuke | because creating the backtrace is what's slow. and we don't use it in this case | ||
| github.com/rakudo/rakudo/blob/mast...ce.pm6#L98 is what's 44% in the profile | 00:21 | ||
| timotimo | i'd rather say skip failure entirely for cases like this | 00:22 | |
| we'd have to pass something to decide between failure with and without backtrace anyway | |||
| MasterDuke | sure, no strong feelings either way here | ||
| but if it doesn't fail/throw/something, whatever the return value is will get passed to nqp::iseq_s | 00:24 | ||
| oops, iseq_i | |||
| timotimo | well, we'd have to check that first | 00:25 | |
| immediately after the return | |||
| typecheck could be enough, since it's either something numeric, or the string again | |||
| (but it could be a string with a role applied, or something derived from Str) | |||
| MasterDuke | i gotta get to bed. but i'll backlog if there are any more idea/suggestions | 00:31 | |
| timotimo | good night! | 00:38 | |
|
02:34
leont left
02:58
lucasb left
03:49
b2gills left
|
|||
| Geth | rakudo: Kaiepi++ created pull request #4028: Throw an exception if &make is called w/o a valid match in $/ |
04:12 | |
|
06:04
sena_kun joined
08:09
Altai-man joined
08:12
sena_kun left
|
|||
| bartolin | vrurg: (exceptions on jvm backend) I'm afraid I'm not of much help there. I've tweaked some code to throw a typed (Raku) exception in the past -- but maybe that's not what you want. I took this old commit as a blueprint for throwing typed exceptions: github.com/rakudo/rakudo/commit/1b01e7aff7 | 09:00 | |
| vrurg: do you have a link to a specific nqp::die you want to change? | 09:01 | ||
|
09:40
linkable6 left,
evalable6 left,
evalable6 joined
09:42
linkable6 joined
10:39
ufobat joined
|
|||
| Geth | rakudo: adeff7de83 | (Elizabeth Mattijsen)++ | 2 files Streamline handling of bind/delete on native arrays - Introduce X::Delete typed error message and use that - Throw an X::Bind on trying to bind: please note that this is runtime and at that point it is impossible to get the name of the native array being accessed, so X::Bind::NativeType can not be used for that. |
11:14 | |
|
11:19
leont joined
12:10
sena_kun joined
12:12
Altai-man left
|
|||
| bartolin | vrurg: I poked around with your branch and I think the internal java error happens because origArg is not decontainerized in github.com/vrurg/rakudo/blob/raku_....java#L519 | 12:18 | |
| vrurg: I tested with Ops.decont(arg_o, tc) instead and in both cases the following error from nqp::die appeared: Impossible coercion from 'BOOTStr' into 'Str': no acceptable coercion method found | 12:26 | ||
|
12:29
frost-lab joined
|
|||
| Geth | rakudo: 3e6e15e620 | (Elizabeth Mattijsen)++ | 2 files Make simple native shaped array access about 5x as fast By supplying postcircumfix candidates that directly map to the underlying nqp:: ops. This does *not* fix the issue with a typecheck on the native shaped array that for some reason is *always* taking the slow path. |
12:30 | |
| bartolin | vrurg: but please note, from what it looks this error pops up for a different object (not the one that caused the other explosion) | 12:34 | |
|
12:37
ufobat left
|
|||
| bartolin | (and the string it doesn't like is the current version (2020.10-90-g3923f18c3)) | 12:47 | |
|
12:49
lucasb joined
|
|||
| dogbert17 | m: my int @a[10]; say @a[0].WHAT | 12:57 | |
| camelia | (Int) | ||
| dogbert17 | lizmat: are native int arrays automatically initialized to zero? | 13:08 | |
| Geth | rakudo: f6a33b8b35 | (Elizabeth Mattijsen)++ | 3 files Make @a[int $i] about 2x as fast Turns out that having explicit int $pos candidates for postcircumfix:<[ ]> is actually detrimental to performance when indexing using a native int. So remove all of the specific int $pos candidates. However, using an int to index into an array, is still about 5x as slow as using an Int:D :-( So effectively it's gone down from 10x as slow to 5x as slow. |
13:09 | |
| lizmat | dogbert17: yes | ||
| dogbert17 | lizmat++ optimizing | ||
| lizmat | m: my int @a; @a[9] = 42; dd @a | ||
| camelia | array[int].new(0, 0, 0, 0, 0, 0, 0, 0, 0, 42) | ||
| lizmat | m: my int @a[10]; dd @a | ||
| camelia | array[int].new(:shape(10,), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) | ||
|
13:10
ugexe left
|
|||
| dogbert17 | thx, just wanted to be certain. I guess it's in the docs somewhere. | 13:10 | |
| lizmat | well, if you think about it: a native int array is basically just a blob of memort | 13:11 | |
| *memory | |||
| we don't want garbage in there, so setting it to 0 seems like a sensible thing to do :-) | |||
| dogbert17 | excellent, now I know | ||
| lizmat: I think I see a slowdown in one of my test scripts after the latest fixes | 13:23 | ||
| lizmat | ah> | ||
| ? | |||
| which one, the last one ? | 13:24 | ||
| or the one adding native shaped array postcircumfix candidates ? | |||
| dogbert17 | dunno, I can investigate | 13:25 | |
| dogbert17 investigates | 13:26 | ||
| lizmat | please :-) with a golfed example, hopefully :-) | ||
| dogbert17 | will try | 13:27 | |
| seems to be the last one | 13:28 | ||
| lizmat | intriguing, are you using native indices in your code ? | 13:29 | |
| dogbert17 | m: my int $max = 2_000_000; my int @a = (0..$max); for (2..($max div 2)) -> int $i { my int $j = 2; @a[$i * $j++] = 1 while $i * $j <= $max; } # the worst golf ever :-) | 13:31 | |
| camelia | ( no output ) | 13:32 | |
| lizmat | dogbert17: am about to go afk for a few hours, will look at it when back | 13:33 | |
| dogbert17 | ++lizmat | ||
| MasterDuke | committable6: HEAD~3,HEAD my int $max = 2_000_000; my int @a = (0..$max); my $s = now; for (2..($max div 2)) -> int $i { my int $j = 2; @a[$i * $j++] = 1 while $i * $j <= $max; }; say now - $s | ||
| committable6 | MasterDuke, ¦HEAD~3: «1.1405576» ¦HEAD(f6a33b8): «1.909452» | ||
| dogbert17 | MasterDuke++ | 13:34 | |
| lizmat | wow, that's quite a difference | ||
| dogbert17 | a mystery | ||
| lizmat | well, a --profile will say a lot | ||
| but when I get back :-) | |||
| bartolin | vrurg: and with Ops.hllize(Ops.decont(arg_o, tc), tc) there seems to be no error at all. I'll start a spectest run ... | 13:36 | |
|
13:37
tailgate left
13:39
b2gills joined
|
|||
| AlexDaniel` | lizmat: can you get the shit together, please? Or at least let me know what I should and should not have access to, so that I can demand privileges that you forgot to grant. For example, if I shouldn't have access to whateverable repo (including not being able to even leave comments on my own issues), then I guess you're ready to run them on your own server? If not, then please fix it. | 13:40 | |
|
13:41
tailgate joined
|
|||
| MasterDuke | how do i pass a named parameter to a `QAST::Op.new( :op('call'), ...)`? | 13:43 | |
|
13:44
unclechu left,
MitarashiDango[m left,
AlexDaniel` left
13:47
JJAtria[m] left
|
|||
| MasterDuke | oh, QAST::SpecialArg | 13:48 | |
|
14:05
wildtrees joined
14:11
unclechu joined
14:19
wildtrees left,
wildtrees joined
14:22
MitarashiDango[m joined
14:23
AlexDaniel` joined
14:25
JJAtria[m] joined
14:26
b2gills left
14:34
b2gills joined
|
|||
| moritz | it used to be any QAST node with :name attached, IIRC | 14:49 | |
| MasterDuke | turns out i had to `my $a := QAST::Op.new( :op('hllbool')QAST::IVal.new( :value(1) ) ); $a.named('name-i-chose');` | 14:55 | |
| and then push that onto the `call` | |||
| moritz | ah, .named, not :name | 14:57 | |
| AlexDaniel` | lizmat: let me know when it's fixed | 15:06 | |
| or whatever the decision is | 15:07 | ||
| MasterDuke | more complicated than i expected | ||
| m: my $a; my $s = now; $a = do given "hi" { when 3 { "three" }; when 5 { "five" }; when "hi" { "hello" }; when * > 40 { "> 40" }; default { "default" } } for ^40_000; say now - $s; say $a | 15:08 | ||
| camelia | 7.7764281 hello |
||
| MasterDuke | timotimo: locally ^^^ went from ~4.5s to ~0.5s | ||
| passes spectest | |||
| AlexDaniel` | and to make it even more actionable: click Settings, Manage access, add AlexDaniel, set role as Admin | 15:09 | |
| in the long run, please, do take over the project. But meanwhile do not interfere. | 15:10 | ||
| MasterDuke | gist.github.com/MasterDuke17/a731e...1f535ad0f9 | 15:11 | |
| timotimo | MasterDuke: very nice | 15:13 | |
| MasterDuke | not sure how pretty/clean/whatever the change is though... | 15:14 | |
| think i should add it to the existing PR? | 15:18 | ||
| added as a new/separate commit | 15:45 | ||
| Geth | ¦ problem-solving: lizmat assigned to codesections Issue How should modules/distributions be handled when severe security issues are discovered? github.com/Raku/problem-solving/issues/245 | 16:08 | |
|
16:09
Altai-man joined
16:12
sena_kun left
16:19
Kaeipi left,
Kaeipi joined
|
|||
| timotimo | very glad to see you succeeded with this optimization | 16:20 | |
|
16:21
ufobat joined
16:22
Merfont joined,
Kaeipi left
16:52
domidumont joined
16:53
domidumont left
17:12
MasterDuke left
17:15
MasterDuke joined
17:22
ufobat left
|
|||
| Geth | rakudo: mienaikage++ created pull request #4029: Improve output of Attribute with Pod::To::Text |
18:12 | |
|
18:15
jmerelo joined
|
|||
| jmerelo | p6steve has posted this in StackOverflow stackoverflow.com/questions/648370...statements | 18:15 | |
| Can anyone help? | |||
| Geth | nqp: usev6++ created pull request #682: Add add_native_assign_op to keywords |
19:13 | |
|
19:34
jmerelo left
|
|||
| [Coke] | "should... segfault" answer is always no | 19:47 | |
| (except for NativeCall maybe) | 19:48 | ||
| timotimo | and for doing multithreading in an unsafe way, the answer is currently "possible to segfault, but not going to stay that way forever" | 19:52 | |
| MasterDuke | backtraces of the segv from the SO question gist.github.com/MasterDuke17/1ca37...e4113a65e5 | 20:07 | |
|
20:10
sena_kun joined
20:12
Altai-man left
|
|||
| Geth | rakudo: dumarchie++ created pull request #4030: Add Windows specific build instructions |
20:16 | |
| vrurg | .tell bartolin I have partially fixed that exception. It was due to where X::Parameter::InvalidConcreteness exception is prepared two arguments are passed as longs instead of boxed values. It's now different exception it produces. Looks like another case of missing boxing. | 22:01 | |
| tellable6 | vrurg, I'll pass your message to bartolin | ||
| MasterDuke | lizmat: i can repro the segv asked about in the SO question. gist.github.com/MasterDuke17/1ca37...e4113a65e5 | 22:03 | |
|
22:21
sena_kun left
22:28
sena_kun joined
22:35
sena_kun left
22:51
sena_kun joined
23:06
sena_kun left
|
|||