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

World: r3wp

[Core] Discuss core issues

Anton
23-Feb-2006
[3550x2]
I think you just need to login before you visit that url. Did you 
have trouble accessing it ?
(Or maybe a Lead such as Reichart needs to approve the task first 
? That might take some time...)
Geomol
23-Feb-2006
[3552x2]
Yes, I don't have permission.
Reeeeiiiichart! It's Anton and John caaaalling! ;)
yeksoon
23-Feb-2006
[3554]
u don't?

I think you are on REBOL SIG.
JaimeVargas
23-Feb-2006
[3555x4]
Look at the regression tests implemented in Orca they already cover 
a lot of behaviour.
http://trac.geekisp.com/orca
They can serve as a base to implement the full unit test for Rebol, 
and save time.
If you download the src code the paths is user-path/orca/trunk/orca/tests/
Robert
23-Feb-2006
[3559x2]
Isn't there a regression test "suite" for Rebol programs? IIRC someone 
made something like this.
Or was it unit-testing...
JaimeVargas
23-Feb-2006
[3561]
I believe there is a Unit Test framework. But no rebol specific regression 
tests have been written. At least not publicly.
Anton
23-Feb-2006
[3562x2]
Geomol, are you able to login to Qtask still ?

Reichart has approved/released the task, so all I need to do is add 
interested people as watchers.
I see "John" in qtask and added him as a watcher. (I assume that's 
you Geomol). I can add anybody else in qtask who is interested as 
watchers too.

(Geomol, you will need to accept becoming a watcher first, then you 
should be able to see the page.)
PeterWood
23-Feb-2006
[3564]
Carl used to wax lyrically about the automated Rebol test suite that 
Jeff (Kreis) wrote when he was at RT. As far as I know it was never 
publicly available.
Geomol
24-Feb-2006
[3565x2]
Anton, I have access to the project on Qtask now.
and yes, I'm John in Qtask.
Anton
25-Feb-2006
[3567]
Ah, very good.
Graham
25-Feb-2006
[3568x2]
>> foreach f read %synapse-chat/ [ ?? f either dir? f [ print [ "directory: 
" f ]][print ["file: " f] ]]
f: %April/
file:  April/
f: %Compkarori/
file:  Compkarori/
this has me somewhat confused.
Volker
25-Feb-2006
[3570x2]
Does still?
read returns pathless filenames.
Graham
25-Feb-2006
[3572]
but you can see that the trailing slash is preserved ...
Volker
25-Feb-2006
[3573x2]
it checks by os-call, not filename.
missing things count as as non-dirs too.
Graham
25-Feb-2006
[3575x2]
foreach f read %./ [ print [ "directory? " dir? f ]]

So, why does this work?
because it's in the current directory ?
Volker
25-Feb-2006
[3577x2]
yes. "dir? %synapse-chat/April/" would work too.
foreach f read dir: %synapse-chat/ [ ?? f either dir? dir/:f [ print 
[ "directory: " f ]][print ["file: " f] ]]
Graham
25-Feb-2006
[3579]
I guess the lesson is that you need to remember where you are when 
doing these things.
Anton
26-Feb-2006
[3580]
It's faster to check for final slash than to use DIR?, which, as 
Volker pointed out, makes an OS call.
Graham
26-Feb-2006
[3581]
Yeah, I moved to doing that.
Geomol
27-Feb-2006
[3582]
This is from the REBOL command prompt under Mac OS X. Does REBOL 
behave the same under other OSs?
>> 31-12-16383
== 31-Dec-16383
>> 1-1-16384  
** Syntax Error: Invalid date -- 1-1-16384
** Near: (line 1) 1-1-16384
>> d: 1-1-0000
== 1-Jan-0000
>> d - 1
== 31-Dec-65535
Henrik
27-Feb-2006
[3583]
Windows:

>> 31-12-16383
== 31-Dec-16383
>> 1-1-16384
** Syntax Error: Invalid date -- 1-1-16384
** Near: (line 1) 1-1-16384
>> d: 1-1-0000
== 1-Jan-0000
>> d - 1
== 31-Dec-65535
Geomol
27-Feb-2006
[3584x2]
The Gregorian Reformation occured in September 1752. This is output 
from the UNIX 'cal' command:
$ cal 9 1752
   September 1752
 S  M Tu  W Th  F  S
       1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Notice the jump from 2. to 14. Sep.!
And then some REBOL:
>> d: 2-9-1752
== 2-Sep-1752
>> d + 1
== 3-Sep-1752


Seems like the reformation didn't occur in REBOL-land. Maybe that 
should be noticed in the wikibook, Henrik?
Henrik
27-Feb-2006
[3586]
it probably should. could you put it in? I'm a little strained for 
time
Geomol
27-Feb-2006
[3587x2]
Also there is no year 0. So this is not absolutely correct:
>> 1-1-0000
== 1-Jan-0000
The year before year 1 is year -1 (or 1 BC).
I'm wondering, how REBOL handle leap year...
Henrik
27-Feb-2006
[3589]
strange that this year was picked, since the gregorian reformation 
didn't happen everywhere at once
Geomol
27-Feb-2006
[3590x2]
yeah, this is from UNIX 'man cal':

The Gregorian Reformation is assumed to have occurred in 1752 on 
the 3rd

     of September.  By this time, most countries had recognized the reforma-

     tion (although a few did not recognize it until the early 1900's.)
So most countries did.
Henrik
27-Feb-2006
[3592]
but would it be good/bad for rebol to support it? what if you are 
calculating astronomical data or similar
Geomol
27-Feb-2006
[3593x2]
It seems, REBOL handle leap years correctly. The rule is, that every 
4. year is a leap year. Every 100 year isn't a leap year though, 
unless it's divided by 400. So 2000 was a leap year, 1900 wasn't, 
but 1600 was. And so on.
Henrik, good question!
Rebolek
27-Feb-2006
[3595x2]
Also, REBOL does not support negative years at all
>> 1-1--1
== 1-Jan-1999
Henrik
27-Feb-2006
[3597x2]
well, that's pretty bad if you want to calculate astronomy stuff... 
maybe support for the julian calendar would be more appropriate for 
calculating extreme time periods?
I've always thought that consideration for science in REBOL was a 
little low
Sunanda
27-Feb-2006
[3599]
REBOL broadly follows the ISO-8601 date format (though not with the 
strict yyyymmdd format): years are 4 digit, positive numbers only. 
ISO 8601 is not designed for acheology or astronomy.

True astronomocal julian dates of course change day at midday not 
midnight -- so be really sure you want to use them.