In many cases, generality is at odds with simplicity. This is why it is so remarkable — and beautiful — to find a simple, general solution. Unfortunately the pursuit of that beauty can be a siren call for engineers, whose real-world domain rarely admits both.

The FSF needs to make some serious course corrections if they want to reverse their descent into irrelevancy.

One thing it doesn’t seem that they’ve understood is that fundamentally in a free society it’s the people that matter, not the ideas in your manifesto.

Circling the wagons around the “good old boys” club won’t do anything to improve the FSF’s claim to leadership in such a movement. New organizations without such a burden will replace them.

Going in the deep end on this and trying to integrate Cairo + Pango + OpenGL. It's a lot of work just to get some 2D graphics on the screen... Hope it's reasonably fast.

Show thread

Having a bit of trouble integrating SDL2 and Dear ImGui. I'd like to use SDL2's render functions, but I'm not sure how to square that with ImGui's own rendering when they must share an OpenGL context... At the moment SDL wins, so no ImGui objects are drawn.

Eyeing The Open Book and wondering if it's worthwhile to try building one.

In other news, my Kindle auto-updated and now it will neither connect to my WiFi nor let me turn it off. Fuck off, FAANG, and quit trying to control what I do with my own damn devices!

Considering writing an email filter that will automatically delete anything with an emoji in the subject line

Ok, here’s what I’m thinking. Maybe I can create some read-only blocks of Forth source as a linkable ELF file and map them into the binary at the flash area. Then you could LOAD them from user programs and FORGET them when you’re done, doing application switching in the classic Forth manner. That would keep the newly defined dictionary words in RAM, but hopefully there’s not going to be too many of those. If it’s an issue I could look at compiling them as well.

Show thread

Aww man, the flash is read-only. Can't use it for block storage apparently. That's a real bummer!

I wonder what other options there are. I had considered, for example, using an SD card since you can talk to them over SPI. That wouldn't work in the emulator but it would on a real board. I'm going to have to look at how you can compile the Forth source into the hex file so that it can be written to flash as part of JTAG programming.

Show thread

Fleshed out most of the core assembly primitives, including NUMBER. I’m still running in the debugger for now, but I’ve verified that basic operations like addition and subtraction work! I’ll have a read through the Forth parts of Jonesforth later; I expect they should run mostly unmodified on my kernel.

Show thread

Oh wait! It's not 512K, it's 512 MEGABYTES. Holy smokes, that's a lot of data.

Show thread

Currently sitting at a little under 4K when assembled and linked. There's still a few primitives I haven't implemented, but I think there should be lots of space for libraries and for block storage on the flash chip (it's 512K)

Show thread

After a few hours in the debugger, I now have INTERPRET/QUIT working! The top level loop is functional! 🎉

Now to flesh out the remaining assembly builtins.

One thing I hadn't considered when I started on this port is that it would be nice to store most of the "standard" library in the E310's onboard SPI flash memory. I could bake it into the object file, or figure out how to tell the interpreter to write the code there. (Not a problem to solve today though.)

Show thread

Fleshed out a minimal interpreter and got it to assemble today. No support for reading literals, few built in words. It doesn’t run yet, which is unsurprising, so tomorrow will be a debugging day! Hoping to get to the point where I can at least print the version number.

Show thread

😬 Feeling a bit antsy about all the assembly I'm writing with no testing whatsoever. Writing a test harness for this stuff feels like it'd be about as much work as finishing the Forth, so I'm just pushing along and hoping I get it mostly right. Right enough to debug, at least.

Show thread

I have a few Forth primitives (colon interpreter, some stack manipulation operators, some memory words like !) defined in RISC-V assembly but no way to test them just yet. Before I get too far into implementation, I really want to exercise these. I might wind up writing a little test harness, or I might push forward and skip most of the rest of the primitives until I get to KEY/WORD/EMIT so I can test things interactively.

Show thread

Today I learned about how assemblers and linkers do code relocation and how that affects macros in GNU ‘as’. Wound up having to modify the linked list feature in Jonesforth’s “defword/defcode” macros to compensate.

Show thread

It's been fun teaching one of my coworkers by taking turns pair programming on a TUI app. Hoping we'll be able to make it open source sometime in the near-ish future.

Wishing there were something akin to Blinkenlights for RISC-V. It would help immensely as I'm learning the assembly language.

Taking a break from programming tonight. If I do it too much, my brain fixates on it and I dream in code. It's not a good way to get rest, so tonight I'm playing games instead.

Spent the past hour pondering how to translate two lines of x86 assembly into RISC-V. This is going to be quite a learning experience.

Show thread
Show older

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.