[REBOL] Re: Sameness - an abstract approach.
From: joel:neely:fedex at: 14-Feb-2003 7:47
Hi, Gabriele,
Ah, but bits aren't atoms...
Gabriele Santilli wrote:
> But if I give them to you at the same time, even if you cannot
> discern a piece from the other you can say that you have two
> different pieces of paper (and the distinction is, for example,
> the hand that holds them --- one is on the left, the other in on
> the right).
>
> This can be applied to the "1"s above; if you have two of them at
> the same time, it is possible that they are like the two pieces of
> paper: interchangeable but not the same...
>
More to the point, if I hand you two "indistinguishable" pieces of
paper at the same time, you *can* distinguish them (e.g. by which
hand holds each one of them). However, you're distinguishing them
by physical location, which works for atoms and not for bits. If
your two hands simultaneously hold two otherwise indistinguishable
objects, you know that they necessarily have distinct histories,
even if you don't know the details (e.g. where they came from).
This is not true of bits. If "register A" of a CPU holds the same
value as "register B", that fact alone does not compell us to
conclude that those two values "came from different places" in any
particularly meaningful sense. OTOH "call by reference" means that
you/CPU are given not the value but access to a container holding
the value; now you/CPU can tell whether there are one or two hands.
But now the discussion is about hands and not pieces of paper!
If we allow you the use of a marker or scissors, you can also mutate
at least one of the pieces of paper so that that you'll be able to
distinguish them if you give them back to me and I subsequently hand
them to you one at a time. But if they are made of some hypothetical
super-teflon that resists all attempts to mark/cut them (or you're in
the home for people who worry too much about the subject of this email,
and you are denied the use of markers and sharp things ;-) then you
won't be able to mutate them to facilitate future distinction.
To push the analogy further (faithfully, I hope), suppose I give you
two photographs/photocopies showing indistinguishable images of a
piece of paper (call by value). Now the fact that you are holding
two copies isn't sufficient to distinguish between two copies of the
same piece of paper vs. one copy each of two identical pieces of
paper. Further, if you modify one of the copies and hand them back
to me, when I subsequently give you another photograph/-copy, you
won't be able to tell whether it is:
- the unmodified copy from before,
- another (fresh) copy of the same (original) piece of paper,
- another (fresh) copy of *one* *of* the original *two* pieces,
- a copy of a newly-minted piece of paper made just like the others,
- a second-generation copy of any the above (if my copier is of
sufficiently-high quality ;-)
- or other variation we haven't the time to address right now.
Metaphors share the property with gunpower, electricity, and nuclear
reactions: they are all very powerful, with terrible consequences for
misuse. When we push metaphors between atoms and bits too far, we
may simply be limiting our imaginations by what we expect from every-
day experience; this is a dangerous as going to another country for
the first time and interpreting everything that is done/said in terms
of the customs with which one grew up.
What's worse is that there's another layer here: the metaphors
between electrons and bits! There really are no "integers" inside a
computer, but rather patterns of electrical activity that we have
arranged to use "as if" they were (a finite subset of) integers.
I'm not trying to be cute or clever or pedantic here; I'm trying to
put the burden of interpretation where it belongs -- back on us!
Let me give two quick examples of why I think this is an important
point:
1) In the early days of "structured programming" (and, sad to say,
with some folks who haven't progressed conceptually past the
late 60s or early 70s ;-) there were some who scorned the value
of such concepts as if-then-else, while-do, etc. by saying
But inside the computer those all become GOTOs anyway!
My reply is
Nothing inside the computer is "go"ing anywhere, except
possibly electrons. All that's happening is that the
contents of a register called the "program counter" are
being changed in some way other than by adding one!
The point is that there is a circular relationship between our
metaphors and our machines; earlier computers were designed on
earlier conceptual models (metaphors), but programming those
primitive machines inspired us to think up more sophisticated
metaphors, which in turn the design and construction of more
sophisticated machines, etc... Progress is made by creating
new metaphors when the old ones create limitations.
The metaphor that there's a "point of control" which moves about
as the program "executes" may be OK for beginning programmers
(or it may *not* ;-) but sticking with that metaphor too long
makes it unnecessarily difficult to deal with concurrency,
distributed computation, declarative programming (e.g. Prolog,
Erlang, etc.), and even recursion. "Evaluation of expressions"
is a much nicer metaphor!
2) Imagine with me about a new CPU, the PowerHextium, which uses
ternary qubits (or some other equally esoteric) representation
of data values. The micro vesion of the PowerHextium has a
33-bit address space; all addresses with a leading zero contain
a "pure" representation of an ideal integer (e.g. with no
superposition) and that half of memory is write-protected. So
for example memory address 0000...0001 contains a pure "one".
The PowerHexium is able to do arithmetic on addresses, so that
adding 0000...0001 to 0000...0101 gives 0000...0110 for example.
This is useful for performance because the circuitry is able to
add addresses a few femtoseconds faster than adding (potentially
superposed 33-qubit) values. Also, the PowerHexium throws an
"address overflow" exception if adding addresses carries into
the high-order bit (when the second bits of the addresses are
of equal values). We could then carry out *ALL* arithmetic of
current 32-bit microprocessors on the PowerHexium usinn only
address operations.
The punch line, of course, is that we are working with things
that represent "true integers" and can manipulate those values
that represent the "true integers" without ever modifying (or
even accessing) the "true integers" themselves. (Of course, we
can simulate the PowerHexium with a current-generation microCPU
by dropping the high bit, changing all code that manipulates
addresses to manipulating 32-bit integers, etc. But then we're
just evaluating our REBOL expression using the box on my desk!
;-)
Metaph(or|ys)ically yours,
-jn-