Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Overall reception & goals
- Many commenters find the Forsp idea “very cool” and conceptually elegant.
- It’s seen as a minimal core that unifies Forth-like stacks with Lisp-like semantics via a CBPV-style lambda calculus.
- Some view it as a candidate “more fundamental” layer beneath both Lisp and Forth, and as a neat discovery rather than just another syntax.
Semantics, CBPV, thunks, and closures
- Discussion clarifies that Forsp is based on Call-By-Push-Value (CBPV), not linear types, though linear types might help with memory management.
- Thunks are described as delayed computations (functions of zero arguments), aligning with Forsp’s lazy “block/thunk” flavor reminiscent of Forth and Rebol.
- A key subtlety:
^a(push without evaluating) differs from(a)(builds a closure to computea); without^you’d accumulate nested closures and need extra forcing.
Syntax, variables, and sigils
- Some like
$and^as variable/stack sigils; others prefer Forth-like!/@or</>or even+/-. - There’s debate whether
'x-style quoting could be replaced by(x); in Forsp they are intentionally different to keep semantics simple and expressive.
Minimal core & primitives
- The language intentionally minimizes primitives (e.g., only subtraction and multiplication).
- Users show how addition can be derived from subtraction; division is acknowledged as “harder but doable.”
- The interpreter is under 1,000 lines of C with a single tagged-union object type and lots of cons cells, essentially a very small Lisp.
Implementation, compilation, and GC
- Questions arise about how a compiler would differ from the C interpreter; suggestions reference Forth compilers and register renaming.
- Ideas floated: simple reference counting plus linear types, or more general real-time GC for complex scenarios.
Relations to Forth, Lisp, and other languages
- Forsp is compared to historic and modern Forths, HP’s RPL, Kitten, Cognition, Dreams, Rebol, “fe”, “aria”, FreeForth, ableForth, and other Forth/Lisp hybrids.
- Some note that many stack-based VMs for Lisp already combine Lisp semantics with a stack machine.
Practicality, usability, and learning curve
- Several commenters express excitement to tinker, see it as a strong teaching/experimental tool, and praise its small, comprehensible implementation.
- Others question whether it will see real use beyond niche language exploration, given the abundance of small experimental languages.
- There’s an extensive side debate about Forth vs Lisp readability; claims that Lisp’s parentheses encode more structure are countered with arguments about style, habit, and tooling, with no consensus reached.