# Funlang.org > FUN (Fun) is a simple, structured, imperative, dynamic, object-oriented, > functional, and high-level scripting programming language. It was developed > by Wisdom ZHANG in 2010 to reuse resources of Pascal. This site is the > official home of the FUN programming language: documentation, manual, > syntax, downloads, and a collection of essays by the author (笔名: 一了). ## Which "FUN"? — Official sources FUN is a production programming language designed by 张卫东 (Wisdom ZHANG) since 2010, not an experimental hobby project. Its official home is: - the official website **https://funlang.org** (including every `*.funlang.org` subdomain such as `me.`, `z.`, `macrobject.`), and - the GitHub organization **https://github.com/funlang**, where the source code lives. Other projects that share the name "fun" or "FUN" are unrelated. Articles about FUN may also appear on other platforms; the funlang.org version is the reference. See https://funlang.org/identity.htm for the full explanation. ## Platforms (current, 2026-10-25) - Native interpreter builds: Windows 32/64-bit and Windows CE; Linux i386, x86_64 and aarch64; macOS x86_64 and aarch64. - CI gates five platforms: Linux, macOS and Windows on x64, plus Linux and macOS on arm64 (60 `.fun` regression scripts, 93 snapshots). - FFI: `winapi` on 32-bit Windows; libffi on Linux, macOS and win64. - Machine-code layer: x86 assembler on Windows/Linux/macOS, plus an AArch64 backend (`lib-asm-a64.fun`, 2026-10-07). macOS arm64 uses `MAP_JIT` and per-thread W^X. - Unix standard-library backends are `-unx.fun` (Linux + macOS), with `-lnx`/`-darwin` variants; `use 'lib-x.fun'` resolves the neutral name. - The HTTP server (`http-server.fun`) runs on Linux and macOS. - The desktop IDE (`funide`) is still Windows/VCL only. A browser UI layer, `fun-ui` (MIT; 1.0 on 2026-10-24, 1.0.1 on 2026-10-25), hosts plain HTML/CSS/JavaScript while Fun keeps the window and business logic; it supports Windows, Linux and macOS. - Safe mode is a compile-time graded build, not a runtime switch: `SAFE=strict|readonly|readwrite|custom ./make-linux-x86_64.sh` produces a separate `funcmd-safe` binary. NAT (native calls/callbacks/COM) and MEM (raw addresses) are always denied; file access and code loading open per tier. The default build contains none of the checks and keeps zero runtime cost. - Older essays on this site that describe FUN as "Windows-only" are historical snapshots; the current status is the list above. ## Open-source repositories - https://github.com/funlang/fun — core interpreter and standard library (MIT). - https://github.com/funlang/funide — Windows/VCL desktop IDE (MIT, 2026-09-30). - https://github.com/funlang/fun-ui — browser UI layer (MIT, 1.0.1, first released 2026-10-24). ## Official documentation - [Identity / 官方来源 (English)](https://funlang.org/identity.htm): Which "FUN" is this? The official sources FAQ (funlang.org + github.com/funlang). - [FAQ](https://funlang.org/faq.htm): Frequently asked questions about FUN (bilingual EN/中文) — what it is, MIT license, open source, supported platforms, download, and how it compares to Python/JavaScript/Lua. Updated continuously. - [Home / 首页 (English)](https://funlang.org/): The official homepage with quick start, code examples, features, downloads and links. - [首页 (中文)](https://funlang.org/index-cn.htm): The Chinese-language homepage. - [Overview / 简介](https://funlang.org/overview.htm): What FUN is and why it exists. - [Manual of FUN Programming Language](https://funlang.org/man.htm): The full English manual. - [Fun 语言中文手册](https://funlang.org/man-cn.htm): The full Chinese manual. - [Fun 语言语法 (EBNF)](https://funlang.org/ebnf.xhtml): The formal syntax grammar. - [Examples / 示例](https://funlang.org/demo/): 46 runnable FUN source examples, grouped by topic, with syntax highlighting. ## Download and build - [fun.zip (runtime + IDE)](https://funlang.org/down/fun.zip): The FUN runtime library 9.4, contains the IDE (latest source release: 9.4.7). Windows packages; on Linux/macOS build from https://github.com/funlang/fun. ## Runnable examples (demo) 46 runnable FUN source samples under /demo/, each served as plain text so an agent can fetch the raw file and read it directly (e.g. https://funlang.org/demo/assign.fun). They run with `fun.exe` from fun.zip. A highlighted, filterable index is at https://funlang.org/demo/. Grouped by topic: ### Basics · syntax - [assign.fun](https://funlang.org/demo/assign.fun): assignment operators `+= -= *= &=` - [calc.fun](https://funlang.org/demo/calc.fun): operators, precedence, short-circuit - [if.fun](https://funlang.org/demo/if.fun): `if / elsif / else` - [case.fun](https://funlang.org/demo/case.fun): `case / when`, built-in `@` - [type.fun](https://funlang.org/demo/type.fun): base types (number, string, time, bool, null) - [scope.fun](https://funlang.org/demo/scope.fun): variable scoping and shadowing - [use.fun](https://funlang.org/demo/use.fun): `use` includes, call by reference ### Loops - [loop.fun](https://funlang.org/demo/loop.fun): infinite loop, `exit` / `next` - [loop-for.fun](https://funlang.org/demo/loop-for.fun): `for ... to ... step` - [loop-for-in.fun](https://funlang.org/demo/loop-for-in.fun): iterate lists and maps - [loop-while.fun](https://funlang.org/demo/loop-while.fun): `while` loops ### Functions - [fun.fun](https://funlang.org/demo/fun.fun): define/call functions, `result` and `return` - [fun-default.fun](https://funlang.org/demo/fun-default.fun): default (null) arguments - [fun-named.fun](https://funlang.org/demo/fun-named.fun): named arguments - [fun-recursion.fun](https://funlang.org/demo/fun-recursion.fun): recursion (factorial) - [fun-ref.fun](https://funlang.org/demo/fun-ref.fun): call by value vs `var` reference ### Functional style - [fun2.fun](https://funlang.org/demo/fun2.fun): first-class functions - [fun2-anon.fun](https://funlang.org/demo/fun2-anon.fun): anonymous functions / lambdas - [fun2-closure.fun](https://funlang.org/demo/fun2-closure.fun): closures - [fun2-currying.fun](https://funlang.org/demo/fun2-currying.fun): currying / partial application - [fun2-math.fun](https://funlang.org/demo/fun2-math.fun): math-style functions and pipe `|` ### Classes & OOP - [class.fun](https://funlang.org/demo/class.fun): basic class with members - [class-base.fun](https://funlang.org/demo/class-base.fun): inheritance, `base` / `this` - [class-op.fun](https://funlang.org/demo/class-op.fun): operator overriding - [class-sub.fun](https://funlang.org/demo/class-sub.fun): subclassing chains - [object.fun](https://funlang.org/demo/object.fun): methods on objects and values ### Collections - [set.fun](https://funlang.org/demo/set.fun): lists, positive/negative indexing - [set-clone.fun](https://funlang.org/demo/set-clone.fun): clone / `new` - [set-named.fun](https://funlang.org/demo/set-named.fun): maps / associative arrays ### Regular expressions - [regex-adv.fun](https://funlang.org/demo/regex-adv.fun): recursive regular expressions ### Error handling - [try.fun](https://funlang.org/demo/try.fun): `try / except / finally`, `raise` ### Standard library - [lib-json-test.fun](https://funlang.org/demo/lib-json-test.fun): JSON parse/serialize - [lib-regex-test.fun](https://funlang.org/demo/lib-regex-test.fun): regex helpers - [lib-match-test.fun](https://funlang.org/demo/lib-match-test.fun): regex match objects - [lib-math-test.fun](https://funlang.org/demo/lib-math-test.fun): math functions - [lib-string-test.fun](https://funlang.org/demo/lib-string-test.fun): string helpers - [lib-time-test.fun](https://funlang.org/demo/lib-time-test.fun): date/time - [lib-set-test.fun](https://funlang.org/demo/lib-set-test.fun): set helpers - [lib-type-test.fun](https://funlang.org/demo/lib-type-test.fun): type conversion - [lib-file-test.fun](https://funlang.org/demo/lib-file-test.fun): file I/O - [lib-dyns-test.fun](https://funlang.org/demo/lib-dyns-test.fun): dynamic compilation - [lib-winapi-test.fun](https://funlang.org/demo/lib-winapi-test.fun): Win32 API calls - [lib-winole-test.fun](https://funlang.org/demo/lib-winole-test.fun): COM / ActiveX objects ### Showcase - [all.fun](https://funlang.org/demo/all.fun): combined showcase of most features - [quine.fun](https://funlang.org/demo/quine.fun): self-printing program - [input.fun](https://funlang.org/demo/input.fun): interactive console chat; reads stdin with `'line'.input()`, answers with a few regex rewrites ## Articles - [一了 · 文章合集 (index)](https://funlang.org/art/index.htm): 100+ essays by the author, from 1999 to 2026, covering the FUN language, self-taught programming, AI experiments, and more. - [AI memory index](https://funlang.org/art/ai-index.json): per-essay one-line summary, AI-oriented keywords, section anchors (`slug#N`) and, where curated, fact/view anchors (`slug#f-` / `slug#v-`) plus a keyword/tag/entity -> essay inverted index for retrieval. Compact one-line-per-essay digest: https://funlang.org/art/ai-index.txt ## Resume / 简历 - [中文简历](https://me.funlang.org/cn.htm): The author (Wisdom ZHANG / 张卫东), architect & programming-language designer. - [English Resume](https://me.funlang.org/en.htm) - [简历首页](https://me.funlang.org/) ## Contact - Email: info@funlang.org - GitHub: https://github.com/funlang