Fun (https://fun-lang.xyz)
Fun is a small, strict, and simple programming language that runs on a compact stack-based virtual machine. The C core is intentionally minimal; most functionality and standard libraries are implemented in Fun itself. The language emphasizes simplicity, consistency, and joy in coding.
Fun is an experiment, just for fun, but Fun works!
Fun is a highly strict programming language, but also highly simple. It looks like Python (My favorite language), but there are differences.
Influenced by Bash, C, Lua, PHP, Python, and Rust (Most influences came from linked languages).
Fun is and will ever be 100% free under the terms of the Apache-2.0 License.
- Simplicity
- Consistency
- Simple to extend
- Hackable
- Joy in coding
- Fun!
- Dynamic and optionally statically typed
- Type safety
- Written in C (C99) and Fun
- Internal libs are written with no_camel_case even when written in Fun, except class names
- Only a minimal function set is written in C, and most other core functions and libraries are implemented in Fun
Fun is a programming language built on a simple idea: Coding should be enjoyable, elegant, and consistent.
- Fun is Fun
Programming should spark creativity, not frustration. Code in Fun feels light, playful, and rewarding. - Fun Uses Nothing
Minimalism is power. No unnecessary features, no endless syntax variations, no formatting debates. Just clean, uniform code. - Indentation is Truth
Two spaces, always. No tabs, no four-space wars. Code should look the same everywhere, from your laptop to /usr/bin/fun. - One Way to Do It
No clutter, no 15 ways of writing the same thing. Simplicity means clarity. - Hackable by Nature
Fun should be small and embeddable, like Lua. Easy to understand, extend, and tinker with — true to the hacker spirit. - Beautiful Defaults
A language that doesn’t need linters, formatters, or style guides. Beauty is built in.
Fun is not about being the fastest or the most feature-rich. It’s about sharing joy in coding. The community should be:
- Respectful
- Curious
- Creative
- Open for everyone
Like the name says: Fun Unites Nerds.
Please visit the Fun Community Page to get in touch.
A language that feels like home for developers who:
- Love minimal, elegant tools
- Believe consistency is freedom
- Want to write code that looks good and feels good
Fun may not change the world — but it will make programming a little more fun.
- functions/classes/objects
- if/else if/else
- try/catch/finally
See ./lib/ for what the standard library provides.
- CGI support builtin using kcgi (optional) ☐
- cURL (libcurl) (optional) ☑
- INI (iniparser) (optional) ☑
- JSON (json-c) (optional) ☑
- libSQL (optional) ☑
- PCRE2 (optional) ☑
- PCSC (smart cards) (optional) ☑
- OpenSSL (optional) ☑
- SQLite (optional) ☑
- Tk (Tcl/Tk GUI) (optional) ☑
- XML (libxml2) (optional) ☑
☑ = Done / ☐ = Planned or in progress.
Note: Not all of the above features will be implemented. Those who are marked "Done" will probaly remain in Fun, but I don't know actually... ;)
There are some libs written in Fun available in the ./lib/ diretory. In the future most Fun enhancements should be written in Fun itself.
See the dedicated page: ./docs/external/openssl.md
Looking for docs? Start here:
- Local documentation index: docs/README.md
- Handbook: docs/handbook.md
- Types overview: docs/types.md
- REPL guide: docs/repl.md
- Testing: docs/testing.md
- Troubleshooting: docs/troubleshooting.md
Additional references:
- Specification: spec/v0.3.md (work in progress)
- Examples demonstrating most features: examples/
- Internals and VM opcodes live in src/ (see src/vm/ for opcode implementations)
Note: The project is evolving; some documents may lag behind. The docs index in ./docs/README.md is the most up‑to‑date entry point.
Johannes Findeisen - you@hanez.org