Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
nine MasterDuke: faking the signal doesn't help, as the process will still dump core even with a synthetic SIGSEGV 09:14
What does help is disabling core dumps for the process via ulimit: use NativeCall; sub setrlimit(int64 $resource, blob8 $rlp) is native(Str) { * }; sub strdup(int64) is native(Str) {*}; try setrlimit(4, blob8.allocate(4096, 0)); strdup(0) 09:15
Problems with that are that setrlimit is defined as int setrlimit(int resource, const struct rlimit *rlp); and we don't have a way in NativeCall to request a native int of whatever the platform default size is, we cannot determine the size of the rlimit structure and the value of the RLIMIT_CORE constant 09:17
We might still get away with this though, as there's no harm if the setrlimit call fails and probably neither if it sets a different limit. 09:18
Nicholas I think that on every platform we build on (and likely ever will) C's int will be 32 bits (and sizeof(int) will be 4) 10:22
it's only certain crazy DSP chips where sizeof(int) is 1, because sizeof everything is 1
and really obsolete Crays (K series, I think) where sizeof(int) is 8
and DOS and similar ancient things where it's 2
but it does somewhat L.T.A. if we don't have a way to express integers with native C sizes 10:23
(if I understood that correctly)
nine I think you did. We have long, longlong, size_t, even bool, but not int. Most probably because the name "int" was already taken and is a 64 bit integer 10:38
m: use NativeCall; my native nativeint is Int is ctype("int") is repr("P6int") { }; say nativesizeof(nativeint) 10:40
camelia 4
nine m: use NativeCall; say nativesizeof(int) 10:41
camelia 8
dogbert17 m: my int8 $x = 2**7 - 1; say $x; say $x++; say $x 15:21
camelia 127
-129
-128
dogbert17 nine: does this look suspicious to you? 15:22
nine it does 15:29
dogbert17 is it something that your recent work might help fix? 15:32
I took the example from this old report: github.com/Raku/old-issue-tracker/issues/5099 15:35
nine I don't think its related. Actually I have no idea how we can get from 127 to -129 :) 15:45
Geth MoarVM: dd97819250 | (Daniel Green)++ | 4 files
Fix format strings for Win32 + set C99 for MinGW
15:48
MoarVM: ef95f00311 | MasterDuke17++ (committed using GitHub Web editor) | 4 files
Merge pull request #1668 from MasterDuke17/some_windows_format_string_fixes
MoarVM: MasterDuke17++ created pull request #1669:
Define -D__USE_MINGW_ANSI_STDIO=1 for MinGW
15:59
nine I now have experimental patches that will allow for arg speshing in a new postcircumfix:<[ ]>(array::uintarray:D \SELF, uint $pos) candidate which unblocks inlining and indeed, we can then end up with a single nqp::atposref_u in place of the call. 16:49
nine They deal with the :D problem, protos with ($, |) signatures and finally try to simplify references to native values when we have multiple possibly matching multi candidate (i.e. runtime dispatch) but the possible candidates agree on rwness of an arg 16:51
lizmat nine++ # wow! 16:59
MasterDuke nice 19:42
MasterDuke jnthnwrthngtn: does github.com/rakudo/rakudo/commit/1f...36ca3c4R49 have to be `try self.invalidate_method_caches($obj);`? it can't be `self.?invalidate_method_caches($obj);`? 20:21
m: say (1.84467440737096e+19).Int  # perl and wolfram alpha think this should be 18446744073709600000 20:31
camelia 18446744073709600768
MasterDuke committable6: releases say (1.84467440737096e+19).Int 20:32
committable6 MasterDuke, ¦releases (60 commits): «18446744073709600768␤» 20:33
MasterDuke but python agrees with raku 20:34
bartolin_ but rakudo-j is on the side of perl and wolfram alpha ... 20:36
MasterDuke welcome to thunderdome... 20:37
moon-child I assume wolfram alpha is using a precise value, not making a float and then rounding it 20:59
but rakudo-j, ehmm... 21:00
MasterDuke oh, nqp doesn't have `.?` 22:43
MasterDuke is there a way to safely nqp::getattr an attribute that might not exist, other than using `try`? 23:21