[REBOL] new proxy server and related problems ...

2000-03-03 Thread Petr . Krenzelok

Hi,

our company has new proxy server installed and I can't get trhu it with
REBOL 

My Netscape settings are:

http: proxy.sec.trz.cz port: 3128

No socks hosts setting is applied.

how should I set my http scheme to let it work?

The only one way of how to get thru is:

port: open/lines tcp://proxy.sec.trz.cz:3128
con: insert port "GET http://www.rebol.com/ HTTP/1.0^M^J^M^J"

wait con
while [data: pick con 1][print data]

close con

This small test works, but read http://www.rebol.com hangs, and I can't
find it combination of setting to make it work.

Any help, please?

Thanks,

-pekr-



[REBOL] [REBOL]How to remove email headers Re:

2000-03-03 Thread giesse

[EMAIL PROTECTED] wrote:

 print first inbox

Try with:

  mail: import-email first inbox

Then you can access mail/content, as well as mail/to, mail/from
etc.

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



[REBOL] Return value from a Script??? Re:(2)

2000-03-03 Thread giesse

[EMAIL PROTECTED] wrote:

 There is no formal mechanism for a script to return a value. There are
 several distinct ways to use scripts:

Actually, every script returns a value, in the same way as every
block returns a value. DO will return the last value in the script
(in the same way as it returns the last value in a block).

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



[REBOL] new proxy server and related problems ... Re:

2000-03-03 Thread icimjs

Hi Petr,

have you tried to set the http proxy settings? I.e. 

 system/schemes/http/proxy/host: proxy.sec.trz.cz
 system/schemes/http/proxy/port-id: 3128
 system/schemes/http/proxy/type:  'socks.
 system/schemes/http/proxy/user: none
 system/schemes/http/proxy/pass: none


At 10:54 AM 3/3/00 +0100, you wrote:
Hi,

our company has new proxy server installed and I can't get trhu it with
REBOL 

My Netscape settings are:

http: proxy.sec.trz.cz port: 3128

No socks hosts setting is applied.

how should I set my http scheme to let it work?

The only one way of how to get thru is:

port: open/lines tcp://proxy.sec.trz.cz:3128
con: insert port "GET http://www.rebol.com/ HTTP/1.0^M^J^M^J"

wait con
while [data: pick con 1][print data]

close con

This small test works, but read http://www.rebol.com hangs, and I can't
find it combination of setting to make it work.

Any help, please?

Thanks,

-pekr-




;- Elan  [: - )]



[REBOL] new proxy server and related problems ... Re:(2)

2000-03-03 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 Hi Petr,

 have you tried to set the http proxy settings? I.e.

  system/schemes/http/proxy/host: proxy.sec.trz.cz
  system/schemes/http/proxy/port-id: 3128
  system/schemes/http/proxy/type:  'socks.
  system/schemes/http/proxy/user: none
  system/schemes/http/proxy/pass: none

the strange thing is - netscape works. Well, I tried above, just instead of
'socks I used 'socks5 and instead of both 'none I used 'false, in other case
REBOL would use my default scheme's proxy setting, where I have 'user and
'pass set.

btw: shouldn't be proxy.sec.trz.cz enclosed in quotes? :-)

but, what is the system/schemes/http/host and system/schemes/http/port-id
for? I even tried set system/schemes/http/port-id to 3128, or directly site:
read http://www.rebol.com:3128, but it still doesn't help. Will
www.rebol.com be used for system/schemes/http/host?

It's strange direct communication with proxy server works fine, but 'read
should work too imho, unless there is bug in http protocol implementation???

-pekr-


 At 10:54 AM 3/3/00 +0100, you wrote:
 Hi,
 
 our company has new proxy server installed and I can't get trhu it with
 REBOL 
 
 My Netscape settings are:
 
 http: proxy.sec.trz.cz port: 3128
 
 No socks hosts setting is applied.
 
 how should I set my http scheme to let it work?
 
 The only one way of how to get thru is:
 
 port: open/lines tcp://proxy.sec.trz.cz:3128
 con: insert port "GET http://www.rebol.com/ HTTP/1.0^M^J^M^J"
 
 wait con
 while [data: pick con 1][print data]
 
 close con
 
 This small test works, but read http://www.rebol.com hangs, and I can't
 find it combination of setting to make it work.
 
 Any help, please?
 
 Thanks,
 
 -pekr-
 
 
 

 ;- Elan  [: - )]



[REBOL] REBOL supported by Codeforge?

2000-03-03 Thread Petr . Krenzelok

Hi,

I just performed occassional search on REBOL and got to following page:
http://www.codeforge.com/

REBOL is listed in section of supported languages. Don't know what does
it mean, though 

-pekr-



[REBOL] new proxy server and related problems ... Re:(3)

2000-03-03 Thread sterling


The new proxy server is probably a Squid proxy server, which means
that the proxy-type needs to be set to 'generic, not 'socks or
'socks5.

I assume that your netscape settings have the host and port number
listed under the http proxy area, not under socks.  Anyway, try it as
generic and see if that fixes the problem.

Sterling

 [EMAIL PROTECTED] wrote:
 
  Hi Petr,
 
  have you tried to set the http proxy settings? I.e.
 
   system/schemes/http/proxy/host: proxy.sec.trz.cz
   system/schemes/http/proxy/port-id: 3128
   system/schemes/http/proxy/type:  'socks.
   system/schemes/http/proxy/user: none
   system/schemes/http/proxy/pass: none
 
 the strange thing is - netscape works. Well, I tried above, just instead of
 'socks I used 'socks5 and instead of both 'none I used 'false, in other case
 REBOL would use my default scheme's proxy setting, where I have 'user and
 'pass set.
 
 btw: shouldn't be proxy.sec.trz.cz enclosed in quotes? :-)
 
 but, what is the system/schemes/http/host and system/schemes/http/port-id
 for? I even tried set system/schemes/http/port-id to 3128, or directly site:
 read http://www.rebol.com:3128, but it still doesn't help. Will
 www.rebol.com be used for system/schemes/http/host?
 
 It's strange direct communication with proxy server works fine, but 'read
 should work too imho, unless there is bug in http protocol implementation???
 
 -pekr-



[REBOL] new proxy server and related problems ... Re:(4)

2000-03-03 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 The new proxy server is probably a Squid proxy server, which means
 that the proxy-type needs to be set to 'generic, not 'socks or
 'socks5.

Squid, yes, they switched to Linux. You are a God, Sterling! :-)

 I assume that your netscape settings have the host and port number
 listed under the http proxy area, not under socks.  Anyway, try it as
 generic and see if that fixes the problem.

Exactly.

I will try it on monday once I am at my work once again.  I think it will work.

side-note: But the strange thing is, I can get to news servers thru:

system/schemes/default/proxy/host: "proxy.sec.trz.cz"
system/schemes/default/proxy/port-id: 1080
system/schemes/default/proxy/user: "usernamehere"
system/schemes/default/proxy/pass: "passwordhere"
system/schemes/default/proxy/type: "socks5"

... but maybe then I am connecting to another service running on proxy.sec.trz.cz
machine ...

Anyway, thanks once again, I think your suggestion will solve my problems ...

-pekr-

 Sterling



[REBOL] Return value from a Script??? Re:(3)

2000-03-03 Thread larry

Hi Gabriele

Thanks for the correction. Silly of me to overlook the most simple method of
returning a value from a script.

Ciao,

Larry

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 03, 2000 4:58 AM
Subject: [REBOL] Return value from a Script??? Re:(2)


 [EMAIL PROTECTED] wrote:

  There is no formal mechanism for a script to return a value. There are
  several distinct ways to use scripts:

 Actually, every script returns a value, in the same way as every
 block returns a value. DO will return the last value in the script
 (in the same way as it returns the last value in a block).

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




[REBOL] [REBOL] Rebol/Command and the kitchen sink Re[2]: Re:

2000-03-03 Thread jbone



 Then why not use php direct? I'm thinking whether the effort spent is
 justified while waiting rebol to catch up.  And the uncertainty of a price
 tag on rebol/??? other than core.


The economics of this argument are compelling.  My newco is using PHP / Zend
exclusively for all the web-based stuff which touches HTML.  I'd rather use Rebol
--- PHP is rather icky, even as hacked-up Web scripting languages go --- but am
waiting on the same stuff...

jb




[REBOL] Rebol/Command and the kitchen sink Re:(2)

2000-03-03 Thread dolmen

If I remember, MySQL has a TCP/IP interface. So it would be possible to
create a mysql protocol scheme for REBOL.

Olivier

- Original Message -
From: [EMAIL PROTECTED]
 [EMAIL PROTECTED] writes
Personally, I'd like to do all of my web development in Rebol/Core,
 but it's looking like I'm going to need to create and access some MySQL
 databases. Now I can do that with PHP, but not Rebol/Core, and I have no
 idea when Rebol/Command is going to actually show up.

 Er, can you use PHP to gateway between Rebol and MySql? ( a Rebol script
 to read a PHP page, and post to a PHP form?




[REBOL] new proxy server and related problems ... Re:

2000-03-03 Thread dolmen


Did you tried to delete %user.r and relaunch REBOL ?
The setup will ask you the proxy settings.

Olivier

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 03, 2000 10:54 AM
Subject: [REBOL] new proxy server and related problems ...


 Hi,
 
 our company has new proxy server installed and I can't get trhu it with
 REBOL 
 
 My Netscape settings are:
 
 http: proxy.sec.trz.cz port: 3128
 
 No socks hosts setting is applied.
 
 how should I set my http scheme to let it work?
 
 The only one way of how to get thru is:
 
 port: open/lines tcp://proxy.sec.trz.cz:3128
 con: insert port "GET http://www.rebol.com/ HTTP/1.0^M^J^M^J"
 
 wait con
 while [data: pick con 1][print data]
 
 close con
 
 This small test works, but read http://www.rebol.com hangs, and I can't
 find it combination of setting to make it work.
 
 Any help, please?
 
 Thanks,
 
 -pekr-
 



[REBOL] Return value from a Script??? Re:

2000-03-03 Thread VoToNi

In einer eMail vom 03.03.00 02:43:40 (MEZ) Mitteleuropäische Zeit schreibt 
[EMAIL PROTECTED]:

 Is it possible for a script to return a value in a similar manner that a
  function does? I've suddenly realised that i have been developing scripts
  but don't seem to have any way for them to communicate with each other?
  
'do returns its last value.

and scripts in own context:
 save %t.r [rebol[] a: func[][print 123 + 234]] 
 b: make object! load %t.r
 b/a
357
 
Volker



[REBOL] Rebol/Command and the kitchen sink Re:(3)

2000-03-03 Thread VoToNi

In einer eMail vom 03.03.00 08:11:02 (MEZ) Mitteleuropäische Zeit schreibt 
[EMAIL PROTECTED]:

 On Thu, Mar 2, 2000,  [EMAIL PROTECTED] wrote:
  
  Having done something similar with ASP and MS-SQL Server 7, using ASP to

snip
.
  I can say it works.  It's ugly, but it gets the job done.  On the other
  hand - what [EMAIL PROTECTED] is trying to accomplish is just better
  done in PHP alone.  
  
  Why bother to add another layer on top of it?  Just to
  use Rebol?  That kind of solution flies in the face of the Rebol
  phillosophy.
  
  K   I   S   S
  
  Keep it Simple, Stupid.
  
  That's what I'm trying to do. I don't think reading a PHP page to get
  the time with millisecond resolution is a particularly complex task.
  Reading PHP pages to access a database might very well be too hairy to
  try. I haven't attempted it yet, so I don't know.
  But for the real meat of what I want to do, Rebol's flexible syntax
  really seems like a boon, i.e. what I want will probably take a lot more
  PHP code to implement than Rebol code. 
  
  The simple solution is usually the best, and most correct one.  When
  Rebol/Command comes out, and you can access deeper functionality using
  

A library for rebol could be written in perl, with a bit thinking about 
protokoll
(a quick look at http://www.zend.com/ says PHP is similar to perl, so it may 
usable too:)
look at rebols "predecessor" perl. When it needs a tricky function, it simply 
mix
C in. or whatever. pretty factored in a library, and after that, it is perl. 
No one needs to know C to use it.
perl has a similar level as rebol in handling strings and eval (do) 
sourcecode.
So a library for rebol could be written in perl, with a bit thinking about 
protokoll.
which can do nearly all and if not, it can C.
if REBOL can communicate with things email, http and other servers, why not 
with a specialised
proxy-server for databases or whatever?
First would be a REBOL-Block -- perl-struct converter, after that one can 
do pretty messaging between them.
if perl starts rebol, communication with stdin/stdout between them is *very* 
private, i think.
Then REBOL (carl) has much (em, more) time to find ways of doing this things 
easy, elegant and everywhere.
The old communication-protokoll should be re-implementable with /command or 
whatever intern,
rest of code continues with "ask-db[select x y from table..]" as before..

snip
  .:Eric
  

Volker



[REBOL] How can i lock files for multitasking-access

2000-03-03 Thread VoToNi

How can i lock files for multitasking-access?
Does open this everywhere?

Volker



[REBOL] need help with internet traffic counter Re:

2000-03-03 Thread VoToNi

There is a proxy.r at rebol.org. For http, it should be able to count this.
How can one write proxies for ftp, email and that? 

another way: is a "DU Meter"s output text, and includes size and url in a 
log, rebol should be able to parse it, and sum.
Hopefully so short that porting would not be a problem :)

Volker
---
In einer eMail vom 02.03.00 01:35:17 (MEZ) Mitteleuropäische Zeit schreibt 
[EMAIL PROTECTED]:

 short version: I need a multiplatform internet traffic counter that counts 
 all upload and download internet traffic from my PC to beyond my ISP. 
 Something very simple like "DU Meter" (www.tucows.com) for win9x would do 
 just fine except that it calculates ALL traffic. I just want to know my 
 traffic beyond my ISP. 
  Rebol seems well suited for the job but I don't know enough about it, nor 
 about the TCP/IP protocol. Any help is appreciated: from a pointer to a TCP/
 IP newbie guide to a ready-to-use program (whishful thinking?). TIA.
  
  long version: I am on a permanent cable connection, like 20.000 other 
 customers from my ISP. They have a limit for *external* traffic, but they 
don'
 t give us a stats page where every client can keep track his traffic. If 
you 
 pass the limit once: you get a warning; twice: 2 days out; third time = 1 
 week out; 4th time = banned permanently! 
  With external traffic I mean every byte that travels from my PC to outside 
 my ISP's domain (or vice versa). Traffic from the ISP newsserver, 
mailserver, 
 ftp server etc. and traffic between customers from my ISP is unlimited, so 
 these shouldn't be counted. From www.ripe.net we know what ip-ranges belong 
 to my ISP: this should be a parameter because its a growing list. Uploads 
and 
 downloads to these ip's shouldn't be counted except the proxy-server at 
proxy.
 pandora.be:8080, this is *always* calculated as external, even if the files 
 were on the proxy!
  The limit is 2GB per week (OK I agree this sounds silly if you have a 56K 
 modem but once you're on a fast  permanent connection you'll understand, 
so 
 plz don't yell at me). It is calculated as follows:
  at 0600 here in Belgium the sum of your external traffic (upload + 
download) 
 of the past 168 hours (or 7 days) is made. If this exceeds 2GB you get 
 warning +1. The program that I need help with should have to be able to 
 display total external volume at all times, preferable giving a warning or 
 block all external upload  download traffic as soon as 2GB/7=286MB has 
been 
 reached since 6am. It should be able to "remember" the last count to be 
able 
 to continue after a reboot
  Why multiplatform? 20.000 customers aren't all Windows users, but they're 
 all very interested in such a program.
  
  Every little bit of help is very much appreciated. TIA
  
  



[REBOL] [REBOL] Rebol/Command and the kitchen sink Re[2]: Re:

2000-03-03 Thread VoToNi

In einer eMail vom 03.03.00 06:16:03 (MEZ) Mitteleuropäische Zeit schreibt 
[EMAIL PROTECTED]:

Personally, I'd like to do all of my web development in Rebol/Core, 
  but it's looking like I'm going to need to create and access some MySQL 
  databases. Now I can do that with PHP, but not Rebol/Core, and I have no 
  idea when Rebol/Command is going to actually show up. 
   
  Er, can you use PHP to gateway between Rebol and MySql? ( a Rebol script 
  to read a PHP page, and post to a PHP form?
  
maybe a start:
have started rebol -w from perl with ipc::open2, then perl can get commands 
from rebol and send results back. rebol acts with input/print.
have not done more. maybe a way to a database-server?
note the first message must come from rebol, earlier perl-writes are lost. 
have windows activeware-perl.
trying to kill rebol from perl failed here, on unix should work?

hm. with perls eval you can even send source from rebol.. 
perl as another dialect :)
Maybe this perl-script (or whatever language can play shell) 
can be extended as a message-dispatcher between rebols?
with [start-rebol [name [string!] command [block! string!]]] and [send-rebol 
[receiver [string!] message [block! string!]]] and [kill[name[string!]]]
then running downloaded code can't hang the server.
console-io is there at every security-level, nothing else needed.

Hm, starting applications is not portable, starting rebols should be?


---
#
use IPC::Open2;   

$rebol_exe="C:\\Program Files\\REBOL\\View\\rebol.exe";
$pid = open2(\*RDR, \*WTR, "$rebol_exe","-wq test.r");
$|=1;
print "begin\n";
while(RDR){
print "from rebol:", $_;
print WTR "hi rebol ",$_;
}
print "done\n";
-
rebol[]
print "hello from rebol"
print ["hi perl" input]
-
begin
from rebol:hello from rebol

from rebol:hi perl hi rebol hello from rebol

done


Volker



[REBOL] Rebol/Command and the kitchen sink Re:(3)

2000-03-03 Thread ralph



 If I remember, MySQL has a TCP/IP interface. So it would be possible to
 create a mysql protocol scheme for REBOL.

 Olivier


To be able to access MySQL with REBOL/Command would firmly establish it in
my opinion.

Well, at least I'd buy itg.

--Ralph




[REBOL] Rebol Meat-Search Engine

2000-03-03 Thread mprice
Title: Rebol Meat-Search Engine





Here's a project I am working on. It's a Meta-Search engine that's built in REBOL. Click on the SEARCH link on the left.

http://www.whadup.com


Sorry but for now it's IE v4 and above only as it uses IE specific DHTML. I will have the Netscape version up in the next couple of days. I will also be adding new search engines when I've parsed the output of them.

Melvin Mudgett-Price
Director of Development
http://www.acmex.com/bio/mmp (Bio)
(216) 391-7400 X207


acmeX.com - Acme Express, Inc.
Web-enabled software / e-commerce / Web Marketing 
http://www.acmeX.com
(216) 391-0707 (FAX)
(216) 276-5487 (Cell)





[REBOL] if this or that, then action

2000-03-03 Thread RChristiansen

Following is a segment of code that repeats an if statement over and over.  
How can I simply this?

if firstword = "Path" [
clear fields
checker: false checker
]

if firstword = "In-Reply-To" [
clear fields
checker: false checker
]

if firstword = "Message-ID" [
clear fields
checker: false checker
]

if firstword = "References" [
clear fields
checker: false checker
]

if firstword = "MIME-Version" [
clear fields
checker: false checker
]

if firstword = "Content-Type" [
clear fields
checker: false checker
]

if firstword = "Lines" [
clear fields
checker: false checker
]

if firstword = "NNTP-Posting-Host" [
clear fields
checker: false checker
]

if firstword = "X-Trace" [
clear fields
checker: false checker
]

if firstword = "NNTP-Posting-Date" [
clear fields
checker: false checker
]

if firstword = "Organization" [
clear fields
checker: false checker
]

if firstword = "Xref" [
clear fields
checker: false checker
]

if firstword = "Followup-To" [
clear fields
checker: false checker
]

if firstword = "Content-Transfer-Encoding" [
clear fields
checker: false checker
]

if firstword = "X-Complaints-To" [
clear fields
checker: false checker
]

if firstword = "X-Mailer" [
clear fields
checker: false checker
]

if firstword = "X-Accept-Language" [
clear fields
checker: false checker
]

if firstword = "Reply-To" [
clear fields
checker: false checker
]

if firstword = "X-Newsreader" [
clear fields
checker: false checker
]

if firstword = "X-Priority" [
clear fields
checker: false checker
]

if firstword = "X-MSMail-Priority" [
clear fields
checker: false checker
]

if firstword = "X-MimeOLE" [
clear fields
checker: false checker
]

if firstword = "User-Agent" [
clear fields
checker: false checker
]

if firstword = "X-Abuse-to" [
clear fields
checker: false checker
]

if firstword = "X-Comments" [
clear fields
checker: false checker
]

if firstword = "X-Anon" [
clear fields
checker: false checker
]

if firstword = "X-Mail-To-News-Contact" [
clear fields
checker: false checker
]

if firstword = "X-Mimeole" [
clear fields
checker: false checker
]

if firstword = "X-Sender" [
clear fields
checker: false checker
]

if firstword = "X-Server-Date" [
clear fields
checker: false checker
]

if firstword = "X-MIMEOLE" [
clear fields
checker: false checker
]

if firstword = "X-Abuse-Info" [
clear fields
checker: false checker
]

if firstword = "X-Anon-1" [
clear fields
checker: false checker
]

if firstword = "X-Anon-2" [
clear fields
checker: false checker
]

if firstword = "X-No-Archive" [
clear fields
checker: false checker
]

if firstword = "Sender" [
clear fields
checker: false checker
]



[REBOL] if this or that, then action Re:

2000-03-03 Thread mjelinek

If you want to execute different logic for each case you can use "switch":

switch firstword [
"Path" [
clear fields
checker: false checker
]

"In-Reply-To" [
clear fields
checker: false checker
]

"Message-ID" [
clear fields
checker: false checker
]
]

It looks like you want to use the same logic, so I would search for the
value in a list:

if find [   "Path" "In-Reply-To" "Message-ID"
"References" "MIME-Version" "Content-Type" ] firstword [
clear fields
checker: false checker
]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, March 03, 2000 4:12 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] if this or that, then action


Following is a segment of code that repeats an if statement over and over.  
How can I simply this?

if firstword = "Path" [
clear fields
checker: false checker
]

if firstword = "In-Reply-To" [
clear fields
checker: false checker
]

if firstword = "Message-ID" [
clear fields
checker: false checker
]

if firstword = "References" [
clear fields
checker: false checker
]

if firstword = "MIME-Version" [
clear fields
checker: false checker
]

if firstword = "Content-Type" [
clear fields
checker: false checker
]

if firstword = "Lines" [
clear fields
checker: false checker
]

if firstword = "NNTP-Posting-Host" [
clear fields
checker: false checker
]

if firstword = "X-Trace" [
clear fields
checker: false checker
]

if firstword = "NNTP-Posting-Date" [
clear fields
checker: false checker
]

if firstword = "Organization" [
clear fields
checker: false checker
]

if firstword = "Xref" [
clear fields
checker: false checker
]

if firstword = "Followup-To" [
clear fields
checker: false checker
]

if firstword = "Content-Transfer-Encoding" [
clear fields
checker: false checker
]

if firstword = "X-Complaints-To" [
clear fields
checker: false checker
]

if firstword = "X-Mailer" [
clear fields
checker: false checker
]

if firstword = "X-Accept-Language" [
clear fields
checker: false checker
]

if firstword = "Reply-To" [
clear fields
checker: false checker
]

if firstword = "X-Newsreader" [
clear fields
checker: false checker
]

if firstword = "X-Priority" [
clear fields
checker: false checker
]

if firstword = "X-MSMail-Priority" [
clear fields
checker: false checker
]

if firstword = "X-MimeOLE" [
clear fields
checker: false checker
]

if firstword = "User-Agent" [
clear fields
checker: false checker
]

if firstword = "X-Abuse-to" [
clear fields
checker: false checker
]

if firstword = "X-Comments" [
clear fields
checker: false checker
]

if firstword = "X-Anon" [
clear fields
checker: false checker
]

if firstword = "X-Mail-To-News-Contact" [
clear fields
checker: false checker
]

if firstword = "X-Mimeole" [
clear fields
checker: false checker
]

if firstword = "X-Sender" [
clear fields
checker: false checker
]

if firstword = "X-Server-Date" [
clear fields
checker: false checker
]

if firstword = "X-MIMEOLE" [
clear fields
checker: false checker
]

if firstword = "X-Abuse-Info" [
clear fields
checker: false checker
]

if firstword = "X-Anon-1" [
clear fields
checker: false checker
]

if firstword = "X-Anon-2" [
clear fields
checker: false checker
]

if firstword = 

[REBOL] if this or that, then action Re:

2000-03-03 Thread rryost

To do the same action for each "special" word, try this simpler approach
illustrated by a console session:

; First, create a block holding all the special words:

 swords: ["Path" "In-Reply-To" "Message-ID" ]
== ["Path" "In-Reply-To" "Message-ID"]
;
Now try it with a word that is not in the block and then with one that is in
t he block:

 firstword: "Paths"
 if find swords firstword [print "Action block if found"]
== false
 firstword: "Path"
 if find swords firstword [print "Action block if found"]
Action block if found


Of course, you must include all your special word in 'swords

I don't know what that would do if a special word were "none", as find
returns none if the test word is not found, otherwise it returns the test
word. But 'none is NOT "none".

 Apparently 'if treats any string, even "", as equivalent to 'true (well,
not false, anyhow), and if the 'if condition is none 'false is returned.
Some of the list members didn't like this, in the past, but it works nicely
here!





Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 03, 2000 5:11 PM
Subject: [REBOL] if this or that, then action


 Following is a segment of code that repeats an if statement over and over.
 How can I simply this?

 if firstword = "Path" [
 clear fields
 checker: false checker
 ]

 if firstword = "In-Reply-To" [
 clear fields
 checker: false checker
 ]

 if firstword = "Message-ID" [
 clear fields
 checker: false checker
 ]

 if firstword = "References" [
 clear fields
 checker: false checker
 ]

 if firstword = "MIME-Version" [
 clear fields
 checker: false checker
 ]

 if firstword = "Content-Type" [
 clear fields
 checker: false checker
 ]

 if firstword = "Lines" [
 clear fields
 checker: false checker
 ]

 if firstword = "NNTP-Posting-Host" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Trace" [
 clear fields
 checker: false checker
 ]

 if firstword = "NNTP-Posting-Date" [
 clear fields
 checker: false checker
 ]

 if firstword = "Organization" [
 clear fields
 checker: false checker
 ]

 if firstword = "Xref" [
 clear fields
 checker: false checker
 ]

 if firstword = "Followup-To" [
 clear fields
 checker: false checker
 ]

 if firstword = "Content-Transfer-Encoding" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Complaints-To" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Mailer" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Accept-Language" [
 clear fields
 checker: false checker
 ]

 if firstword = "Reply-To" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Newsreader" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Priority" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-MSMail-Priority" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-MimeOLE" [
 clear fields
 checker: false checker
 ]

 if firstword = "User-Agent" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Abuse-to" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Comments" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Anon" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Mail-To-News-Contact" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Mimeole" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Sender" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Server-Date" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-MIMEOLE" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Abuse-Info" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Anon-1" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-Anon-2" [
 clear fields
 checker: false checker
 ]

 if firstword = "X-No-Archive" [
 clear fields
 checker: false checker
 ]

 if firstword = "Sender" [
 clear fields
 checker: false checker
 ]




[REBOL] Fw: [REBOL] if this or that, then action

2000-03-03 Thread rryost

I should have said 'find returns the block of special words with the current
position at the found word, if the word is found.
'if responds to a condition of any block, even [], as if it were  "true".
Russell [EMAIL PROTECTED]
- Original Message -
From: "Russell Yost" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 03, 2000 7:52 PM
Subject: Re: [REBOL] if this or that, then action


 To do the same action for each "special" word, try this simpler approach
 illustrated by a console session:

 ; First, create a block holding all the special words:

  swords: ["Path" "In-Reply-To" "Message-ID" ]
 == ["Path" "In-Reply-To" "Message-ID"]
 ;
 Now try it with a word that is not in the block and then with one that is
in
 t he block:

  firstword: "Paths"
  if find swords firstword [print "Action block if found"]
 == false
  firstword: "Path"
  if find swords firstword [print "Action block if found"]
 Action block if found
 

 Of course, you must include all your special word in 'swords

 I don't know what that would do if a special word were "none", as find
 returns none if the test word is not found, otherwise it returns the test
 word. But 'none is NOT "none".

  Apparently 'if treats any string, even "", as equivalent to 'true (well,
 not false, anyhow), and if the 'if condition is none 'false is returned.
 Some of the list members didn't like this, in the past, but it works
nicely
 here!





 Russell [EMAIL PROTECTED]
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 03, 2000 5:11 PM
 Subject: [REBOL] if this or that, then action


  Following is a segment of code that repeats an if statement over and
over.
  How can I simply this?
 
  if firstword = "Path" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "In-Reply-To" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Message-ID" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "References" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "MIME-Version" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Content-Type" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Lines" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "NNTP-Posting-Host" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Trace" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "NNTP-Posting-Date" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Organization" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Xref" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Followup-To" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Content-Transfer-Encoding" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Complaints-To" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Mailer" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Accept-Language" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Reply-To" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Newsreader" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Priority" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-MSMail-Priority" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-MimeOLE" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "User-Agent" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Abuse-to" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Comments" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Anon" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Mail-To-News-Contact" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Mimeole" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Sender" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Server-Date" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-MIMEOLE" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Abuse-Info" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Anon-1" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-Anon-2" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "X-No-Archive" [
  clear fields
  checker: false checker
  ]
 
  if firstword = "Sender" [
  clear fields
  checker: false checker
  ]
 




[REBOL] if this or that, then action Re:(2)

2000-03-03 Thread norsepower

 firstword: "Paths"
 if find swords firstword [print "Action block if found"]
== false
 firstword: "Path"
 if find swords firstword [print "Action block if found"]
Action block if found


Yes, this is exactly what I was looking for.  I tried using the pipe | 
like in the parse dialect, but it didn't work (obviously) and "or" 
doesn't work for strings (or so console told me.)  Thanks for the 
input.  I'm a newbie to programming (my only experience is programming 
in AppleSoft BASIC 15 years ago) and I really appreciate the help.  In 
case you didn't recognize it in the code, I am working on a script that 
grabs the headers and bodies for a newsgroup from a news server, then 
discards all of the unwanted headers and builds the page nicely with 
HTML tags.  Then I will have it FTP the information to a site 
somewhere.  I would like to make this automated at some point, where 
the script runs every 15 mins. or so and refreshes the information, but 
I have a ways to go with that.

-Ryan



[REBOL] pick server-said 4

2000-03-03 Thread norsepower

when trying to use ftp with the following script 

REBOL []

secure none

set-net [[EMAIL PROTECTED] pop.mail.network.net]

site: ftp://user:[EMAIL PROTECTED]/public_html

files: [%NEWSbeadvocacy.html %NEWSbehelp.html %NEWSbemisc.html 
%NEWSbeprogrammers.html]

foreach file files [
write site/:file read file
]

I received the error

** Script Error: pick expected series argument of type: series money 
date time object port tuple any-function.
** Where: pick server-said 4 

Where does the "pick server-said 4" come in when it is a script error?

-Ryan



[REBOL] Why doesn't this work?

2000-03-03 Thread rex

obj: make object! [a: "" b: ""]
t: 'obj
new-obj: make t []

When I try it, I get the following response:

 obj: make object! [a: "" b: ""]
 t: 'obj
== obj
 new-obj: make t []
** Script Error: Expected one of: word! - not: block!.
** Where: new-obj: make t []

How does one make a derived object using a variable to specify the parent
object?

.:Eric