Date: Sun, 22 Feb 2015 01:16:12 +0100
From: Glen Chiacchieri
Subject: Re: Time and Possibility
Yes! I have some specific ideas about how/why exploring transforms/what-ifs could work from the data transform language-environment thing I've been thinking about for a while now. I've also been thinking about trying to manage possibilities in an image-manipulation environment a bit—e.g. "what colors would look good for this header? show me possibilities, let me compare them, let me narrow them down and explore/reevaluate them later".

On Sun, Feb 22, 2015 at 12:37 AM, Bret Victor wrote:

Time

I went into the woods last week carrying a substantial portion of Rich Hickey's Greatest Hits.  

Are We There Yet is particularly important, and presents a "epochal state model" loosely inspired by the philosophy of Alfred North Whitehead.  In this model, there is no such thing as an "object that changes over time".  Instead, there are only immutable (frozen) "values", and "processes" that construct new values based on old values.  A "state" is a value at a point in time.  We can assign an "identity" to a sequence of causally-related values (a timeline), but Hickey emphasizes that such an identity is a mental construct, not "reality".


Hickey's programming language Clojure is designed around this model.  (Although real Clojure programs are not as clear as this model might suggest -- the code still looks like the usual textual mashed potatoes.)


It struck me that this concept -- that we can and should think of a "changing" object as really just a sequence of frozen states -- is an old friend, and has been seen around here in several different guises:



In particular, what RMO wrote recently --

Let's start with our example player from above and call that the illusion of motion; this illusion is constructed out of a reality we'll call the bucket of frames.

-- this illusion and reality is essentially identical to Hickey's philosophy.




Stability, Ethereality, Persistence

The rationale that Hickey gives for his style of programming has resonances with the earlier "ramble" emails about ethereality.  He says we can only (sanely) do logic on stable values, not unstable things that can change out from under us at any moment

- A changing world with mutable objects is unstable -- "speech-like", moment-to-moment, fleeting, ephemeral.
- A sequence of immutable states/frames is stable -- "writing-like", persistent, reliable.

The magic technique that makes Hickey's programming style work at all is called persistent data structures.

The ethereality emails might be considered, analogously, an appeal for a "persistent physical reality".



Reality

Alan Kay (according to Rich Hickey!) looked around and saw that the physical world was made of changing things, and created object-oriented programming (with changing objects) as a computational model of this world.

Rich Hickey (according to Rich Hickey) said, "No, we can only do logic on stable values, not unstable things that can change out from under us at any moment.  Yes, the physical  world is made of changing things, but our computational model should be a sequence of unchanging states."

Seeing Spaces (according to me) is really, at its heart, about closing the loop in a kind of startling way -- "Forget about computational models -- let's see the physical world itself as a sequence of unchanging states.  Let's think about and work with the physical world as a frozen sequence of states.  Let's decouple time from reality, and be able to freely pan across time and abstract over time in the physical world."

(This viewpoint might have gotten lost amidst the talk of robots and makers.)




Decision

In Ladder of Abstraction, abstracting over time is just the first step.


Ladder of Abstraction presents a three-dimensional system model (which I still believe in very strongly, and has been the foundation for everything I've done since):

- time
- decision (algorithm / structure / choices made by the designer / "our actions")
- external world (environment / input data / initial conditions / factors out of the control of the designer / "actions of others")


Seeing Spaces presented a simplification which only covered the first two of those dimensions, time and decision.




The representation of abstractions over time and abstractions over decision keep showing up in what we do.  Here's a sampler of ad-hoc representations of these two concepts.




Reification

Rich Hickey starts with an analogy.  A lot of incidental complexity in C++ programs, especially around the ownership of objects and whether it's safe to hold onto or release them, comes from its lack of automatic memory management.  Garbage collection addresses this.  

Likewise, he claims, a lot of the incidental complexity in object-oriented languages, especially around concurrency and when it's safe to view or hold onto objects, comes from their lack of automatic time management.  The epochal time model addresses this.

That is, time was an important enough concept to reify in the language, via a small set of standard constructs.


It seems to me that time and possibility are so important to what we want to do, we need to reify these concepts via a set of standard representations.  (Here, I'm using "possibility" to cover both "decision" and "external world" from Ladder of Abstraction -- that is, parallel timelines resulting from either our actions or the actions of others.)

By standard representations, I mean both machine representations and human representations.  

A machine representation would be an explicitly "2D" data model / database, where the program has random access to not just the "current state", but entire timelines, and parallel timelines, and can freely process data and perform queries across this matrix.  Not just "the past is always with us", but "many possible pasts are always with us".

A human representation would be a generic form of visualization, like a table row, but for the entire timeline/possibility matrix.  This would allow and encourage us to always be thinking explicitly across time and possibility, in all situations, instead of always just seeing the "current state".  Domain-specific visualizations (such as the ad-hoc ones above) could be thought of as transformations of the generic representation.  (In the same way that we might think of the view of an individual state, such as a bouncing ball frame below, as a domain-specific visualization of a table row.)

More specific plans, with regards to the Room project, will follow in the next email.