github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
timotimo i love it when putting an "int" in the right place gets me a 75% boost in framerate for my random SDL experiments 00:40
MasterDuke japhb: interesting point, i can see what you mean. there are actually more num literals now than before, because before all literals were treated as num 01:15
timotimo: i thought the compiler would turn such things into computed gotos?
timotimo hum 01:16
not sure it would happen automatically like that
MasterDuke japhb: i've currently made most of them 1.0 instead of 1e0, but if you feel like changing them i could get behind that (i.e., i don't feel like doing it myself, but would +1 a PR) 01:22
04:12 Kaypie left
MasterDuke timotimo: fyi, changing smrt_intify to replaced DEPRECATED_32 breaks the rebootstrapping of the NQP branch 04:22
06:23 Kaypie joined 07:05 domidumont joined 07:12 domidumont1 joined 07:15 domidumont left 07:18 AlexDaniel joined 07:36 domidumont1 left 07:51 robertle_ joined 08:18 zakharyas joined 08:42 Kaypie left 08:59 patrickb joined
patrickb o/ 09:02
samcv: Could you add contact information to your GSoC idea page? Otherwise students won't be able to contact you when browsing the ideas list. 09:03
09:06 zakharyas left, zakharyas joined 10:38 Kaypie joined 12:20 zakharyas left 12:34 Kaypie left 13:18 brrt joined
brrt good * #moarvm 13:18
jnthn o/ brrt 13:19
nwc10 good *, #moarvm 13:21
brrt I should get working on the MoarVM GSoC project ideas 13:27
I have two so far:
- making linking/loading/executables awesome
- unit testing MoarVM spesh and JIT
One thing that'd also be very valuable, is profiling grammars, and seeing why they aren't faster, and figuring out how to make them afster 13:28
But I don't know enough to guide that project
lizmat
.oO( that f was faster than the aster)
patrickb brrt: Do you know whether the grammar thing is mostly moar or rakudo? 13:30
lizmat nqp 13:31
jnthn Scattered across the whole stack, but largely the stuff that'd need changing will be in NQP/MoarVM
lizmat mostly, if not totally, nqp
TIL :-)
jnthn And yeah, majority NQP
patrickb Actually TimToady could be a good mentor for that one... 13:32
lizmat MoarVM? what parts of grammars are in MoarVM ?
timotimo there could be new ops that the code generator could spit out for moarvm-supported measurements
moarvm has all the string ops like index/rindex and iscclass
jnthn lizmat: It contains an NFA evaluator, and that'd surely need to change somewhat.
timotimo oh, that, yes
lizmat TIL
surely that should also be moved to NQP in time? 13:33
timotimo you can at least already get a state list from every nfa object
jnthn lizmat: Ummm...only when we're so good at JITting that we can produce a result about as good as the carefully optimized C we have there today :)
Geth MoarVM: 631cfdf6cf | (Jonathan Worthington)++ | src/io/dirops.c
Call strerror for directory errors

So that we get an error text rather than an error code, as reported in Rakudo issue github.com/rakudo/rakudo/issues/2649. Note that this only fixes it for the POSIX case; the Windows case probably also needs a look into, to see how it should be done there.
13:34
lizmat is reminded of the scalar container hack :-)
timotimo in theory we could JIT an NFA to native code, though i'm not entirely sure how much that would be worth 13:35
jnthn lizmat: Yeah, and that took 8 years of improving optimization to be in a place to eliminate :) 13:37
lizmat jnthn: ok, fair enough :-) 13:38
jnthn To get a big improvement on grammars, we really need an algorithmic change, though, to start passing down fates so we don't have to relex the same thing over again. 13:39
timotimo until then, a user-facing measurement tool for that exact thing could be interesting, though there isn't really a tuning knob for users to change how that behaves
lizmat brrt: you were once in a GSoC project, no ? 13:40
brrt yes 13:41
actually, thrice
first time, I tried to implement a video decoder in java
that never really worked
second time, I implemented an apache module for the parrot VM
third time, was the MoarVM JIT
timotimo .o( and look where that ended ) 13:42
lizmat brrt: that started with: brrt-to-the-future.blogspot.com/2014/04/
?
brrt yes
timotimo the "not-so-magical component"? :) :) 13:43
brrt well, i kind of hope it is still not magical :-)
13:50 lucasb joined
brrt anyway, I thought that TimToady was doing some 'recursor' branch some time ago 13:50
was that merged?
timotimo it was not
i don't think it was complete? 13:51
brrt I have no idea in general
oh, here's a cute hack from luajit 13:56
LJ has a rule-based expression 'folder', much like I want for the optimizer
it has a preprocessor written in C that generates a hash table for lookup 13:57
it looks for a pattern in the optimizer source file 'LJFOLD(FOO BAR BAZ)'
the same file also defines that as a macro: '#define LJFOLD(X)' 13:58
so that this pattern can be read, but does nothing
(in the compiled source code)
14:02 zakharyas joined 14:03 brrt left
timotimo surely the int-by-default branch can make the NFA optimizer a tiny bit more efficient ... 14:03
AlexDaniel .seen TimToady 14:15
yoleaux I saw TimToady 12 Nov 2018 16:33Z in #perl6: * TimToady is officially back from vacation, but completely trashed due to helping SoCal family deal with wildfire evacuations (nothing of ours burnt down, thankfully), and now I get to breathe all the smoke in NorCal, so it's gonna be a while before I'm back in sync enough to act like a BDFL...and maybe that's a good thing :)
AlexDaniel heh 14:17
AlexDaniel for a second went ā€œSystem on Chip what?ā€
lizmat hopes TimToady reads the clogs 14:20
14:23 Guest92871 joined 14:29 brrt joined 14:30 Kaypie joined
AlexDaniel brrt, timotimo: wait, what? 14:36
recursor was merged a long time ago
timotimo oh?
oh!
recursor was when match and cursor were unified
AlexDaniel yes 14:37
timotimo it had nothing to do with recursive NFA re-matching
jnthn It would have been a perfect name for a branch that did, alas... :) 14:38
timotimo though maybe "unrecurse" could also work
moritz call it "rererematch" :D 14:39
AlexDaniel wait, or was it called ā€œuncurseā€? 14:40
quotable6: uncurse 14:41
quotable6 AlexDaniel, OK, working on it! This may take up to three minutes (4582161 messages to process)
AlexDaniel quotable6: recursor
quotable6 AlexDaniel, OK, working on it! This may take up to three minutes (4582161 messages to process) 14:42
AlexDaniel, 189 messages (2017-04-10āŒ2017-08-22): gist.github.com/1b6ac36880bd7b186d...c01f145354
AlexDaniel, 34 messages (2005-03-01āŒ2018-04-26): gist.github.com/f823aa29599a29d219...0c4ec24f5d 14:43
AlexDaniel quotable6: recurse
quotable6 AlexDaniel, OK, working on it! This may take up to three minutes (4582161 messages to process)
AlexDaniel, 526 messages (2005-02-28āŒ2018-04-13): gist.github.com/9d8716a081d62b0191...4dfc5fbb06 14:44
AlexDaniel timotimo: so I'm mistaken, right? It was called uncurse 14:45
timotimo it was? 14:46
i didn't look :)
14:52 MasterDuke left
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2019/01/28/...r-of-code/ 14:58
jnthn ooh, earlier than usual today :) 14:59
lizmat yeah, wanted to get it off my chest, need to work on other stuff 15:00
somehow my head is not big enough anymore to keep all of Perl 6 happenings / code / and other stuff in there at the same time 15:01
so I try not to mix them much :-)
jnthn :) 15:07
brrt nlizmat++
lizmat++
AlexDaniel: that's why I asked :-) 15:08
15:10 Guest92871 left
timotimo ah, damn 15:43
i'm hanging the "normalized" size off of the spesh candidate
but we have only the staticframe at the point where we make the inlining decision
the staticframe already has the instrumented stuff in it, doesn't it? :\ 15:44
jnthn Yes 15:53
timotimo: Maybe when we write the bytecode in src/spesh/codegen.c then we can just tot the size of such instructions up there? 15:54
timotimo that's where i'm calculating that
in write_instructions
ah, i put it in the writer state
jnthn Aha 15:55
Yeah
You may also have to hang it off the inline table
timotimo for get_effective_size, right?
otherwise they could be double-ignored
jnthn Yeah 15:56
timotimo more hairier than i expected :P 15:57
though alternatively in codegen everything inside inlines could be added to ignored bytes regardless
then get_effective_size doesn't have to loop through inlines, either
scovit hello MoarVM masters, I would like to hear your thought about my pull request here github.com/MoarVM/MoarVM/pull/1039 . One thing is this bit of code in CStruct.c: github.com/MoarVM/MoarVM/pull/1039...541d9acdf4 , I wonder if it should have been already there or if it is wrong 16:02
brrt scovit: I'll take a look, but I'm not terribly familiar with nativecall 16:06
timotimo huh, i didn't know that can be done reliably
brrt it can be done, but it is underdocumented 16:08
scovit timotimo the point is that by doing that, you can use the embedded CStruct to manipulate the contents, otherwise I have the impression that they are just placeholders
brrt (or, I just have never found it in the ABI documentation)
timotimo oh
somehow i thought this is about returning CStruct from functions or passing CStruct as parameters to function calls
brrt I'd actually thought so too 16:09
scovit that is the general point of the patch
timotimo OK. i'm not sure that's possible %)
scovit it works (but not stresstested) 16:11
16:11 robertle_ left
brrt scovit: I left some notes 16:37
scovit brrt thank you 16:40
I have a question about your last note
does MVM_gc_mark_thread_unblocked means that GC can be done by another thread?
timotimo yes 16:41
jnthn Well, another thread can do GC whlie it's blocked
timotimo all threads will wait for every thread to be ready (or blocked)
before something happens
jnthn Marking a thread blocked means that it can't itself join in with GC 16:42
Because it's in native code, system call, etc.
And so another thread will have to do its GC work for it
scovit Ok 16:43
16:43 brrt left
scovit res.o cannot be moved at least untill the end of that function, right 16:45
this is what you call ROOT
well, it is way over my head: what is a MVMRegister? 16:48
timotimo just an union of a few different types
MVMObject * for the .o, MVMString * for the .s, MVMint64, MVMint32, MVMint16, MVMint8, ...
scovit Thanks, now it makes sense 16:56
16:56 patrickb left
timotimo really just a short-hand for casting 16:58
17:04 patrickb joined 17:33 domidumont joined, zakharyas left 17:56 sivoais left 18:17 brrt joined 18:23 lucasb left 18:29 brrt left 19:46 domidumont left
Geth MoarVM: scovit++ created pull request #1042:
Allow CStruct pass-by-value in Nativecall
20:52
scovit brrt: thanks for the comments, I corrected the most obvious 20:56
22:30 MasterDuke joined, MasterDuke left, MasterDuke joined, cronus_ joined
cronus_ hello. I think I found a bug in moar in windows. more specifically in syncsocket.c -> throw_error. the result of FormatMessage is treated as a utf8 string, althouth in my particular case it is iso 8859-7, witch results utf8 decode exception been thrown. 22:39
i have tried to reimplement it by using FormatMessageW and UnicodeToUTF8 and it seems to work. 22:41
timotimo that sounds useful 22:43
cronus_ unfortunatelly I cannot find a way to output unicode characters on windows powershell. do you know of a terminal for windows that can handle moar's output?
timotimo i'm blissfully unaware of having unicode on windows
cronus_ i'm mostly using perl6 on linux. then i tried to use a small script ~20loc on windows. i still haven't manage to run it, but i'm getting there.... 22:47
timotimo ah damn 22:48
patrickb cronus_: This might be of help: conemu.github.io/en/UnicodeSupport.html 22:52
cronus_ patrickb: thanks. good enought - it shows unicode properly, but i cannot type them in repl. 23:00
23:04 cronus_ left 23:40 patrickb left