
Show HN: Snigl – Forth with Lisp in C - sifoobar
https://gitlab.com/sifoo/snigl
======
japanoise
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.

~~~
sifoobar
You're welcome :)

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.

~~~
Someone
Reading [https://gitlab.com/sifoo/snigl](https://gitlab.com/sifoo/snigl), some
examples of where you could lose readers by section:

\- _[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)

~~~
sifoobar
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.

------
samatman
Is this the same project that was called sixl?

If so, I liked it then and I like it now ^_^

~~~
sifoobar
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 :)

You're welcome!

------
agumonkey
cloned, built and enjoyed.

