Hmmm...
This commit is contained in:
parent
6f17b404a5
commit
d07121a819
11 changed files with 359 additions and 213 deletions
2
Makefile
2
Makefile
|
|
@ -39,7 +39,7 @@ localrelease:
|
|||
minify:
|
||||
find ./_site -type f -name "*.html" -exec minify --html-keep-document-tags --html-keep-end-tags -o {} {} \;
|
||||
find ./_site -type f -name "*.html" -exec sed -i 's/ \/>/>/g' {} +
|
||||
find ./_site -type f -name "*.html" -exec perl -0777 -pi -e 's/\n/ /g' {} +
|
||||
#find ./_site -type f -name "*.html" -exec perl -0777 -pi -e 's/\n/ /g' {} +
|
||||
find ./_site -type f -name "*.css" -exec minify --css-precision 0 -o {} {} \;
|
||||
find ./_site -type f -name "*.xml" -exec minify -o {} {} \;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ libdir: /var/www/fun-lang.xyz/www/lib
|
|||
|
||||
mastodon: https://fosstodon.org/@fun
|
||||
|
||||
truncatewords_length: 512
|
||||
truncatewords_length: 10000
|
||||
|
||||
# Set to your git root and branch to show a link to the file source in the footer. Unset to disable.
|
||||
git: https://git.xw3.org/fun/fun/
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<li style="display:inline;"> <a href="/community/code-of-conduct/" style="text-decoration:none;" title="Code of Conduct" class="love">Code of Conduct</a> -</li>
|
||||
<li style="display:inline;"> <a href="/privacy/" style="text-decoration:none;" title="Privacy" class="privacy">Privacy</a> -</li>
|
||||
<!--<li style="display:inline;"> <a href="/search/" style="text-decoration:none;" title="Search" class="search">Search</a> -</li>-->
|
||||
<li style="display:inline;"> <a href="/blog/feed/" style="text-decoration:none;" title="Blog Feed" class="rss">Blog Feed</a></li>
|
||||
<li style="display:inline;"> <a href="/feed/" style="text-decoration:none;" title="Blog Feed" class="rss">Blog Feed</a></li>
|
||||
</ul>
|
||||
<ul style="list-style:none;margin-left:0px;text-align:center;">
|
||||
<li style="display:inline;"> <a href="{{ site.git }}" style="text-decoration:none;" title="Git" class="git">Git</a> -</li>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
<h2 style="display:none;">Navigation</h2>
|
||||
<ul style="list-style: none;">
|
||||
<li><a class="page-link" href="/" style="text-decoration:none;" title="/">/</a></li>
|
||||
<!-- <li><a class="page-link" href="/about/" style="text-decoration:none;" title="/about/">/about/</a></li>-->
|
||||
<li><a class="page-link" href="/blog/" style="text-decoration:none;" title="/blog/">/blog/</a></li>
|
||||
<li><a class="page-link" href="/about/" style="text-decoration:none;" title="/about/">/about/</a></li>
|
||||
<li><a class="page-link" href="/community/" style="text-decoration:none;" title="/community/">/community/</a></li>
|
||||
<li><a class="page-link" href="/contact/" style="text-decoration:none;" title="/contact/">/contact/</a></li><!--
|
||||
<li><a class="page-link" href="/development/" style="text-decoration:none;" title="/development/">/development/</a></li>
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
layout: post
|
||||
published: true
|
||||
author: hanez
|
||||
title: Init Fun!
|
||||
description: Blog - Init Fun!
|
||||
date: 2025-10-05
|
||||
_date_updated: 2024-02-07
|
||||
categories:
|
||||
- news
|
||||
- project
|
||||
tags:
|
||||
- fun
|
||||
- programming
|
||||
- static
|
||||
- dynamic
|
||||
- language
|
||||
---
|
||||
|
||||
Initial homepage... no content actually!
|
||||
|
||||
160
_posts/2026-02-25-announcing-fun.md
Normal file
160
_posts/2026-02-25-announcing-fun.md
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
---
|
||||
layout: post
|
||||
published: true
|
||||
author: hanez
|
||||
title: Announcing Fun 0.37.62
|
||||
date: 2026-02-25
|
||||
categories:
|
||||
- news
|
||||
- project
|
||||
tags:
|
||||
- fun
|
||||
- programming
|
||||
- static
|
||||
- dynamic
|
||||
- language
|
||||
---
|
||||
|
||||
## Announcing Fun 0.37.62: The Programming Language That Makes You Have Fun!
|
||||
|
||||
We're excited to announce the release of Fun version 0.37.62, the latest iteration of our experimental programming language that prioritizes simplicity, consistency, and—most importantly—joy in coding.
|
||||
|
||||
## What's Fun All About?
|
||||
|
||||
Fun is a highly strict yet highly simple programming language that draws inspiration from Bash, C, Lua, PHP, Python, and Rust. If you love Python's clean syntax but want something with stricter rules and built-in type safety, Fun might be worth exploring. It's dynamically typed with optional static typing, written in C (C99) and Fun itself, and designed to be small, embeddable, and hackable.
|
||||
|
||||
## Important: This is an Experiment
|
||||
Please note: Fun is an experimental language and should be treated as such. While Fun works, it has many known and unknown bugs. We will not declare Fun as stable until we reach the 1.0 release. This is a project born out of curiosity and passion for elegant code, not production readiness—at least not yet.
|
||||
|
||||
## What Makes Fun... Fun?
|
||||
|
||||
### Philosophy
|
||||
- Fun is built on the idea that coding should be enjoyable, elegant, and consistent. Our manifesto includes core principles like:
|
||||
- Fun is Fun – Programming should spark creativity, not frustration
|
||||
- Fun Uses Nothing – Minimalism is power; no unnecessary features or syntax variations
|
||||
- Indentation is Truth – Two spaces, always (no tabs, no debates, no four-space wars)
|
||||
- One Way to Do It – No clutter, no 15 ways of writing the same thing. Simplicity means clarity
|
||||
- Hackable by Nature – Small and embeddable, like Lua. Easy to understand, extend, and tinker with
|
||||
- Beautiful Defaults – A language that doesn't need linters, formatters, or style guides. Beauty is built in
|
||||
|
||||
## What's New in v0.3 (and 0.37.62)
|
||||
|
||||
- This release brings Fun closer to its vision with significant language enhancements:
|
||||
- Object-Oriented Programming Classes and objects with methods, constructors, and inheritance using extends
|
||||
- Explicit this in method definitions for clarity
|
||||
- Private members by convention (leading underscore)
|
||||
- Dot-call syntax sugar for clean method invocations: obj.method(a, b)
|
||||
|
||||
<pre>
|
||||
class Counter
|
||||
value = 0
|
||||
fun inc(this)
|
||||
this.value = this.value + 1
|
||||
return this.value
|
||||
|
||||
c = Counter()
|
||||
print(c.inc()) // 1
|
||||
</pre>
|
||||
|
||||
## Module System
|
||||
|
||||
- Namespaced includes with #include <path> as alias for clean imports
|
||||
- Organize code into reusable modules without naming conflicts
|
||||
|
||||
<pre>
|
||||
#include <utils/math.fun> as m
|
||||
print(m.add(2, 3)) // 5
|
||||
</pre>
|
||||
|
||||
## Enhanced Type System
|
||||
|
||||
- Fixed-width integers: int8, uint8, int16, uint16, int32, uint32, int64, uint64
|
||||
- Maps/dictionaries: map<K, V> with literal syntax { "key": value }
|
||||
- Typed arrays: array<T> for type-safe collections
|
||||
- Byte type for low-level operations
|
||||
|
||||
## Concurrency Support
|
||||
|
||||
- Thread primitives: thread_spawn, thread_join, and sleep
|
||||
- Write concurrent programs with ease
|
||||
|
||||
<pre>
|
||||
fun square(n)
|
||||
sleep(100)
|
||||
return n * n
|
||||
|
||||
tid = thread_spawn(square, 5)
|
||||
print(thread_join(tid)) // 25
|
||||
</pre>
|
||||
|
||||
## Control Flow Improvements
|
||||
|
||||
- Loop control: break and continue statements
|
||||
- Exception handling: try/catch/finally syntax (runtime implementation evolving)
|
||||
|
||||
## System and Network Integration
|
||||
|
||||
- Process execution: Blocking (exec, system) and non-blocking (nexec, nspawn) with process management
|
||||
- TCP and Unix domain sockets: Build networked applications
|
||||
- Serial port support: Communicate with hardware devices
|
||||
- Environment variables: Access with env(NAME)
|
||||
- CLI argument handling: Parse command-line arguments
|
||||
|
||||
## Additional Features
|
||||
|
||||
- Bitwise operations: band, bor, bxor, bnot, shl
|
||||
- Rich standard library with modules for cryptography (MD5, SHA1/256/384/512, CRC32), encoding (Base64, hex), JSON, XML, INI, regular expressions (PCRE2), datetime utilities, and more
|
||||
- Optional extensions for cURL, SQLite/libSQL, PC/SC smart cards, and Tk GUI toolkit
|
||||
|
||||
## Core Language Features
|
||||
|
||||
- Fun provides a clean, readable syntax with:
|
||||
- Strict indentation-based structure (2 spaces, no semicolons)
|
||||
- Type safety with no implicit numeric coercions
|
||||
- Bounds-checked operations to prevent common errors
|
||||
- Higher-order functions: map, filter, reduce for functional programming
|
||||
- Multiple return values from functions
|
||||
- Comprehensive built-ins for common tasks
|
||||
|
||||
## The Community: Fun Unites Nerds
|
||||
|
||||
Fun isn't about being the fastest or most feature-rich language—it's about sharing the joy of coding. We welcome contributors who are:
|
||||
|
||||
- Respectful
|
||||
- Curious
|
||||
- Creative
|
||||
|
||||
A language that feels like home for developers who love minimal, elegant tools, believe consistency is freedom, and want to write code that looks good and feels good.
|
||||
|
||||
## Want to Participate?
|
||||
|
||||
Everybody is welcome to participate! However, before you can get started, you need to contact me at hanez@fun-lang.org to request an account on our Git server.
|
||||
|
||||
Important: Fun is not developed on third-party Git servers like GitHub or GitLab. All Fun infrastructure is self-hosted at git.xw3.org. This keeps us independent and aligned with the hacker spirit of the project—we control our tools, our code, and our community.
|
||||
|
||||
## Getting Started
|
||||
|
||||
If you're curious about Fun, check out:
|
||||
|
||||
- [Website](https://fun-lang.xyz)
|
||||
- [Git Repository](https://git.xw3.org/fun/fun)
|
||||
- [Fun Handbook](https://git.xw3.org/fun/fun/src/branch/main/docs/handbook.md)
|
||||
- [Specification v0.3](https://git.xw3.org/fun/fun/src/branch/main/spec/v0.3.md)
|
||||
- [Examples](https://git.xw3.org/fun/fun/src/branch/main/examples)
|
||||
- [Library modules](https://git.xw3.org/fun/fun/src/branch/main/lib)
|
||||
- [Community](https://fun-lang.xyz/community/)
|
||||
|
||||
The examples directory contains demonstrations of most Fun features, from basic "Hello, World!" to threading, networking, classes, and more. The lib directory includes modules written in Fun itself—and in the future, most enhancements will be written in Fun rather than C.
|
||||
|
||||
## The Road Ahead
|
||||
|
||||
Documentation is a work in progress as we continue debugging, fixing bugs, and evolving the language. Complete API documentation will follow in future releases. Version 0.37.62 represents substantial progress, but remember: this is an experiment, and stability won't be declared until we reach 1.0.
|
||||
|
||||
Fun may not change the world, but it aims to make programming a little more fun. We're on a journey, and we'd love to have you along for the ride—bugs and all.
|
||||
|
||||
Fun is and will always be 100% free under the terms of the Apache-2.0 License.
|
||||
|
||||
Happy coding, and remember: Fun is Fun!
|
||||
|
||||
Johannes Findeisen
|
||||
you@hanez.org
|
||||
File diff suppressed because one or more lines are too long
140
about/about.md
Normal file
140
about/about.md
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
---
|
||||
layout: default
|
||||
title: /about/index.fun
|
||||
description: About
|
||||
metasub: news
|
||||
noToc: false
|
||||
tags:
|
||||
- xw3
|
||||
- project
|
||||
- cgi
|
||||
- static
|
||||
- jekyll
|
||||
_description: The programming language that just makes fun!
|
||||
noComments: true
|
||||
permalink: /about/
|
||||
---
|
||||
|
||||
<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 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](https://www.gnu.org/software/bash/){:class="ext"}**, **[C](https://en.wikipedia.org/wiki/The_C_Programming_Language){:class="ext"}**, **[Lua](https://www.lua.org/){:class="ext"}**, PHP, **[Python](https://www.python.org/){: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](https://opensource.org/license/apache-2-0){: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**<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.
|
||||
|
||||
## 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](https://fun-lang.xyz/community/) 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 (only Linux actually)
|
||||
|
||||
- [CGI](https://en.wikipedia.org/wiki/Common_Gateway_Interface){:class="ext"} support builtin using [kcgi](https://kristaps.bsd.lv/kcgi/){:class="ext"} (optional) <span style="color:red;font-weight:bold;">☐</span>
|
||||
- [cURL](https://curl.se/){:class="ext"} support builtin using [libcurl](https://curl.se/libcurl/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [INI](https://en.wikipedia.org/wiki/INI_file){:class="ext"} support builtin using [iniparser](https://gitlab.com/iniparser/iniparser/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [JSON](https://www.json.org/){:class="ext"} support builtin using [json-c](https://github.com/json-c/json-c){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [libSQL](https://github.com/tursodatabase/libsql){:class="ext"} support builtin as a compatible alternative to SQLite (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [PCRE2](https://pcre2project.github.io/pcre2/){:class="ext"} support builtin for Perl-Compatible Regular Expressions (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [PCSC](https://pcscworkgroup.com/){:class="ext"} smart card support builtin using [PCSC lite](https://pcsclite.apdu.fr/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [SQLite](https://sqlite.org/){:class="ext"} support builtin (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [Tk](https://www.tcl-lang.org/){:class="ext"} support builtin for GUI application development (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [XML](https://www.w3.org/XML/){:class="ext"} support builtin using [libxml2](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
|
||||
<span style="color:green;font-weight:bold;">☑</span> = Done / <span style="color:red;font-weight:bold;">☐</span> = Planned or in progress.
|
||||
|
||||
Note: Not all of the above features will be implemented. Those who are marked "Done" will probably remain in Fun, but I don't know actually... ;)
|
||||
|
||||
There are some libs written in Fun available in the [./lib/](https://git.xw3.org/fun/fun/src/branch/main/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](https://git.xw3.org/fun/fun/src/branch/main/docs/handbook.md){:class="ext"}.
|
||||
|
||||
In the [./examples/](https://git.xw3.org/fun/fun/src/branch/main/examples){:class="ext"} directory should be an example of most Fun features.
|
||||
|
||||
Fun internals are found directly in the [./src/](https://git.xw3.org/fun/fun/src/branch/main/src){:class="ext"} diretory. Fun [Opcodes](https://en.wikipedia.org/wiki/Opcode){:class="ext"} are found in [./src/vm/](https://git.xw3.org/fun/fun/src/branch/main/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
|
||||
|
||||
- [https://git.xw3.org/fun/fun/](https://git.xw3.org/fun/fun/){:class="git"}
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
title: /blog/index.fun
|
||||
subtitle: This is a work in progress... More to come soon!
|
||||
description: Blog
|
||||
metasub: news
|
||||
noToc: true
|
||||
tags:
|
||||
- fun
|
||||
- project
|
||||
- dynamic
|
||||
- static
|
||||
- programming
|
||||
- blog
|
||||
- language
|
||||
permalink: /blog/
|
||||
---
|
||||
|
||||
<div class="post">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title" id="terminal">{{ site.title }} {{ page.title }}</h1>
|
||||
<p>{{ page.subtitle }}</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<h2>Latest posts - <a href="/blog/feed/" title="Blog Feed" class="rss">Blog Feed</a></h2>
|
||||
|
||||
{% for post in site.tags.pinned %}
|
||||
<article class="post-content">
|
||||
<h3><a href="{{ post.url }}" title="{{ post.title }}">{{ post.url }}</a> <span style="cursor:help; float: right;" title="Pinned Post!">📌</span></h3>
|
||||
<p class="post-meta">{{ post.date | date: "%b %-d, %Y %H:%M:%S" }} ({{ post.date | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }})
|
||||
{% if post.date_updated %} - Edited: {{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" }}{% endif %} ({{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }}){% if post.author %}, <a href="{{ site.git_short }}/{{ post.author }}" target="_blank" class="user">{{ post.author }}</a>{% endif %}</p>
|
||||
{{ post.content | truncatewords: site.truncatewords_length }}
|
||||
<p style="text-align:right;"><a href="{{ post.url }}" title="{{ post.url }}">[Read post]</a></p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% unless post.tags contains 'pinned' %}
|
||||
<article class="post-content">
|
||||
<h3><a href="{{ post.url }}" title="{{ post.title }}">{{ post.url }}</a></h3>
|
||||
<p class="post-meta">{{ post.date | date: "%b %-d, %Y %H:%M:%S" }} ({{ post.date | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }})
|
||||
{% if post.date_updated %} - Edited: {{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" }}{% endif %} ({{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }}){% if post.author %}, <a href="{{ site.git_short }}/{{ post.author }}" target="_blank" class="user">{{ post.author }}</a>{% endif %}</p>
|
||||
{{ post.content | truncatewords: site.truncatewords_length }}
|
||||
<p style="text-align:right;"><a href="{{ post.url }}" title="{{ post.url }}">[Read post]</a></p>
|
||||
</article>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
<h2>$ cd</h2>
|
||||
|
||||
<div id="pages">
|
||||
{% if paginator.page == 1 %}<a href="/blog/" class="active" title="Page 1">1</a>{% else %}<a href="/blog/" title="Page 1">1</a>{% endif %}
|
||||
{% for count in (2..paginator.total_pages) %}
|
||||
{% if count == paginator.page %}<a href="/{{ count }}/" class="active" title="Page {{ count }}">{{ count }}</a>{% else %}<a href="/{{ count }}/" title="Page {{ count }}">{{ count }}</a>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
layout:
|
||||
permalink: /blog/feed/
|
||||
permalink: /feed/
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
156
index.md
156
index.md
|
|
@ -1,139 +1,65 @@
|
|||
---
|
||||
layout: default
|
||||
title: /index.fun
|
||||
description: Homepage
|
||||
description: Blog
|
||||
metasub: news
|
||||
noToc: false
|
||||
noToc: true
|
||||
tags:
|
||||
- xw3
|
||||
- fun
|
||||
- project
|
||||
- cgi
|
||||
- dynamic
|
||||
- static
|
||||
- jekyll
|
||||
_description: The programming language that just makes fun!
|
||||
noComments: true
|
||||
- programming
|
||||
- blog
|
||||
- language
|
||||
permalink: /
|
||||
---
|
||||
|
||||
<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>
|
||||
<p>{{ page.subtitle }}</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
## What is Fun?
|
||||
<h2>What is Fun?</h2>
|
||||
|
||||
Fun is an experiment, just for fun, but Fun works!
|
||||
<p>Fun is an experiment, just for fun, but Fun works!</p>
|
||||
|
||||
Fun is a highly strict programming language, but also highly simple. It looks like Python (My favorite language), but there are differences.
|
||||
<p>Fun is a highly strict programming language, but also highly simple. It looks like Python (My favorite language), but there are differences.</p>
|
||||
|
||||
Influenced by **[Bash](https://www.gnu.org/software/bash/){:class="ext"}**, **[C](https://en.wikipedia.org/wiki/The_C_Programming_Language){:class="ext"}**, **[Lua](https://www.lua.org/){:class="ext"}**, PHP, **[Python](https://www.python.org/){:class="ext"}**, and Rust (Most influences came from linked languages).
|
||||
<p>Fun is and will ever be 100% free under the terms of the <a href="https://opensource.org/license/apache-2-0" class="ext">Apache-2.0 License</a>.</p>
|
||||
|
||||
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"}.
|
||||
<h2>Blog - <a href="/feed/" title="Blog Feed" class="rss">Blog Feed</a></h2>
|
||||
|
||||
## Idea
|
||||
{% for post in site.tags.pinned %}
|
||||
<article class="post-content">
|
||||
<h3><a href="{{ post.url }}" title="{{ post.title }}">{{ post.url }}</a> <span style="cursor:help; float: right;" title="Pinned Post!">📌</span></h3>
|
||||
<p class="post-meta">{{ post.date | date: "%b %-d, %Y %H:%M:%S" }} ({{ post.date | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }})
|
||||
{% if post.date_updated %} - Edited: {{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" }}{% endif %} ({{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }}){% if post.author %}, <a href="{{ site.git_short }}/{{ post.author }}" target="_blank" class="user">{{ post.author }}</a>{% endif %}</p>
|
||||
{{ post.content | truncatewords: site.truncatewords_length }}
|
||||
<p style="text-align:right;"><a href="{{ post.url }}" title="{{ post.url }}">[Read post]</a></p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
- Simplicity
|
||||
- Consistency
|
||||
- Joy in coding
|
||||
- Fun!
|
||||
{% for post in site.posts %}
|
||||
{% unless post.tags contains 'pinned' %}
|
||||
<article class="post-content">
|
||||
<h3><a href="{{ post.url }}" title="{{ post.title }}">{{ post.url }}</a></h3>
|
||||
<p class="post-meta">{{ post.date | date: "%b %-d, %Y %H:%M:%S" }} ({{ post.date | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }})
|
||||
{% if post.date_updated %} - Edited: {{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" }}{% endif %} ({{ post.date_updated | date: "%b %-d, %Y %H:%M:%S" | date: "%Z" }}){% if post.author %}, <a href="{{ site.git_short }}/{{ post.author }}" target="_blank" class="user">{{ post.author }}</a>{% endif %}</p>
|
||||
{{ post.content | truncatewords: site.truncatewords_length }}
|
||||
<p style="text-align:right;"><a href="{{ post.url }}" title="{{ post.url }}">[Read post]</a></p>
|
||||
</article>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
## Characteristics
|
||||
<h2>$ cd</h2>
|
||||
|
||||
- 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**<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.
|
||||
|
||||
## 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](https://fun-lang.xyz/community/) 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 (only Linux actually)
|
||||
|
||||
- [CGI](https://en.wikipedia.org/wiki/Common_Gateway_Interface){:class="ext"} support builtin using [kcgi](https://kristaps.bsd.lv/kcgi/){:class="ext"} (optional) <span style="color:red;font-weight:bold;">☐</span>
|
||||
- [cURL](https://curl.se/){:class="ext"} support builtin using [libcurl](https://curl.se/libcurl/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [INI](https://en.wikipedia.org/wiki/INI_file){:class="ext"} support builtin using [iniparser](https://gitlab.com/iniparser/iniparser/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [JSON](https://www.json.org/){:class="ext"} support builtin using [json-c](https://github.com/json-c/json-c){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [libSQL](https://github.com/tursodatabase/libsql){:class="ext"} support builtin as a compatible alternative to SQLite (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [PCRE2](https://pcre2project.github.io/pcre2/){:class="ext"} support builtin for Perl-Compatible Regular Expressions (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [PCSC](https://pcscworkgroup.com/){:class="ext"} smart card support builtin using [PCSC lite](https://pcsclite.apdu.fr/){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [SQLite](https://sqlite.org/){:class="ext"} support builtin (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
- [Tk](https://www.tcl-lang.org/){:class="ext"} support builtin for GUI application development (optional) <span style="color:red;font-weight:bold;">☐</span>
|
||||
- [XML](https://www.w3.org/XML/){:class="ext"} support builtin using [libxml2](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home){:class="ext"} (optional) <span style="color:green;font-weight:bold;">☑</span>
|
||||
|
||||
<span style="color:green;font-weight:bold;">☑</span> = Done / <span style="color:red;font-weight:bold;">☐</span> = Planned or in progress.
|
||||
|
||||
Note: Not all of the above features will be implemented. Those who are marked "Done" will probably remain in Fun, but I don't know actually... ;)
|
||||
|
||||
There are some libs written in Fun available in the [./lib/](https://git.xw3.org/fun/fun/src/branch/main/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](https://git.xw3.org/fun/fun/src/branch/main/docs/handbook.md){:class="ext"}.
|
||||
|
||||
In the [./examples/](https://git.xw3.org/fun/fun/src/branch/main/examples){:class="ext"} directory should be an example of most Fun features.
|
||||
|
||||
Fun internals are found directly in the [./src/](https://git.xw3.org/fun/fun/src/branch/main/src){:class="ext"} diretory. Fun [Opcodes](https://en.wikipedia.org/wiki/Opcode){:class="ext"} are found in [./src/vm/](https://git.xw3.org/fun/fun/src/branch/main/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
|
||||
|
||||
- [https://git.xw3.org/fun/fun/](https://git.xw3.org/fun/fun/){:class="git"}
|
||||
<div id="pages">
|
||||
{% if paginator.page == 1 %}<a href="/blog/" class="active" title="Page 1">1</a>{% else %}<a href="/blog/" title="Page 1">1</a>{% endif %}
|
||||
{% for count in (2..paginator.total_pages) %}
|
||||
{% if count == paginator.page %}<a href="/{{ count }}/" class="active" title="Page {{ count }}">{{ count }}</a>{% else %}<a href="/{{ count }}/" title="Page {{ count }}">{{ count }}</a>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue