(rontolisp) docs

Clojure (experimental)

Experimental. rontolisp reads a small subset of Clojure -- just large enough to run a Clojure-shaped program on every backend. Conformance is partial by design and nothing here is a subset or compatibility promise. Use it to try a Clojure program on the JVM or WebAssembly; write Common Lisp for anything you need to keep working. Interop runs on the interpreter and the JVM only: the wasm backends reject the java: surface it lowers to.

A .clj file is read as Clojure; --source-language clojure says so for any other file. The language is picked per file, so one program may mix the two.

rontolisp hello.clj                                # interpreter
rontolisp hello.clj -o Hello.class && java Hello   # JVM
rontolisp hello.clj -o hello.wasm && wasmtime run hello.wasm
rontolisp hello.clj -o hello-c.wasm --component && wasmtime run hello-c.wasm
rontolisp prog.txt --source-language clojure       # any extension

--no-gc is refused: that backend has no pairs, symbols or closures.

The supported surface, one page per name, is the Reference: the core binding and control forms with sequential and map destructuring, the threading macros, the seq verbs over strict list views of every collection, the persistent map and set operations over equal hash tables, the numeric and predicate core, atoms and volatiles, multimethods with hierarchies, try/catch/finally with ex-info, namespaces across files (ns/require of project files) and clojure.string, clojure.set, clojure.test with its summary runner, and Java interop. What each form lowers to, and what stays refused, is Semantics; the reader rules are Syntax; the departures from the oracle are Deviations.

This section

PageContents
REPLThe clojure> REPL
SyntaxThe reader: literals, characters, radix integers, keywords
SemanticsWhat lowers to what; the refused forms
DeviationsWhere behavior departs from Clojure
ReferenceOne page per supported name