GRASP

Joel Gustafson / Things

GitHub, Demo

It’s easy to look at lines of code and think you know what programming is, but text is only one of many possible representations. GRASP visualizes Scheme ASTs with as little text as possible, using a force-directed 3D graph to organize the program’s structure. Data transformation happens laterally with functions, while references and variable scoping are organized vertically.

Functions are green, variables are blue, and environments are translucent. That's about it.

In GRASP, variables don’t need to be named, since every reference links back to just one spatially unique node in the original environment in which it was defined. Similarly, functions also don’t need labels, since they can link back to their original definitions. The “Labels” switch toggles these optional labels.

GRASP is an ongoing project. The project’s long-term goal is to eliminate the need for text entirely (changing the mindset to optionally “labeling” nodes to be searchable later), with the graph editable directly by dragging edges from node to node while reflecting those changes dynamically in the textual code.

Wait, this is just like every other visual programming thing I’ve seen

Maybe. I like to think it's different. All the visual “languages” that exist are shallow wrappers around inherently textual code, and usually end up requiring the user to type just as many characters to do the same thing, or (worse!) expose some pre-selected GUI toolbox of all the functions you can drag-and-drop. The goal of GRASP is to eliminate the keyboard altogether, and enable open-ended program construction in an interactive, intuitive manner that scales with program complexity and size. It seems subtle, but the difference is very fundamental.

Wait, the graph looks harder to understand than the code

It probably does! That’s because 1) this is in pre-alpha and I haven’t got the graphics to work well, but mostly 2) you’ve spent n years staring enormous text files of code and your brain has trained for ages to parse it. “anyone could learn Lisp in one day, except that if they already knew Fortran, it would take three days.” - Marvin Minsky For large n, it actually gets more difficult to think about programs in new contexts or in new representations. Grab the nearest non-coder and see if they ‘get’ GRASP. You might be surprised.

Name

GRASP is short for GRAphical liSP. Yes, I know.

Inspiration

GRASP was heavily inspired by many projects and people, only some of which are listed here.

Credits