00:41 jnap joined 01:01 FROGGS__ joined 01:44 jnap joined 02:25 donaldh joined 02:43 jnap joined 03:43 jnap joined 04:44 jnap joined 05:27 woosley joined 05:45 jnap joined 06:46 jnap joined
nwc10 jnthn: the attribute is written to by set_int() in P6int.c 06:55
and there is a mismatch here: 06:56
(gdb) p l->p6o_header.common.header.size
$5 = 28
(gdb) p sizeof(*l)
$6 = 32
so, whatever lays out a P6Int doesn't (sufficiently) follow structure alignment rules
jnthn: the "story so far" paste.scsys.co.uk/364379 07:43
I infer that watchpoints on ARM are software, as it's 2 small cups of coffee later and not yet got to the punchline 07:44
(the bit where it reads at a different offset)
but anyway, issue is that on ARM the 64 bit in in the structure is 8 byte aligned
but P6Opaque is assuming 4 byte alignment is legal, so doesn't put 4 bytes padding in 07:45
and I don't know where it's making that assumption
I shall put the hammock up, as this is a zero hours contract and I'm now unable to continue work :-)
07:47 jnap joined 08:22 ilbot3 joined
nwc10 gah, I'm also unable to slack off in the hammock, as there's wind, clouds, and it's only a matter of time before the pine tree scores a direct hit with a pinecone 08:26
jnthn: when laying stuff out in memory, does P6Opaque have to deal with any "types" other than void *, MVMInt64 and MVMNum64? [technically I guess chars, but the size and alignment of the header is going to be (at least) 4 bytes and 4 bytes] 08:39
jnthn nwc10: At present, no 08:40
nwc10: Later on, yes. CStruct (which is behind NativeCall) *does* have to and takes more care on alignment for such things 08:41
P6opaque should learn that too, though we don't rely on it anywhere yet
nwc10 OK, so the problem here is "what is the alignment of a MVMInt64?" 08:42
which it's getting wrong on ARM
in that, the compiler is laying them out at 64 bit alignment when in structs
even though the read (at least for the compiler and CPU and optimisation level I was using) is just fine at 32 bit alignment 08:43
on x86, the compiler puts them at 32 bit alignment in structs
jnthn Yeah, I mean the key lines in this are
nwc10 and P6Opaque is assuming that that is the case (everywhere)
jnthn cur_alloc_addr = sizeof(MVMP6opaqueBody);
nwc10 yes, was going to say, found that about 15 minutes ago 08:44
and it's the issue
jnthn Well, later, we do:
cur_alloc_addr += bits / 8;
nwc10 because it's right if what comes next is 4 byte constrained
s/next/first/
jnthn But in CStruct it does:
if (cur_size % align) { 08:45
cur_size += align - cur_size % align;
}
Before that.
nwc10 OK, so WTF is gcc on x86 doing telling me that alignof(int64_t) is 8?
when it's putting them in structs at 4 byte alignment
jnthn In moar.h we have some alignof related stuff 08:47
It tries to use the GCC built-in
Then falls back to:
#define ALIGNOF(t) ((char *)(&((struct { char c; t _h; } *)0)->_h) - (char *)0)
08:47 jnap joined
nwc10 aha :-) 08:47
jnthn I dunno if that second one gets a righter answer... 08:49
bbi10
nwc10 OK
OK, so what sets HAVE_ALIGNOF? :-) 08:56
jnthn Not us :) 09:10
I figure it's GCC-defined
nwc10 nope. :-) 09:12
jnthn hm
Is it defined anywhere? :) 09:13
nwc10 I believe that HAVE_* is not the sort of macro a *compiler* is allowed to define
jnthn OK, but a standard header somewhere?
nwc10 I think "no" also. A standard header would at least prefix _ if not __ 09:14
if not __both__
FROGGS good that we have SSD's and we can grep for that on our disk :o) 09:18
nwc10 laptop has SSD
x86 VM I think doesn't, and it was getting hammered by rsync at one point
Pi is connected to an external USB disk, which is faster than an SD card
but still going over USB 2 09:19
actually, root filesystem on SD card
something strange here, as I "ought" to be able to break x86, but I can't 09:26
good news for MoarVM - clouds increasing
OK. Yes, *strange* 09:27
__alignof__(MVMint64) is 8
This beauty:
#define ALIGNOF(t) ((char *)(&((struct { char c; t _h; } *)0)->_h) - (char *)0)
says 4
4 is the truth we need
jnthn wow :)
nwc10 yet the "ought" problem is that if I force the use of the former, I don't see the SNAFU that I see on ARM
yes, <nod> <sigh> <expletive> Drink! 09:28
so, new question (1) is "why can't I break x86 by using __alignof__?" 09:29
oh, I know
lets keep going into Rakudo and then spectests
(...)
anyway, www.imdb.com/title/tt0088846/quotes...=qt0223927 09:31
jnthn seems so... 09:33
FROGGS hmmm, there is no HAVE_ALIGNOF in my /usr 09:38
nwc10 OK, so yes, confirmed 09:42
computer says: __alignof__(int64_t) is 8
computer says: __alignof__() a struct containing just one int64_t is 4 09:43
how is that for Awesome? :-)
FROGGS O.o 09:44
nwc10 I shall walk the dogs to celebrate 09:46
09:48 jnap joined
jnthn nwc10++ 09:49
train, but should hopefully have wifi & 09:54
10:04 woosley left 10:05 woosley joined 10:08 bxdsam_ joined 10:49 jnap joined
nwc10 and here was I thinking that 0.5l of Gösser should get me close to the Balmer peak to go fix this 11:15
and then I looked at the code.
mmm. 11:16
nwc10 contemplates the drinks cabinet
jnthn nwc10: Anything about the code in quesiton you'd like explaining? 11:19
*question
nwc10 (for anyone reading this $n years hence in the archives and getting the wrong impression - I am actually being pretty careful about what I'm drinking, as I have to be stone cold sober to drive home this evening. There are trams...)
jnthn: no. It's just more complex than I was thinking
jnthn ah
nwc10 and I think line 711 is going to have to move a lot later:
Gösser
oops
repr_data->attribute_offsets[cur_slot] = cur_alloc_addr; 11:20
because it's going to need to have alignment fixed up
and I have to work out the implications of tha tmove
jnthn ah
I don't think anything else in the layout computation depends on that, fwiw
nwc10 Stack Overflow already knows about this __alignof__() fun: stackoverflow.com/questions/1182508...nion-struc
jnthn: I hoped that too, but I'll figure it out, as it's blocking me, not you 11:21
also, I think I've got the cheaper drinks service :-)
(I didn't buy the beer, but it happens that I did buy the new bottles of sherry and gin) 11:22
jnthn I guess I could buy beer on this train but I doubt it'd be too intresting.
Once I get to my destination, though...there's a Bishop's Arms, which should have nice stuff. 11:23
nwc10 but the price would be "interesting"? :-(
jnthn Oh, sure... 11:24
But...trackamente :)
(In Sweden, when you're sent away by $dayjob to work somewhere that's not home, you get some spending money.)
nwc10 cash? or "budget" (ie spend it or it vanishes)? 11:25
jnthn Even simpler: I declare the time I was away from home, and a fixed amount per half day shows up in my slip.
If I just go eat cheap crap and don't have any beer I can actually come out ahead. :)
But pizza every night really doesn't work for me :)
nwc10 I think I've gone off *cheap* pizza any night. I've got fussy :-( 11:27
jnthn Yeah...I like a good one.
nwc10 so for the purposes of tax residence, you'll be "moving" to a PO Box in Kiruna?
jnthn Kiruna itself is moving these days... 11:28
nwc10 I read about that 11:30
11:50 jnap joined
nwc10 jnthn: style question - why does static void compose() define a bazillion MVMint64's at the top, whereas Cstruct.c does the declarations (usually) in the tightest block? 12:49
12:50 jnap joined
jnthn nwc10: I prefer the tightest block approach, I suspect the way it is is an accident of history 13:38
(The P6opaque code has had a long one; the stuff in Moar actually was originally from the 6model code I built for Parrot)
nwc10 I prefer it too, because it makes it clearer what isn't re-used in loops etc
jnthn right 13:39
Feel free to make it that way. It's a decided improvement.
13:51 jnap joined
nwc10 jnthn: even if I change P6Opaque to do alignment in compose(), it doesn't affect the MAST::Local allocation 14:10
st->size is still 28, not 32
and I can't work out *where* that 28 is getting set 14:11
(gdb) p st
$15 = (MVMSTable *) 0x175f0
(gdb) p st->size
$16 = 28
so, from that address, st isn't malloc()ed
but I can't work out what compiles it
jnthn The allocation is also computed in deserialize_repr_data, I think. 14:13
We can't just persist the allocation because we might load the bytecode on a different machine 14:14
nwc10 OK
my fan club is wagging like crazy and expects to go out
jnthn :)
timotimo d'aaw 14:15
14:25 donaldh joined 14:32 zakharyas joined 14:52 jnap joined
nwc10 looks at deserialize_repr_data 15:34
and again at the drinks cabinent
and at the clock :-)
jnthn: OK, I can put the aligns into deserialize_repr_data, but I can't see what calculates the size 15:42
JimmyZ Good evening...
nwc10 jnthn: oh, deserialize_stable_size 15:45
I start to see the same logic in 3 places... :-(
JimmyZ nwc10++
jnthn Ugh, battery nearly out...and no power :/ 15:47
nwc10: Yeah, I think it's not entirely easy to factor out...
timotimo oh no! jnthn won't be able to hack! 15:49
jnthn < 1 hour of trip to go, though
bbl
nwc10 Do you want me to hack? No Mr Worthington, I want you to drink! 15:51
15:53 jnap joined
timotimo :D 16:28
16:53 jnap joined
jnthn Made it :) 17:24
Hm, this place has a nice castle :)
nwc10 I like castles 17:30
jnthn Seems this too has an Indian restaurant too. Seems like some kind of civilization. :) 17:32
Will save that for tomorrow or so
nwc10 you're not in Stockholm? :-) 17:37
jnthn No
I'm in Örebro 17:38
A rather smaller place. :)
Took some getting here.
jnthn ponders what he wants for dinner 17:39
nwc10 cheap pizza! 17:40
Drive via E4 · 1,655 km17 h 39 min
not *that* close and I would need to fill up
jnthn :)
nwc10 or 1d 7h with *eight* train symbols 17:41
jnthn Yes, well, it was 2 trains and a bit of a roundabout route to get here sanely...
Oddly, the trip home will take me around an hour and a half less...
nwc10 oh, most curious. If I put "St Pancras International Station" in, Google is suggesting that I fly 17:42
jnthn Or maybe 2 hours less
hah :)
fail
nwc10 it's thoroughly failing to give me a <8 train icon suggestion
in that I think that anywhere in the UK will only be 6 trains from here
gah.
progress. first bug finally nailed, I think 17:43
got a Bus error
jnthn If I use bahn.de I can get it to give me a 7-hop route by train from Vienna to here :)
nwc10 about 2 steps further on
jnthn wtf, this route is insane 17:44
nwc10 175 ins_node->operands[i].lit_n64 = GET_N64(args, arg_size);
OK. I think that that's an alignment fail. 17:45
all the world is not a VAX
yep
[39244.575347] Alignment trap: not handling instruction ed910b00 at [<b6e1a9fc>]
[39244.584948] Unhandled fault: alignment exception (0x011) at 0xb62c7942
jnthn Hmmm 17:46
It's on the RHS, I guess? 17:47
nwc10 I think so
my poor brane is failing to expant the macro GET_N64 17:49
(gdb) p args+arg_size 17:51
$4 = (MVMuint8 *) 0xb62c7942 ""
Yep. alignment fail 17:52
going to need to be a memcpy() on not-a-VAX 2.0
why is that mgacro defined in 4 places? 17:53
bad codebase! naughty codebase! no cookie.
right. food
I'm too frazzled to fix this
17:54 jnap joined
jnthn also needs food 17:54
bbiab 17:56
nwc10 I think that GET_N64 is going to need to become an inline function that is a memcpy() on some platforms, and a simple assignment on others 18:26
18:55 jnap joined
jnthn back 19:34
nwc10 actually also just back
jnthn nwc10: Yes, inline functions works for me.
nwc10 bother. that was "patches welcome", wasn't it? :-)
jnthn Went to the pub. They had a rather nice porter on tap.
And I ate raggmunk. This appears to be Swedish for "heart attack on a plate". :)
So I took a walk around the lake after it. :) 19:35
nwc10 :-)
#define GET_I8 19:36
etc seem to be cargo cult in about 4 places
OK, the various ones are 2 to 4 places
what's a better name, and where do they go?
jnthn They're in part cargo-cult out of some uncertaintly if they'll all end up looking the same... 19:37
interp.h is probably a sensible place
interp.c kinda benefits form the terse names, but no reason we can't just do #define in interp.c to keep the short names but may them to MVM_BC_GET_I8 defined as a static function 19:39
Probably good to check timings to make sure the static functins work out the same performance wise, given the interpreter itself is one of the most performance sensitive bits.
nwc10 for now, I'm going for "does it even build?" 19:40
jnthn :)
nwc10 in a branch
timotimo jnthn: is there something kinda-obvious we could do to make access to CStruct repr'd things more optimal through spesh?
the CStruct repr could get a generator for some of its reprops, no? 19:41
jnthn timotimo: maybe; it's a little complicated though 19:42
P6opaque is much easier to do such things with
timotimo dang
19:56 jnap joined
tadzik what is the best way to profile things on rakudo-moar? 19:57
something akin to --profile from parrot backend preferably :)
jnthn tadzik: There's one area Moar is really lacking at the moment :( 19:58
tadzik aw
jnthn I did mention how I thought such a thing might be implemented just the other day 19:59
I don't have tuits for it immediately
tadzik alright, I guess I can use parrot for the profiling I need
heh, apparently my game only works in moarvm anyway 20:01
both jvm and parrot do nativecall differently somehow
nwc10 jnthn: not got there yet, but if it generates the same assembler, there's no need to benchmark a changeset, is there? :-) 20:21
jnthn no, and, uh, wow. :P 20:23
nwc10 no, I meant, I'm going to aim for htat 20:24
because benchmarking is insane
I was getting repeatable different results depending on the order that I linked object files
said object files were compiled with everything aligned to 64 bytes
jnthn wtf...
nwc10 ie L1 cache size
yes, utter WTF 20:25
it DID NOT MAKE SENSE at all.
I do not enjoy benchmarking.
the computer manages more stupid than I can fight
drink! 20:26
Pi been building NQP for a few minutes now. This is progress. 20:27
jnthn \o/ 20:30
nwc10 it's building with -fsigned-char 20:31
I'll tackle removing that hack after I get it to build at all 20:32
and -funsigned-char fails (far faster) on x86_64
where hardware watchpoints work properly
tadzik Fun Signed! \o/
nwc10 ie in hardware :-)
oh, and valgrind, and ASAN
and all my favourite hammers 20:33
jnthn Hardware watchpoints are awesome 20:40
I taught one C++ dev about them a year or so ago and he almost mentions their awesomeness every time we talk now. :)
And then in WebApiConfig 20:43
ooops
nwc10 pig still flying... 20:56
20:57 jnap joined
nwc10 I suppose if I wanted *real* pain I'd get a cross toolchain and figure out how to compile it for the satellite reciever 20:57
tadzik wow 21:15
I updated rakudo-moar, and now my game can handle 60 collision checks per frame, instead of 20 21:16
what sorcery is this :o
21:16 TimToady joined
tadzik or even 100 21:17
jnthn What version did you update from? 21:18
I put in a couple of nice opts in the last week
tadzik it was probably older than that, hard to say now
but the speedup is stunning 21:19
jnthn++
jnthn If you had a month old you will have missed another round of really nice opts
tadzik it was definitely spesh
but it may have been like 'spesh on merge day' or so
jnthn yeah, the opts were not just spesh stuff though :)
21:20 brrt joined
jnthn spesh is actually currently better at dealing with NQP code than Perl 6 code. My current work is changing that :) 21:20
brrt hi #moarvm
hi jnthn
jnthn brrt! \o/
brrt yes, i'm back :-)
i'd like to explain my radio silence over the last half week or so, if only to get it off my chest 21:21
my girlfriend was hospitalized last thursday night
jnthn Ouch. Sorry to hear that. :(
tadzik ooh 21:22
brrt thanks
and after about 2,5 days in the IC, she's now on the mend, and hopefully will be back later this week
tadzik hugs brrt
I hope she gets well soon
brrt thanks, i hope so too 21:23
but that why i haven't been arround much, obviously
:-)
jnthn brrt: Glad she's on the mend; hope the recovery continues to go well, and of course, take what time's needed for that; people matter more than software.
brrt thanks for that 21:24
how's spesh and moarvm been doing these last days?
tadzik amazing, as I've just found :o
I mean, I'm used to awesome progress by now 21:25
jnthn brrt: Well, I've started in on the next round of spesh work, getting it to gather more info.
nwc10 All tests successful.
jnthn brrt: And nwc10++ is doing awesome things on portability.
nwc10: On...? :)
That was the Pi?
nwc10 that was NQP
Files=89, Tests=3239, 726 wallclock secs ( 9.69 usr 0.60 sys + 691.52 cusr 14.49 csys = 716.30 CPU)
Result: PASS
real 68m16.870s
user 66m52.730ssys 0m30.280s
om nom nom goes Terminal 21:26
yes, that was the Pi
going to reboot, because it seems it's not doing HDMI
and I'd like "console" in case it goes titsup
jnthn :)
brrt oooh nice
jnthn
.oO( MoarVM: ARMed and dangerous! )
brrt would still like a pi 21:27
nwc10 what stops you? constrained budget? GF objects to even more computers? $other? 21:28
brrt dynasm supports arm i think
never really bothered with actually getting one :-p
also everybody in my environment was treating them like cheap media centers and i'm not so interested in that
tadzik I was doing some electronics with mine :) 21:29
and LCD that told me how warm it is and when's the next bus
and there was some perl (5) in there :)
brrt nice
tadzik then one day I bumped the whole installation with my elbow and all the wires disconnected from their slots
and I never bothered to put it back together :o
should've soldered that 21:30
nwc10 We're at: 21:34
/mnt/Sandpit/moar-gs/bin/nqp-m --target=mbc --output=blib/Perl6/Pod.moarvm --encoding=utf8 \ src/Perl6/Pod.nqp
and I'm going to bed
brrt sleep well 21:35
FROGGS gnight nwc10++
jnthn 'night, nwc10++
brrt jnthn, out of curiosity, did you ever learn swedish? 21:52
jnthn brrt: Barely. I can get by in restaurants, supermarket, on the train, decode station announcements about how late the train is today, and various other bits :) 21:54
brrt: Basically, enough that I don't have to bother folks to use English for trivial situations.
brrt a bit then 21:55
jnthn Yeah. I tend to be able to get the gist of the work emails that fly by in Swedish too.
brrt i've been watching both swedish and danish tv-series and movies
woolfy ncw10++ (wow fantastic!)
jnthn Reading is always easier though.
brrt and i must say i found swedish /much/ easier to understand 21:56
i'd like to learn a few more languages too
jnthn I can read a lot more Russian than I can write/speak/listen too... Guess reading gives you more decoding time. :)
brrt i suppose so
russian?
jnthn Oh yeah...Danish is way harder than Swedish when spoken.
But when written it's not so bad. 21:57
brrt i haven't seen much of it written, actually :-)
21:57 jnap joined
brrt swedish i could almost (almost) understand as spoken, but then i'm dutch and its probably more similar to swedish than english is 21:57
jnthn Yes, I starting making some lame attempts to decode Dutch menus when I was in the Netherlands for nlpw recently. :) 21:58
brrt did it work out? how was the nlpw?
jnthn Well, I confused egg and onion consistently :P 21:59
brrt lol
they're close
jnthn nlpw was nice
brrt ei vs ui
jnthn I gave a talk. People seemed to like it. 22:00
brrt oh yes.. i renember not having clicked on the link, thinking to look at it later
jnthn Other than that, it was just generally a very nice time. :) 22:01
brrt good to hear
nothing extraordinary due to the 'kings day / night' celebrations?
btw, my plan for the duration of the 'community bonding period' was to post a (weekly) entry on the following topic: dynasm, moarvm bytecode, x64 bytecode, and another topic i've forgotten 22:02
jnthn ooh
That sounds really nice
Was the other topic how spesh works? :) 22:03
brrt yes
precisely that
jnthn looks forward to reading that :)
tadzik :D 22:04
brrt and correcting, probably
:-
:-)
wait, whats hardware watchpoints 22:10
jnthn A hardware-supported way of saying "break whenever this memory address gets written to" 22:11
Exposed by various C debuggers
brrt hmm okay, including gdb?
(the only c debugger i know :-))
jnthn Exceptionally useful when you know that at some point a bit of memory gets corrupted.
But have no idea what does it. 22:12
I used them heavily when debugging the MoarVM GC in the past.
Surely gdb supports them.
Though I don't know how they look there.
But I think that's what nwc10 was using.
brrt yes, he mentioned them
jnthn yeah, and I figure he's using gdb
brrt did i ask what version of visual studio - if at all - you're using to compile moarvm on windows? 22:13
jnthn I know he's not using what I tend to be :)
brrt what are you using?
jnthn Don't think so. I've got VS2012 on this machine.
But 2010 toolchain was fine too
And later ones also should be
You can get the free express edition and it's enough
I have fancier editions 'cus I do .Net stuff for $dayjob
brrt ok, i can get that 22:15
i'll need a (strawberry) perl install for building, right? 22:16
jnthn That's probably fine 22:17
The ActiveState one works out fine too
brrt never used it, know nothing of it :-)
oh, thats not true though
activestate made komodo iirc
(nickdesaulniers.github.io/blog/2014...me-x86-64/ this is a nice and accessible entry into x64, i think, and easier than amd or intel manuals) 22:26
22:29 btyler joined
tadzik can you still order intel manuals in print for free? 22:29
brrt i have no idea 22:30
if so... that'd be awesome to have 22:31
could you?
tadzik I think they did that at some point
now they're just downloadable, it seems 22:33
brrt shame
print would be awesome
tadzik "Note: The Intel® 64 and IA-32 Architectures Software Developer’s Manuals are no longer available to order as hard copy"
brrt really a shame 22:34
although $16,48 isn't that much 22:40
but i expect shipping to be added
tadzik oh, so you _can_ order them? 22:41
I paid more for yesterday's pizza :o
it was 1 AM though :P
brrt you can order them on a site called lulu.com 22:42
www.lulu.com/spotlight/IntelSDM :-) 22:43
tadzik oh cool 22:49
brrt yeah, maybe worth it
though i think it unlikely i'll use the entire instruction set 22:50
jnthn Teaching tomorrow...should sleep :) 22:57
'night
22:58 jnap joined
brrt goodnight 22:59
brrt is off too
22:59 brrt left 23:59 jnap joined