baku89/glisp
Über uns
Ein kleines Lisp als Interaktionsgrundlage für Kreativsoftware: Ein Programm lässt sich als Code, als Blöcke oder direkt von Hand auf einer Zeichenfläche bearbeiten. Glisp Canvas ist die darauf aufbauende Anwendung zum Vektorzeichnen.
Design und MedienGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- +7
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalGlisp
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.

Example
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")
]

About
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:
- Evaluation does not change the AST or any environment. An effect is an
IOvalue that the host runs. - There is no clock or built-in source of entropy.
randommakes a sequence from a seed, which is part of the program. - An error in a program gives
()and a diagnostic, rather than throwing. A typed slot turns()into its type's default. - Types are sets of values, with structural subtyping.
- Results are cached on what a node refers to, so a value that an edit did not affect stays
===. solveworks out what to write in the program for a value to come out as wanted, which is how dragging works.@glisp/langhas no dependencies.
See the guide and the specification.
Development
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.
Not done yet
- Tools that can be written by the user
- A timeline, and video export
- Raster images and GLSL filters
- Binding controllers over OSC or MIDI
Earlier version
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.
Related projects
- Para and Dynamic Brush by Jennifer Jacobs
- Sketch-n-Sketch
- Ronin by Hundred Rabbits
- Quil
- snek by Anders Hoff
- Autoshop and Auto-Illustrator by Adrian Ward
- Scriptographer and Paper.js by Jürg Lehni
Credits
By Baku Hashimoto. Thanks to Naoto Hieda for examples, suggestions and translation, and to the sponsors.
MIT License. See LICENSE.
Ähnliche Projekte entdecken
Wird geladen…