[REBOL] Re: R: Mutability and sameness - a new puzzle
From: lmecir:mbox:vol:cz at: 22-Jul-2001 17:59
> > I propose the INDEXZ? function to be able to discern some block values,
> > that are discernible. I shall give you an example so that we may discuss
> > POV's. Let's have:
> > a: tail [1 2]
> > b: back a
> > clear head a
> I've understood. An index, being an absolute position, remains in
> memory also if the index is past the end of serie. When the serie is
> up to the index, the index of the serie return to be valid. The only
> preserve the index embedded and distingue "a" from "b" is filling the
> series, like in your routine. Skip, back, next do not help because they
> an error.
> However, in the Rebol context, the value of b, when "a" is clear, is an
> which is not a bug, but a feature (I think). So your method of retrieving
> index of b with lenghtz? goes beyond the actual Rebol implementation.
> When a is clear, b at position 3 and c (=a) at position 100 give the same
> result: an error and therefore their values are indiscernibles.
Your approach is valid. The only problem with it is, that if you apply it
consistently, you are not able to discern:
, because they are discernible only by mutations (if we exclude the
bug-plagued SAME?), exactly like the A and B values above.
> To discern them you must change their value! So I think that "b"
> (with index 3) and "c" (with index 100) are discernibles only if their
> is not what actually it is (a clear series). The actual value is an error
> both. You can't discern the difference between two values, changing them.
> This lead only to an "ipotetical difference": if values of "a" and "b"
> "x" then...
> Index, indeed, is not a propriety of values but a propriety of words. In
> case, clearing "a" hides this propriety and makes it indifferent to the
> get function (it is indifferent for get if a word is 3 o 100 places after
I would say, that index is really an attribute of Rebol series and has
little to do with words ...
> Another thing: if you make a different binding, two word which have the
> value can result in different value. Therefore, as you see, I can
> two words with the same value by binding one of them to another context.
> And binding does not change the initial value, as one can see with a
> word. So if we try to define all the ipotetical values of a word, we must
> in care
> all the binding (one for every object - could be a fun routine).
> Therefore, i think you should introduce the concept of binding and the
> object before speaking of indiscernibility.
> Your text:
> >Observation # 1: Two Rebol values A and B are identical, if for every
> equivalence EQ the expression >(eq get/any 'a get/any 'b) yields TRUE. In
> different words: two Rebol values are identical, if they are equivalent
> every purpose
> Now see this a little strange EQ text which try to respect your spec of
> a: 4
> o: context [a: 3]
> same? get/any 'a get/any 'a ;=true
> same? reduce bind [get/any 'a] in o 'a reduce bind [get/any 'a]
> The value of a is not identical to value of a. :-)
I see, what you are after. You are saying, that you can create a similar
expression as the one I used and get a different result. The expression can
be even more similar, than you have shown:
expression: to paren! [same? get/any 'a get/any 'a]
b: use [a] [a: 3 ['a]]
change at :expression 3 b
probe :expression ; == (same? get/any 'a get/any 'a)
expression ; == false
Although the similarity is obvious, I must say, that there are visible
> I see another little problem, about path:
> same? get/any 'a get/any 'system/words/a
> gives an error. Perhaps, you should speak only of words or extend the
> definition to include path. Object path is also an indirect form of
What I had in mind was actually any expression having the property to yield
a Rebol value. I.e. for some values the (eq :a :a) will do, for some cases
(eq 1 + 1 1 + 1) will do, for some cases (eq first  first ) will do,
for some cases (eq get/any in system/words 'a get/any in system/words 'a)
will do, etc. The only thing we really need for the expression is to start
with "(eq", finish with ")" and contain one subexpression representing a
Rebol value written twice in succession. I thought, that the expression like
(get/any 'a) would be sufficient, because it can represent all necessary
> Trying a very initial definition of mine, more semantic than sintax
> I should say:
> Two Words have the same meaning (value) if the Vocabularies (context)
> used by the Interpreter for that words, associate (get) them to the same
> Many things should be cleared: first of all: "same data".
That is what I am after here (to make the "same data" meaning clear). I
don't intend to make clear the meaning of the "two words have the same
meaning". I am pretty sure, that the words have very little to do with the
subject. The only reason why I used the subexpression (get/any 'a) lies in
the fact, that it can represent any Rebol value. But, If you are not
comfortable with it, you can use any other subexpression, which is capable
to represent a Rebol value.
> > That is an error, I think. We can always ask questions like: "Are 1 and
> > indiscernible values?" as well as: "Are 1 and 2 indiscernible values?".
> > question is meaningful regardless of the fact, if the answer is positive
> > negative.
> Nobody can discern what is indiscernible, as Leibniz teaches, the
> "Are 1 and 1 indiscernible values?" discern the two "1" with the
> itself: the two "1", in fact, have different position in the statement, so
> and I, can discern them and the question is meaningful.
> I asked you at the beginning if you take in consideration the "literal" or
> "lexical" layer to define indiscernibility...
What about a question: "Is the value 1 indiscernible from itself?" I am
convinced, that the question has got its meaning regardless of the fact,
that the answer should be positive in this case. OTOH, I was trying to write
a definition, that wouldn't discern 1 and 1 "because they can be found at
My definition is there. Do you find it "literal" or "lexical"?