Programming in Nature

we need to get out more

Posts tagged QaSaC

QaSaC Introduction

:: QaSaC

When we consider a language for programming with cameras we note that visual recognition has a great strength and great weakness.

  • The weakness is that recognition gets harder as we need to accurately disambiguate and classify more things.
  • The strength is that we have two-dimensions to play with.

Our first attempt at a language for this environment is QaSaC (an acronym for Queues and Stacks and Combinators, the elements from which QaSaC is made). QaSac is inspired by and combines elements of “data-flow” programming / languages, such as Pure Data. And stack-based “concatenative” languages such as Forth, and more specifically, Joy.

Both of these programming paradigms help us by reducing the number of names that need to be created and worked with.

Stack-based languages work with local data on an implicit stack. And data is refered to largely based on its “ordering” in the program and positioning on the stack, rather than with local names.

Data-flow languages organize their larger-scale structure in terms of nodes and the connections between them. In visual languages such as PD, no explicit names are given to these nodes, but instead, positioning and the visual arcs between the nodes, provides topological information.

A QaSaC program, then, is a flow-network of nodes, joined by asynchronous queues. Each node is a self-contained, small machine that reads data from its input queues, manipulates it using its local stack, and ultimately passes it on via its output queues.

A node’s program itself is writen in a language largely inspired by Joy.

The topology joining the nodes does have a textual representation, but is intended to be infered from images or created with a visual editor.



See the QaSaC GitHub repository for further details with a working QaSaC virtual machine / interpreter.