2026-07-03 16:15:02 +03:00
2026-07-03 16:12:25 +03:00
2026-07-03 16:12:25 +03:00
2026-07-03 12:21:19 +03:00
2026-07-03 11:30:18 +03:00
2026-07-03 10:02:18 +03:00
2026-07-03 16:12:25 +03:00
2026-07-02 23:26:38 +03:00
2026-07-03 16:12:25 +03:00
2026-07-03 16:15:02 +03:00
2026-07-03 16:12:25 +03:00

Clyx programming language

About

Clyx (pronounced like clicks) is a concatenative, stack-oriented, interpreted programming language designed for simplicity, minimalism, and metaprogramming capabilities.

Clyx aims for maximum portability and can be implemented in any modern runtime environment that supports data structures defined in JSON (numbers, strings, lists and key-value dictionaries). Extra features varying in portability include filesystem support and TCP socket I/O.

The core spec of Clyx is mostly stable but the standard library is still a work-in-progress.

Language features

  • Single, unbounded data stack that can hold numbers, strings and quotations (lists)
  • Forth-like parsing, RPN (postfix notation) and word definition mechanics
  • Tcl-like quotation (list) bracket syntax
  • Janet-like quotation (list) operations
  • Homoiconicity: quotations and strings can be manipulated as data and executed dynamically
  • Character I/O (implementation-dependent)
  • File I/O (may not support all features on some targets)
  • TCP socket I/O (may not be supported on some targets)
  • Host language interop (may not be supported on some targets, only to be used when nothing else helps)
  • Platform-agnostic standard library
  • Ability to include custom modules into the current runtime context (depends on file I/O capabilities)

Implementations

Installation

Depending on the implementation, there are several installation ways.

Reference Python (CPython) implementation installation

For the easiest way to install the reference Python-based Clyx implementation, pipx is recommended:

pipx install "git+https://codeberg.org/luxferre/clyx.git#subdirectory=clyx-python"

This will install the REPL as clyx into your current environment.

Then, you can just run pipx upgrade clyx to upgrade to the new release versions whenever they come out.

Reference implementation for MicroPython

Clone this repo, then run sh dist-python.sh. A dist/clyx_py/clyx directory will appear, which will contain all the files necessary to run micropython clyx.py [prog.clx] on the desktop or copy them to the target device.

Reference implementation for CircuitPython + T-DeckARD runtime

Clone this repo, then mount your T-Deck's CircuitPython volume, and then run:

sh dist-python.sh /path/to/mounted/volume/app/clyx

This will install Clyx as a T-DeckARD applet.

Reference Go implementation installation

To install the Go-based Clyx implementation directly from Git, run:

go install codeberg.org/luxferre/clyx@latest

For maximum performance, you can pass optimization flags to build a stripped binary without debug symbols, bounds checks, or inlining:

go install -a -trimpath -gcflags=all="-l -B -e" -ldflags "-s -w" codeberg.org/luxferre/clyx@latest

This will install the executable as clyx into your $GOPATH/bin directory. To upgrade to the latest version at any time, simply run the same command again.

Alternatively, to compile and build it locally, navigate to the clyx-go directory and run:

cd clyx-go
make

This will build the clyx executable.

Usage

Note: this section describes how to run the interpreter itself. For the language manual, refer to Clyx Reference Manual.

All core implementations must accept a .clx file to run (either via command line or via library call parameter). The REPL is implemented in Clyx itself and resides in the clyx_repl.clx file.

Running the reference Python implementation

If Clyx is installed as a PyPi package, just use clyx [prog.clx] to run the REPL or a program.

Otherwise, to run the REPL, run [micro]python clyx.py command from the directory created by ./dist-python.sh. Pass a .clx file additionally to run a Clyx program directly.

Running as a T-DeckARD applet

To run the REPL inside T-DeckARD:

from app.clyx import clyx
clyx.repl()

To run a Clyx source file directly, issue clyx.clyx('path/to/file.clx') instead.

Running the Go implementation

To run the REPL, execute the compiled clyx binary without arguments:

./clyx

To run a program directly, pass the path to the .clx file as an argument:

./clyx path/to/program.clx

Caveats:

  1. The entire operation is rather slow (which is expected for an interpreted runtime on top of CircuitPython on this class of machines) and may sometimes overflow the allocated (native) Python stack. As such, it's not recommended to src files from the REPL if you can run them directly instead.
  2. Don't forget to mount an SD card or run unlock_rootfs() if you want to use file writing capabilities inside T-DeckARD environment.

FAQ

Where does the name Clyx originate from?

Similarly to LVTL and LTTB, the prototype of Clyx had been called LPLF (Luxferre's Pointer-Less Forth). However, as the finalized language began to differ from the Forth standard in too many ways, a decision was made to focus on the concatenative nature itself. Thus, the word ConCat had been chosen, which was quickly modded into ConLynx and then naturally shortened to Clyx.

Additionally, this name can be viewed as an acronym hinting at the order some binary operations pop their operands from the stack: "Compute by Loading Y, then X".

Is this language high-level or low-level?

More of a high-level one (because you don't have any memory control), but in fact it can be both.

Clyx combines the conceptual simplicity of Forth (and concatenative/RPN programming in general) with list definition syntax, list manipulation and metaprogramming capabilities of Janet and Tcl, making it much more practical for everyday tasks. At the same time, you can build abstraction levels as high as you need to, making it a nice choice for creating custom DSLs (domain-specific languages), especially with the next word that pushes the next logical token onto the stack, allowing to change token processing order.

Why not just pick up a Forth instead?

Forth is good if you are fine with only being able to push integers onto the stack and building all your abstractions using direct memory access. Clyx, on the other hand, does not have direct memory access because it was designed for the systems that might not even give you one, but you can do so much more with the data types that it allows you to push onto the stack without involving any trickery.

While diverging from some "purity" aspects, Clyx is a decent choice for newcomers that want to try out a totally new programming paradigm without investing too much time into fighting the language's quirks.

What do I need to do to create my own Clyx implementation?

Just port the core interpreter along with the 48 primitive words, stubbing out the words that cannot be supported by the target platform if there are any, so that if a program that e.g. uses nopen runs on a non-networked host environment, or a program that uses hseval runs on a C-based interpreter, then the user would get a clear message that an unsupported core primitive word has been encountered and the program has been terminated because of that.

Apart from that, your implementation needs to be able to load lib.clx (standard library source) upon initialization, and clyx_repl.clx upon passing no parameters (if it is CLI-based).

Doesn't hseval primitive make Clyx programs non-portable across different implementations?

Yes, it does, because it works differently across different host languages (and Clyx implementations like clyx-go are allowed to not support it at all), so it must only be used as a last resort when any other attempts to interact with the outside world are unsuccessful. Additionally, using hseval introduces extra security risks. Nevertheless, this primitive had been added in order to enable some host-specific interoperability that would otherwise be impossible or very cumbersome to implement, such as browser-based deployments.

In other words, hseval is sometimes very useful in very specific cases, but please avoid using it unless you have a really good reason to use it.

Credits

Created by Luxferre in 2026, released into the public domain with no warranties.

Languages
Go 66.7%
Python 32%
Shell 0.8%
Makefile 0.5%