ExForth

Forth-inspired stack language that compiles to Elixir

ExForth is a custom programming language inspired by Forth and Factor, implemented in Elixir. It combines the elegance of stack-based programming with modern functional concepts, compiling directly to efficient Elixir modules.

Features

Installation

Add exforth to your dependencies in mix.exs:

def deps do
  [
    {:exforth, "~> 0.1.0"}  # or {:exforth, github: "ZeroMoonSan/ExForth"}
  ]
end

Quick Start

  def start(_type, _args) do
    children = [
      ExForth.Vars,
      ExForth.Cache,
      ExForth.FLoader,
    ]
# Load and compile a Forth file
iex(1)> ExForth/FLoader.load("path/to/your/file.fs")
{:ok, "ExForth.FLoader.Scripts.File"}
# Run the compiled module
iex(2)> ExForth.FLoader.Scripts.File.exec()
13
[]
iex(3)> 

License

MIT License - see LICENSE file for details.