[REBOL] When?

2000-05-20 Thread alex . pini

>- Open Your Mind -<



Could we know when RT plans to release the next products, with all the approximations, 
warnings, disclaimers and plain don't-trust-this-dates-too-much granted?
TIA.




Alessandro Pini ([EMAIL PROTECTED])

"Jim... you realize you have no idea what kind of *danger* you may be sending that 
team into." "If there's a *good* kind of danger, doctor, I've yet to *encounter* it." 
(McCoy & Kirk)




[REBOL] Windows NT 4.0 / Apache / Rebol Configuration Re:(2)

2000-05-20 Thread mailinglists

Hello,

> On NT 4.0 in my CMD.EXE window, why does
>
> e:\rebol\rebol.exe --cgi sample.r
>
> product no output, but
>
> e:\rebol\rebol.exe --cgi sample.r | more
>
> produce the correct output? (My configurations etc are
> listed in the message below.)

When you run Rebol in --cgi mode, it is only supposed to produce output
to a webserver, never to the console! Otherwise if your CGI would be
working, it would open a rebol window everytime you ran a cgi script
(apache doesn't have its own console).

But is CGI running yet? Have you tried a script like this:

#!path/to/rebol.exe -cs

REBOL []

print "Content-Type: text/plain^/^/"
print "Just testing!"

Name this script test.cgi and place it in your /cgi-bin/ as defined in
your config. The association you made for Rebol only matters to your NT
system, NOT to Apache, if you would like to set Apache up for .r
execution (and I could never be bothered) you must add an AddHandler
command to your config. Put one below "AddHandler cgi-script .cgi" that
reads: "AddHandler cgi-script .r" and that should work (never tried it,
though)...

Good luck,
Rachid




[REBOL] When? Re:

2000-05-20 Thread Al . Bri

> Could we know when RT plans to release the next products, with all the
approximations, warnings, disclaimers and plain
don't-trust-this-dates-too-much granted?

Have a look on the Ally and Command lists. More details from Carl have been
published there.

Andrew Martin
Submerging...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-




[REBOL] higher order functions

2000-05-20 Thread usher

Is it possible to write a higher order functions like apply, map,
compose etc in rebol?






[REBOL] upgrade on /Core changed?

2000-05-20 Thread ralph

Hey HQ REBOLians???

Did ya guys change something on your Upgrade script?

When I do >> upgrade, I get a buncha stuff like below.

--Ralph Roberts


2.2.0.9.1
0.0.0.9.2
2.2.0.9.3
0.0.0.9.4
2.2.0.9.5
0.0.0.20
0.0.0.21
0.0.0.26
2.2.0.12
2.2.0.17
0.0.0.16
0.0.0.18
2.2.0.4.1
2.2.0.4.2
2.2.0.4.3
2.2.0.4.4
2.2.0.4.5
2.2.0.4.6
0.0.0.4.7
2.2.0.4.8
2.2.0.4.9
2.2.0.2.1
2.2.0.2.2
2.2.0.2.3
2.2.0.2.4
Your copy of Windows 95/98/NT iX86 REBOL/core 2.2.0.3.1 is currently
up-to-date.





[REBOL] upgrade on /Core changed? Re:

2000-05-20 Thread ralph

Same thing on my BSD Unix server

--Ralph

> Hey HQ REBOLians???
> 
> Did ya guys change something on your Upgrade script?
> 
> When I do >> upgrade, I get a buncha stuff like below.
> 
> --Ralph Roberts
> 
> 
> 2.2.0.9.1
> 0.0.0.9.2
> 2.2.0.9.3
> 0.0.0.9.4
> 2.2.0.9.5
> 0.0.0.20
> 0.0.0.21
> 0.0.0.26
> 2.2.0.12
> 2.2.0.17
> 0.0.0.16
> 0.0.0.18
> 2.2.0.4.1
> 2.2.0.4.2
> 2.2.0.4.3
> 2.2.0.4.4
> 2.2.0.4.5
> 2.2.0.4.6
> 0.0.0.4.7
> 2.2.0.4.8
> 2.2.0.4.9
> 2.2.0.2.1
> 2.2.0.2.2
> 2.2.0.2.3
> 2.2.0.2.4
> Your copy of Windows 95/98/NT iX86 REBOL/core 2.2.0.3.1 is currently
> up-to-date.
> 




[REBOL] upgrade on /Core changed? Re:(2)

2000-05-20 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

> Same thing on my BSD Unix server
>
> --Ralph
>

Smells like 2.3 is near ;-) :-)))

-pekr-

>
> > Hey HQ REBOLians???
> >
> > Did ya guys change something on your Upgrade script?
> >
> > When I do >> upgrade, I get a buncha stuff like below.
> >
> > --Ralph Roberts
> >
> >
> > 2.2.0.9.1
> > 0.0.0.9.2
> > 2.2.0.9.3
> > 0.0.0.9.4
> > 2.2.0.9.5
> > 0.0.0.20
> > 0.0.0.21
> > 0.0.0.26
> > 2.2.0.12
> > 2.2.0.17
> > 0.0.0.16
> > 0.0.0.18
> > 2.2.0.4.1
> > 2.2.0.4.2
> > 2.2.0.4.3
> > 2.2.0.4.4
> > 2.2.0.4.5
> > 2.2.0.4.6
> > 0.0.0.4.7
> > 2.2.0.4.8
> > 2.2.0.4.9
> > 2.2.0.2.1
> > 2.2.0.2.2
> > 2.2.0.2.3
> > 2.2.0.2.4
> > Your copy of Windows 95/98/NT iX86 REBOL/core 2.2.0.3.1 is currently
> > up-to-date.
> >




[REBOL] upgrade on /Core changed? Re:(3)

2000-05-20 Thread ralph

<*sniff, sniff*> yu!

Hey, I believe you are right, Pekr... and I wuz just thinking we were having
something good cooking for supper.

--Ralph


> [EMAIL PROTECTED] wrote:
>
> > Same thing on my BSD Unix server
> >
> > --Ralph
> >
>
> Smells like 2.3 is near ;-) :-)))
>
> -pekr-
>
> >
> > > Hey HQ REBOLians???
> > >
> > > Did ya guys change something on your Upgrade script?
> > >
> > > When I do >> upgrade, I get a buncha stuff like below.
> > >
> > > --Ralph Roberts
> > >
> > >
> > > 2.2.0.9.1
> > > 0.0.0.9.2
> > > 2.2.0.9.3
> > > 0.0.0.9.4
> > > 2.2.0.9.5
> > > 0.0.0.20
> > > 0.0.0.21
> > > 0.0.0.26
> > > 2.2.0.12
> > > 2.2.0.17
> > > 0.0.0.16
> > > 0.0.0.18
> > > 2.2.0.4.1
> > > 2.2.0.4.2
> > > 2.2.0.4.3
> > > 2.2.0.4.4
> > > 2.2.0.4.5
> > > 2.2.0.4.6
> > > 0.0.0.4.7
> > > 2.2.0.4.8
> > > 2.2.0.4.9
> > > 2.2.0.2.1
> > > 2.2.0.2.2
> > > 2.2.0.2.3
> > > 2.2.0.2.4
> > > Your copy of Windows 95/98/NT iX86 REBOL/core 2.2.0.3.1 is currently
> > > up-to-date.
> > >
>





[REBOL] higher order functions Re:

2000-05-20 Thread lmecir

Hi, here you are:

Rebol [
Title: "Enum"
Date: 15/12/1999
File: %enum.r
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
]

enum: func [
{Enumerates a block}
from [integer!]
to [integer!]
/local result
][
result: make block! to + 1 - from
for i from to 1 [
append/only result i
]
result
]

{
Example:

enum 1 3
}

Rebol [
Title: "Map"
Date: 15/12/1999
File: %map.r
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
]

map: func ["Maps a function to all elements of a block"
f [any-function!] blk [block!]
/local result
][
result: make block! length? blk
foreach elem blk [
append/only result f :elem
]
result
]

{
Example:

map :- [1 2 3]
}

Rebol [
Title: "Nargs"
Date: 31/1/2000
Version: 1.0.0
File: %nargs.r
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
Limitations: {
ignores refinements
}
]

nargs: func [
"The number of the function arguments"
f [any-function!]
/local result args
] [
result: 0
args: first :f
while [not empty? args] [
either refinement? first :args [args: tail args] [
result: result + 1
args: next args
]
]
result
]

{
Examples:

nargs :-
}

Rebol [
Title: "Apply"
Date: 31/1/2000
File: %apply.r
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
Purpose: {
Apply a function to its arguments stored in a block
}
]

include %enum.r
include %map.r
include %nargs.r

toarg: func [i [integer!]] [
to word! append copy "a" form i
]

apply: func [
{Apply a function to its arguments}
f [any-function!]
blkargs [block!] {Argument values}
/local numargs args getargs
] [
numargs: nargs :f
args: map :toarg enum 1 :numargs
use :args compose [
set/any (reduce [args]) (reduce [blkargs])
f (
getargs: make block! 2 * numargs
foreach arg args [
append getargs compose [
   get/any (to lit-word! arg)
]
]
)
]
]

{
Example:

apply :subtract [2 1]
apply :type? reduce [()]
}

Rebol [
Title: "SFun"
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
Date: 8/3/2000
File: %sfun.r
Purpose: {
A function with static variables
}
Category: [General]
]

sfun: func [
{create a function with static local variables}
init [block!]
args [block!]
body [block!]
/local ini words
] [
words: copy []
foreach elem :init [
if set-word? :elem [
append :words to word! :elem
]
]
words: union :words []
ini: function [] :words compose [
(reduce [:words])
(:init)
]
ini
if not empty? :words [
words: first first second :ini
body: compose [
(reduce [reduce [:ini]])
(bind/copy :body :words)
]
]
func :args :body
]

{
Example #1:

counter: sfun [count: 0] [] [
count: count + 1
print count
]

counter
counter
recycle
counter


Example #2

cell: func [
{create a function that holds a value}
initval [any-type!]
] [
sfun [value: none set/any 'value get/any 'initval origset:
:set] [
/set newval [any-type!]
] [
either set [origset/any 'value get/any 'newval] [
get/any 'value
]
]
]

a: cell 5
print a
a/set 18
print a
}


Rebol [
Title: "Curry"
Date: 31/1/2000
Version: 2.0.4
File: %curry.r
Author: "Ladislav Mecir"
Email: [EMAIL PROTECTED]
History: [
1.0.0 {alpha, problems with GC and function contexts}
2.0.0 {still GC problems}
2.0.2 {incorrect handling of natives/actions}
2.0.3 {incorrect handling of unset arguments}
2.0.4 {
CATCH/THROW attributes of the argument function
ignored
refinements of the argument function ignored
incompatible with literal/fetched arguments of the
argument function
}
]
]

include %map.r
include %enum.r
include %nargs.r
include %sfun.r

toarg: func [i [integer!]] [
to word! append copy "a" form i
]

tla: func [i [integer!]] [
to lit-word! append copy "a" form i
]

tsa: func [i [integer!]] [
to set-word! append copy "a" form i
]

ga: func [a] [get/any a]

curry: func ["Create curried functions"
f [any-function!] "Function to be curried"
cargs [integer!] "Number of the arguments of the result"
/local numargs args restargs getargs setargs
] [
numargs: nargs :f
args: map :toarg enum 1 cargs
restargs: map :toarg enum cargs + 1 numargs
setargs: make block! 2 * cargs
for i 1 cargs 1 [
append setargs compose [
(tsa i) none
]
]
getargs: make block! 2 * numargs
for i 1