[REBOL] %redit.r ? compose? Re:(3)

1999-01-02 Thread aguerrx

exactly!

Thanks, I have now  upgraded.

Thanks also to [EMAIL PROTECTED], I will now try to upgrade ofter.


[EMAIL PROTECTED] wrote:

> [EMAIL PROTECTED] wrote:
>
> > Just as I sent my question I read the answer in a message sent yesterday
> > by "Bo" Lechnowsky...
> >
> > Good, I got %redit-archive.r, extracted the files, and tried:
> >
> > >> do %redit.r
> > Script: "REBOL native editor" (7-Oct-1999)
> > ** Script Error: compose has no value.
>
> It seems you are using old REBOL version
> just type rebol/version in the console prompt ... I bet you are using pre 2.1.90
> version ...
>
> >> rebol/version
> == 2.2.0.3.1
> >> help compose
> Selectively evaluates a block of expressions, only evaluating paren expressions
> and return
> s the result as a block.
> Arguments:
> value -- Block to compose
> Refinements:
> /deep -- Compose within nested blocks
> >>
>
> Cheers,
>
> -pekr-



[REBOL] Anyone successfully got passed a proxy-server ?? Re:

1999-01-02 Thread petr . krenzelok



[EMAIL PROTECTED] wrote:

> Hello.
>
> I'm having major problems getting out through a proxy-server.
>
> Basically, the mail server (smtp and pop) is at 192.168.0.1, the
> proxy-server is at 192.168.0.2 and the machine I'm using is
> 192.168.0.4.
>
> My settings for web access from the browser is 192.168.0.2:80

Aha, so you are using proxy setting for http protocol directly, not
Socks Hosts? Look at your Netscape or IE setting to see, if there is
some exceptions set (it should be the same window (Tab), as you have
your 192.168.0.2:80 set. If there is no exception set, and your browser
+ mailer work good, then you have your REBOL set inproperly:

Could you look at your user.r file, and send me your set-net settings?

it should be something like that:

set-net [[EMAIL PROTECTED] 192.168.0.1 192.168.0.1 192.168.0.2 80
"socks4"]

it's also important to set your socks setting properly - socks4, socks5,
false , generic ... ask your Inet admins if and what kind (version) of
sokcs they are supporting 

But as for above setting, I would wonder if you would not have Socks
Hosts set, on port 1080, but well, maybe I just don't understand all
that Inet stuff correctly ...

Also - look at http://www.rebol.com/howto.html#proxy.html for further
references 

but! - 'set-net settings sets general REBOL protocol configuration -
system/schemes/default

If you want to override such setting for entire protocol, overriding
default one, you will have to set it in the following manner: e.g.

system/schemes/http/proxy/host: "web-proxy.mynet.net"
system/schemes/http/proxy/port-id: 8080
system/schemes/http/proxy/type: 'generic

I have e.g.

system/schemes/default/proxy/bypass: ["orion.sec.trz.cz"]

to tell REBOL to exclude our email server from going thru socks hosts


-pekr-

>
>
> I've also tried the proxy setup but all I get is :-
>
> port  not open
>
> Anyone on a lan with a similar configuration ??
>
> Regards...Martin



[REBOL] Anyone successfully got passed a proxy-server ??

1999-01-02 Thread spamoff

Hello.

I'm having major problems getting out through a proxy-server.

Basically, the mail server (smtp and pop) is at 192.168.0.1, the
proxy-server is at 192.168.0.2 and the machine I'm using is
192.168.0.4.

My settings for web access from the browser is 192.168.0.2:80

I've also tried the proxy setup but all I get is :-

port  not open

Anyone on a lan with a similar configuration ??

Regards...Martin



[REBOL] New reboldoc.r Re:

1999-01-02 Thread Al . Bri

REBOL 2.2.0.3.1
>> write %reboldoc.r read http://www.rebol.com/reboldoc.r
connecting to: www.rebol.com
>> do %reboldoc.r
Script: "REBOL Dictionary" (2-Nov-1999/23:06:40)
328 words in dictionary
** Script Error: Cannot use path on none! value.
** Where: print info/size
==>

:-(

Andrew Martin
[EMAIL PROTECTED]
http://members.xoom.com/AndrewMartin/
Online @ 33,600 Baud!
-><-



[REBOL] New reboldoc.r Re:(2)

1999-01-02 Thread icimjs

At 09:13 PM 11/4/99 -0500, you wrote:
>
>When trying to do a "do %reboldoc.r", I received the following result:
>
>Script: "REBOL Dictionary" (2-Nov-1999/23:06:40)
>328 words in dictionary
>** Script Error: Cannot use path on none! value.
>** Where: print info/size
>==>

Please let us know when the error has been corrected. Apparently 2.2 has
quite a few new features. 

TIA,

Elan



[REBOL] New reboldoc.r Re:

1999-01-02 Thread Editor


When trying to do a "do %reboldoc.r", I received the following result:

Script: "REBOL Dictionary" (2-Nov-1999/23:06:40)
328 words in dictionary
** Script Error: Cannot use path on none! value.
** Where: print info/size
==>




>New REBOL dictionary in raw dialect format has been posted.
>
>Run this email to grab it:
>
>REBOL []
>
>write %reboldoc.r read http://www.rebol.com/reboldoc.r
>



[REBOL] New reboldoc.r

1999-01-02 Thread carl

New REBOL dictionary in raw dialect format has been posted.

Run this email to grab it:

REBOL []

write %reboldoc.r read http://www.rebol.com/reboldoc.r




[REBOL] "Everything is relative"... hmmm... Re:(4)

1999-01-02 Thread ole_f

Hi Elliott, 2-Nov-1999 you wrote:

>> relativity theory and REBOL, other than the word "relative". (Besides, as
>> far as I remember, "Relative Expression-Based Object Language" was made up
>> _after_ the name "REBOL" was decided upon...)

>I don't know about this, but I do remember reading about Carl and Lava
>before Rebol.  Was this a simple name change or a change in the whole
>concept?

AFAIR, Carl said something about his lawyers urging him to change the name,
due to the potential name confusion with Java.

I doubt that the name change had any conceptual changes for the language, but
I guess only Carl can answer that question.

Kind regards,
-- 
Ole Friis <[EMAIL PROTECTED]>

"Ignorance is bliss"
(Cypher, The Matrix)



[REBOL] Charset population Re:

1999-01-02 Thread brian . hawley

Hello Gavin.

[EMAIL PROTECTED] wrote:
>Lookin' for help again...

[skipped motivation :)]

>It feels like there should be an easy way to build a charset,
>and them maybe do arithmetic on it using 'difference'.
>
>You know how you can do this...
>
>allowable: charset [#"A" - #"Z"]
>
>well I really want to be able to something do this:
>
>allowable: charset [#00 - #FF]

Try this.
  allowable: charset [#"^(0)" - #"^(FF)"]

I know this isn't (yet) mentioned in the User Guide but I've
sent feedback to that effect. Regardless, it works.

>Conceptually what I want is:
>
>allowable: charset difference ['set of all chars'] [#"&" #"<"]

That would be expressed (in REBOL 2.2 and above) as
  allowable: difference/only charset [#"^(0)" - #"^(FF)"]
  charset [#"&" #"<"]

but I prefer
  allowable: complement charset [#"&" #"<"]

not only because it's faster but also because the difference
function was introduced in 2.2 and not everyone has upgraded
to that version yet (it's a great function, though).

Brian Hawley



[REBOL] epoch? Re:(9)

1999-01-02 Thread rryost

Russell [EMAIL PROTECTED]
See comments below:
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 02, 1999 2:07 PM
Subject: [REBOL] epoch? Re:(8)


> [snip - some algorithms]
>
> [EMAIL PROTECTED] wrote:
> >That appears to be a Julian day referenced to the start of the year.  My
> >understanding of a Julian day number is that it is the number of days
since
> >the start of the current Julian period, which started noon Jan 1 4713 BC.
>
> That's what a Julian date is in the real world :)
> As a computer term, a Julian date is any date calculated in the same
> manner as a real world Julian date, but possibly from a different base
> date. Whatever the base date is, that's called the epoch. The epoch
> for Unix is 1-Jan-1970, for DOS it's 1-Jan-1980.


For EXCEL, the MIS spreadsheet, it's jan 1 1900, which is day 1.  Negative
numbers are not convertible to dates.

> There are problems
> similar to Y2K when Julian date counters overflow or roll over.

That won't be for awhile!  32 bits can count days for over 11 million
years - not to worry!

>
> >Noon of Dec 31 1998 was the beginning of JD  2,451,179.  There is an
> >algorithm for calculating this number from a given date in the Gregorian
> >Calendar, our present calendar, but I don't have it at hand.  It requires
> >the use of a floor or ceiling function, the nearest integer smaller (or
> >greater) than a given decimal number.  The formula accounts for leap
years
> >and the days in each month.  It also starts a year on March 1, so
February
> >is the last month, and the formula truncates its length correctly.  I
> >implemented the formula in Forth using integers, but it was long ago -- .
>
> I don't know about anyone else here, but I'd be interested in seeing
> that algorithm if you could dig it up, even in Forth :)

I haven't found it yet, but I was doing some experiments in REBOL 2.2 and
it's pretty sophisticated! It knows that 1600 *was* a leap year, as it's a
multiple of 400, even though it's a multiple of 100, which are generally not
leap years  Also.

>> 1-1-1999 - 1-1- / 365.2422
== 1999.00230586718
>>
Not too shabby an approximation of 1999 and possibly the error
>
But it doesn't like negative years:

>> 31-12-1998 - 1-1--0001 / 365.2422
== -63536.0536104535
>>
>> source to-date
to-date: func ["Converts to date value." value "Value to convert"][to date!
value]
>> source to
to: native [
{Constructs and returns a new value after conversion.}
type [any-type!] "The datatype or example value."
spec [any-type!] "The attributes of the new value."
]
>> to-date [1 1 ]
== 1-Jan-
>> to-date [1 1 -4317]
== 1-Jan-61219
>> to-date [1 1 -0001]
== 1-Jan-65535
Hmmm we're getting somewhere.  Looks like REBOL's epoch date is jan 1 ,
and it uses 16 bits for years!

On the algorithms, I'll have to get back to it later.  Gotta go do an
errand!

> Brian
>



[REBOL] http server... Re:(9)

1999-01-02 Thread KSMiTH

*Sigh*

Finally, fyi, Rebol is satisfied with this header:

alias sendheader {
  sockwrite $1 HTTP/1.1 200 OK  $crlf
  sockwrite $1 Date: $date() $+ , $date(mmm)  $date(d) $+ , $date()
$crlf
  sockwrite $1 Server: Kat v1.0 on mIRC v5.51 $crlf
  sockwrite $1 Content-Location: %httpd.dirlist. [ $+ [ %sockname ] ] $crlf
  sockwrite $1 Content-Type: text/html $crlf
  sockwrite $1 $crlf
 }

( $1 is the socketname i passed to the routine. )

I think all the $crlf is what made it palatable to Rebol, but i don't care
to continue experimenting with it. It sure would have saved some time had
someone who worked at Rebol jumped in and said what Rebol required. Or a way
to tell Rebol to not require the header, and to be compatable with IE5 and
etc..

Kat



[REBOL] Hit Counter Script

1999-01-02 Thread jim

Has anyone written a hit counter script with REBOL?  I'd love to see it.

Thank,

Jim



[REBOL] [REBOL] [REBOL] Need a Script Re:(5)

1999-01-02 Thread venter

Thanks, Jeff, for illustrating just how flexible and multi-facetted REBOL
really is
Compared to your example I can see how uneconomical my attempt was. The
timeout check was required, though, on a particular site prone to long
loading times - but I'm beginning to see how the check could be done more
eloquently. Much appreciated.
REBOL ROCKS!
-andre

ps
sorry, i seem to have messed the thread heading! 

>> sites: [
>> "Site 1" http//www.site1.com "1"
>> "Site 2" http//www.site2.com "1"
>> "Page2" http//www.site1.com/page2.htm "1"
>> ]
>> 
>> while [ true ][
>> foreach [name url status] sites [ 
>> start: fourth now
>> either error? try [read url][
>> if status = "1" [ 
>> message: reform ["Rebol Alert:" name "is down!"]
>> send [EMAIL PROTECTED] message 
>> change status "0"]
>> ]
>> [change status "1"]
>> stop: fourth now
>> if stop - start >= 0:00:45 [ 
>> if status = "1" [
>> message: reform ["Rebol Alert:" name
"timed  out!"]
>> send [EMAIL PROTECTED] message ;
>> ]
>> ]
>> ]
>> print reform [fourth now "Pausing for 5 min"]
>> wait 0:05:00 ;   //change to suite your needs
>> ]
>
> Another approach:
> sites: [
>http://www.worldrps.com
>http://www.theonion.com
>http://www.rebol.org
>http://www.doesnotexist.com
>http://www.neitherdoesthis.com
> ]
> total-no-go: copy [] 
> forever [
> no-go: copy []
> foreach site sites [
>   all [not exists? site append no-go site]
> ]
> if not empty? no-go: difference no-go total-no-go [
> send [EMAIL PROTECTED] reform ["These sites down:" no-go]
> ]
> total-no-go: union total-no-go no-go
> wait 00:05:00
> ]
>  EXISTS? works for urls.  The UNION and DIFERENCE functions let you
> see pretty quickly when something new has entered a set of items, in
> this case the set of missing sites. Like Andre's code, the above will
> only send mail the first time a site goes down (but the above code
> doesn't deal with time out errors, as Andre's does (-:).  Using
> DIFFERENCE you can also then restrict further checking of urls to only
> those sites you haven't found to be down previously.
> 
> (ie: sites: difference sites total-no-go).
> There's so many ways to do things in REBOL. It's just t00 k00l! :)
>   -jeff



[REBOL] http server... Re:(8)

1999-01-02 Thread joel . neely

[EMAIL PROTECTED] wrote:
> 
> Well, like i said, i wrote the server from the port access level up. What
> header would Rebol like, and how is it sent?
> 

I don't work at REBOL (and I don't play one on TV... ;-), but I have
played around a little with bare-knuckled HTTP.  My experience is that
different browsers have different levels of tolerance to servers (or
web pages) that don't follow the standards.  If you're running against
a home-grown HTTP server, I'd suggest that you try to make sure your
server is returning all of the most common headers.  There are two
good ways to find out what they are:

1) Use telnet to connect to a commercial server at port 80.  A typical
   such manual connection looks something like the following. The "->"
   and "<-" prefixes show which lines I typed and which ones the server
   sent back; they're NOT part of the actual data.  Server names have
   been changed to protect the innocent.  ;-)

   -> telnet x.y.z.com 80
   <- Trying...
   <- Connected to x.y.z.com.
   <- Escape character is '^]'.
   -> GET /tiny.html HTTP/1.0
   -> 
   <- HTTP/1.1 200 OK
   <- Server: Netscape-Enterprise/3.6
   <- Date: Thu, 04 Nov 1999 14:22:30 GMT
   <- Content-type: text/html
   <- Connection: close
   <- 
   <- 
   <- Hi!
   <- Hi!
   <- 
   <- 
   <- Connection closed by foreign host.

   (I'm back to the command line prompt at this point.)

   You might try simply faking the above headers (including the
   blank line) and see if that helps.  Those should be adequate,
   as the following REBOL snippet implies:

  >> read http://x.y.z.com/tiny.html
  == {
  Hi!
  Hi!
  

  }
  >> 

2) If the problem really is related to HTTP protocol compliance,
   you might want to look at the O'Reilly book

  _Web_Client_Programming_with_Perl_
  Clinton Wong, 1997
  ISBN 1-56592-214-x

   Even though the book uses The Wrong Language ;-) , the first
   three chapters provide the best narrative explanation of HTTP
   client-server interactions I've seen, and Appendix A contains
   a detailed explanation of HTTP header content and meaning.

Good Luck!

-jn-



[REBOL] http server... Re:(11)

1999-01-02 Thread Russ

Who knows... but why make things complex?  Just try a header comprised of
two lines and see how that works.  My basic philosophy on debugging and
implementation is: "Get something (anything) working, and incrementally
improve it while keeping it working." :)  There are an infinite number of
"solutions" that don't work, but many fewer that do.  So narrow the scope
and create progress, not frustration.

HTTP/1.0 200 OK
Content-type: text/html


My suspicion of your current problem would be that "Content-Location:..."
line, but I'd also bet a lot that is one line that's definitely not needed.

R.

===
>Ok, i read
>http://www.w3.org/Protocols/rfc2616/rfc2616
>
>i could make little sense of it, but i wrote a header server (made-up
>values) :
>alias makeheader {
>  write -c  [ $1 $+ .htm ] HTTP/1.1 200 OK
>  write [ $1 $+ .htm ] Date: Thu, 04 Nov 1999 08:51:31 GMT
>  write [ $1 $+ .htm ] Server: mIRC
>  write [ $1 $+ .htm ] Content-Location: %httpd.dirlist. [ $+
>[ %sockname ] ]
>  write [ $1 $+ .htm ] Content-Type: text/html
>  write [ $1 $+ .htm ] If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
>  write [ $1 $+ .htm ] $crlf
>}
>
>and this happens:
>>> print read http://localhost/untitled.txt
>connecting to: localhost
>** Script Error: Invalid argument: Make.
>** Where: make integer! value
>>> print read http://localhost/
>connecting to: localhost
>
>   dir listing   BGCOLOR="#FF"> File listing for Root 
>(escape)
>>>
>
>So the next question is,, why is the header ok for the root dir listing, and
>not ok for getting a file?
>
>Kat
>
>
>



[REBOL] Rebol Databses Re:(5)

1999-01-02 Thread fprowse

Thanks - this is exactly what I needed...thanks for all your help

Francois

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 04, 1999 1:39 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Rebol Databses Re:(4)




[EMAIL PROTECTED] wrote:

>  names: load %names.r
> == [Francois_Prowse [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "engineer"
> ]
> Bill...
>

> If would be good if I could do the following but having trouble.
>
> foreach person names [print person/workemail]

it should be trivial, you just created two record containing two fields in
regard to main block - person and personal-info, so just use it :-)

foreach [person personal-info] names [
  print person
  print personal-info/workemail
]

Does it help?

Regards,

-pekr-

>
> Cheers
>
> Francois
>
> file begins...
> --
> [
> Francois_Prowse
>
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "engineer"
> ]
> ]
>
> [
> Bill_Smith  [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "cleaner"
> ]
> ]
> [
> Alyson_King [
> workemail [EMAIL PROTECTED]
> homeemail none
> title "manager"
> ]
> ]
>
> > Hi :-)
> >
> > 1) first, I would change your block to:
> >
> > Names: [
> >  Bill_Smith  [
> > workemail [EMAIL PROTECTED]
> > homeemail [EMAIL PROTECTED]
> > title "Engineer"
> >   ]
> > ]
> >
> > If you want to use path navigation, for e.g.
> >
> > info: names/Bill_Smith
> >
> > Now you are able to navigate even further:
> >
> > names/Bill_Smith/workemail
> > == [EMAIL PROTECTED]
> >
> > But sadly, I don't know how to substitute Bill_Smith value with some
> > referencing variable ...
>
> Hi Pekr and Francios,
>
> Here's a way to do that
>
> name: to-word "Bill_Smith"
>
> == Bill_Smith
> >> name/:search
> == [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "Engineer"
> ]
>
> works for further levels down too
> name: to-word "Bill_Smith"
> entry: to-word "title"
>
> >> names/:name/:entry
> == "Engineer"
>
> Cheers,
>
> Allen K




[REBOL] Rebol Databses Re:(4)

1999-01-02 Thread petr . krenzelok



[EMAIL PROTECTED] wrote:

>  names: load %names.r
> == [Francois_Prowse [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "engineer"
> ]
> Bill...
>

> If would be good if I could do the following but having trouble.
>
> foreach person names [print person/workemail]

it should be trivial, you just created two record containing two fields in
regard to main block - person and personal-info, so just use it :-)

foreach [person personal-info] names [
  print person
  print personal-info/workemail
]

Does it help?

Regards,

-pekr-

>
> Cheers
>
> Francois
>
> file begins...
> --
> [
> Francois_Prowse
>
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "engineer"
> ]
> ]
>
> [
> Bill_Smith  [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "cleaner"
> ]
> ]
> [
> Alyson_King [
> workemail [EMAIL PROTECTED]
> homeemail none
> title "manager"
> ]
> ]
>
> > Hi :-)
> >
> > 1) first, I would change your block to:
> >
> > Names: [
> >  Bill_Smith  [
> > workemail [EMAIL PROTECTED]
> > homeemail [EMAIL PROTECTED]
> > title "Engineer"
> >   ]
> > ]
> >
> > If you want to use path navigation, for e.g.
> >
> > info: names/Bill_Smith
> >
> > Now you are able to navigate even further:
> >
> > names/Bill_Smith/workemail
> > == [EMAIL PROTECTED]
> >
> > But sadly, I don't know how to substitute Bill_Smith value with some
> > referencing variable ...
>
> Hi Pekr and Francios,
>
> Here's a way to do that
>
> name: to-word "Bill_Smith"
>
> == Bill_Smith
> >> name/:search
> == [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "Engineer"
> ]
>
> works for further levels down too
> name: to-word "Bill_Smith"
> entry: to-word "title"
>
> >> names/:name/:entry
> == "Engineer"
>
> Cheers,
>
> Allen K



[REBOL] Rebol Databses Re:(3)

1999-01-02 Thread fprowse

What I have now is this...saved as a text file named names.r
I then load file file using

names: load %names.r

then test it as follows...

 names: load %names.r
== [Francois_Prowse [
workemail [EMAIL PROTECTED]
homeemail [EMAIL PROTECTED]
title "engineer"
]
Bill...
>> user: names/francois_prowse
== [
workemail [EMAIL PROTECTED]
homeemail [EMAIL PROTECTED]
title "engineer"
]
>> print user/workemail
[EMAIL PROTECTED]
>>

If would be good if I could do the following but having trouble.

foreach person names [print person/workemail]

Any ideas how I can process the file eaisly to give me all of a specific
entry. Just my stupidity getting in the way.

Cheers

Francois




file begins...
--
[
Francois_Prowse

workemail [EMAIL PROTECTED]
homeemail [EMAIL PROTECTED]
title "engineer"
]
]

[
Bill_Smith  [
workemail [EMAIL PROTECTED]
homeemail [EMAIL PROTECTED]
title "cleaner"
]
]
[
Alyson_King [
workemail [EMAIL PROTECTED]
homeemail none
title "manager"
]
]



> Hi :-)
>
> 1) first, I would change your block to:
>
> Names: [
>  Bill_Smith  [
> workemail [EMAIL PROTECTED]
> homeemail [EMAIL PROTECTED]
> title "Engineer"
>   ]
> ]
>
> If you want to use path navigation, for e.g.
>
> info: names/Bill_Smith
>
> Now you are able to navigate even further:
>
> names/Bill_Smith/workemail
> == [EMAIL PROTECTED]
>
> But sadly, I don't know how to substitute Bill_Smith value with some
> referencing variable ...

Hi Pekr and Francios,

Here's a way to do that

name: to-word "Bill_Smith"

== Bill_Smith
>> name/:search
== [
workemail [EMAIL PROTECTED]
homeemail [EMAIL PROTECTED]
title "Engineer"
]

works for further levels down too
name: to-word "Bill_Smith"
entry: to-word "title"

>> names/:name/:entry
== "Engineer"


Cheers,

Allen K





[REBOL] http server... Re:(6)

1999-01-02 Thread giesse

[EMAIL PROTECTED] wrote:

> >> http-port: open tcp://localhost:80
> >>
> >> insert http-port "GET /dctfiles_new\AA.htm HTTP/1.0^m^j^m^j"
> >>
> >> while [data: copy http-port] [prin data]
> 
> A's A's 
> 
> == none
> >>

That sounds like an HTTP 0.9 server. Perhaps REBOL doesn't support
them (they're obsolete).

Ciao,
/Gabriele./
o) .-^-. (--o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o) `-v-' (--o



[REBOL] http server... Re:(6)

1999-01-02 Thread giesse

[EMAIL PROTECTED] wrote:

> > port: open/binary tcp://localhost:80
> >
> > insert port make string! [
> >   "GET /Books/Dictionary/A-dct.txt HTTP/1.0" CRLF
> >   CRLF
> > ]
> >
> > wait port
> >
> > buffer: make string! 1024
> > read-io port buffer 1024
> >
> > close port
> >
> > print mold buffer
> 
> Rebol waited, the server hung because it had no filename or ip addy to reply
> to.

Ok, let's remove that WAIT PORT then. (It's strange, anyway.)

Ciao,
/Gabriele./
o) .-^-. (--o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o) `-v-' (--o



[REBOL] [REBOL] Recursive data structures Re:

1999-01-02 Thread jhagman

Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]):

> I need some help about recursive data structures (stacks, queues, trees, etc)
> Which is the best method in Rebol for the creation and manipulation of
> these structures?
> 
> Example:
> The following is a simple C code for insertion and deletion of stack elements.
> How can be rewritten in REBOL?

Why would you want to implement a linked list in REBOL, when there are
integrated types BLOCK and LIST. So an easy implementation of stack or
queue is just to manipulate a BLOCK. I see no need to reimplement a
linked list, you probably wouldn't come even close to the native
implementation of LIST or BLOCK.

If you want to have a binary tree you can implement it as nested
BLOCKs. For example following tree

  1
 / \
2   3
   / \
  4  5

can be expressed as [1 [2 4 5] 3] (that's 
[value left-sub-tree right-sub-tree]). Functions to manipulate it 
should be quite straightforward to implement (Haven't tried :).

Yours,
Jussi

-- 
Jussi Hagman CS in Åbo Akademi
Studentbyn 4 D 33[EMAIL PROTECTED]
20540 Åbo[EMAIL PROTECTED]
Finland



[REBOL] http server... Re:(10)

1999-01-02 Thread KSMiTH


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 04, 1999 1:02 AM
Subject: [REBOL] http server... Re:(9)


> Kat,
>
> I did some more experimenting.  Here's what's returned by a VERY
simplistic
> web server (written in PERL):
>
> HTTP/1.0 404 Object Not Found
> Content-type: text/html
>
> HTTP/1.0 404 Object Not Found
>
> This would seem to support my last suggestion that these two lines (at
> least) in a header might be what's necessary.  Of course, you want
"HTTP/1.0
> 200 OK", rather than the error code returned in this example :)

Ok, i read
http://www.w3.org/Protocols/rfc2616/rfc2616

i could make little sense of it, but i wrote a header server (made-up
values) :
alias makeheader {
  write -c  [ $1 $+ .htm ] HTTP/1.1 200 OK
  write [ $1 $+ .htm ] Date: Thu, 04 Nov 1999 08:51:31 GMT
  write [ $1 $+ .htm ] Server: mIRC
  write [ $1 $+ .htm ] Content-Location: %httpd.dirlist. [ $+
[ %sockname ] ]
  write [ $1 $+ .htm ] Content-Type: text/html
  write [ $1 $+ .htm ] If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
  write [ $1 $+ .htm ] $crlf
}

and this happens:
>> print read http://localhost/untitled.txt
connecting to: localhost
** Script Error: Invalid argument: Make.
** Where: make integer! value
>> print read http://localhost/
connecting to: localhost

   dir listingFile listing for Root 
(escape)
>>

So the next question is,, why is the header ok for the root dir listing, and
not ok for getting a file?

Kat