[REBOL] Simple CGI Problem Re:(7)

2000-05-24 Thread fred-ml

Hello christian,

Wednesday, May 24, 2000, 6:08:38 PM, you wrote:

cwpad> IFRAME is IE-specific. But have you tried ILAYER? Or  WIDTH="1" HEIGHT="1">?

 ?... cannot find it in HTML4

 is nice, but for including text.

Regards, Fredrik Bergstrom

--

[ PowerWebs have a good Webhotel for everyone, supports Rebol to =) ]
[ www.powerwebs.se  ]

PowerWebs AB
Wåxnäsgatan 10
S-653 40 Karlstad
Sweden
Tel: +46-(0)54-103377
Fax: +46-(0)54-103376
ICQ# 7654213





[REBOL] Simple CGI Problem Re:(7)

2000-05-24 Thread fred-ml

Hello ryanc,

Wednesday, May 24, 2000, 7:33:41 PM, you wrote:

ridc> After viewing your counter I got an idea you might like.  You can have your 
REBOLridc> You could also use tags like , just 12345, or whatever 
sequence you
ridc> feel appropriate. This could be useful for doing quotes of the day, random 
jokes, time
ridc> and date, and all that other fun stuff.

ridc> Best of all, it would count everytime.

Wouldn't there be a Cache problem here, IE fetches its html pages from
the cache if possible, the same as Netscape does for pictures.

Also, having a page that is
http://www.server.web/index.r
is ok while
http://www.server.web/remap.r?index.html
is not ok..

maybe the index.r is what you where thinking of?

Regards, Fredrik Bergstrom

--
[   I'm on candid camera =) (www.powerwebs.se and click on webcam)   ]

PowerWebs AB
Wåxnäsgatan 10
S-653 40 Karlstad
Sweden
Tel: +46-(0)54-103377
Fax: +46-(0)54-103376
ICQ# 7654213





[REBOL] Amiga PPC version?

2000-05-24 Thread peter . carlsson

Hello!

Are there any plans on Amiga PPC versions of the
REBOL products?

Best regards,
Peter Carlsson


Peter CarlssonTel: +46 31 735 45 26
Saab Ericsson Space ABFax: +46 31 735 40 00
S-405 15 Göteborg Email: [EMAIL PROTECTED]
SWEDENURL: http://www.space.se





[REBOL] refinements Re:(2)

2000-05-24 Thread Al . Bri

> And this function shows how to use it:

Ooops!
Actually, it shows _why_ the replacement 'append is needed.

As can be seen in this line:
> if case [head insert tail :Refined_Select 'case]

and this line (from the replacement 'append):
> head Refined_Insert tail :series :value

With the replacement 'append, this line is nicer:
if case [append Refined_Select 'case]

Andrew Martin
An imperfect rebol...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-




[REBOL] refinements Re:

2000-05-24 Thread Al . Bri

> I want to pass all of the given refinements to another function.

There's a better way of doing this. Just 'append (you have to replace
'append with a better 'append, though) the refinements of the function to
the function as a path.

Like this:


; A replacement 'append function that doesn't evaluate 'series and uses a
refined path for 'insert.
append: function [
 {Appends a value to the tail of a series and returns the series head.}
 series [series! port!]
 value
 /only {Appends a block value into a block series as a block}
 ][
 Refined_Insert
 ][
 Refined_Insert: to path! 'insert
 if only [head insert tail :Refined_Insert 'only]
 head Refined_Insert tail :series :value
 ]

And this function shows how to use it:

SNA_switch: function [
 "Selects a choice and evaluates what follows it."
 value "Value to search for."
 cases [block!] "Block of cases to search."
 /case "Value is case-sensitive."
 /only "Treats a series value as a single value."
 /any "Enables the * and ? wildcards."
 /default Default_Case "Default case if no others are found."
 ][
 Refined_Select
 ][
 Refined_Select: to path! 'select
 if case [head insert tail :Refined_Select 'case]
 if only [head insert tail :Refined_Select 'only]
 if any [head insert tail :Refined_Select 'any]
 either found? value: Refined_Select cases value [
  do value
  ][
  either default [
   do Default_Case
   ][
   none
   ]
  ]
 ]

I hope that helps!

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




[REBOL] refinements Re:

2000-05-24 Thread icimjs

Hi Michael,

here's another idea:

1. Use refine-func instead of func to create a function.
2. Use call-with-refine to call a function with refinements.

Example:

Given the function f:
f: func [/a /b /c][if a [print 'a] if b [print 'b] if c [print 'c]]

You can create a calling function g:
g: refine-func [/a /b /c] [ call-with-refine f refinements ]

Such that:
>> g
== false
>> g/a
a
== false
>> g/b
b
== false
>> g/c
c
== false


Here are the two functions refine-func and call-with-refine:


refine-func: func [spec body /local refinements] [
  refinements: make block! length? spec
  foreach word spec [
if all [
 refinement? word 
 word <> /local
   ]
[
  append refinements to word! word
]
  ]
  insert body compose/deep [
refinements: make block! 0 
foreach word [(refinements)] [
  if get :word [ append refinements word ] 
]

  ]
  either found? find spec /local [
append spec 'refinements
  ][
append spec [/local refinements]
  ]
  return func spec body
]

call-with-refine: func [:f ref-block [block!] /local g] [
  g: make path! compose [f (ref-block)]
  g
]

Oh, by the way, the function defined as

g: refine-func [/a /b /c] [ call-with-refine f refinements ]

ends up looking like this:

>> source g
g: func [/a /b /c /local refinements][
refinements: make block! 0
foreach word [a b c] [
if get :word [append refinements word]] call-with-refine f
refinements]
>>

At 12:50 PM 5/24/00 -0700, you wrote:
>A while back a message was posted to the list (can't find it now) about
>wanting to loop on the refinements specified to a function, without an 'if
>for each one. I've finally come up with a reason to do something similar: I
>want to pass all of the given refinements to another function. That is:
>
>- I call func A, giving some refinements
>- func A calls func B with all of the refinements given to func A
>
>I have been doing the 'if thing on each possible refinent of A and
>performing a different (hard-coded) call of B with each different
>refinement, but this would get messy if I were to specify more than one
>refinement at a time. I have found an "automatic" way of building the
>funcname/refinement string, but I haven't found any "slick" way of doing it.
>BTW the code below could be improved by recognizing only refinement! from
>the first func block. However, I haven't decided whether I even want to use
>it.
>
>f1: function [/a /b /c][local1 local2 local3][
>   ; Calls function F2 with the refinements given to this function
>   ; MUST define [local1 local2 local3] (exactly) as locals to this
>function
>   local3: :f1
>   do bind refine 'local1
>   do join "f2" local1
>]
>
>f2: func [/a /b /c][if a [print "a"] if b [print "b"] if c [print "c"]]
>
>; Then, somewhere in the code specify the block:
>refine: [
>   local1: make string! length? first :local3
>   ; Assume that no other parameters were specified
>   repeat local2 length? first :local3 [
>   if true = get bind to-word pick first :local3 local2 'local1
>   [append local1 join "/" pick first :local3 local2]
>   ]
>]
>
>; Example use:
>>> f1/b
>b
>== none
>>> f1/b/c
>b
>c
>- Michael Jelinek
>
>
>

;- Elan >> [: - )]




[REBOL] New REBOL Website .... Re:(2)

2000-05-24 Thread vddi



[EMAIL PROTECTED] a écrit :

> What is the website address?
>

It's the same old adress , Frederick ;-) It's only a new design for our
preferred site http://www.rebol.com !!!

>
> Thanks!
> Frederick Thomas
> [EMAIL PROTECTED]
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 24, 2000 1:25 PM
> Subject: [REBOL] New REBOL Website 
>
> > Hi,
> >
> > updated content of REBOL website with much of interesting info ...
> >
> > -pekr-
> >
> >




[REBOL] Website & Direction

2000-05-24 Thread carl

Yes.  This is our "first wave" business direction.  It's a fertile ground that we 
think has great potential. It gives us the niche we need to build our business, but 
gives us a lot of dynamic range to expand into other markets as we succeed.

Besides, it gives all us REBOL folks, both you and me, the ability to now live off of 
our favorite hobby.  8)

-Carl, Founder


At 5/24/00 08:25 PM +0200, you wrote:
>
>
>[EMAIL PROTECTED] wrote:
>
>> >
>> > Hi,
>> >
>> > updated content of REBOL website with much of interesting info ...
>> >
>> > -pekr-
>> >
>>
>> VERY much interesting content, Pekr. REBOL appears well on its way now.
>> Exciting.
>
>Well, my comment from ally list - what do you think?:
>
>
>
>hmm, much of buzzwords, seems like REBOL moving from multimedia tool to
>some money money corporate spheres ;-)
>
>What's REBOL/Serve? Seems like it contains functions promissed earlier
>for /Command. So does it mean we will not get tasking/threading for
>/Core or /View some day? What about so called "on-demand component
>loading"? Or are just REBOL/Link, REBOL/Serve and REBOL/Track fitting
>the earlier picture of rebol modules and components?
>
>Thanks,
>
>-pekr-
>
>---
>
>-pekr-
>
>>
>>
>> --Ralph Roberts
> 




[REBOL] refinements

2000-05-24 Thread mjelinek

A while back a message was posted to the list (can't find it now) about
wanting to loop on the refinements specified to a function, without an 'if
for each one. I've finally come up with a reason to do something similar: I
want to pass all of the given refinements to another function. That is:

- I call func A, giving some refinements
- func A calls func B with all of the refinements given to func A

I have been doing the 'if thing on each possible refinent of A and
performing a different (hard-coded) call of B with each different
refinement, but this would get messy if I were to specify more than one
refinement at a time. I have found an "automatic" way of building the
funcname/refinement string, but I haven't found any "slick" way of doing it.
BTW the code below could be improved by recognizing only refinement! from
the first func block. However, I haven't decided whether I even want to use
it.

f1: function [/a /b /c][local1 local2 local3][
; Calls function F2 with the refinements given to this function
; MUST define [local1 local2 local3] (exactly) as locals to this
function
local3: :f1
do bind refine 'local1
do join "f2" local1
]

f2: func [/a /b /c][if a [print "a"] if b [print "b"] if c [print "c"]]

; Then, somewhere in the code specify the block:
refine: [
local1: make string! length? first :local3
; Assume that no other parameters were specified
repeat local2 length? first :local3 [
if true = get bind to-word pick first :local3 local2 'local1
[append local1 join "/" pick first :local3 local2]
]
]

; Example use:
>> f1/b
b
== none
>> f1/b/c
b
c
- Michael Jelinek




[REBOL] [REBOL]hidden variables in objects? Re:(2)

2000-05-24 Thread tim

Thanks Elan:
I will pass on the info, and make use of
it myself, no doubt.
Also will apprise you folks of this presentation.
It's good news I think!!
Later
Tim
At 11:47 AM 5/24/00 -0700, you wrote:
>Hi Tim,
>
>hiding words in REBOL is independent of objects and facilitated by the 'use
>context. The 'use context can be used in objects.
>
>The 'use native is used to create a context in which words are hidden:
>
>use [ a b c ] [
>  a: 1
>  b: 2
>  c: 3
>]
>
>
>object: make object! [
>  a: none
>  b: none
>  use [a b] [
>a: "this is the hidden a"
>b: "this is the hidden b"
>  ]
>]
>
>If we probe the object we find that the words in the use context are not
>exposed:
>
>>> probe object
>
>make object! [
>a: none
>b: none
>]
>
>
>
>At 09:20 AM 5/24/00 -0800, you wrote:
>>I am presently reviewing a presentation on rebol
>>made by a third party. It is good to see that rebol
>>is getting some exposure.
>>
>>I need to verify something stated in this presentation:
>>Can there be "hidden variables" in a rebol object.
>>
>>I.E. would these by like private variables/methods
>>in C++;
>>
>>I'd appreciate the informed word on this.
>>
>>Thanks
>>Tim
>>
>>
>>
>
>;- Elan >> [: - )]
>
>




[REBOL] Simple CGI Problem Re:(9)

2000-05-24 Thread ryanc

Here you go:
--
REBOL [
Title: "Preprocessing counter"
Date:  24-May-2000
Purpose: {Reads an HTML document replacing ~counter with the
contents of the counter.txt file, incrementing it in the
process.  Meant to be ran as a CGI.}
]

page: copy read %index.html

save %counter.txt counter: (load %counter.txt) + 1

replace page "~counter" counter

prin "Content-type text/html^(0A)^(0A)"
print page

--

Enjoy!  --Ryan

[EMAIL PROTECTED] wrote:

> Yes, please send it.  And thanks!
>
> Louis
>
> At 11:01 AM 5/24/00 -0700, you wrote:
> >You probably wont need it, but I now have source for that available on
> >request.
> >
> >[EMAIL PROTECTED] wrote:
> >
> > > I love the inline frame tag, but unfortuneately its not well supported
> > yet. That makes
> > > it a bad counter since you would only count those browsers that support it.
> > >
> > > After viewing your counter I got an idea you might like.  You can have
> > your REBOL
> > > counter preprocess your web page--much like the way PHP or SSI
> > does.  Have it parse
> > > your web page looking for a special text like ~counter.  Once this text
> > is found it
> > > would replace it with the actual count.  This way would let you use
> > your favorite html
> > > editor to create and edit the page, and still have an easy to create
> > program.
> > >
> > > You could also use tags like , just 12345, or whatever
> > sequence you
> > > feel appropriate. This could be useful for doing quotes of the day,
> > random jokes, time
> > > and date, and all that other fun stuff.
> > >
> > > This would only add about 3 or 4 more lines to your existing counter
> > script. Hint: use
> > > the replace function.  You will also need to tell the webserver that
> > your printing
> > > html by first printing "Content-type: text/html^(0A)^(0A)".
> > >
> > > Best of all, it would count everytime.
> > >
> > > --Ryan




[REBOL] [REBOL]hidden variables in objects? Re:

2000-05-24 Thread icimjs

Hi Tim,

hiding words in REBOL is independent of objects and facilitated by the 'use
context. The 'use context can be used in objects.

The 'use native is used to create a context in which words are hidden:

use [ a b c ] [
  a: 1
  b: 2
  c: 3
]


object: make object! [
  a: none
  b: none
  use [a b] [
a: "this is the hidden a"
b: "this is the hidden b"
  ]
]

If we probe the object we find that the words in the use context are not
exposed:

>> probe object

make object! [
a: none
b: none
]



At 09:20 AM 5/24/00 -0800, you wrote:
>I am presently reviewing a presentation on rebol
>made by a third party. It is good to see that rebol
>is getting some exposure.
>
>I need to verify something stated in this presentation:
>Can there be "hidden variables" in a rebol object.
>
>I.E. would these by like private variables/methods
>in C++;
>
>I'd appreciate the informed word on this.
>
>Thanks
>Tim
>
>
>

;- Elan >> [: - )]




[REBOL] New REBOL Website .... Re:

2000-05-24 Thread bciceron


YES,

it 's getting really good ... just as the products themself.

i wonder wether it can even beat java at its own game.

think about it, rebol is: multiplatform , FAST,
easy, porwerfull.

the only lacking feature may be database interfacing.
but it may be already on its way , specialy DB access ?
i think it's the key to win all those blooming
dynamic page commercial servers.

anybody has an input on that ?

On Wed, 24 May 2000 [EMAIL PROTECTED] wrote:

-- Hi,
-- 
-- updated content of REBOL website with much of interesting info ...
-- 
-- -pekr-
-- 







[REBOL] Simple CGI Problem Re:(7)

2000-05-24 Thread allenk


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 25, 2000 3:33 AM
Subject: [REBOL] Simple CGI Problem Re:(6)


> I love the inline frame tag, but unfortuneately its not well supported
yet. That makes
> it a bad counter since you would only count those browsers that support
it.

I know it is poorly supported, and that is a real shame/pain. It's in the
HTML 4.0 & 4.1
standards. It is a great tag for returning results from multiple queries,
by shifting the calling of the queries off the server and onto the client.

Cheers,

Allen K






[REBOL] Simple CGI Problem Re:(8)

2000-05-24 Thread allenk

Another solution is to return an image of the number rather than the text.
There is a script on
rebol.org that can create these number gifs on the fly. So adapt it to your
counter needs.

http://www.rebol.org/cgi/gif-number.html
http://www.rebol.org/cgi/gif-number.r

Then you can add the link to the script as a normal image tag. This would be
the most cross browser friendly method.

Cheers,

Allen K


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 25, 2000 4:01 AM
Subject: [REBOL] Simple CGI Problem Re:(7)


> You probably wont need it, but I now have source for that available on
request.
>
> [EMAIL PROTECTED] wrote:
>
> > I love the inline frame tag, but unfortuneately its not well supported
yet. That makes
> > it a bad counter since you would only count those browsers that support
it.
> >
> > After viewing your counter I got an idea you might like.  You can have
your REBOL
> > counter preprocess your web page--much like the way PHP or SSI does.
Have it parse
> > your web page looking for a special text like ~counter.  Once this text
is found it
> > would replace it with the actual count.  This way would let you use your
favorite html
> > editor to create and edit the page, and still have an easy to create
program.
> >
> > You could also use tags like , just 12345, or whatever
sequence you
> > feel appropriate. This could be useful for doing quotes of the day,
random jokes, time
> > and date, and all that other fun stuff.
> >
> > This would only add about 3 or 4 more lines to your existing counter
script. Hint: use
> > the replace function.  You will also need to tell the webserver that
your printing
> > html by first printing "Content-type: text/html^(0A)^(0A)".
> >
> > Best of all, it would count everytime.
> >
> > --Ryan
>
>




[REBOL] [REBOL]Setting up an error template Re:(2)

2000-05-24 Thread tim

Hi Volker:
I take note of make error! and will
experiment with it later today.
Thank you
Tim
At 10:54 AM 5/24/00 +0100, you wrote:
>
>> The following block construct seems to work to
>> catch errors from the interpreter:
>> ;==
>> if error? set/any 'err
>> try
>> [ "Good Code Block"
>>   x: "a" + 1
>> ]
>> [ "Error Block"
>>   err: disarm err
>>   print reform bind (get in (get in system/error err/type) err/id) in err
>> 'type
>> ]
>> Two questions arise from this
>> 1)Are there associated error numbers that I can trap and 
>>   thus change the syntax of the error message itself?
>
>Understand not fully. the reis [code: 800] or that in the
>error-object, but trapping?!
>But, look at that:
>
>>> catch [print 123 throw 'bum print 234]
>123
>==  bum  ;  word!
>this way you have not to deal with "dangerous" 'error! . Dangerous? :
> 
>> 2)Is there a way in which I can explicitly force control to
>>   be transferred to "Error Block", with an attendant error message.
>> I have looked at docs for "throw" and don't find a clear answer
>> there.
>
>>> try [123 make error! "bum" 234] 
>** User Error: bum.
>** Where: make error! "bum"
>
>as you can see, having an "armed" error throws it!
>
>> 
>> Thanks
>> Tim
>> 
>
>Volker
>
>




[REBOL] New REBOL Website .... Re:(2)

2000-05-24 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

> >
> > Hi,
> >
> > updated content of REBOL website with much of interesting info ...
> >
> > -pekr-
> >
>
> VERY much interesting content, Pekr. REBOL appears well on its way now.
> Exciting.

Well, my comment from ally list - what do you think?:



hmm, much of buzzwords, seems like REBOL moving from multimedia tool to
some money money corporate spheres ;-)

What's REBOL/Serve? Seems like it contains functions promissed earlier
for /Command. So does it mean we will not get tasking/threading for
/Core or /View some day? What about so called "on-demand component
loading"? Or are just REBOL/Link, REBOL/Serve and REBOL/Track fitting
the earlier picture of rebol modules and components?

Thanks,

-pekr-

---

-pekr-

>
>
> --Ralph Roberts




[REBOL] New REBOL Website .... Re:(2)

2000-05-24 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

> What is the website address?

Http://www.rebol.com :-))


>
>
> Thanks!
> Frederick Thomas
> [EMAIL PROTECTED]
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 24, 2000 1:25 PM
> Subject: [REBOL] New REBOL Website 
>
> > Hi,
> >
> > updated content of REBOL website with much of interesting info ...
> >
> > -pekr-
> >
> >




[REBOL] Simple CGI Problem Re:(8)

2000-05-24 Thread louisaturk

Yes, please send it.  And thanks!

Louis

At 11:01 AM 5/24/00 -0700, you wrote:
>You probably wont need it, but I now have source for that available on 
>request.
>
>[EMAIL PROTECTED] wrote:
>
> > I love the inline frame tag, but unfortuneately its not well supported 
> yet. That makes
> > it a bad counter since you would only count those browsers that support it.
> >
> > After viewing your counter I got an idea you might like.  You can have 
> your REBOL
> > counter preprocess your web page--much like the way PHP or SSI 
> does.  Have it parse
> > your web page looking for a special text like ~counter.  Once this text 
> is found it
> > would replace it with the actual count.  This way would let you use 
> your favorite html
> > editor to create and edit the page, and still have an easy to create 
> program.
> >
> > You could also use tags like , just 12345, or whatever 
> sequence you
> > feel appropriate. This could be useful for doing quotes of the day, 
> random jokes, time
> > and date, and all that other fun stuff.
> >
> > This would only add about 3 or 4 more lines to your existing counter 
> script. Hint: use
> > the replace function.  You will also need to tell the webserver that 
> your printing
> > html by first printing "Content-type: text/html^(0A)^(0A)".
> >
> > Best of all, it would count everytime.
> >
> > --Ryan




[REBOL] New REBOL Website .... Re:(2)

2000-05-24 Thread ryanc

www.rebol.com

[EMAIL PROTECTED] wrote:

> What is the website address?
>
> Thanks!
> Frederick Thomas
> [EMAIL PROTECTED]
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 24, 2000 1:25 PM
> Subject: [REBOL] New REBOL Website 
>
> > Hi,
> >
> > updated content of REBOL website with much of interesting info ...
> >
> > -pekr-
> >
> >




[REBOL] New REBOL Website .... Re:

2000-05-24 Thread ralph



>
> Hi,
>
> updated content of REBOL website with much of interesting info ...
>
> -pekr-
>

VERY much interesting content, Pekr. REBOL appears well on its way now.
Exciting.

--Ralph Roberts





[REBOL] Simple CGI Problem Re:(7)

2000-05-24 Thread ryanc

You probably wont need it, but I now have source for that available on request.

[EMAIL PROTECTED] wrote:

> I love the inline frame tag, but unfortuneately its not well supported yet. That 
>makes
> it a bad counter since you would only count those browsers that support it.
>
> After viewing your counter I got an idea you might like.  You can have your REBOL
> counter preprocess your web page--much like the way PHP or SSI does.  Have it parse
> your web page looking for a special text like ~counter.  Once this text is found it
> would replace it with the actual count.  This way would let you use your favorite 
>html
> editor to create and edit the page, and still have an easy to create program.
>
> You could also use tags like , just 12345, or whatever sequence you
> feel appropriate. This could be useful for doing quotes of the day, random jokes, 
>time
> and date, and all that other fun stuff.
>
> This would only add about 3 or 4 more lines to your existing counter script. Hint: 
>use
> the replace function.  You will also need to tell the webserver that your printing
> html by first printing "Content-type: text/html^(0A)^(0A)".
>
> Best of all, it would count everytime.
>
> --Ryan




[REBOL] New REBOL Website .... Re:

2000-05-24 Thread mijit

What is the website address?

Thanks!
Frederick Thomas
[EMAIL PROTECTED]
- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 24, 2000 1:25 PM
Subject: [REBOL] New REBOL Website 


> Hi,
> 
> updated content of REBOL website with much of interesting info ...
> 
> -pekr-
> 
> 




[REBOL] Simple CGI Problem Re:(6)

2000-05-24 Thread ryanc

I love the inline frame tag, but unfortuneately its not well supported yet. That makes
it a bad counter since you would only count those browsers that support it.

After viewing your counter I got an idea you might like.  You can have your REBOL
counter preprocess your web page--much like the way PHP or SSI does.  Have it parse
your web page looking for a special text like ~counter.  Once this text is found it
would replace it with the actual count.  This way would let you use your favorite html
editor to create and edit the page, and still have an easy to create program.

You could also use tags like , just 12345, or whatever sequence you
feel appropriate. This could be useful for doing quotes of the day, random jokes, time
and date, and all that other fun stuff.

This would only add about 3 or 4 more lines to your existing counter script. Hint: use
the replace function.  You will also need to tell the webserver that your printing
html by first printing "Content-type: text/html^(0A)^(0A)".

Best of all, it would count everytime.

--Ryan

[EMAIL PROTECTED] wrote:

> Hello allenk,
>
> Wednesday, May 24, 2000, 12:47:15 PM, you wrote:
>
> apca> http://www.worldmerchantltd.com/cgi-bin/counter.r>
> apca> 
>
> Only in IE5... hm.. I cannot get it to work in Netscape at all.
>
> Regards, Fredrik Bergstrom
>
> --
>
> [ PowerWebs have a good Webhotel for everyone, supports Rebol to =) ]
> [ www.powerwebs.se  ]
>
> PowerWebs AB
> Wåxnäsgatan 10
> S-653 40 Karlstad
> Sweden
> Tel: +46-(0)54-103377
> Fax: +46-(0)54-103376
> ICQ# 7654213




[REBOL] New REBOL Website ....

2000-05-24 Thread Petr . Krenzelok

Hi,

updated content of REBOL website with much of interesting info ...

-pekr-




[REBOL] [REBOL]hidden variables in objects?

2000-05-24 Thread tim

I am presently reviewing a presentation on rebol
made by a third party. It is good to see that rebol
is getting some exposure.

I need to verify something stated in this presentation:
Can there be "hidden variables" in a rebol object.

I.E. would these by like private variables/methods
in C++;

I'd appreciate the informed word on this.

Thanks
Tim




[REBOL] Simple CGI Problem Re:(5)

2000-05-24 Thread louisaturk

Allen,

Your solution worked!  Many thanks to you and  everyone else that has 
helped me with this problem.

Here is the exact line that works:

http://www.worldmerchantltd.com/cgi-bin/counter.r>

Thanks again to everyone.
Louis


At 08:47 PM 5/24/00 +1000, you wrote:
>Have you tried using IFRAME ? It works, as long as the browser supports
>HTML4.0




[REBOL] Simple CGI Problem Re:(6)

2000-05-24 Thread christian . wenz

IFRAME is IE-specific. But have you tried ILAYER? Or ?

Regards
Christian

[EMAIL PROTECTED] wrote:

> Hello allenk,
>
> Wednesday, May 24, 2000, 12:47:15 PM, you wrote:
>
> apca> http://www.worldmerchantltd.com/cgi-bin/counter.r>
> apca> 
>
> Only in IE5... hm.. I cannot get it to work in Netscape at all.
>
> Regards, Fredrik Bergstrom
>
> --
>
> [ PowerWebs have a good Webhotel for everyone, supports Rebol to =) ]
> [ www.powerwebs.se  ]
>
> PowerWebs AB
> Wåxnäsgatan 10
> S-653 40 Karlstad
> Sweden
> Tel: +46-(0)54-103377
> Fax: +46-(0)54-103376
> ICQ# 7654213

--
PP Active GmbH
Informations- und Kommunikationssysteme
Candidplatz 11
81543 Muenchen
Phone: +49 89 748828 0
Fax:   +49 89 748828 11
Mail: [EMAIL PROTECTED]





[REBOL] Simple CGI Problem Re:(5)

2000-05-24 Thread fred-ml

Hello allenk,

Wednesday, May 24, 2000, 12:47:15 PM, you wrote:

apca> http://www.worldmerchantltd.com/cgi-bin/counter.r>
apca> 

Only in IE5... hm.. I cannot get it to work in Netscape at all.

Regards, Fredrik Bergstrom

--

[ PowerWebs have a good Webhotel for everyone, supports Rebol to =) ]
[ www.powerwebs.se  ]

PowerWebs AB
Wåxnäsgatan 10
S-653 40 Karlstad
Sweden
Tel: +46-(0)54-103377
Fax: +46-(0)54-103376
ICQ# 7654213





[REBOL] Changing a String to a file? Re:(2)

2000-05-24 Thread mjelinek

Hmm, I always used 'to-file. The 5/% key is broken on my (other) keyboard.

file: to-file "/path/file"

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 24, 2000 5:24 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Changing a String to a file? Re:



Thanks for the Help.  Load does the job.  

Doug

At 08:06 AM 5/24/00 -0200, you wrote:
>
>Hello, How do I change a string such as 
>file: "%/path/file" to type: file?
>file: %/path/file
>
>thanks in advance,
>Doug
>
>




[REBOL] [REBOL] [REBOL] Default Port Values? Amended Re:

2000-05-24 Thread icimjs

Hi Tim,


A) Initiliazing Words?
why do you want to initialize the word port to some value before opening
it? Let us assume you did NOT initialize it. Then there are three possible
states for the word port. It does not exist yet, because the port has not
been opened. You can check for this condition using value?

>>  value? 'port
== false

once the word port has been assigned to some value? 'port returns true.
This value could be an open port! or something else. 

Second condition is port has been opened. Third condition is port has been
closed. Note that when a port has been closed, it still qualifies as a
value of type port!. Trying to read from or write to a closed port will
generate an error. (Maybe that is the source of some of your errors? Can
have you been trying to read from or write to a closed port, because the
port was not none?)

3 -> 2

You may want to reduce complexity by dealing with two port states: exists
or open. Then, whenever you close a port, use unset to get rid of the word.
Instead of using the close function, you use the following shut function
that does it for you:

shut: func ['port] [
  if port? get port [
close get port
unset port
  ]
]

>> value? 'port
== false
>> port: open %file
>> value? 'port
== true
>> shut port
>> value? 'port
== false


Of course it's more port-like (portly?) to ask the port if its open,
instead of asking it if it exists. Also, if it exists, it better reference
a port! value. Let's do that:

open?: func ['port] [
  return all [
   value? port
   port? get port
 ]
]

>> open? port
== false
>> port: open %file
>> open? port
== true
>> shut port
>> open? port
== false

Using the three functions open?, open, and shut consistently, instead of
using close will narrow words referencing ports to two states. If open?
port returns true, then the word port is pointing at an open port that was
opened using open. If open? port is false, then there is no word port and -
if port previously referenced an open port - then that port has been closed. 

For instance you would say:

if open? port [safe-close port] 

and by having used open? you would be guaranteed that that the port you are
passing to safe-close is an open port, not some other type of value, not a
closed port, and it exists.

3 -> 5?

When you initialize port to some non-port value, you are introducing a
fourth and a fifth state for the word port, in addition to the three
default states. 

Besides being 
1. existent/non-existent
2. open
3. closed

the word port can now also be
4. none
5. a type that is not port!. (namely none!)

1. A function may fail because it expects a port! type value, BUT it is
passed the word port when it references the value none, i.e. a none! type
value. 

2. A function may fail because the having checked for none, it determines
that the value of port is NOT none, and it now attempts to access the port.
BUT the port - even though it is not none - is closed, not open, and
accessing it generates an error message.

My personal preference is to reduce complexity. Two states suits me better
than five.

If I thought that declaring values before using them is important, I would
certainly prefer none over an empty block. A value set to none can easily
be identified using if or either, because none evaluates to a logical false
value. An empty block evaluates to a logical true value. It complicates
matters.

With respect to your example code, be sure to use a uniform function
interface. It does not help you, if you test for the types of arguments
occassionally and not consistently. 

In the following example you note that once you do and once you don't get
an error message. Apparently you overlooked that in one function you are
checking for the type of the argument being passed and in the other version
of the function you do not:

  argument is type checked here:
 |
 |
With type checking:safe-close: func [p[port!]][if p [close p]]

Without type checking: safe-close: func [p][if p <> [] [close p]]
 |
 |
   No type checking here

You comment saying:

lets say  
dufus: none
safe-close dufus
generates
Script Error: safe-close expected p argument of type: port


The error message is reporting that your safe-close function is checking
for the type of the passed argument. You require that the argument be of
type port! 
safe-close: func [p [port!]] ...
but you are passing a value of type none!
Therefore you get the error message. You would be getting the same error
message, if you used [] instead of none with this version of the safe-close
function, because you would be passing a value of type block!, while this
version of safe-close expects a value of type port!. block! <> port!

>>>
HOWEVER:
if I

[REBOL] Changing a String to a file? Re:(2)

2000-05-24 Thread mike . yaunish

At 10:24 AM 5/24/2000 -0200, you wrote:
If you actually want to convert the string to a file type use:

file: to-file "/path/file"

Note: Don't include the % at the beginning of the string.

>
>Thanks for the Help.  Load does the job.  
>
>Doug
>
>At 08:06 AM 5/24/00 -0200, you wrote:
>>
>>Hello, How do I change a string such as 
>>file: "%/path/file" to type: file?
>>file: %/path/file
>>
>>thanks in advance,
>>Doug
>>
>>
>
>
Mike Yaunish
[EMAIL PROTECTED]





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

2000-05-24 Thread Jonathan . Saunders

Thanks to everyone who helped with the Apache setup.

It turns out it was my own fault. I had configured Apache to log in as
IUSR_APACHE and denied access to that user to the rest of the file system,
including the Rebol directory. Fixed the permissions and it works fine.

FWIW:

I did not need to uncomment the httpd.conf entry for "#AddHandler cgi-script
.cgi" since my script files are in the cgi-bin directory.

I did need to use the ".cgi" extension on my Rebol script files.

Both "#!e:/rebol/rebol.exe -cs" and "#! e:\rebol\rebol.exe" worked fine.

Thanks again!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 20, 2000 4:12 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Windows NT 4.0 / Apache / Rebol Configuration Re:(2)


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] Changing a String to a file? Re:

2000-05-24 Thread dlawlor


Thanks for the Help.  Load does the job.  

Doug

At 08:06 AM 5/24/00 -0200, you wrote:
>
>Hello, How do I change a string such as 
>file: "%/path/file" to type: file?
>file: %/path/file
>
>thanks in advance,
>Doug
>
>




[REBOL] Changing a String to a file? Re:

2000-05-24 Thread jkinraid

Hi,

> Hello, How do I change a string such as
> file: "%/path/file" to type: file?
> file: %/path/file

You can use the load function for this,

string: "%/path/file"

file: load string


Julian Kinraid




[REBOL] Changing a String to a file? Re:

2000-05-24 Thread allenk


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 24, 2000 8:06 PM
Subject: [REBOL] Changing a String to a file?

You can use 'load to convert the string.

load  "%/path/file"
== %/path/file

type? load  "%/path/file"
== file!


Cheers,

Allen K

> 
> Hello, How do I change a string such as 
> file: "%/path/file" to type: file?
> file: %/path/file
> 
> thanks in advance,
> Doug
> 
> 




[REBOL] Simple CGI Problem Re:(4)

2000-05-24 Thread allenk

Have you tried using IFRAME ? It works, as long as the browser supports
HTML4.0



http://www.worldmerchantltd.com/cgi-bin/counter.r>




Check out http://www.w3.org/TR/html4/present/frames.html#edef-IFRAME for
more details on this tag.

Cheers,

Allen K


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 24, 2000 4:32 PM
Subject: [REBOL] Simple CGI Problem Re:(3)


> Hello,
>
> [EMAIL PROTECTED] wrote:
>
> > Ryan and Ralph,
> >
> > I still can't get it to work on my home page.  My web host does support
> > SSI; I'm not sure about PHP.  I am using Drumbeat 2000, and am using the
> > "Roll Your Own HTML" smart element to insert the code into the home
page.
> >
>
> [...]
>
> >
> > Please examine the source code of this home page (
> > http://www.worldmerchantltd.com ), and see how Drumbeat inserted the
> > html.  I suspect that the problem lies there.
> >
> > A good book on HTML would probably solve my problem; do you recommend
one?
>
> I don't think that's a matter of HTML - it's a matter of the server used
here. How
> about putting your counter and the HTML code of your homepage in one
single .r
> file, and calling this as your homepage? That's the only other idea I can
think
> of, if including doesn't work.
>
> Regards
> Christian
>
>




[REBOL] Changing a String to a file?

2000-05-24 Thread dlawlor


Hello, How do I change a string such as 
file: "%/path/file" to type: file?
file: %/path/file

thanks in advance,
Doug




[REBOL] [REBOL]Setting up an error template Re:

2000-05-24 Thread agem


> The following block construct seems to work to
> catch errors from the interpreter:
> ;==
> if error? set/any 'err
> try
> [ "Good Code Block"
>   x: "a" + 1
> ]
> [ "Error Block"
>   err: disarm err
>   print reform bind (get in (get in system/error err/type) err/id) in err
> 'type
> ]
> Two questions arise from this
> 1)Are there associated error numbers that I can trap and 
>   thus change the syntax of the error message itself?

Understand not fully. the reis [code: 800] or that in the
error-object, but trapping?!
But, look at that:

>> catch [print 123 throw 'bum print 234]
123
==  bum  ;  word!
this way you have not to deal with "dangerous" 'error! . Dangerous? :
 
> 2)Is there a way in which I can explicitly force control to
>   be transferred to "Error Block", with an attendant error message.
> I have looked at docs for "throw" and don't find a clear answer
> there.

>> try [123 make error! "bum" 234] 
** User Error: bum.
** Where: make error! "bum"

as you can see, having an "armed" error throws it!

> 
> Thanks
> Tim
> 

Volker




[REBOL] [REBOL] Default Port Values? Re:(3)

2000-05-24 Thread agem


Want to add: 
You can 'probe for tracing,
 safe-close: func [p][if probe p <> [] [close probe p]]
'probe will show you the values without modifying something.
good if one mistake content or the error-position.

(thanks for the more specific answers for inits :)

Volker

> Hi Ladislav:
> Yes, your code works for me. But I wrote a function
> as follows:
> safe-close: func [p[port!]][if p [close p]]
> lets say  
> dufus: none
> safe-close dufus
> generates
> Script Error: safe-close expected p argument of type: port
> HOWEVER:
> if I write 
> safe-close: func [p][if p <> [] [close p]]
> dufus: []
> safe-close dufus
> I get no error message.
> :>) Duh!! I know I have lots to learn yet.
> Thanks
> Tim
> >Sorry, I don't understand. For me your code works:
> >
> >>> dufus-pointer: none
> >== none
> >>> either equal? dufus-pointer none [][close dufus-pointer]
> >>>
> >
> >Ladislav
> >
> >
> 
> 
> 




[REBOL] Simple CGI Problem Re:(3)

2000-05-24 Thread kracik

Hi,

not sure if it's the problem, but AFAIK SSI requires full local
absolute paths, not relative paths, URLs, or virtual directory paths.

i.e. something like:


-- 
Michal Kracik

[EMAIL PROTECTED] wrote:
> 
> Ryan and Ralph,
> 
> I still can't get it to work on my home page.  My web host does support
> SSI; I'm not sure about PHP.  I am using Drumbeat 2000, and am using the
> "Roll Your Own HTML" smart element to insert the code into the home page.
> 
> Here is my counter:
> 
> http://www.worldmerchantltd.com/cgi-bin/counter.r
> 
> By clicking on the above link and then refreshing your browser, you can see
> that it works.
> 
> Here are lines I have tried:
> 
> 
> 
> 
> 
> http://www.worldmerchantltd.com/cgi-bin/counter.r">
> http://www.worldmerchantltd.com/cgi-bin/counter.r">
> http://abooks.com/cgi-bin/banner.r"); ?>
> http://worldmerchantltd.com/cgi-bin/counter.r"); ?>
> http://www.worldmerchantltd.com/cgi-bin/counter.r"); ?>
> 
> Note that even Ralph's banner code is there; that should surely work since
> it addresses his own server.  I am just trying to get anything to work.
> 
> Please examine the source code of this home page (
> http://www.worldmerchantltd.com ), and see how Drumbeat inserted the
> html.  I suspect that the problem lies there.
> 
> A good book on HTML would probably solve my problem; do you recommend one?
> 
> Thanks,
> Louis
> 
> At 01:21 PM 5/23/00 -0700, you wrote:
> >Hi Louis,
> >There are actually several ways to call CGI scripts that count hits to a web
> >page, but this one is probably the most straight forward for your purposes,
> >that is if your web host supports SSI (Server Side Incudes) as well as REBOL:
> >
> >
> >
> >Otherwise you will probably want to use a REBOL script as an image.  I
> >have'nt seen a REBOL counter that does this yet, so a few people would likely
> >be glad if you wrote one.
> >
> >--Ryan
> >
> >[EMAIL PROTECTED] wrote:
> >
> > > Dear REBOL Friends,
> > >
> > > What is the HTML code for activating a REBOL CGI script from a web
> > > page?  Specifically I want to activate a hit counter.
> > >
> > > I know the answer must be simple, but I am trying to learn REBOL and HTML
> > > at the same time, and the answer eludes me.
> > >
> > > Thanks,
> > > Louis




[REBOL] Simple CGI Problem Re:(2)

2000-05-24 Thread fred-ml

Hello ryanc,

Tuesday, May 23, 2000, 10:21:00 PM, you wrote:


ridc> Otherwise you will probably want to use a REBOL script as an image.  I
ridc> have'nt seen a REBOL counter that does this yet, so a few people would likely
ridc> be glad if you wrote one.

I have one on my webpage.

http://www.powerwebs.nu/scripts/counter.r?name=reboltest&action=sc&style=1

10 different styles (0-9)... noncache...


The only thing is that the pictures are generated by a Linux box, that
runs GCL (Global Counter Language), the counting is done by rebol,
that fetches the pictures for the number from the Linux box through
http =).. 

I did not have the time to make fully gif routines in rebol =)

Regards, Fredrik Bergstrom

--

[ PowerWebs have a good Webhotel for everyone, supports Rebol to =) ]
[ www.powerwebs.se  ]

PowerWebs AB
Wåxnäsgatan 10
S-653 40 Karlstad
Sweden
Tel: +46-(0)54-103377
Fax: +46-(0)54-103376
ICQ# 7654213