Run a Lispex program and change one number to see why its result changes from
5 to 10. Start in the browser with no installation.
Run it in the Playground
Open the Playground, replace the editor contents with this program, and choose Run.
(define language "Lispex")
(list 'hello language (+ 2 3))Result
(hello "Lispex" 5)define gives the string "Lispex" the name language. The final expression
calls list to collect three values. They are the symbol hello, the string
stored as language, and the sum of 2 and 3. The quote before hello
keeps that name as data.
The Playground shows the values of expressions written at the outermost level
of the program. define itself produces no displayed value.
Change 3 to 8 and run again.
Result
(hello "Lispex" 10)The last item changes because (+ 2 8) returns 10. The symbol and string
stay the same.
Fix a missing parenthesis
Replace the editor contents with this example. Its first line is missing a closing parenthesis.
(define total 10
(+ total 5)Lispex reports error E100. It cannot finish reading the first expression,
so it runs none of the program. Add ) after 10 and run again.
Result
15The corrected program defines total as 10, then adds 5.
See Diagnostics for errors during reading,
syntax expansion, execution, or resource use.
Exercise
Return to the first program and change it to produce this result.
(hello "Lispex" 12)Show one answer
Change the final expression to (list 'hello language (* 3 4)). Lispex
calculates (* 3 4) before list receives its three values.
Continue to Step 2
When you can explain the name, string, nested call, and final list, continue to Values, Names, and Procedures. The remaining sections are for local files and editor setup.
Save and run a local file
Save the original program with (+ 2 3) as hello.lspx.
With Node.js installed, run it through the npm package.
npx lispex hello.lspxOr install the Native program for your platform from Downloads and run the same file.
lispex hello.lspxBoth commands print this result and exit with status 0.
(hello "Lispex" 5)Both use the reference implementation written in Rust. npm runs its WASM build, while Native runs it directly. Downloads includes installation and checksum instructions.
For the unfinished example, save the code as unfinished.lspx and use Native to run
lispex unfinished.lspx. It exits with status 1 and writes this diagnostic
to standard error.
E100 unfinished.lspx:1:1 unterminated list (missing `)`)To prepare a compiled file later, follow Run Verified Bytecode.
Add syntax highlighting and formatting
The official extension, studiohaze.lispex, highlights .lspx syntax and adds
a file icon for light and dark themes.
Formatting requires a separately installed Native CLI. Use Format Document
or format-on-save to rewrite the document with consistent spacing and layout.
The extension passes the document to lispex fmt - and uses the formatted
source it returns. Set lispex.format.executable if the program is not on
PATH.
The extension provides syntax highlighting, icons, and formatting. Run code in the Playground or a CLI to see values and diagnostics. For formatting, use Native.