548 karma · joined September 2, 2014
Speculation in other words, not science; imagination, not facts; which is fine unless it's being framed as truth.
We over-complicate things, for different reasons. The truth is that nothing is very complicated once you understand it well enough to break it down to its core.
I've never written a standard Forth program in my life though, never installed any other implementation. The second I was introduced to Forth, it clicked; Lisp took me much, much longer to get by comparison.
Like I said, I'm not very much into rebuilding what has already been built better by someone else. Anyone who's written any amount of code is bound to have own ideas, and the nice thing about Forth as a substrate is that doesn't come with that many ideas of its own.
I've written a few blog posts explaining design choices (https://github.com/andreas-gone-wild/blog/blob/master/forthy...), there's more interesting stuff to come now that the pieces are falling into place; I've only been working on Snabel for a couple of months.
https://github.com/andreas-gone-wild/snackis/blob/master/sna...
Looping with unblocking reads is plenty fast enough though.
As for waiting on any event without select, adding an optional condition-variable pointer to each channel that is pinged when data arrives is the easiest approach I can think of.
I prefer working with channels, which are still missing from the library; but they are trivial to add:
https://github.com/andreas-gone-wild/blog/blob/master/diy_cp...
Replace Fascist with Communist and it's like entering a time machine, only the name of the bogeyman and the faces of the ignorant haters change.
Truth is, we're all in this together; the real enemy is pulling all the strings. Divide and conquer, oldest trick in the book.
https://github.com/andreas-gone-wild/snackis/blob/master/sna...
An example is Snabels use of "|" for resetting the stack, "_" for dropping the top and "(..)" for grouping modifications; it smells a tiny bit like Perl in that it's not afraid of using what's available to get the wanted experience, but has a dramatic effect on code shape compared to regular mumble-Forth.