Browse by type
A small functional language for embedding in creative software, and a vector drawing app built on it. A program can be edited as text, as blocks, or by dragging what it draws on a canvas.
This is a work in progress, and the language may still change.

turn = (/ tau 96)
ring = (map (range 0 96) (=> [i: number]: _
[(+ 400 (* 290 (cos (* i turn))))
(+ 400 (* 290 (sin (* i turn))))]))
[
dots = (spray ring 7 3 26 44 "#ff4d2e" "#ffd23f")
rays = (map (range 0 24) (=> [i: number]: _
(style
(path.line
[(+ 400 (* 70 (cos (* i 4 turn)))) (+ 400 (* 70 (sin (* i 4 turn))))]
[(+ 400 (* 215 (cos (* i 4 turn)))) (+ 400 (* 215 (sin (* i 4 turn))))])
stroke: "#ffffff" width: 3)))
bg = (solid "#1473e6")
]

Glisp stands for Graphical LISP. A project in the drawing app is a Glisp program: dragging a handle on the canvas rewrites a value in the program, and the program can be edited as code at any time. The app is not aimed at one kind of graphics.
In the language:
IO value that the host runs.random makes a sequence from a seed, which is part of the program.() and a diagnostic, rather than throwing. A typed slot turns () into its type's default.===.solve works out what to write in the program for a value to come out as wanted, which is how dragging works.@glisp/lang has no dependencies.See the guide and the specification.
git clone --recurse-submodules https://github.com/baku89/glisp
cd glisp
npm install
npm run dev:canvas # the drawing app
npm run dev # the website, with the guide and the playground
npm run repl # a REPL in the terminal
npm test
npm run typecheck
| Directory | |
|---|---|
packages/lang |
The language, @glisp/lang |
packages/repl |
The terminal REPL |
packages/tweeq |
Editing an AST through Tweeq widgets |
site/canvas |
The drawing app |
site/lang |
The website |
spec |
The specification, whose marked examples run as tests |
The drawing app uses pave for paths, geome for geometry, and linearly for vectors.
The first version, from 2020, was a design tool with an interpreter based on Make a Lisp. It is still online. This repository has since been rewritten.
By Baku Hashimoto. Thanks to Naoto Hieda for examples, suggestions and translation, and to the sponsors.
MIT License. See LICENSE.
browse all types & interfaces →
$ claude mcp add glisp \
-- python -m otcore.mcp_server <graph>