This summer I have had some fun trying to figure out how to implement a super
simple toy Forth. For a start, I chose PicoLisp as an implementation language.
You may find it here:
There is one problem, however, occurring quite regularly when I run this
forth.l using 32-bit PicoLisp on Mac. As the README.md suggests, I start it by
pil path/to/forth.l +
If I then enter “: ff 0 if 77 else 88 then ;” (without the quotes), which
defines a new word “ff” (which when used always pushes 88 on the stack), and
then enter “t”, which is a (non-standard) word just for checking the state of
the “tempStack” field (probably empty), then I usually get a “Segmentation
I have not seen that problem when using 64-bit PicoLisp (in Docker).
Is this Segmentation fault caused by a bug in 32-bit PicoLisp, or is it me
doing something stupid?
Have a nice weekend!