Skip to content

Staying in touch #222

Open
Open

Description

@mschwartz

I made my own Forth in C++:

https://gitlab.com/mschwartz/inspiration

Also wanted to share a picture you might get a kick out of.

Image

Activity

  1. philburk commented on Apr 8, 2026

    @philburk
    Owner

    Inspiration Forth looks really nice. It is fun to see all the different ways of implementing Forth.
    Your threading with DOCOLON is very interesting.
    Is the dictionary relocatable?

    Nice bookshelf. Some real classics there! JForth, 3DO and 68030 assembly.

  2. mschwartz commented on Apr 8, 2026

    @mschwartz
    Author

    Dictionary is not relocatable. The whole thing compiles from “make clean” to (make + run) Ok prompt with everything 4th compiled in about 5 seconds. That’s on my M1 MBP, but also on my XPS 13 9300.

    I suspect your switch statement is faster, but I don’t care to benchmark.

    The clever thing is not as much the DOCOLON logic but the use of __thread local variables so pthreads work. It also means the primitives code is concise. These thread locals are accessed offset FS (or GS) on x64, with each thread having it’s own FS value.

    The name Inspiration is partly a play on RJ’s Intuition and JForth and PForth and others.

    Also Foley/Van Dam graphics book and the 2 TCP/IP textbooks 😀

    Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions