Graphics

Houston We Have Circles

Today, we have the first successful eval of a Klee program!

(begin
  (define (map f l)
      (if (null? l)
          (list)
          (cons (f (car l)) (map f (cdr l)))))
  (stroke 1 (rgb 1 1 1)    
      (map (lambda (x) 
              (circle (point (* 8 x) (* 8 x)) (* x (/ x 25.0)))) 
              (range 100))))

When you load this program into a Klee interpreter, and evaluate it, it produces a series of draw commands that when encoded and passed to the GPU, evaluate to the following image:

Devlog

Apr 25, 2025

The Circle is Moving!

We’re now animating the screen at 60fps using wayland’s frame callbacks:

here is the associated program that is driving that animation:

(stroke 1 (rgb 1 0.1 0.1) 
  (circle (point 
            (+ 200 (* 50 (sin (/ (now) 600.0)))) 
            (+ 200 (* 77 (cos (/ (now) 533.0))))) 
    50))

Worm

(stroke 10 (rgb 1 0.1 0.1) 
  (path (moveto (point 50 50)) 
        (curveto 
          (point 200 (+ 200 (* 100 (sin (/ (now) 100.0)))))
          (point 300 (+ 300 (* (- 0 100) (sin (/ (now) 100.0)))))
          (point 450 450)))

Overview

A diagram of 2 actors, A and B asserting fragments of a klee program to a third actor, K.

Two Syndicate actors, A and B, make assertions into a Klee dataspace.

Background

The problem: We have an actor that has a rich internal model of some domain, and we want to use this model to generate a graphic design and render it to the user, how do we do this?