[REBOL] unsubscibe

2000-01-11 Thread 70740 . 503
How do I unsubscribe?

[REBOL] Printing Re:

2000-01-02 Thread 70740 . 503
Eric, I have a little C program which sends command to DOS in windows 98. I can print from REBOL with this. If you have any interest let me know. It might work in other operating systems with minor modifications. Jerry

[REBOL] Modified? returns wrong year Re:

2000-01-01 Thread 70740 . 503
Carlos, Modified? works perfectly on my windows 98 system. Do you have the latest versions of REBOL and windows 98? Jerry

[REBOL] Series essay Re:(8)

1999-12-29 Thread 70740 . 503
Gabriele, Thanks for your note. I just redid the experiment with a fresh copy of REBOL. Same result; REBOL says x/1 = x/2 is true but (do x/1) = (do x/2) is false. It seems we may have slightly different versions of REBOL. I use windows 98. Jerry

[REBOL] Series essay Re:(6)

1999-12-28 Thread 70740 . 503
Gabriele, I think, using your example, that I have found a bug in REBOL. block: copy [] repeat i 4 [use [x] [x: i * i append block 'x]] == [x x x x] do x/1 == 1 do x/2 == 4 x/1 = x/2 == true x/1 == x/2 == true What do you think? Is it a bug? Jerry

[REBOL] Executing system commands from the REBOL console

1999-12-19 Thread 70740 . 503
Under windows 98 the following cpp program will execute system commands from the REBOL console. If the version of dos used supports redirections, the output, if any, will appear on the console screen. If not, the results will appear in the dos box from which command.exe has been invoked. I use

[REBOL] Newbie seeks help Re:(5)

1999-12-08 Thread 70740 . 503
Larry, My face is red. I don't know how I managed to send an incorrect version. Of course I had checked my results against yours. In any case, the correct version and its result from the console: source byter byter: func [n [integer!]][ do join "#{" [skip to-string to-hex (256 * (n //

[REBOL] RFF: empty? for blocks Re:

1999-12-08 Thread 70740 . 503
Robert, It seems to me it already does: empty? [] == true empty? [1 2 3] == false empty? {} == true empty? { } == false Jerry

[REBOL] Math and plotting functions.

1999-12-06 Thread 70740 . 503
Russ, I sent you via direct email the all my REBOL functions except those which communicate with dos. If you have REXX you might want them also. I hope you are right that others might be interested--the more comments and feedback I get the better. Please don't hesitate to ask me any questions

[REBOL] Objects: Preventing Code Duplication Re:(11)

1999-12-04 Thread 70740 . 503
Is it possible to make a sound (like a beep) from REBOL?

[REBOL] Off topic message

1999-12-04 Thread 70740 . 503
Russell, Sorry about that. I didn't realize the topic was copied when I sent a message. I will be more careful in the future. Jerry

[REBOL] Encouraging functional programming Re:(9)

1999-12-01 Thread 70740 . 503
The Fibonnacci series is defined by the recurrence relations a(n)=a(n-1)+a(n-2) a(1)=1 a(2)=1 The series resulting is 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 ... Jerry

[REBOL] Newby needs some strings help Re:

1999-11-30 Thread 70740 . 503
JW, I think the code below does what you want. Here is what it does: s: "sfsfkppiovranmnsvkey1=8key2=key3=22" == {sfsfkppiovranmnsvkey1=8key2=key3=22} keysubstr s "key1=" "key2=" == "8" keysubstr s "key2=" "key3=" == "" I'm fairly new to REBOL

[REBOL] Newby needs some strings help Re:(3)

1999-11-30 Thread 70740 . 503
Elan, Thanks for your kind words. I knew that arrays had the property you tell me now strings have. I will fix up my function. Jerry

[REBOL] Encouraging functional programming Re:(2)

1999-11-29 Thread 70740 . 503
Gisle, What do you think of the following example? I expect the 10 could be increased significantly, but I get tired of waiting. Jerry tree: array 0 for n 1 10 1 [insert tail tree 1.0 * n] == [] length? tree == 10 last tree == 10

[REBOL] Encouraging functional programming Re:(3)

1999-11-29 Thread 70740 . 503
I think the following example shows that in some cases recursion is undesirable. Jerry testnr 1000 == 500500 testr 1 0.0 ** Internal Error: Stack overflow. ** Where: either n 0 [testr n - 1 x + n] testr 1000 0.0 == 500500 testnr: func [n] [ x: 0.0 for i 1 n 1 [x: x +

[REBOL] Encouraging functional programming Re:(8)

1999-11-28 Thread 70740 . 503
Ladislav, I am impressed by your recursive fib. In fact it inspired me to write a zero finding routine in a similar manner. If I am not imposing too much, can you tell me if it is functional programming? Jerry x: binsrch "x - exp - x" 'x 0 1 == 0.567143290409784 exp - x == 0.567143290409784

[REBOL] Encouraging functional programming Re:(5)

1999-11-27 Thread 70740 . 503
Erich, I timed three methods of filling a block with successive integers from ` 1 to 1000. The times are for 1000 iterations. It would seem that head recursion is rather slow. Jerry, time-block/reps [a: array 0 for i 1 1000 1 [insert tail a i]] 1000 0:00:11 time-block/reps [a: array 0 for

[REBOL] Encouraging functional programming Re:(6)

1999-11-27 Thread 70740 . 503
Jordan, I calculate the Fibonnacci numbers without recursion using REBOL. For example fib 100 == 3.54224848179262E+20 How would you calculate it with recursion? Jerry

[REBOL] Encouraging functional programming Re:(7)

1999-11-27 Thread 70740 . 503
Brent, I'm confused. You seem to say that test: func [n /local sum] [sum: 0 for i 1 n 1 [sum: sum + i]] is not functional since it contains an index. On the other you seem to say it is functional in that the output depends only on the input without any side effects. Where did I go wrong?

[REBOL] Encouraging functional programming Re:(8)

1999-11-27 Thread 70740 . 503
Jordan, I am impressed with your clever function. It seems to take only 10% more time than my non-recursive version. Jerry

[REBOL] Encouraging functional programming Re:

1999-11-26 Thread 70740 . 503
John, I don't know what functional code is. However the following example shows the calculation of the product of successive odd numbers for quite a range. What kind of code is it? Jerry source test test: func [n /local x z][ x: array 0 for i 1 n 1 [insert x 2 * i + 1] z: 1

[REBOL] time function Re:(2)

1999-11-22 Thread 70740 . 503
Russ, to-integer epoch works on my machine viz: x: epoch == 943272946 to-integer x == 943272946 type? to-integer x == integer! Jerry

[REBOL] Round function Re:(3)

1999-11-22 Thread 70740 . 503
Donald, Try the script below. It rounds to n digits after the decimal point. n may even be negative. Use do read %filename to load the script. Jerry round: func [x[integer! decimal!] n[integer!]] [ either x = 0 [ x: (x * (10 ** n)) + 0.5 x: x - (x // 1) x: x * (10 **

[REBOL] Date and time in American format

1999-11-22 Thread 70740 . 503
To all I think some of you might be interested in the following script, which prints date and time in standard American long format. I would appreciate comments and suggestions. Jerry { date returns the current date and time in pretty American format} date: function [][t a d m] [ t:

[REBOL] almost counter CGI Re:(4)

1999-11-13 Thread 70740 . 503
To all, The following program creates pretty date and time in American format. To use it, enter do read %file, where file is the name of the file in which the program is stored. I think the code is quite clear, but if you have any difficulties, I shall be glad to explain further. Jerry date:

[REBOL] Declaring Arrays Re:

1999-10-28 Thread 70740 . 503
Phil, Try my-array: array j Jerry

[REBOL] Round function Re:

1999-01-17 Thread 70740 . 503
Andrew, You asked "Any one got any other maths functions?". I have a great many including such things as roots of polynomials, prime factors, eigenvalues and eigenvectors of matrices, inverse of matrices etc. I have started to upload some of them. However, if you would like, I can email any or