fun-lang.xyz/index.md
2025-11-28 18:42:26 +01:00

6.6 KiB
Raw Blame History

layout title description metasub noToc tags _description noComments
default /index.fun Homepage news false
xw3
project
cgi
static
jekyll
The programming language that just makes fun! true

{{ site.title }} {{ page.title }}

{{ site.subtitle }}

What is Fun?

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{:class="ext"}, C{:class="ext"}, Lua{:class="ext"}, PHP, Python{:class="ext"}, 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{:class="ext"}.

Idea

  • Simplicity
  • Consistency
  • Joy in coding
  • Fun!

Characteristics

  • 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

The Fun Manifesto

Fun is a programming language built on a simple idea: Coding should be enjoyable, elegant, and consistent.

Philosophy

  • 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.

The Community

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

Like the name says: Fun Unites Nerds.

Please visit the Fun Community Page to get in touch.

The Goal

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.

Features

Core

  • functions/classes/objects
  • if/else if/else
  • try/catch/finally

Lib

...

Extensions

  • CGI{:class="ext"} support builtin using kcgi{:class="ext"} (optional) ☐
  • cURL{:class="ext"} support builtin using libcurl{:class="ext"} (optional) ☑
  • INI{:class="ext"} support builtin using iniparser{:class="ext"} (optional) ☐
  • JSON{:class="ext"} support builtin using json-c{:class="ext"} (optional) ☑
  • libSQL{:class="ext"} support builtin as a compatible alternative to SQLite (optional) ☑
  • PCRE2{:class="ext"} support builtin for Perl-Compatible Regular Expressions (optional) ☑
  • PCSC{:class="ext"} smart card support builtin using PCSC lite{:class="ext"} (optional) ☑
  • SQLite{:class="ext"} support builtin (optional) ☑
  • Tk{:class="ext"} support builtin for GUI application development (optional) ☐
  • TOML{:class="ext"} support builtin using tomlc99{:class="ext"} (optional) ☐
  • XML{:class="ext"} support builtin using libxml2{:class="ext"} (optional) ☐
  • YAML{:class="ext"} support builtin using libfyaml{:class="ext"} (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/{:class="ext"} diretory. In the future most Fun enhancements should be written in Fun itself.

Documentation

This is actually a work in progress...

Current documentation is only found in the Fun Handbook{:class="ext"}.

In the ./examples/{:class="ext"} directory should be an example of most Fun features.

Fun internals are found directly in the ./src/{:class="ext"} diretory. Fun Opcodes{:class="ext"} are found in ./src/vm/{:class="ext"}.

Since things are actually changing sometimes, I will not write the documentation for this as of now.

Complete API documentation will follow.

Code