World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Ladislav 4-Jul-2009 [16092] | (it was certainly not a prototype of any specific member of the current equality coparison hierarchy) |
BrianH 4-Jul-2009 [16093] | Are we doing equivalence within any-block! or limiting it to within any-path! ? |
Ladislav 4-Jul-2009 [16094x3] | re last question: supposedly True |
(ie. I would take the any-block variant) | |
but, you may propose a different alternative, if you don't like it for some reason | |
BrianH 4-Jul-2009 [16097] | One alternative is equality within any-path!, within any-word! and within any-string!, but not within any-block!. |
Ladislav 4-Jul-2009 [16098] | yes, the only difference is, that I considered any-block! to be the counterpart of any-string!, but that is just me |
BrianH 4-Jul-2009 [16099] | Another alternative (the current one) is equality within any-word! and any-string, but not within any-block! or any-path!. |
Ladislav 4-Jul-2009 [16100x2] | I think, that currently the equality within any-string isn't imlemented |
sorry for the typos | |
BrianH 4-Jul-2009 [16102x2] | I consider any-block! and any-string! to correspond as well, but the question is whether EQUAL? should do the same. |
You are right about the equality of any-string! - not implemented yet. | |
Ladislav 4-Jul-2009 [16104] | yes, this needs to be decided specifically for the purpose of equality comparison |
BrianH 4-Jul-2009 [16105] | Remember, EQUAL? is the simplee default for people who don't want to worry about things. We have more strictness later down the line, buut a little strictness in EQUAL? would help newbies in some cases. |
Ladislav 4-Jul-2009 [16106] | a little strictness in EQUAL? - do you mean, that newbies may be more comfortable with finer (stricter) or with coarser (less strict) version of EQUAL? in this case? |
BrianH 4-Jul-2009 [16107x2] | Yeah. It's hard for me to judge, but equivalence within any-block! seems confusing to newbies. However, equivalence within any-path! seems to be similar to equivalence within any-word!, so we might want to implement it. |
We should ask Fork - he seems to be the designated newbie advocate these days :) | |
Ladislav 4-Jul-2009 [16109x3] | :-) |
ARN (The Association of Rebol Newbies) president | |
(it is hard for me to understand what he means quite often) | |
BrianH 4-Jul-2009 [16112] | And vice-versa, in my experience, but he's very intelligent so that's not it :( |
Ladislav 4-Jul-2009 [16113] | yes, the problem is, that I am used to different terminology |
BrianH 4-Jul-2009 [16114] | My problem is that my vocabulary is too big and precise for most people to get the subtle distinctions :( |
Ladislav 4-Jul-2009 [16115] | I found, that complete newbies are frequently outside of the range of my understanding. After discussing a couple of things in the fora, they start to become understandable even for me :-) |
BrianH 4-Jul-2009 [16116] | Most of Fork's recent complaint about tag! in R3 came down to not making the distinction between "join" (JOIN and REJOIN) and "adjoin" (AJOIN). If he had been around for the discussion that led to the creation of the AJOIN function it woldn't have been a problem :( |
Ladislav 4-Jul-2009 [16117] | is seems to be caused by the fact, that I am prepared to assign too many possible meanings to their questions to be able to detect what they are actually asking |
BrianH 4-Jul-2009 [16118x2] | Contextual decoding issues :( |
It looks like an algorithm similar to EQUAL-STATE? will work for structural equivalence if you get rid of lines 518 and 519. Some of the comparisons should be relaxed to the same level as the comparison function you are implementing too. I notice that it does topological similarity rather than strict structural equivalence :) | |
Ladislav 4-Jul-2009 [16120x2] | yes, but this algorithm is rather slow for Rebol standards? |
hmm, seems I am using different line numbering | |
BrianH 4-Jul-2009 [16122x2] | It will be native (inside the actions). Most of the silly stuff inside IDENTICAL? goes away if you are doing C code. The done lists can be more efficient too. |
The lines to remove: a: head :a b: head :b | |
Ladislav 4-Jul-2009 [16124] | yes, but what about the search? that is O(n) |
BrianH 4-Jul-2009 [16125] | The done lists can be hashed on the pointer values. |
Ladislav 4-Jul-2009 [16126x2] | these index issues - there are simply too many variants of equality - the Equal-state? comparison is certainly unrelated to any of the currently proposed hierarchy levels |
(it looks to me like a level slightly above Strict-equal?, but below Same?) | |
BrianH 4-Jul-2009 [16128] | Just mining it for the topological equivalence algorithm :) |
Ladislav 4-Jul-2009 [16129] | if you look a bit further, you can see, that even to define what is cyclic can be ambiguous, there are two such detector functions in the text |
BrianH 4-Jul-2009 [16130] | All that matters to me is cyclic references after the referenced position - values before the position don't matter to anything but SAME?. |
Ladislav 4-Jul-2009 [16131x3] | yes, looks fine for the comparison |
same? is actually the simplest comparison, it is much easier to find whether two values are the same, than whether they are similar | |
btw, did you notice there is a deepcopy function? (the http://www.rebol.net/wiki/Identity#Making_a_deep_copy_of_a_.28possibly_cyclic.29_block) | |
BrianH 4-Jul-2009 [16134] | Yes, but I haven't traced it yet. |
Geomol 6-Jul-2009 [16135] | Ladislav, I've tested random some more. The equal sign, =, is used to test in the end of RANDOM, if the result should be changed to 0.0. This will change more values, than if =? was used. I use =? in my test. My test goes like this: REBOL [ Title: "Random distribution test" Author: "John Niclasen" ] random/seed now dist: clear [] ; distribution tt62: to integer! 2 ** 62 a: tt62 - 1024 loops: 100000 loop loops [ i: random 1024 if i > 512 [i: i + a] ; test close to 0.0 and close to 1.0 y: i - 1 / tt62 * 1.0 if y =? 1.0 [y: 0.0] ; the result of random 1.0 y: form y either find dist y [ dist/:y: dist/:y + 1 ][ repend dist [y 1] ] ] while [not tail? dist] [ dist/1: load dist/1 ; change strings back to decimals dist: skip dist 2 ] dist: head dist sort/skip dist 2 ; sorting distribution print dist mean: 0.0 foreach [value count] dist [ mean: value * count + mean ] mean: mean / loops ; calculating the mean value print mean ; this should be 0.5 The test is testing values close to 0.0 and close to 1.0. Notice the high count of 0.0 result compared to other low values. Also notice, how the mean value is close to 0.25, where it should be 0.5. Try out-comment the change of y to 0.0. Then the result will be much better. |
Ladislav 6-Jul-2009 [16136x4] | The equal sign, =, is used to test in the end of RANDOM, if the result should be changed to 0.0. - actually, you caught my doc translation error (the code is in C and I "automatically converted" == to =, which does not correspond well |
to the other code: so, it looks, that it is difficult for you to test the actual implementation, i.e. the random x function, where x is decimal. No wonder, but I have and idea how to do that. | |
re the equal sign - see the corrected http://www.rebol.com/r3/docs/functions/random.html | |
moreover, your random/seed now does not make any sense in case like this, you should use random/seed 0 or something like that to make sure everyone obtains the same result | |
Pekr 6-Jul-2009 [16140] | Carl states, that time-zone precision was rised to 15 minutes. Is it any usefull? :-) http://www.rebol.net/r3blogs/0217.html |
Graham 6-Jul-2009 [16141] | Any and all fixes to time would be good. |
older newer | first last |