DUST

Work in progress. This specification is incomplete and subject to change.

DUST (Data Universal S-expression Toolkit) is a small, high-performance, game‑engine‑inspired Lisp dialect designed for embedded information processing, data manipulation, and business logic.

DUST source files use the .dust extension. DUST extends RON with syntax for expressions and evaluation rules, while retaining a JSON representation of every source form.

This reference covers syntax, evaluation, schemas and contracts, special forms, and all standard functions. The Function Index lists every callable alphabetically. The Command line and REPL page covers the engine's command line, formatter, REPL, and evaluation costs.

DUST
(let [total (fn total [items discount]
             (reduce :+ 0.0 (map
                              (fn [{quantity quantity unitPrice unitPrice}]
                                (* (float (* quantity unitPrice)) (- 1.0 discount)))
                              items)))]
  [(total [{quantity 3 unitPrice 20} {quantity 2 unitPrice 15}] 0.1)
   (total [{quantity 2 unitPrice 15}] 0.0)
   (total [] 0.5)])
→
Canonical DUST
(let
  [total (fn total [items discount]
           (reduce
             :+
             0.0
             (map
               (fn [{quantity quantity unitPrice unitPrice}]
                 (* (float (* quantity unitPrice)) (- 1.0 discount)))
               items)))]
  [(total [{quantity 3 unitPrice 20} {quantity 2 unitPrice 15}] 0.1)
   (total [{quantity 2 unitPrice 15}] 0.0)
   (total [] 0.5)])
=
DUST Result
81.0
30.0
0.0