Gofra
Beta
Gofra is in beta. The language and toolchain may change.
Recreational programming
Gofra is not competing with other languages. It is another incomplete language, much like the others.
A Stack-based compiled programming language.
Gofra is a concatenative (stack-based) language that compiles to native
code. Programs are written in
Reverse Polish notation:
operations follow their operands (2 + 2 is 2 2 +).
Quick start
#include "std"
func void main[]
"Hello, World!" println
end
Features
- Native - Compiles to native machine code
- C-like - Close to C, but has a few more high-level abstraction (
for in,type generics) - C FFI - Seamless integration with C-FFI libraries
- Low-level - Write unsafe, low-level code with direct memory access
- Type System - Validate types at compile time, has compile-time warnings (Partial generics supports, typechecker)
- Library - By default has support for
math,random,networkand other libraries - First class functions - Has support, and lambda definitions (no closures/capturing yet)
Showcase
- Pong Game (
examples/03_pong.gof) - Simple HTTP server (
examples/04_http_server.gof)
Platform support
Gofra currently supports native compilation (no cross-compilation yet). Compile on the same platform as your target.
| Platform | Status |
|---|---|
| AArch64 macOS (Darwin) | Full |
| x86_64 macOS (Darwin) | Partial |
| x86_64 Linux | Partial |
| WASM32 | Partial |
| x86_64 Windows | Planned |
Install
pip install gofra
gofra --help
For full instructions, see Installation.
Where to go next
- New to Gofra? Start with the tutorial.
- Want to accomplish something? See how-to.
- Need exact syntax? See reference.
- Want to understand why? See explanation.