fun-lang.xyz/index.md

110 lines
4.2 KiB
Markdown
Raw Normal View History

2025-10-08 02:42:14 +02:00
---
layout: default
title: /index.fun
description: Homepage
metasub: news
noToc: false
tags:
- xw3
- project
- cgi
- static
- jekyll
_description: The programming language that just makes fun!
noComments: true
---
<div class="post">
<header class="post-header">
<h1 class="post-title" id="terminal">{{ site.title }} {{ page.title }}</h1>
<p style="padding: 0px 0px 0px 0px;">{{ site.subtitle }}</p>
</header>
</div>
## What is Fun?
Fun is a highly strict programming language, but also highly simple. It looks like Python (My favorite language), but there are differences.
2025-10-08 04:01:26 +02:00
Influenced by **[Bash](https://www.gnu.org/software/bash/){:class="ext"}**, **[C](https://en.wikipedia.org/wiki/The_C_Programming_Language){:class="ext"}**, Go, **[Lua](https://www.lua.org/){:class="ext"}**, **[Python](https://www.python.org/){:class="ext"}**, and Rust (Most influences came from linked languages).
2025-10-08 02:42:14 +02:00
2025-10-08 04:01:26 +02:00
Fun is and will ever be 100% free under the terms of the [Apache-2.0 License](https://opensource.org/license/apache-2-0){:class="ext"}.
2025-10-08 02:42:14 +02:00
## Idea
2025-10-21 23:57:37 +02:00
- Simplicity
- Consistency
- Joy in coding
- Fun!
2025-10-08 02:42:14 +02:00
2025-10-09 03:45:42 +02:00
### Extras
2025-11-22 01:27:46 +01:00
- [JSON](https://www.json.org/){:class="ext"} support builtin using [json-c](https://github.com/json-c/json-c){:class="ext"} (optional, planned, maybe write a parser in Fun for stdlib)
- [ODBC](https://learn.microsoft.com/en-us/sql/odbc/reference/odbc-overview?view=sql-server-ver16){:class="ext"} support builtin for flexible database connectivity using [unixODBC](https://www.unixodbc.org/){:class="ext"} (optional, planned)
- [PC/SC](https://pcscworkgroup.com/){:class="ext"} smart card support builtin using [PCSC lite](https://pcsclite.apdu.fr/){:class="ext"} (optional, in progress)
2025-10-21 23:57:37 +02:00
- [SQLite](https://sqlite.org/){:class="ext"} support builtin (optional, planned)
2025-11-22 01:27:46 +01:00
- [Tk](https://www.tcl-lang.org/){:class="ext"} support builtin for GUI application development (optional, planned)
2025-10-09 03:45:42 +02:00
2025-10-08 02:42:14 +02:00
## Characteristics
2025-10-21 23:57:37 +02:00
- 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
2025-10-08 02:42:14 +02:00
## The Fun Manifesto
Fun is a programming language built on a simple idea:
Coding should be enjoyable, elegant, and consistent.
### Philosophy
2025-10-21 23:57:37 +02:00
- **Fun is Fun**<br>
Programming should spark creativity, not frustration. Code in Fun feels light, playful, and rewarding.
- **Fun Uses Nothing**<br>
Minimalism is power. No unnecessary features, no endless syntax variations, no formatting debates. Just clean, uniform code.
- **Indentation is Truth**<br>
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**<br>
No clutter, no 15 ways of writing the same thing. Simplicity means clarity.
- **Hackable by Nature**<br>
Fun should be small and embeddable, like Lua. Easy to understand, extend, and tinker with — true to the hacker spirit.
- **Beautiful Defaults**<br>
A language that doesn’t need linters, formatters, or style guides. Beauty is built in.
2025-10-08 02:42:14 +02:00
## 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:
2025-10-21 23:57:37 +02:00
- Respectful
- Curious
- Creative
2025-10-08 02:42:14 +02:00
Like the name says: Fun Unites Nerds.
2025-10-13 00:09:13 +02:00
Please visit the [Fun Community Page](https://fun-lang.xyz/community/) to get in touch.
2025-10-08 02:42:14 +02:00
## The Goal
A language that feels like home for developers who:
2025-10-21 23:57:37 +02:00
- Love minimal, elegant tools
- Believe consistency is freedom
- Want to write code that looks good and feels good
2025-10-08 02:42:14 +02:00
Fun may not change the world — but it will make programming a little more fun.
## Documentation
2025-10-13 00:09:13 +02:00
I am writing documentation only actually, but this is work in progress, since debugging and bug fixing includes this task.
Current documentation is only found in the [Fun Handbook](https://git.xw3.org/fun/fun/src/branch/main/docs/handbook.md){:class="git"}.
In the [examples/](https://git.xw3.org/fun/fun/src/branch/main/examples){:class="git"} directory should be an example of most Fun features.
A complete API documentation will follow.
2025-10-08 02:42:14 +02:00
## Code
- [https://git.xw3.org/fun/fun/](https://git.xw3.org/fun/fun/){:class="git"}