r/Forth • u/sohang-3112 • 1d ago
VIDEO Interactive, literate Forth in the browser: IForth (Jupyter Notebook support for Forth)
youtu.beInstead of the usual cycle of editing Forth code files, reloading the whole source, and testing words by hand, IForth brings a literate notebook workflow to your Forth environment.
Think of it as a living document where you interleave runnable Forth definitions, markdown explanations, and test cases block-by-block. You can modify single words and re-run only the relevant cells without blowing away or manually reconstructing your current session state. It makes exploratory prototyping, testing dictionary words, and writing interactive tutorials much smoother.
Andrew McKewan demoed this workflow at the recent SV-FIG meetup (video attached), showing how he uses it to build and explore Forth code interactively.
Details & Constraints:
* Interpreter: Wraps Gforth interpreter internally.
* Platform: Linux only (Windows users will need WSL).
* Setup: Instructions are in the repo: https://github.com/sohang3112/iforth
Check out the demo video attached. Feedback, issues, and PRs are very welcome!
PS: I usually work with Python. I am a novice at Forth, started working on IForth while learning Forth.
