Graphics protocol #23
Labels
No Label
accepted
bug
clj
documentation
enhancement
errors
infrastructure
later
next
now
optimization
proposal
question
research
semantics
syntax
ux
vm
wontfix
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: twc/ludus#23
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What should the graphics protocol be for Ludus?
At current, in the pure-function JS version of Ludus, the output of Ludus is a JS object that has a
result
(a string representing the output value of the script), aconsole
(a JS array of strings that get written to the console in a Ludus script),errors
(a JS array of errors messages), and adraw
field. Thisdraw
field is, to a close approximation, a series of S-expressions (JS arrays) that describe a series of graphics calls against p5.js. For the quick-and-dirty version of Ludus, and to stand up turtle graphics real fast, this makes sense.@matt expressed some reservations about coupling Ludus to p5. That makes total sense.
But we have to speak some kind of graphics protocol.
We've landed in JS, and that seems to suggest that the browser is our environment, but I can see wanting to deal with other kinds of graphics than canvas: SVG, for example. In my work on https://alea.ludus.dev/twc/ludus-repl, I find myself wanting a local/native/server-side JS graphics scene that's not p5.
Given that, eventually, Ludus will run in Zig/WASM, it strikes me that we'll want to have multiple possible renderers for a graphics protocol. That also suggests we need a Ludus specific graphics protocol.
That connects to interesting, difficult design questions like: does this protocol embody ideas like our computational transitional objects? What belongs in Ludus vs. in a host environment?
Moved to 0.1.0 because we'll just use the exact same graphics/p5 protocol for Computer Class web frontend.
#93 duplicates this, but with better/more info.