01:55 ilbot3 joined 02:09 yoleaux joined 05:48 brrt joined 05:59 domidumont joined 06:04 domidumont joined 06:50 brrt joined
jnthn yawns 07:03
brrt good hi jnthn 07:20
jnthn o/ brrt 07:21
brrt any plans for today? 07:24
nwc10 lunch! 07:25
jnthn Having some nice lights installed in my office. Winter is coming. :-) 07:26
nine Screen not large enough to light the room? ;) 07:27
nwc10 Aye. I put jeans on today. Shorts felt a bit cold yesterday.
samcv jnthn, I was thinking of trying to implement perl's -a option to split commands into an array @f for stdin but i am not doing the QAST totally correctly 07:29
i'm getting Cannot resolve caller STORE(Array: Seq); none of these signatures match: (Array:D $: Iterable:D \iterable, *%_) (Array:D $: Mu \item, *%_)
jnthn stuck with shorts for now, though my commute is pretty short :)
It's a quite large room with high ceilings, so needs some good lights :) 07:30
nine samcv: you asked on #perl6-dev about getting a defined array. That's not solved yet? 07:31
samcv no clue
that's what i'm guessing the issue is
nine samcv: just generate the code for the .new call
samcv hmm okay 07:32
jnthn looks up what -a does
samcv this is what i have right now
github.com/rakudo/rakudo/compare/n...a?expand=1
it splits the input with a delimiter
jnthn ah, right 07:33
Hmm
But I'm quite sure a magically named
@F is not the way to go in Perl 6 ;)
nine samcv: Something like QAST::Op(:op<callmethod>, :name<new>, QAST::WVal.new( :value($*W.find_symbol(['Array'])) ))
samcv well i agree jnthn
ah awesome nine
jnthn Probably we can pass it as an argument to the loop body, perhaps as @_ or something 07:34
samcv but i'm guessing it's not defined. though the error doesn't show you if defineness had an effect
which would be nice to add to the errors
jnthn Anyways, now that the light installers are hear and seemingly getting on with things, I plan to work on the scheduler :) 07:35
samcv nice :) 07:36
jnthn gist.github.com/jnthn/398d84b088d6...a5bfe89497 in case anyone missed it yesterday 07:37
brrt just saw the animoji things and is sure to have nightmares 07:41
moritz jnthn: nice 07:42
fwiw my regex book will be called "Parsing with Perl 6 Regexes and Grammars", subtitle "A Recursive Descent into Parsing"
jnthn Cute :) 07:43
moritz I'm quite fond of the subtitle; bdmatatu++ came up with it
brrt i like that as well
samcv looks good jnthn
moritz and I was positively surprised that the publisher didn't reject it :-) 07:44
jnthn Now all I need to do is implement the proposed design and see if it works ;)
moritz sounds like a walk in the park :-) 07:45
nine So a plain normal Perl 6 program will at least have 3 threads?
jnthn 2 like today; we'll still lazily start further ones 07:46
(Where 1 is the main thread, and 1 is the specializer/JIT thread)
07:49 domidumont joined 08:24 zakharyas joined 08:29 robertle joined 08:48 cog_ joined 09:53 timo1 joined 10:05 timo1 joined 10:30 timo1 joined 11:16 lizmat joined 12:04 domidumont joined
MasterDuke do things allocated by FSA need any special care when being serialized? 12:44
brrt didn't read that yesterday, but i like the idea of monitor threads 12:58
(i do not know MasterDuke)
timotimo serialization just means something reads the data and puts it into a file 13:06
so i don't think any special care has to be taken
jnthn What timotimo said, fwiw 13:08
MasterDuke thanks 13:09
nqp builds ok...make m-test's ok... 13:11
rakudo built ok... 13:13
make m-test ok...
doh, did *not* make m-spectest ok... `Error in `/home/dan/Source/perl6/install/bin/moar': free(): invalid next size (fast): 0x0000562ba9c4e2f0` 13:15
nwc10 oooh, hammer that with ASAN 13:17
timotimo could very well be a free being called on an fsa alloced piece of memory 13:19
valgrind will know where it was allocated. not sure if asan can do it, too
MasterDuke i'm afk for a bunch of hours, but will attempt to debug later
i've never successfully used asan, if someone could post instructions, i'll backlog
timotimo in that case it might be easier to just valgrind it 13:20
did you push your code yet?
samcv so i got -a on perl 6 sort of working (splitting the line into a variable) right now it's $f, but it's not availible to me with perl6 code 13:29
but i have a QAST::Op.new call say on the variable i declare with the quast nodes 13:30
but i'm guessing i need to do something else to have it be availible to the rest of the code
geekosaur should it perhaps be a dynamic scope variable?
samcv maybe. though i'm wondering why i can't access it by name. i assigned it $f 13:31
geekosaur, github.com/samcv/rakudo/blob/a/src...#L871-L892 13:33
running: echo '3,3,4' | perl6 -ae ".say" i get it to print out an array of [3 3 4] which is progress 13:34
since i pt a say down there
well the .say in the -e just prints out $_ which is the line, not the array. but i have it print out $f in the qast code i did 13:35
MasterDuke timotimo: work so far is here: github.com/MasterDuke17/MoarVM/tre...r_VMArrays 13:39
timotimo did it show you where the free was b0rked? 13:42
you might be misunderstanding what "root" does 13:43
i believe it's the "outermost" object when another object, like a p6opaque, has other object bodies inlined into its own body 13:44
you need to refer to the root object to do write barriers correctly for example
the storage spec on the VMArray should tell us if we'll ever inline the body into a p6opaque or similar 13:48
so maybe we won't do that ever
but multiple VMArrays might share the same root object, and thus the header bit won't work properly
i wonder if there's a good succinct description of root object and friends somewhere
13:49 ilmari[m] joined 13:51 MasterDukeMobile joined
MasterDukeMobile timotimo: yeah, I am/was pretty sure that was suspect 13:51
But iirc, set-size-internal only took an arraybody, and I needed an MVMObject to get to the header flags 13:53
Any suggestions much appreciated 13:54
timotimo vmarray is already set up to never be inlined it looks like 13:57
so this shouldn't actually be a problem
nine samcv: you also need to push the variable to the lexpad 13:58
geekosaur was wondering about that but couldn't even say "lexpad" --- don't know internals that well
nine Something like $*W.cur_lexpad.push(QAST::Var.new( :name(<$f>), :scope(<lexical>), :decl<var>));
geekosaur just suspect some symbol-table-y thingy needed to be told about it 13:59
*suspected
jnthn Probably more like cur_lexpad[0].push(...) but there's also various things you can call to decalre a varaible
In fact, the sub iirc is called declare_variable :)
samcv :) 14:00
oh i set it to $*f and it works
and moved the variable declaration
now how to accept a delimiter as a command line argument 14:01
nine jnthn: no really, declare_variable would be much too readable :)
MasterDukeMobile timotimo: maybe I need to go back even further in the call chain and pass the actual array everywhere, not just the arraybody, so I have the right thing to get the header from (i.e., not root)
samcv should have named the sub: `dcv` so everyone can understand it
jnthn root is the collectable
I think I've abbreviated enough things... :P
$*W ;) 14:02
MasterDukeMobile jnthn: ah, so I do want to be checking its flags?
samcv tgt
jnthn MasterDukeMobile: I'd add a github.com/MoarVM/MoarVM/blob/mast...odel.h#L97 enum entry like MVM_CF_REPR_PRIVATE 14:03
MasterDukeMobile: And then in VMArray.h #define MVM_ARRAY_USES_FSA MVM_CF_REPR_PRIVATE or so 14:04
And yeah, you'd set it on root
MasterDukeMobile I did add an entry to that enum
jnthn root->header.flags |= MVM_ARRAY_USES_FSA; or so 14:05
MasterDukeMobile Yep, that's what I did 14:06
Can't link it easily from this client, but I put a link to my repo earlier
Anyway, really afk, thanks all, bbl
jnthn Hm, the flags usage looks right enough 14:08
timotimo i'll try to valgrind it 14:09
14:47 zakharyas joined
Geth MoarVM: 9e7c16e778 | (Jonathan Worthington)++ | src/6model/reprs/ConcBlockingQueue.c
Fix elems of ConcBlockingQueue REPR
14:56
15:01 Skarsnik joined
jnthn Hmmm 15:08
So for the scheduler to make decent decisions, we could do with having some idea of whether threads are actively working or not
There's a few options here
One is to use uv_cpu_info 15:09
Which gets per-CPU utilization info, or at least I figure that's what it is doing
On Linux it does something like this: github.com/libuv/libuv/blob/f1e0fc...nux-core.c
This approach has the benefit of telling us if we're on a system that's under load 15:10
Though it doesn't tell us if our process is making any progress
afaict, the data is system global 15:11
Which means it's less useful for deciding whether we should add another thread or not
15:11 replacementimo joined
replacementimo the server i irc from has somehow fallen off of the 'net 15:11
MasterDuke: did you see my comment on your commit? i found out what caused the explosions
jnthn I'm thinking of a scheme like 15:12
1) Up to the number of CPU cores, if we see that there's a backlog of work in the queue, add extra threads to help take it on
2) Once we reach that, try to figure out if we're making progress, and only add more threads if we're not (and thus are deadlocked) 15:13
uv_getrusage is thus perhaps more useful 15:14
Hm, it also looks a lot cheaper to call 15:15
Anyway, that's probably the better option in the immediate. 15:16
The overall system load maybe wants to be factored into the calculation in part 1
lizmat would love to see some nqp ops for getting usage statistics :-) 15:17
replacementimo hm, uv_getrusage might not need any setup, perhaps you can just nativecall that
jnthn A futher option is that we could just use something MoarVM specific since we can look at a thread context and tell if progres *didn't* happen (pc and frame counter wouldn't change would) 15:18
Though it can give false negatives in a tight fully inlined loop if the PC happens to be at the same point I guess 15:19
replacementimo: Maybe, though I'm going to use this in CORE.setting
And also Windows is different :) 15:20
replacementimo ah, of course the scheduler is hll code
jnthn oh, but calling the libuv one would hadnle that
replacementimo btw, would you say for the sampling profiler we should have a thread that regularly sends a signal to each of our threads so they hold still for a little bit so we can grab data? 15:21
jnthn ohhh...I had a realization about that
We can do something much simpler
Use instrumenting to add a "maybe take a sample now" op
At entry, before each back branch, and after each instruction with a line number annotation 15:22
If we don't get any samples, we can extrapolate that all of the last samples were in the same place
replacementimo i thought something like that, too, but i feared it would be too intrusive 15:23
jnthn And if we already did one sufficiently recently, then we don't take one
Well, depends how we engineer it
If we make it just a few instructions... :)
replacementimo if only the performance counter i'm using for telemeh were available everywhere ...
that's a really cheap thing to query at runtime
jnthn We could also have a thread that is firing every interval, bumping a global counter 15:24
And the thread context has a "last time I logged" 15:25
So then it's just an integer comparison
I suspect an op to expose rusage is my best bet, anyways
Anyway, that can be for tomorrow :) 15:26
replacementimo my spectest will be done soon. wasn't as explosive as before my change 15:30
Skarsnik nativecallable6, raw.githubusercontent.com/libuv/li...clude/uv.h 15:31
nativecallable6 Skarsnik, Successfully fetched the code from the provided URL.
Skarsnik, gist.github.com/ac12ef1be686069ec2...fbc419aec8
Skarsnik damn, was too easy x) 15:32
replacementimo hah
15:38 brrt joined
replacementimo heyo brrt 15:38
brrt hey replacementimo 15:39
replacementimo spec tests are clean with masterduke's "vmarray uses fsa now" branch; i think it still wants to have the size parameters moved into the allocated blob, too, though 15:42
that'll be a nice thing to have in the next release 15:45
"concurrently changing the size of VMArray now causes only memory loss, not crashes
"
16:43 dogbert17 joined 16:49 leont joined 16:54 robertle joined 17:07 AlexDaniel joined 17:24 domidumont joined 17:48 leont joined
nine I've marked nativecallinvokejit .a in oplist, yet I still get "Bytecode validation error: expected instruction marked 'a' but got ' '" 19:04
What else would I have to do?
Skarsnik did you run the script to update the ops? (dumb question 19:05
nine I did
19:12 timo joined 19:42 geekosaur joined 20:02 geekosaur joined 20:03 geekosaur joined 20:27 Skarsnik_ joined
timo i think i'll want to reconsider ; as separator for the profiler kind and its options, as shells see that as a character they own 21:01
lizmat
.oO( everybody wants the semi-colon )
21:02
22:33 replacementimo joined 22:38 vendethiel- joined 23:30 replacementimo joined 23:37 geekosaur joined