[REBOL] [REBOL] Prime number generator Re:

2000-02-14 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

>  I have one question, though (several actually, but this one will do for
> now, I think :)
> [flags/:mult: 0  gives this error
> ** Syntax Error: Invalid word -- :mult:.
> ** Where: (line 45) flags/:mult: 0 ;-- this does not work. why? NV 6/2/2000
> This stumped me. Earlier I had declared [mult: make integer! 1] Surely, it
> is in scope.
>

REBOL doesn't support this kind of syntax:

->> i: 1
== 1
>> j: 2
== 2
->> blk: [["A" "B" "C"] ["D" "E" "F"]]
== [["A" "B" "C"] ["D" "E" "F"]]
->> blk/:i
== ["A" "B" "C"]
->> blk/:i/:j
== "B"
->> blk/:i/:j: "Q"
** Syntax Error: Invalid word -- :j:.
** Where: (line 1) blk/:i/:j: "Q"

->> change blk/:i/:j "Q"
== ""
->> blk
== [["A" "Q" "C"] ["D" "E" "F"]]
->>

Is that what you wanted to achieve?

-pekr-

> Nitish.
> [EMAIL PROTECTED]
> http://www.loka.net/



[REBOL] [REBOL] Prime number generator

2000-02-14 Thread rebol

G'day, folks  I've been enjoying the discussions on [EMAIL PROTECTED]  It is 
obvious that the flexibility of REBOL unleashes a lot of creativity. I am 
still trying to get my head around  some of your discussions, but here's a 
start..

I was testing is-primes? that comes with the REBOL Core 2.2.x distribution: 
%is-prime.r  and found that it comes up with the following:
>> is-prime? 341
== true
>> 341 / 11
== 31
>> 561 / 11
== 51
In the process I wrote a prime number generator %primes.r  which defines a 
function primes [N] that returns a series of primes from 2..N-1 and posted 
it to rebol.org category math. I hope it comes in handy. 
Comments/enhancements are most welcome!

 I have one question, though (several actually, but this one will do for 
now, I think :)
[flags/:mult: 0  gives this error
** Syntax Error: Invalid word -- :mult:.
** Where: (line 45) flags/:mult: 0 ;-- this does not work. why? NV 6/2/2000
This stumped me. Earlier I had declared [mult: make integer! 1] Surely, it 
is in scope.
I was trying to set the "mult" th item in series "flags" to 0 . I got 
around that by using the "remove" and "insert" methods. If this type of 
problem was discussed elsewhere, I missed it. Please let me know where to 
look...

Nitish.
[EMAIL PROTECTED]
http://www.loka.net/




[REBOL] Prime number generator

2000-02-14 Thread rebol

G'day, folks  I've been enjoying the discussions on [EMAIL PROTECTED]  It is 
obvious that the flexibility of REBOL unleashes a lot of creativity. I am 
still trying to get my head around  some of your discussions, but here's a 
start..

I was testing is-primes? that comes with the REBOL Core 2.2.x distribution: 
%is-prime.r  and found that it comes up with the following:
>> is-prime? 341
== true
>> 341 / 11
== 31
>> 561 / 11
== 51

..so I wrote what I think is a more reliable prime number generator 
%primes.r and posted it to rebol.org. I hope it comes in handy. 
Comments/enhancements are most welcome!

 I have one question, though (several actually, but this one will do for 
now, I think :)
[flags/:mult: 0  gives this error
** Syntax Error: Invalid word -- :mult:.
** Where: (line 45) flags/:mult: 0 ;-- this does not work. why? NV 6/2/2000
This stumped me. Earlier I had declared [mult: make integer! 1] Surely, it 
is in scope.
I was trying to set the "mult" th item in series "flags" to 0 . I got 
around that by using the "remove" and "insert" methods. If this type of 
problem was discussed elsewhere, I missed it. Please let me know where to 
look...

Nitish.
[EMAIL PROTECTED]
http://www.loka.net/




[REBOL] Running from batch file? Re:

2000-02-14 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

> If I do "Rebol dns.r" from the DOS prompt (DOS box of
> Windoze 95) my dns.r program runs fine.
>
> If I put the same thing in a batch file, then Rebol just
> brings up the console, and dns.r is not loaded, just goes
> right to the Rebol prompt.
>
> How do you start rebol & program from batch file?

kurzy.bat
--
start /w rebol -sq kurzy-seznam.r
import /PATH=G:\aplikace\promiss\system

We even managed another app to wait untill the rebol part of the task is
not finished by using start /w

I tried to run REBOL from Netware login script. It runs, but on some
machines we get black Rebol console screen. Once you begin to type,
background changes back to default console b/w coloring. Problems with
refresh when started from dos prompt? Don't know.

-pekr-



[REBOL] FW: Email Extractor Script

2000-02-14 Thread Ed


 I run a Free Trip to Tahiti Contest on the net and have so many
contestants to respond to that I can't do it individually.  All the
email messages reside in an MS Outlook Folder.  My dilemma is: How to
look inside each email message and extract the email address for each
contestant.  I was thinking I could export all the email messages to a
text file and then write a REBOL script to extract the email addresses.

 Could someone give me an idea what the Rebol script would look like
that would read the text file which contains email addresses scattered
throughout and create another text file containing just the email
addresses?

  Thanks,
  Ed Grant
  http://edgrant.com/tahiti




[REBOL] Running from batch file? Re:(3)

2000-02-14 Thread Al . Bri

Here's a batch file that works for REBOL 2.2.0.3.1:

"C:\Program Files\REBOL\REBOL.EXE" "c:\Program
Files\REBOL\View\ChorusLine.r"

REBOL 2.2 needs a full path to the script. It's different in REBOL/View.

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

Another round of applause for the REBOL City Music Hall REBOLettes!

REBOL 2.2.0.3.1
Copyright (C) 1998-1999 REBOL Technologies
REBOL is a Trademark of REBOL Technologies
All rights reserved.

Finger protocol loaded
Whois protocol loaded
Daytime protocol loaded
SMTP protocol loaded
POP protocol loaded
HTTP protocol loaded
FTP protocol loaded
NNTP protocol loaded
Script: "REBOL Extended Definitions" (3-Sep-1999/17:55:08)
Script: "User Preferences" (26-Jan-2000)
Script: "Patch" (26-Jan-2000)
Script: "Include" (25-Jan-2000)
Script: "Script" (19-Dec-1999)
Script: "ReSwitch" (10-Dec-1999)
Script: "Cls" (23-Jan-2000)
Script: "Desktop" (30-Dec-1999)
Script: "Printer" (24-Jan-2000)
Script: "Ifs" (16-Jan-2000)
Script: "Dir" (24-Jan-2000)
Script: "Stack" (21-Jan-1999)
Script: "The REBOL City REBOLettes" ("13-Jan-2000")


  Presenting the REBOL City Music Hall REBOLettes!


.@@@..@@@..@@@..@@@..@@@.
@o_o@@o_o@@o_o@@o_o@@o_o@
/\v/\/\v/\/\v/\/\v/\/\v/\
\(_)/\(_)/\(_)/\(_)/\(_)/
 | |  | |  | |  | |  | |
_| |__| |__| |__| |__| |_


  **applause**applause***

Next Show 10 p.m.





[REBOL] Running from batch file? Re:(3)

2000-02-14 Thread terry . chilvers

 Looks like a dos path issue
 
 If I run a batch file from my rebol directory
 rebol test.r
 
 it works fine
 
 from another directory I run
 c:\rebol\rebol test.r
 
 and I just get the command prompt
 
 if I run
 cd c:\rebol
 rebol test.r
 
 it again works
 
 terry


__ Reply Separator _
Subject: [REBOL] Running from batch file? Re:(2) 
Author:  <[EMAIL PROTECTED]> at internet
Date:14/02/2000 21:02


>> How do you start rebol & program from batch file?
>
>I've tried REBOL/View with a batch file and it works fine. Here's what's
>inside the batch file:
>
>"C:\Program Files\REBOL\View\REBOL.EXE" %ChorusLine.r

I'm trying to do with with Core 2.2.0.3.1.

I've tried these variations, while being in the same
directory as rebol.exe:

rebol dns.r
rebol %dns.r
"rebol.exe" %dns.r
"rebol.exe" dns.r"

while being in a different directory:

"C:\REBOL\Rebol.exe" %dsn.r
"C:\REBOL\Rebol.exe" dsn.r

they all just go to the ">>" prompt.

Can type them manually and they work fine.

BTW, is the "%" required on the command line?  Seems to work
with or with-out it.





[REBOL] Running from batch file? Re:

2000-02-14 Thread tim781

Hey, Have you tried to add a dos command to your bat file
to change the current directory before the command
to run your script.. It prob'ly seems not worth trying
but dos is different like that. win95 won't recognize my
cd-rom drive but if I first start dos and then windows
my cd-rom drive shows up in windows explorer.

timmy


[EMAIL PROTECTED] wrote:

> If I do "Rebol dns.r" from the DOS prompt (DOS box of
> Windoze 95) my dns.r program runs fine.
>
> If I put the same thing in a batch file, then Rebol just
> brings up the console, and dns.r is not loaded, just goes
> right to the Rebol prompt.
>
> How do you start rebol & program from batch file?





[REBOL] Running from batch file? Re:(2)

2000-02-14 Thread bpaddock

>> How do you start rebol & program from batch file?
>
>I've tried REBOL/View with a batch file and it works fine. Here's what's
>inside the batch file:
>
>"C:\Program Files\REBOL\View\REBOL.EXE" %ChorusLine.r

I'm trying to do with with Core 2.2.0.3.1.

I've tried these variations, while being in the same
directory as rebol.exe:

rebol dns.r
rebol %dns.r
"rebol.exe" %dns.r
"rebol.exe" dns.r"

while being in a different directory:

"C:\REBOL\Rebol.exe" %dsn.r
"C:\REBOL\Rebol.exe" dsn.r

they all just go to the ">>" prompt.

Can type them manually and they work fine.

BTW, is the "%" required on the command line?  Seems to work
with or with-out it.



[REBOL] Running from batch file? Re:

2000-02-14 Thread Al . Bri

B Paddock wrote:
> If I do "Rebol dns.r" from the DOS prompt (DOS box of Windoze 95) my dns.r
program runs fine.

> If I put the same thing in a batch file, then Rebol just brings up the
console, and dns.r is not loaded, just goes right to the Rebol prompt.

> How do you start rebol & program from batch file?

I've tried REBOL/View with a batch file and it works fine. Here's what's
inside the batch file:

"C:\Program Files\REBOL\View\REBOL.EXE" %ChorusLine.r

I've also run from inside a C program, using the "system" function with the
above command line.

Andrew Martin
Ooh laa laa!
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-




[REBOL] Running from batch file?

2000-02-14 Thread bpaddock


If I do "Rebol dns.r" from the DOS prompt (DOS box of
Windoze 95) my dns.r program runs fine.

If I put the same thing in a batch file, then Rebol just
brings up the console, and dns.r is not loaded, just goes
right to the Rebol prompt.

How do you start rebol & program from batch file?



[REBOL] WebCam CGI script Re:(2)

2000-02-14 Thread bpaddock

>>addr: join http:// [ read join dns:// read dns:// to-url ":8080" ]
>>save ftp://user:[EMAIL PROTECTED]/WWW/webcam-addr.txt addr
>>---
>
>I get the following error (with all the right stuff filled in):
>
>** User Error: Server error: tcp 550 ./user/: The system cannot find
> the file specified. .
>** Where: save ftp://user:[EMAIL PROTECTED]/user/myip.txt addr
>
>Any ideas?

Never mind, operator error.  If the message had been
"Directory not found" I would have known what it meant.

Turning on Trace helped.

The fun of learning a new language... :-)



[REBOL] Computer date? Re:

2000-02-14 Thread allenk


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 15, 2000 12:36 AM
Subject: [REBOL] Computer date?


>
> Hi:
>
> I have been using REBOL's date format in file names. This has the
distinction
> of putting the files in a mixed order, and the dictionary does not show
other
> formats.
>
> Is there a way to get the date in -mm-dd format, without parsing the
basic
> date?
> --


Nothing that I can think of unless there something undocumented, but it
doesn't take too much to reformat

to-mmdd: func [date [date!]][
   join date/year reduce

   either date/month < 9 [join "0" date/month][date/month]
   either date/day < 9 [join "0" date/day][date/day]
  ]
]

; usage..
to-mmdd modified? %filename

or

to-yyymmdd now
=="2215"

Cheers

Allen K



[REBOL] Computer date? Re:

2000-02-14 Thread rebol

It looks like you could just do something like

date: now
sortabledate: rejoin [date/year "-" date/month "-" date/day]

Check out http://www.rebol.com/users/valdate.html for more info about dates.

Anyone know of any other way to do it?

Keith

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 14, 2000 9:36 AM
Subject: [REBOL] Computer date?


>
> Hi:
>
> I have been using REBOL's date format in file names. This has the
distinction
> of putting the files in a mixed order, and the dictionary does not show
other
> formats.
>
> Is there a way to get the date in -mm-dd format, without parsing the
basic
> date?
> --
>
> ---===///||| Donald Dalley |||\\\===---
>  The World of AmiBroker Support
>   http://webhome.idirect.com/~ddalley
>Member: ICOA and Team AMIGA




[REBOL] REBOL for Netware?

2000-02-14 Thread Petr . Krenzelok

Hi,

as several people asked about REBOL for their popular Palm Pilots, I
would like to ask about the state of development of REBOL for Netware
platform. Any progress?

Thanks,

-pekr-



[REBOL] WebCam CGI script Re:(2)

2000-02-14 Thread kevin


> I get the following error (with all the right stuff filled in):
> 
> ** User Error: Server error: tcp 550 ./user/: The system cannot find
>  the file specified. .
> ** Where: save ftp://user:[EMAIL PROTECTED]/user/myip.txt addr
> 
> Any ideas?

Your FTP server may be chroot()'ing the account.  If so, you may not 
need the /user/ part of the path.

If your home directory on the server is /user, the server will log 
you into /user and make it look like /.  (The /user part is implied.) 
This is starting to be used more often for security.

See if this works:
save ftp://user:[EMAIL PROTECTED]/myip.txt addr

Cheers,
Kev


Kevin McKinnon, Network Engineer [EMAIL PROTECTED]
Sunshine Communications http://www.sunshinecable.com

PGP Public Key: http://www.dockmaster.net/pgp.html   PGP 6.0 www.pgp.com



[REBOL] What Type Of Apps Are You Writting? Re:(3)

2000-02-14 Thread mjelinek

I'm still "just learning" and am not even writing net-aware apps, but the
reason I like it over any other language I've used (incl Perl) is that the
commands are intuitive (including syntax-less) yet powerful. IMHO it's
REALLY not JUST another language. Java is just another language, Perl is
just another language. To use them and be good with them, you've got to
memorize a whole bunch of syntax and many "simple" things just aren't done
in english-thinking ways. You have to become one with the computer
(language) to understand how some "simple" tasks are to be done. Rebol
provides a language where these tasks are done in terms more closely
resembling natural language (or thought) that any of these other languages.
THAT is how programming is easier (from my point of view).

- Michael Jelinek

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 14, 2000 8:00 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] What Type Of Apps Are You Writting? Re:(2)



I'm new to REBOL and so probably don't really get it yet (the story of my
life could probably be writting with that phrase!).  Most of the
applications I've seen mentioned could be done as easily in Perl, Python or
tcl/tk (or even Java!).  I'd expected to see applications that took
advantage of Rebol's extremely small foot-print and protocol-knowledge: web
servers for hand-helds, net-aware embedded apps, etc.

I'm not interested in starting any kind of religious war, but I would like
to know what people see as the big selling point of Rebol, the reason they
picked it over the various other languages on the web.

Thanks,
Russell.



[REBOL] Computer date?

2000-02-14 Thread ddalley


Hi:

I have been using REBOL's date format in file names. This has the distinction
of putting the files in a mixed order, and the dictionary does not show other
formats.

Is there a way to get the date in -mm-dd format, without parsing the basic
date?
-- 

---===///||| Donald Dalley |||\\\===---
 The World of AmiBroker Support
  http://webhome.idirect.com/~ddalley
   Member: ICOA and Team AMIGA



[REBOL] WebCam CGI script Re:

2000-02-14 Thread bpaddock


>REBOL [ Title: "Camera On" ]
>
>addr: join http:// [ read join dns:// read dns:// to-url ":8080" ]
>save ftp://user:[EMAIL PROTECTED]/WWW/webcam-addr.txt addr
>---

I get the following error (with all the right stuff filled in):

** User Error: Server error: tcp 550 ./user/: The system cannot find
 the file specified. .
** Where: save ftp://user:[EMAIL PROTECTED]/user/myip.txt addr

Any ideas?



[REBOL] Your invaluable assistance Re:(2)

2000-02-14 Thread tjohnson

Hi Eric:
I will definitely take a look at your script.
To give you an example of the scope of what I do online:
I have one project in "c" that is 19,000 lines of code.
I have another that is about 9,000 plus the Borland
Database Engine (am rewritting THAT project to eliminate
the BDE, am considering a Rebol dbase module as one
alternative, although I have other resources.)
Thanks Eric.
:>) tim
At 09:52 AM 2/13/00 +0900, you wrote:
>
>Hi Tim,
>
>I enjoyed reading your description of your personal history and
>your project. I don't know very much about web programming, but
>I'll help when I can.
>
>You wrote:
>
>>P.S. I've got some ideas for a rebol "librarian",
>>that could fetch reusable subroutines like the one
>>the Eric wrote, and insert them into a project file.
>>More about that later.
>
>I'm not sure how necessary a project file is for REBOL programming,
>at least at this stage. I never got to the point in C where I needed
>a project file, but my understanding is that project files are handy
>to speed up the process of compilation (so that you don't have to
>recompile files if their code hasn't changed), and to link in compiled
>libraries.
>
>I think with REBOL you don't have to do (can't do) anything more
>complicated than including files. A lot of us have written utilities
>for this. I have one on rebol.org called dore.r that is a big help.
>It indexes all the *.r files below the REBOL home directory. Then you
>can do my-script.r with just:
>
>   dore my-script; takes a word! argument
>
>and,
>
>   dore/maybe my-script
>
>will do that script only if it hasn't been done. This is the statement
>I use as an equivalent to an include statement. Also,
>
>   dore/list my-script
>
>will print out a list of functions and objects defined in that script.
>I could send you the latest version if you're interested.
>
>See you,
>Eric
>
>



[REBOL] What Type Of Apps Are You Writting? Re:(2)

2000-02-14 Thread lear


I'm new to REBOL and so probably don't really get it yet (the story of my
life could probably be writting with that phrase!).  Most of the
applications I've seen mentioned could be done as easily in Perl, Python or
tcl/tk (or even Java!).  I'd expected to see applications that took
advantage of Rebol's extremely small foot-print and protocol-knowledge: web
servers for hand-helds, net-aware embedded apps, etc.

I'm not interested in starting any kind of religious war, but I would like
to know what people see as the big selling point of Rebol, the reason they
picked it over the various other languages on the web.

Thanks,
Russell.



[REBOL] (E)BNF of valid email addresses? Re:

2000-02-14 Thread brucel

RFC 822  (under revision, see
).
RFC 2047 

Bruce Long
Senior Software Engineer
Vogo Networks 

425-803-5482



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 12, 2000 10:36 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] (E)BNF of valid email addresses?
> 
> 
> Hi Rebols,
> 
> 
> I'm working on an cgi-application and want to do some reasonable error
> checking on what users type in my html-form as their email address.
> Relying on rebols email! datatype and email? type-tester is 
> not enough.  
> 
> Surely someone on the rebol list knows where I can find the 
> (E)BNF syntax
> specification or something similiar.
> 
> Thank you in advance,
> 
> 
> Christian CHE Ensel
> 
> [EMAIL PROTECTED]
> - Germany -
> 



[REBOL] Demo of console animation, the REBOL City Music Hall REBOLettes Re:(2)

2000-02-14 Thread ralph

Sorry, the lines "wrapped" in the mail... I'll submit it to REBOL.org and am
putting up a site of my own.

--Ralph

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 13, 2000 10:02 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Re: Demo of console animation, the REBOL City Music
> Hall REBOLettes
>
>
> Hello [EMAIL PROTECTED]
>
> On 13-Feb-00, [EMAIL PROTECTED] wrote:
> > Okay, okay--I'll quit after this, but one lady dancing was so
> much fun, I
> > did a whole chorus line.
> >
> The single lady worked fine on Pc/Amiga Rebol but got this for the chorus
> line:
>  do %chorusline.r
> ** Syntax Error: Invalid string -- "^(1B)[2C.@@@..@@@.
> .@@@.
>   .@@@..@@@..
> ** Where: (line 14) print "^(1B)[2C.@@@..@@@.
> .@@@.
>   .@@@.
>   .@@@.
> union problem? :)
> Regards
> --
> JMS Trustee http://www.jms.org
> HP=http://www.sonic.net/~alanwall/
> First computer solar powered vic-20
> AmigaQNX-notAmigaNG=no good
> computers for people not suits
> sent via Yam ver2 on AmigaForever ver3
> UIN=9391028
>




[REBOL] test program needed

2000-02-14 Thread fuchs

Could one of you Rebol jockeys write a one-line program (actually any
length) that does the following:

Opens a port to another machine running a similar Rebol program and just
sends and receives data? I am trying to debug a problem with what is
probably the wireless driver on a WinCe machine and I suspect that it
dies when there is sustained data flowing in both directions. I am sure
I could, given sufficient time, do this myself but we are trying to do
this quickly.

Thanks.