PitchHut
Log in / Sign up
Strange Forth
17 views
A unique interpreted Forth implementation in modern C++.
Pitch

Strange Forth is a modern implementation of the Forth programming language, showcasing a bytecode interpreter approach with features from C++20. It's designed for readability and scripting tasks rather than traditional compilation. Dive into a flexible, interpreted environment that pays homage to Forth while embracing contemporary programming paradigms.

Description

Sorth: A Unique Implementation of Forth in C++ 20

Sorth is a user-friendly, interpreted version of the Forth programming language, crafted in C++20. This innovative project diverges from traditional Forth implementations by avoiding machine code compilation; rather, it utilizes a bytecode interpreter approach. This design decision primarily aims to enhance readability by adopting modern programming idioms, thereby making it simpler for developers to engage with Forth.

Key Features of Sorth

  • Interpreted Forth: Unlike classic versions, Sorth operates as an interpreter, embracing language constructs that enhance usability while respecting core Forth concepts.
  • Bytecode Interpretation: Experience the flexibility of bytecode execution, allowing for quick iterations and scripting functionalities without the overhead of compilation.
  • Modern C++ Design: Leverage the power of C++ features like exceptions and advanced STL facilities, providing modern solutions while embracing Forth's unique style.

Experimental Implementations

Explore the evolving landscape of Sorth's experimental versions:

  • C# Version: Built to harness .NET’s JIT compilation, this version aims to facilitate deep integration with .NET classes and structs. Future developments will enhance extensibility and threading capabilities.
  • Rust Version: Focused on leveraging memory safety, the Rust-based interpreter invites possibilities for API development and seamless embedding within other applications.

Roadmap for Future Enhancements

Sorth is continuously evolving, with an array of enhancements underway:

  • Improve Foreign Function Interface (FFI) capabilities for better interoperability.
  • Expand I/O functionalities to support inter-process communication (IPC).
  • Enhance stability and functionality within the REPL and language server, particularly with thread support.
  • Streamline existing command palettes to ensure ergonomic usage and interconnectivity.
  • Investigate the possibility of a modular system and a package management approach for easier code sharing.

Engage with Sorth

Begin your journey into the world of Sorth today! You can interact with the language, test functionality, and contribute to its evolution through our Wiki. Join the community as we redefine how Forth is experienced in modern programming environments.