I am half-way tempted to say screw it all, and just write my own Modula-2 compiler, rewrite my assembler to emit Hunk-format object files, and create a linker that will create Hunk-format executables and libraries.
ELF, like systemd that came long after it, is perhaps one of the most egregious violations of the Unix philosophy that I've ever seen. A horrible, horrible file format.
@Azure I made a conscious decision to not watch this series. I could tell from its production values that it wasn't true Star Trek: lens flares, dark scenes everywhere, lots of flashy explosions and special effects ...
Seeing your commentary vindicates my initial impressions. While it might be a fun watch, to be sure, it's not Star Trek. Not really.
The more I work with ELF, the more I am starting to detest it. It's way *too* simple in some respects, for which it compensates by being in-FUCKING-SANELY complicated in other respects. >:/
So, today, I think I'm going to put hacking on DX-Forth on hold for awhile, and try to play with loading and executing dynamically-linked ELF files.
Without using mmap().
The goal of this research is to come up with an ELF loader that I can eventually port to a first-generation Kestrel-3.
An unexpanded Kestrel-2DX doesn't have the memory to deal with dynamic ELFs; a statically linked ELF that, in its entirety, is less than 32KB is doable, but that's it; also, statically linked ELFs are easy.
ColorForth took a similar approach, where tapping the spacebar invoked the previously entered word, which then cleared out the input buffer. Misspelled words took no action; backspace just emptied the input buffer as well.
@seanl@djsundog You aren't likely able to run immediate words from the interactive prompt. I believe @djsundog is referring to the Forth's outer interpreter, not the inner interpreter or what happens when you INCLUDE/LOAD a file/block.
Hey Mastodons, I hear you like open source and federation, so I'd like to tell you about https://gettogether.community/ an open source, federated(*) event planning service similar to Meetup
It's free to use, and while it's still very early development it is live! Try it yourself, share it with your friends, start a team ahd have a Get Together! #gettogether
The only problem is, I now need to relocate the interpreter's return stack. Invoking LOAD puts so much pressure on the return stack that it overflows into the video display framebuffer. Yuck.