FUK1 is a small interpreted programming language originally created for fukOS. This repository contains a standalone portable interpreter, so .fuk programs can run directly on Linux without booting fukOS.
The Linux runtime supports terminal colors, cursor positioning, blocking input, non-blocking key polling, random numbers, timing, strings, integers, floats, arrays, labels, branches, and functions.
FUK1
inputs name Enter your name:
if_seq name Dan success denied
label success
color 10
println Access granted!
exit
label denied
color 12
println Access denied!
exit
- Signed 32-bit integers
- 32-bit floating-point values
- Strings up to 127 bytes
- Integer, float, and string comparisons
- Direct true/false branches
- Labels, jumps, calls, and returns
- 4,096-element integer array
- Conversions and safe string helpers
- ANSI terminal colors and cursor control
- Blocking input and non-blocking keyboard polling
- Random numbers, sleep, and monotonic time
- Small embeddable C API
Install the standard build tools:
sudo pacman -S --needed base-devel git pythonBuild and test:
git clone https://github.com/YOUR_USERNAME/fuk-lang.git
cd fuk-lang
make
make testRun an application:
./fuk examples/hello.fuk
./fuk examples/types-and-branches.fuk
./fuk examples/tetris.fukInstall globally:
sudo make install
fuk examples/hello.fukUninstall:
sudo make uninstallfuk program.fuk
fuk run program.fuk
fuk check program.fuk
fuk --version
fuk --help
check starts the VM with output, delays, and interactive input disabled. It catches header, label, and startup/runtime validation errors along the reached path.
include/fuk.h public embedding API
src/fuk.c portable FUK1 VM
src/main.c command-line program
platforms/host.c Linux/POSIX terminal adapter
docs/language-reference.md complete instruction reference
docs/tutorial.md step-by-step tutorial
docs/embedding.md embedding guide
examples/ example .fuk applications
tests/ automated VM tests
packaging/PKGBUILD Arch package template
The language started as the in-kernel FUK1 VM in fukOS. The standalone VM removes FAT, framebuffer, kernel heap, and hardware dependencies. Platform operations are provided through callbacks, allowing the same interpreter core to be embedded back into fukOS.
| Resource | Limit |
|---|---|
| Source size | 512 KiB |
| Variables | 256 |
| String value | 127 bytes |
| Integer array | 4,096 elements |
| Source line | 2,047 bytes |
| Executed instructions | 100,000,000 |
| Call depth | 64 |
| Labels | 1,024 |
| One sleep | 60,000 ms |
FUK1 is distributed under the GNU General Public License version 2. See LICENSE.
Check out my OPERATING SYSTEM