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

World: r3wp

[!REBOL3-OLD1]

Steeve
5-Jun-2009
[15173]
to fit the R2 behavior
BrianH
5-Jun-2009
[15174x2]
Use INSERT on the result:
>> insert insert complement charset "^(00)0123456789^(FF)" 0 255

== make bitset! #{FFFFFFFFFFFF003FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
You forgot the ^(00) at the front.
Steeve
5-Jun-2009
[15176x2]
Fine, exactly what i wanted to get, thanks
we can't add 256 directly in the intial charset, i guess, anyway 
it's a clever solution.
BrianH
5-Jun-2009
[15178]
The complement charset problem is also the inspiration for the FIND/not 
proposal.
Steeve
5-Jun-2009
[15179]
Hmmm, no need to add the char #"(00)", it seems...
Henrik
5-Jun-2009
[15180]
btw. is there a reason why we can use 'unique on a bitset?
Steeve
5-Jun-2009
[15181]
yep, they don't want bitsets acting like true series
BrianH
5-Jun-2009
[15182]
Completeness, and to reduce special-casing code.
Henrik
5-Jun-2009
[15183]
hmm ok :-)
Steeve
5-Jun-2009
[15184]
Wait a minute... UNIQUE on a bitset! means nothing, they already 
contain unique values
BrianH
5-Jun-2009
[15185x5]
Yup, it's a noop. It was deemed more important to eliminate all potential 
test-to-see-if-something-is-a-bitset-and-not-call-unique code.
We're trying to make the functions more polymorphic in R3, to reduce 
special-case code.
Where it makes sense, of course (meaning: we can come up with a rationale).
For example, SELECT and APPEND also work on objects and maps, and 
the set functions also work on typesets.
Steeve, this works too: insert complement charset "^(00)0123456789^(FF)" 
[0 255]
Steeve
5-Jun-2009
[15190x2]
no need for ^(00)
same result with:
insert complement charset "0123456789^(FF)" 255
BrianH
5-Jun-2009
[15192]
Interesting. I wondered how the sparse charsets were handled - Carl 
had implied that they were offset (I probably misunderstood).
Ladislav
6-Jun-2009
[15193x3]
For 2.7.6.3.1:
Total: 3028 Succeeded: 2959 Failed: 69

For 2.100.55.3.1:
Total: 3155 Succeeded: 3110 Failed: 45
Taking into account that R3 implements more features (more datatypes 
e.g.), I would say, that it already succeeded to "surpass" R2 in 
its core functionality.
(the above are test results)
Henrik
6-Jun-2009
[15196]
Is this with Carl's test suite or your own?
Ladislav
6-Jun-2009
[15197x2]
it is a test suite I wrote for Carl
(some time ago)
Henrik
6-Jun-2009
[15199]
Ladislav, does it look like we can get going with Carl's test suite 
again? Have you studied it?
Ladislav
6-Jun-2009
[15200]
Carl gave me some requirements how a test suite should work and I 
wrote my implementation of his spec. Carl looked at it and he probably 
felt it was more complicated than what he liked. OTOH, the main difference 
was, that my test suite tries to give useful informations always 
when it is possible and continue with testing.
Henrik
6-Jun-2009
[15201]
I think his desire was that most people could write their own tests.
Ladislav
6-Jun-2009
[15202x2]
So, it generally doesn't "choke", when encountering "runaway return", 
"runaway throw", "runaway break", etc.
most people could write their own tests
 - yes, that is fulfilled, the test are according to Carl's spec
Henrik
6-Jun-2009
[15204]
Did you write the suite before he added the *-of functions? I remember 
he did a lot of work on those right when he wrote his own test suite.
Ladislav
6-Jun-2009
[15205x2]
(a block of code, that should evaluate true)
yes, I wrote it before he wrote the reflector functions, so it does 
not contain sufficiently many tests of these
Henrik
6-Jun-2009
[15207]
maybe that's the complexity issue, he's talking about, or was the 
discussion recent?
Ladislav
6-Jun-2009
[15208x2]
another spec: the tests can be preceded by #issue modifiers, like 
#r3only, meaning, the test is meant just for the r3 interpreter
or #r2only meaning the opposite
Henrik
6-Jun-2009
[15210]
is it possible to compile comparison lists?
Ladislav
6-Jun-2009
[15211x2]
complexity issue: if you mean the possibility to write tests that 
would check every possible aspect of the functionality, than that 
is probably impossible
compile comparison lists - you mean to compare different interpreter 
versions?
Henrik
6-Jun-2009
[15213]
comparison: yes. this would not only be useful during tests, but 
for documentation for users to study legitimate differences in behavior 
between R2 and R3.
Ladislav
6-Jun-2009
[15214x3]
when comparing two interpreters, I can generally run all the non-crashing 
tests by both interpreters (a crashing test is a problem, since it 
stops the testing process) and show the differences
of course, this may mean to run R2-specific test by the R3 interpreter 
or vice versa, which may well look crazy, but it is doable
(since the majority of tests is common for all interpreters)
Henrik
6-Jun-2009
[15217]
ok
BrianH
6-Jun-2009
[15218x5]
We need to have the test suite and framework be public, in DevBase, 
and to support both R2 and R3 - just saying, not implying that they 
aren't already. By having one common suite of tests with the version-specific 
differences clearly marked, the tests can serve as docmentation of 
the differences between R2 and R3. This can also help point out flaws 
in R2 that we *want* to change, and determine the implications of 
fixing them.
If you want documentation of the differences in behavior between 
the old reflectors and the *-OF ones, start with R2-Forward: I did 
a lot of testing to determine the behavior of the *-OF functions 
so that I could replicate their behavior in R2. I am not able to 
emulate some R3 datatypes in R2, so the behavioral model is not complete.
Eventually I would like to be able to test R2-Forward with the R3 
test suite. There will be whole classes of behavior that can't be 
emulated, but in many cases the compatibility should be pretty good. 
I am also curious about where R2-Forward is incompatible with R2, 
so those incompatibilities can be segregated into modules.
There are numerous bug fixes in R2-Forward, and every one of those 
fixes is a change: No longer bug-for-bug compatible. I am particularly 
interested in which changes would break legacy code.
It's not as bad as it sounds. Many of the fixes were of bugs that 
were so bad that there was little chance that working code could 
have used the functionality involved. Fixing such bugs shouldn't 
break much. The same goes for some native bugs that haven't been 
fixed yet.