This looks like a really interesting project, thank you for sharing. I'll be sure to play with it some when I have the time.
My only gripe is that the documentation is a little sparse, more like a crash-course than a guide, and I only grokked it due to my existing Forth chops. Perhaps a (community-contributed?) longer-form tutorial could expand on what's already there and aid newcomers with learning the language.
I hear you, it's very much a crash course so far. I've tried to keep the examples nimble enough to allow decoding any foreign constructs. This is unfortunately the level I'm operating at, because it's exactly where I need to be to write the code. Any contributions along those lines would be most welcome.
- [sni`gel]: example is too deep a dive for a first dive without comments (a few lines “it also multi-threads easily. For example, here’s how to have two tasks write to @out in parallel and wait for both to complete” already would improve things a lot IMO)
- Evaluation: rotl ignores the top element on the stack, but rotr doesn’t? That would be quite surprising. Or do these work on the bottom 3 stack elements??? I also would switch names, given the tendency to show top of stack to the right in stack describing comments.
- Equality and identity has an example using !==, but doesn’t say what it does. I also would introduce != here (I assume it exists)
- functions: in the fib-tail example, explain why you don’t need a fib, and can call fib-tail with one argument on the stack instead.
- iterators: I would expect the sum of 0 through 7 to be 28 (“7 list” produces a list not including 7, I think)
Regarding rotl/rotr, that was a typo in the example; they rotate the top three items left or right, I find Forths choice of 'rot' arbitrary but that may be a consequence of how the pieces fit together in Snigl.
And I agree, the sum of 0-7 is still 28 :) Another typo.
Thanks again, this really helps. The plan is to turn all examples into actual tests and generate the README using Snigl eventually, but the required features are not quite there yet.
Sure thing, thanks for the help with IO stream workarounds for mac. It's a complete re-implementation to solve some of the show stoppers that Cixl ran into. Snigl should build mostly anywhere using any C11 compiler for example, so that's an improvement. And it's leaner, faster and just plain better across the spectrum :)
My only gripe is that the documentation is a little sparse, more like a crash-course than a guide, and I only grokked it due to my existing Forth chops. Perhaps a (community-contributed?) longer-form tutorial could expand on what's already there and aid newcomers with learning the language.