github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:06 eater left, dogbert2 left, avarab left 00:07 eater joined 00:10 wictory[m] left, ilmari[m] left
jnthn bah, my spellchecker nearly had me change decrement into excrement... 00:10
timotimo oh crap 00:11
i've sketched out the perl6 side of how host and port will be passed to the user; want to have a quick look if i'm on the right path? 00:12
gist.github.com/timo/508a2ee6023da...5177d5b750 00:13
00:15 dogbert2 joined, avarab joined, Voldenet joined
jnthn 6guts.wordpress.com/2018/07/20/bet...ecializer/ # no excrement :D 00:22
timotimo hooray, bloggage!
jnthn timotimo: Hmm, but what if we tap it multiple times?
The two tappings would start two listeners, which'd get their own distinct ports... 00:23
Probably we need something more like 00:25
timotimo oh, that's a good point. mhm.
jnthn react {
my $tap = do whenever IO::Socket::Async.listen(...) { ... }
whenever $tap.listen-port -> $port { say "I'm on port $port. Connect to me today and you could win a roll of duck tape!" } 00:26
} 00:27
:)
timotimo ah, put it on the tap, i see.
MasterDuke jnthn: "more in the a future" 00:29
this is really minor, but in the chars bytecode example (the before), r11(2) isn't aligned the same as the rest 00:35
timotimo well, it aligns the version number to match up
Geth MoarVM: jstuder-gh++ created pull request #911:
Rm 'unsafe' templates already in core_templates
00:36
timotimo good post, jnthn++ 00:38
MasterDuke yes, very informative
jnthn MasterDuke: Thanks, fixed 00:40
(the typo; life's too short to figure out how wordpress managed spaces...) 00:41
sleep, 'night o/ 00:43
timotimo gnite jnthn 00:45
00:47 ilmari[m] joined
MasterDuke timotimo: any idea why the routines implementing (add|sub|mul|div|mod)_I all return the value, but (neg|abs)_I sets the value into a passed in variable? 00:50
timotimo they were all implemented like that initially
then i put the code to create the object into the functions in bigintops.c and made it return the result instead 00:51
so that i could jit the functions
MasterDuke yeah, i just saw a bail because of neg_I which is why i'm looking at them now
from this code: 'my @lines; for "i100k.txt".IO.lines>>.words -> @g { my int $index = @g[0].Int; @lines[$index - 1] = @g.tail(*-2); }; say +@lines; say now - INIT now' 00:52
timotimo should be easy to find an example commit by using "git blame" on interp.c and looking for the _I ops
MasterDuke but the weird thing is that there isn't even an implementation of MVM_bigint_neg (which neg_I calls). just the whatever-you-call-it in the header 00:53
timotimo ah
because it's so simple i guess?
MasterDuke `void MVM_bigint_neg(MVMThreadContext *tc, MVMObject *result, MVMObject *a);` 00:54
timotimo oh, you mean the forward declaration
MasterDuke yes
timotimo that's odd
MasterDuke yes
timotimo ah
MVM_BIGINT_UNARY_OP(neg, { sb = -sa }); 00:55
this implements it with a macro
that's how many of the ops are implemented, actually
MasterDuke right, i remember that now
really was throwing me for a loop there for a while 00:56
timotimo "for a loop", haha
get it
MasterDuke groans 00:57
if i'd had an 'until' in the sentence i could have had all the looping constructs
any reason not to re-write the unary ops like you did for the binary ones? 00:59
also, any reason not to jit the speshguard* ops? i also saw a bail from speshguardtype in the same example 01:01
timotimo "it threw you for a loop until you got to grips with that", unless i misunderstood? 01:03
i don't see a reason not to rewrite the unary ops like that 01:04
MasterDuke heh, i think you understood correctly (it's getting hard to follow the levels of indirection) 01:08
timotimo i just had to get an "unless" in there, too 01:12
there's also a "with" in there
i'm going to bed, seeya!
MasterDuke later... 01:13
01:14 lizmat left 01:21 lizmat joined 01:50 wictory[m] joined, AlexDaniel[m] joined 05:09 Kaiepi left, Kaiepi joined
Geth MoarVM: 8b52229112 | (Jeremy Studer)++ (committed by Bart Wiegmans) | src/jit/unsafe.expr
Rm 'unsafe' templates already in core_templates

These templates have working versions in src/jit/core_templates.expr
06:26
06:35 domidumont joined 06:41 domidumont left 06:42 domidumont joined 07:27 domidumont left 07:28 domidumont joined 07:31 buggable left 07:51 domidumont left 07:54 domidumont joined 08:09 zakharyas joined
Geth MoarVM: e3e1d0d0ca | (Samantha McVey)++ | 4 files
Use sized types for uthash (instead of using unsigned everywhere)

unsigned is only guarenteed to be at least 16-bits, which is insufficent for what we want (we really want uint32 on all platforms for these variables).
08:28
08:46 robertle joined
Geth MoarVM/master: 25 commits pushed by (Jeremy Studer)++, (Bart Wiegmans)++
review: github.com/MoarVM/MoarVM/compare/e...1aa0d64848
08:55
MoarVM: dad8a39f6e | (Samantha McVey)++ | src/strings/uthash_types.h
Remove a line that shouldn't have been added in the last commit
09:06
09:12 zakharyas left 09:19 robertle left 09:20 zakharyas joined 09:42 wictory[m] left, ilmari[m] left, AlexDaniel[m] left 09:45 benchable6 left, nativecallable6 left, statisfiable6 left, bisectable6 left 09:46 zakharyas left, undersightable6 left, greppable6 left 09:47 zakharyas joined 09:49 robertle joined 09:53 ilmari[m] joined 10:03 zakharyas left 10:22 zakharyas joined 10:36 domidumont left 10:41 AlexDaniel[m] joined, wictory[m] joined 10:43 benchable6 joined, greppable6 joined, nativecallable6 joined, undersightable6 joined 10:45 MasterDuke left 10:51 Ven`` joined 11:04 zakharyas left 11:17 Ven`` left 11:27 yoleaux joined 11:46 lizmat left 11:48 lizmat joined 12:00 domidumont joined 12:10 domidumont left 12:11 domidumont joined 12:15 domidumont left 12:16 domidumont joined 12:24 domidumont left 12:25 harrow joined, domidumont joined 12:35 domidumont left, domidumont joined 12:40 domidumont left 12:41 domidumont joined 12:45 domidumont left 12:46 domidumont joined 12:50 domidumont left 12:53 domidumont joined 13:01 statisfiable6 joined 13:10 zakharyas joined
Geth MoarVM: jkramer++ created pull request #912:
Add +x and shebangs for scripts.
13:27
MoarVM: 33363d321c | (Jonas Kramer)++ | 15 files
Add +x and shebangs for scripts.

Related to rakudo/rakudo#2077.
13:31
MoarVM: 36cd04e57b | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 15 files
Merge pull request #912 from jkramer/issue-2077

Add +x and shebangs for scripts.
synopsebot RAKUDO#2077 [open]: github.com/rakudo/rakudo/issues/2077 [easy to resolve][good first issue][meta] Extensions, shebangs, executable permissions in tools/ and elsewhere
dogbert11 aha, a SEGV (in t/spec/S02-lexical-conventions/unicode-whitespace.t) 14:46
Geth MoarVM: 4d22fb9e72 | (Jonathan Worthington)++ | 3 files
Fix protect handling in continuationcontrol

Make sure we re-instate the tag at the base frame when the continuation is invoked.
jnthn Good news: got things fixed up 14:47
Bad news: Ah, was talking about it in #perl6-dev, will continue there 14:48
dogbert11 jnthn: have a juicy SEGV if you're interested 14:52
crashes here github.com/MoarVM/MoarVM/blob/mast...rp.c#L2814 context == NULL
15:04 zakharyas left
jnthn dogbert11: Odd, not sure about that 15:07
dogbert11 jnthn: i ran - MVM_SPESH_NODELAY=1 MVM_SPESH_BLOCKING=1 ./perl6-gdb-m t/spec/S02-lexical-conventions/unicode-whitespace.t 15:08
with a bit of luck you can repro it 15:09
15:09 brrt joined
brrt jnthn++ post 15:09
15:11 zakharyas joined
jnthn Another crash I see comes from trying to execute a paramnamesused instruction when there's no args context 15:20
15:23 brrt left 15:29 robertle left
jnthn Seems I can provoke the lock-async-stress2.t crash with spesh disabled, so at least it's not going to turn out to be about that 15:30
15:39 domidumont left 15:50 zakharyas left
jnthn Also with the fixed size allocator disabled 15:58
With --no-optimize so I have useful debug symbols, and spesh and FSA disalbed to rule them out, it fails annoyingly rarely 16:08
Certainly seems like something racy, but what... 16:09
timotimo rr offers a "chaos mode" where it tries to make race conditions more likely to appear 16:10
16:10 Dogbert4711 joined
timotimo i have not yet tried it 16:10
Dogbert4711 power outage, sigh 16:11
timotimo BBL 16:13
jnthn Odd, now I can't get it to break even optimized 16:14
16:15 Dogbert4711 left
jnthn *sigh* ever since I put in an extra bit of diagnostic output, I just can't get it to break 16:19
Clearly the solution is to include that diag :P 16:20
Geth MoarVM: 54dc849da8 | (Jonathan Worthington)++ | src/6model/reprs/MVMMultiCache.c
Add extra diagnostic output to multi cache panic

So we can see if it's a discrepancy in the lookup algorithms or if something more sinister is going on.
16:21
jnthn bah, even the stresstest passes now :P 16:28
japhb Declare "Better than it was before" and move on?
jnthn Well, it's Friday late afternoon, so moving on is close to a certainty :) 16:29
Anyway, yes, better than it was once I push my Rakudo patch
16:31 diakopter joined
japhb jnthn++ # Good blog post 16:32
diakopter that cur_node error looks wrong?
japhb jnthn: In the example with annotations, do the annotations apply to the following instruction or the preceding instruction?
jnthn japhb: The following one 16:33
japhb Ah, thank you.
jnthn Just like the square brackets annotation syntax in C#, though I suspect that's familiar to a small subset of my readers :)
diakopter: How so? 16:34
japhb looks forward to the next post (that was hinted at multiple times)
masak, probably. Beyond that, I suspect you're right. :-)
diakopter jnthn: it says cur_node == 0 in the error, or is the error implying that claim/check failed
jnthn oh, I see :)
Right :)
Yes, the condition is correct, the error is not
Geth MoarVM: 403460ecc8 | (Jonathan Worthington)++ | src/6model/reprs/MVMMultiCache.c
Correct error text to match the condition

Spotted by diakopter++.
16:36
diakopter japhb: yoooooooooo 16:37
jnthn Grrr...it failed this time in the stresstest but not in 100 runs under gdb :S
(yes, all the gdb runs while I was running stresstest, so there was the same kind of load)
lizmat
.oO( I'm hearing an AI go 'na na na na na' somewhere in the background )
16:38 ChanServ sets mode: +o diakopter, diakopter sets mode: -o diakopter
diakopter just checking lol 16:38
(bumping question I asked a few years ago) - is it possible to write jit expressions for object access routines yet 16:43
er, repr access routines, to be clearer 16:46
and while I'm on that note, here's an even more bizarre thought - what about an API in nqp:: ops that builds up jit expressions, so that someone can write their own jittable repr in high level code 16:47
(obviously extremely unsafe, haha) 16:48
16:49 domidumont joined
jnthn .tell brrt If you have a spare moment, please could you take a look at github.com/rakudo/rakudo/issues/2070 which shows we still have JIT issues on Windows. I wonder if it's related to that ARG5/ARG6 thing... 16:51
yoleaux jnthn: I'll pass your message to brrt.
jnthn diakopter: Don't think that got done yet; all we do in the JIT is devirtualize the calls to REPR operations. 16:52
diakopter: Though now we have the expression JIT that sort of thing should be much more possible to make happen
diakopter enabling jittable repr routines could enable big overall performance bumps, if I had to guess :o 16:54
especially if the jit does a lot of the standard, low-hanging fruit assembly optimizations
*already, I mean 16:55
timotimo it doesn't do much of those :) 16:57
diakopter oh :D
timotimo and the exprjit doesn't yet devirt repr routines, i don't thinks 16:58
hm, that could mean that exprjitting more can make our stuff slower in that way
diakopter in that case, enabling jittable reprs would likely pessimize performance overall XD
timotimo don't we actually have repr ops in the exprjit yet? 16:59
yes, we do
jnthn goes for food/rest; bbl o/ 17:00
diakopter timotimo: where's that
timotimo core_templates.expr
for example push_i!
diakopter timotimo: oh, but I was asking about making the repr op routines themselves jittable, not just calling to them 17:01
timotimo that's more difficult :) 17:02
that requires having some expansion mechanism for the exprjit
i.e. it must find the right templates by looking at the REPR it has
diakopter right, but it wouldn't be worth it before the jit is doing most of the standard assembly optimizations 17:03
timotimo i'd claim it'd be worth a noticable bit 17:05
but you probably know more than me, so ...
diakopter I doubt it, but I'm basing that on the theory that C optimizers have already done a much better job with the repr op code 17:06
timotimo ah, so we should probably "just" call into the functions directly from the exprjit? 17:07
japhb diakopter: yo ... yo?
diakopter timotimo: yeah that's my theory, at least until the jit gets a lot more optimizers
timotimo we should be able to eliminate switches inside of reprops from inside the exprjit by knowing an object's type 17:08
i.e. we'll know not only the REPR, but also the repr_data 17:09
diakopter ah, yeah, I guess some of them do that
timotimo i.e. we can have a push_i, but inside the exprjit we'll also know if it's an i64, i32, i16, or i8 array we're pushing into 17:10
so not only can we throw out the check "does the kind of the op, i.e. _i vs _n, match the array type", but also directly do the index calculation properly 17:11
diakopter I wonder if the jit could use the fact engine in spesh
timotimo it will have to learn that, yeah
it does have a path to get the facts by chasing a few pointers
17:12 ZofBot left 17:13 huggable left
masak diakopter: suddenly I really want to see what "fruit assembly" looks like :P 17:22
diakopter yes, and how to make it low-hanging 17:23
17:24 domidumont left 17:26 ZofBot joined 17:28 huggable joined 17:32 lizmat left 17:55 brrt joined 18:07 domidumont joined 18:10 lizmat joined 18:12 domidumont left 18:16 AlexDaniel left 18:18 AlexDaniel joined 18:27 dogbert17 joined 19:13 zakharyas joined
timotimo i think i want to change how the three byte counts in the gc profile are counted 19:34
if i remember correctly, the "freed bytes" contains unmanaged bytes, which means that cleared + promoted + retained does not equal the nursery size 19:35
19:47 zakharyas left
dogbert17 jnthn: added github.com/MoarVM/MoarVM/issues/913 19:58
jnthn timotimo: iirc it's promoted bytes that contains unmanaged, or at least, that's where it's most usefully retained :) 20:01
yoleaux 18:18Z <brrt> jnthn: will do
jnthn dogbert17: Got some other things I need to do right now, but you could try on github.com/MoarVM/MoarVM/blob/mast...plist#L435 adding :noinline at the end, then run perl6 tools/update_ops.p6 and re-compile and see if that helps 20:03
dogbert17 jnthn: will try 20:04
brrt jnthn: I don't have enough memory on my machine to start a VM at this point :-( 20:18
will have to do so later
it probably is something silly 20:19
at least, I hope it is
jnthn Yeah, I suspect it'll be silly rather than deep also
brrt :-)
jnthn ABI is about the only thing that differs
timotimo jnthn: do you think it makes sense to count unmanaged bytes separately for all three categories? 20:20
20:23 brrt left
jnthn Hm, I guess we could 20:23
Dunno how easy it is though 20:24
Or rather, easy to do cheaply
dogbert17 jnthn: tried your suggestion, changed the line and ran update_ops, rebuilt and installed MoarVM and then ran the test file. It SEGV'd again. Perhaps I don't understand the procedure or some other change is needed to fix the problem 20:40
jnthn Maybe 20:41
Hmm
Sounds like you did it right 20:42
I think that change is necesary
But clearly it's not sufficient on its own :)
20:58 Kaiepi left 20:59 Kaiepi joined
Kaiepi is there documentation on how the async parts of moar work? 21:07
21:13 Kaiepi left 21:14 Kaiepi joined 21:16 AlexDaniel[m] left, wictory[m] left, ilmari[m] left 21:19 benchable6 left, nativecallable6 left, nativecallable6 joined, benchable6 joined, undersightable6 left 21:20 statisfiable6 left
timotimo i don't know, but i can tell you a bit of what i know 21:39
there's one thread spawned when we want to do async stuff, and there's channels that we can push "work items" to 21:40
that's what you often see, first a callable gets pushed into an array, then a bunch of arguments, then it gets pushed into a queue just with MVM_repr_push_o 21:41
there's also work item management, which i haven't looked into much yet
Kaiepi how would i be able to tell which code would need to be pushed to the queue? 21:54
timotimo the async ops tend to let the "user" give it one or more callables 21:55
those are the ones you'd push into the queue
for example, listenasync pushes a code block that takes socket, error, peer-host, peer-port, socket-host, socket-port 21:56
and it uses that for both errors and receiving a new connection
Kaiepi so would it be a good idea to push a callback that gets the fd of a socket onto the queue? 22:00
timotimo honestly, i'd tend towards re-using the same callback that already exists and make it distinct by what arguments you pass 22:01
Kaiepi which one do you mean? 22:02
timotimo which one are you interested in right now? building a connection? 22:03
line 173
that's for connecting
Kaiepi i'm trying to write introspection methods for async sockets 22:08
22:09 ilmari[m] joined
jnthn Such as the socket fd? 22:12
timotimo you'd probably want it to give the native id right when it gets created and just stash it in an attribute i think
jnthn If so, I'd just send it along as an extra argument to the callback 22:13
timotimo ideally as a promise
i mean expose the fd to the user as a promise
jnthn I don't think we need to do that
timotimo because of the asynchronous nature of the queue you're pushing the task to
jnthn In this particular case
timotimo that's fair, too
jnthn Because we know the fd at the point we create the socket
So we can send along to the listen/connect callbacks
And since that runs before the user ever gets the object to ask for its descriptor, we're all good ;) 22:14
Kaiepi sounds good 22:15
jnthn After github.com/MoarVM/MoarVM/blob/mast...ket.c#L534 and github.com/MoarVM/MoarVM/blob/mast...ket.c#L702 is the place to push the fd, boxed into an integer 22:16
22:17 statisfiable6 joined
jnthn And you'll receive it as an extra arg at github.com/rakudo/rakudo/blob/mast...c.pm6#L175 and github.com/rakudo/rakudo/blob/mast...c.pm6#L218 respectively 22:17
Then add has $.native-descriptor on the class, do a bindattr in each of those two places I just mentioned, and that should be good. 22:18
Geth MoarVM: Kaiepi++ created pull request #914:
Update dyncall to latest commit
22:19
22:28 MasterDuke joined 22:45 bisectable6 joined 22:55 wictory[m] joined, AlexDaniel[m] joined
Kaiepi oh i figured out what was wrong with the oriignal way i wrote the code 22:56
i was being very smart and freeing the pointer to the fd before returning it