Feb 19, 2021
An experimental way to do control flow in the postfix Mu shell

The screenshot below shows an idea I've been playing with.

Screenshow showing the Mu shell running without an OS within Qemu. Below each word typed in is the state of the stack after the word was executed. Most words push things to the stack. The <code>break</code> word skips future words until a <code>}</code>, so some later words don't show stacks.

The conventional way Forth does control flow is a little confusing with words like if and then showing up at the end.

Factor uses quotations to put code blocks on the stack. But then you see a potentially complex chunk of code executing "all at once".

Main project page: https://github.com/akkartik/mu

This post is part of my Freewheeling Apps Devlog.

Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.

archive
projects
writings
videos
subscribe
Mastodon
RSS (?)
twtxt (?)
Station (?)