←back to thread

122 points rickcarlino | 1 comments | | HN request time: 0.207s | source
Show context
oersted ◴[] No.45655964[source]
A Forth-like command-line shell (bash replacement) does sound quite interesting actually, particularly if the stack is displayed on the side and is not implicit.

It's rather concise, most functions tend to be a single short line. Its syntax is minimal (or non-existent according to some), it's just flat white-space separated tokens. It has imperative/interactive semantics, in the sense that every successive word makes some changes on the current state (the stack).

All of this makes it quite amenable to be used as an OS shell I think, it seems obvious in retrospect.

The idea of starting with an empty Forth and creating a whole universe of automations and DSLs for your system, one command at a time, is quite pleasing, in a purist sense, although perhaps not entirely practical.

Does such a shell exist? Not as minimal as Ilo, one you can actually use in a modern system instead of bash and the like, ideally with a nice display of the stack. Probably Factor is the most appropriate Forth-like to build it on, it already has a good REPL mode, it would mainly involve adding a bunch of utilities for practical command-line use.

replies(7): >>45656030 #>>45656070 #>>45657137 #>>45657317 #>>45658405 #>>45660659 #>>45664639 #
1. ◴[] No.45658405[source]