Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: R: Mutability and sameness - a new puzzle

From: lmecir:mbox:vol:cz at: 23-Jul-2001 20:55

Hi Romano, don't be afraid, I think, that the things aren't that bad. A few answers (hope they will be of some use to you):
> word-series-data > > 1) word: changing the binding of a word does not changes data, but can
> the result of expression "get/any..."
The sentence you wrote looks a little bit oversimplified. I will try to be more specific/exact. The notions of "mutations" and "replacements" are defined as in the article ( The following holds: a) the only way, how you can change the binding of a word in Rebol is to replace it by a word with different binding. You cannot mutate a word to change its binding, as you can find in the article. b) if you replace a word and get the value of the new word, it logically may have nothing in common with the value of the original word
> 2) series have index, which is not indifferent to "same?" except when
index is
> beyond tail.
I would use a different formulation: the SAME? function is undefined for series having "beyond tail" index.
> Two series can appear different even if they are linked to the > same close set of data: if all the data are the same (same? head a head > b;==true), difference depends only by index. > > 3) different storage of identical data can be revealed by some functions. > However in many cases, the storage of values is indifferent to "same?": > > same? 1 1; ==true > > I ask myself: the two "1" where are stored? At the same "memory address"?
> they mut-equal? Are dependent? Are independent but are the same? I can
> the two "1" but they are the same. I do not understand.
Of course, you can choose the meaning of the "two values are discernible" predicate. What is the best way here? Your POV is, that you can discern the 1's because you see, that they are "stored" at different Places in the code: code: [same? 1 1] The first 1 is "stored" at the second Place of CODE, while the second 1 is stored at the third Place. On the other hand, such discernibility (although fully feasible, let's call it discernibility1) is trivial, because a function INDISCERNIBLE1? using such a discernibility is: indiscernible1?: func [ a [any-type!] b [any-type!] ] [ false ] You would surely agree with me, that discernibility1 has very little use. Moreover, the INDISCERNIBLE1? is not an equivalence, because there is no way, how we can get a TRUE result. What we really need is a way how to compare two Rebol values (the most useful way is to have a Rebol function) and find out if they are equivalent in some way. That is why the Identity should be an equivalence. When we agree on this, we shall pick the "most useful" equivalence available. For me it is the finest equivalence, because it not only tells you, whether the values are equivalent in some sense, but it actually tells you, whether they are equivalent in every possible sense, which is the only situation, where I can admit, that the values are identical.
> Sameness appears to me like an arbitrary convention that has not a "real" > meaning. > It has for me little "reality" or "naturality".
You are totally correct if you are speaking about the SAME? function, because it really is an arbitrarily picked function that has got a lot of bugs and an incorrect description. The problem with SAME? is mainly caused by the wrong impression, that such a function can be "arbitrarily chosen". I am pretty sure, that there is only one correct way how to define the Identity in Rebol: it shall be the finest equivalence.
> Correct my vision: > your approach to the problem is: we can't make a "real" (hardware?) model
> sameness in Rebol, but we can construct a specific routine: the class of
> its "true" result is what we call "sameness" in Rebol.
Correction: We can make a "real" (hardware) model of sameness in Rebol. The proof of this is the SAME? function, which was (somewhat arbitrarily) chosen to model the sameness in Rebol. This attempt crashed (IMHO), because the model the SAME? function presents is arbitrary and takes into account "individual bits" instead of "the values as whole things". To get the "real thing", we should know what the sameness should mean, which is why I presented a totally different approach (look at the forest instead of the individual trees). The resulting function then looks a little bit arbitrarily too, but the difference lies in the way how it was defined. To repeat myself: Rebol sameness has to be the finest equivalence. That is all.
> You make ask to myself: what is a value in Rebol? > A "value" seems only the result of the evaluation of an expression. We
> see data itself; we can see only the results of expressions. I could say
> "value" in Rebol is what is printed on the console after an expression + > Return.
That is oversimplified and incorrect, I am afraid, because e.g. 'a ; == a yields a word value, but you can see only its root, not the whole thing, without doing other "magic" with it.
> It is not an entity that exists in front of the language but the > result of language. We could disassemble Rebol and go and see what
really is
> a series, an integer, a string. However, we should exit from Rebol. In C I
> write: > > a=1 > > then, build a pointer to "a" and see what "1" means for C, bit for bit,
> all we know are a state (on/off) of a real (hardware) cell of memory. We
> also check this with an assembly routine passing the pointer. > But in Rebol we can't do it, we must believe in User Guide when it say > something to us about storage of integer; we have no pointers.
What I try to prove is, that we don't have to trust anything. We can always create our own models of "what is going on". Rebol is a "higher level" language than C, which gives us the possibility to create "higher level" models, without the need to go down to the assembler. I do not have any problem with that, quite the contrary is true, I like it.
> Therefore, sameness has a meaning only in the language (it is the
formality of
> sameness). Can we define "value" in Rebol without a Rebol expression?
> does not seem something that exist outside the language and that the
> "find", but a construct, not a "data" (in the literal sense of word).
Could we
> speak of Rebol as of a kantian language? :-)
There is no problem with it. It resembles other languages more, than you think. You cannot define what is a "Rebol value", but you can summarize some basic properties Rebol values have. But then, the same seems to be true for almost any other language too.
> > 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. > > Your question is: can I predicate "indiscernible" to "1" and "itself"? > Here we do not discern two real 1, we discern the predicate "1" (with its > meaning) from the predicate "itself", whose meaning is different from the > meaning of "1". In other words: Can we predicate to the "thing" 1 the two > (obviously) different predicates "1" and "itself"? I admit: my English > competence is very limited, I could explain it much better in my language. > This is Leibniz, not necessary my thought (I made a boutade two message
> As you know, Leibniz indiscernibility lead to "simplicity" against
> and to "spirit" against "matter". What is truly indisc. has no part, no
> no time, no relations, no windows (!). His idea, as you see, has many deep > consequences. >
I admit, that I probably mislead you. I didn't know how Leibnitz defined his indiscernibility. That is why all that I can say is, that the indiscernibility I had in mind was the one I defined in my article. There surely is a possibility to use a different indiscernibility, but it wouldn't be as useful IMO. (see the applications in the article)