<remexre>
hm, is there a way to do DODOES without needing to be able to write machine code to the dictionary?
<remexre>
I'm writing an ITC forth in C, and I'd like it to work across all Linux 64-bit little-endian arches without having to have a separate version of "write a jmp dodoes to the dictionary" for each arch
<tabemann>
if it's ITC, you put a primary code pointer and a secondary code pointer in the dictionary; then, when calling a word, you call the function pointed to by the primary code pointer
<crest>
remexre: make your pointer a union or cast it to function pointer
<tabemann>
and if that word is a colon or does> word, that in turn initiates execution of the forth code poined to by the secondary code pointer
<remexre>
tabemann: oh, that's elegant; right now I just have DOCOLON continuing execution immediately after the code pointer
<tabemann>
the real purpose of the secondary code pointer is to enable does> to work
<tabemann>
note that this all gets harder in the context of a forth like the forth I've been working on, zeptoforth, which operates on an MCU where it has to compile into both RAM and flash
<tabemann>
of course zeptoforth is an SRT/NCI forth, not an ITC forth
<remexre>
yeah, I'm glad I don't have to work on "weird" arches lol
<tabemann>
Cortex-M is not a "weird" arch - lol
<remexre>
I think ulrich drepper once called arm weird, but I guess "systems one wouldn't interact with using a mouse" might be a better expansion :)
<crest>
ulrich drepper is an idiot
<crest>
he closed a bug report for glibc on arch with "works on my i386 laptop"
<crest>
because single threaded x86 code doesn't care about about alignment
<remexre>
ugh
<crest>
while armv5 just hands you a sigbus/sigsegv if you attempt to load aligned words
<crest>
ulrich drepper is most of the reason that eglibc was forked
<crest>
to collect all the fixes for problems he refused to acklowledge
<tabemann>
back
<remexre>
yeah, that was kinda darkly hilarious
<tabemann>
I was reading back a bit, and ulrich drepper seems like both an idiot and an asshole
<crest>
i agree
<crest>
he was a smug idiot
<tabemann>
at least with zeptoforth I don't have to deal with any of his crap!
<tabemann>
gecause aside from gas and ld I answer to no one aside from STMicroelectronics and ARM
<crest>
tabemann: if zeptoforth runs into the same problem you have only yourself to blame :-P
<remexre>
yeah, my bare-metal project is inspired by similar ideals
<remexre>
wrt "only myself to blame"
<tabemann>
if I only have myself to blame then I can fix my own problem rather than hoping that someone else fixes it for me!
<tabemann>
unless it's a problem with the MCU or board themselves, where then I am fucked