r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

Henrik
4-Jul-2009
[15980]
Cool, time! has been reimplemented.
Ladislav
4-Jul-2009
[15981]
hi, please check http://www.rebol.net/wiki/Comparisons, I am e.g. 
unusure about the relation between timezone and STRICT-EQUAL?
PeterWood
4-Jul-2009
[15982]
I would have thought that strict-equal? would imply the same timezone.
Ladislav
4-Jul-2009
[15983x3]
yes, it is possible to set it that way
(differs from the current behaviour)
are there other votes for the change?
BrianH
4-Jul-2009
[15986x2]
I would have thought EQUIVALENT? would imply the same time zone, 
or at least some time zone math. Certainly STRICT-EQUAL?.
differs from the current behaviour

 - The time! type is being rewritten right now because itts current 
 behavior is bad.
Ladislav
4-Jul-2009
[15988x2]
Equivalent? - it would use time zone math, even EQUAL? now uses time 
zone math:

>> equal? 7/7/2009/10:00 7/7/2009/10:00-02:00
== false

>> equal? 7/7/2009/10:00 7/7/2009/8:00-02:00
== true
(i.e. UTC is compared)
BrianH
4-Jul-2009
[15990]
As long as no zone is equal? to zone of 0:00 I am happy.
Ladislav
4-Jul-2009
[15991x2]
no zone is actually 0:00 zone
>> 7/7/2009/10:00/0:0
== 7-Jul-2009/10:00
BrianH
4-Jul-2009
[15993]
t/zone = none, but basically yeah
Ladislav
4-Jul-2009
[15994]
aha, did not notice, that there are actually two zones: zone = 0:00 
and zone = none
BrianH
4-Jul-2009
[15995x2]
It's a recent bug fix. Wait, isn't STRICT-EQUAL? supposed to be EQUIVALENT? 
plus a datatype check? Then if EQUIVALENT? already does zone math 
I vote that STRICT-EQUAL? do zone math and SAME? do precise equivalence.
Wait again, == also does case checking. Does EQUIVALENT? do case 
checking?
Ladislav
4-Jul-2009
[15997x2]
Equivalent?: ignores datatype differences, alias distinctions, character 
case differences
so, more differences between Strict-equal? and Equivalent?
BrianH
4-Jul-2009
[15999]
Then this seems like a good add, unless it is reserved for =?
Ladislav
4-Jul-2009
[16000x2]
you mean to add the distinction of timezone to Strict-equal? - yes 
looks natural
t/zone = none - how did you get that?
BrianH
4-Jul-2009
[16002]
Yeah. (Bad hand, bad keyboard day)
Ladislav
4-Jul-2009
[16003x2]
OK, *adding the timezone distinction to Strict-equal?*
BTW, I should probably put the tests away from the main article, 
otherwise it is quite unmanageable, what do you think?
BrianH
4-Jul-2009
[16005x2]
Oh, the t/zone is really d/zone - it's a date! thing, recently fixed.
Please moo their own page.
Ladislav
4-Jul-2009
[16007]
yes, but still, it is not none, but 0:00
BrianH
4-Jul-2009
[16008]
moo -> move the tests to. Bad AltMe as well.
Ladislav
4-Jul-2009
[16009]
OK
BrianH
4-Jul-2009
[16010x2]
You're right:
>> d: 12-Jan-2000
== 12-Jan-2000
>> d/zone
== none
>> d: 12-Jan-2000/1:00
== 12-Jan-2000/1:00
>> d/zone
== 0:00
Current build, don't know about after Carl's current changes.
Ladislav
4-Jul-2009
[16012x2]
d/zone  = none is related to the d/time = none, yes
("pure" date)
BrianH
4-Jul-2009
[16014]
So apparently the time zone is never none, but the whole time in 
date! may be none.
Ladislav
4-Jul-2009
[16015]
this is discerned by Equivalent? already, otherwise it would not 
be transitive
BrianH
4-Jul-2009
[16016]
Ladislav, check bug#1049 - I added a new comment. We need to discuss 
this.
Ladislav
4-Jul-2009
[16017x3]
this is already done by MOLD, so it is present
(I mean the marking)
...as well as collect-words, etc....
BrianH
4-Jul-2009
[16020x2]
Mold does cycle detectionn, but not cycle comparison. Mold gives 
up when it detects a cycle.
EQUAL? would have to detect whether the cycle was the equivalent 
reference to the cycles of the other block.
Ladislav
4-Jul-2009
[16022x2]
yes, but the detection uses the Marking algorithm, nevertheless (at 
least AFAIK)
so, the same approach as for MOLD
BrianH
4-Jul-2009
[16024]
That will have to change when task! is fixed.
Ladislav
4-Jul-2009
[16025x2]
hmm, marking is used for Collect-words and some other things, too
and GC, of course
BrianH
4-Jul-2009
[16027x2]
These would all need to be considered EQUAL?:
>> a: [z] append/only a a
== [z [...]]
>> b: [z [z]] append/only second b second b
== [z [...]]
>> c: [z [z]] append/only second c c
== [z [z [...]]]
Simple cycle detection wouuldn't help there - you would need cycle 
tracing.
Ladislav
4-Jul-2009
[16029]
that depends on the quantity of marking bits, if you have only one 
marking bit, you can just detect cycle, if you have 32 bits, you 
can detect the index