[REBOL] Rolling your own ideal looper: does Repeat still have a bug? Re:(6)

2000-08-30 Thread lmecir

Hi,


> Ladislav,
>
> That is an impressive For function!
> your example of using
> >a: [1 2]
> >for s a tail a 1 [print s]
> as a test is very amusing bug, looks
> like an infinite loop on windows, just
> keeps printing newlines without ever ending.
>
> Just for kicks, I just tried this:
> >> for s a back tail a 1 [print s]
> 1 2
> 2
>
> so that it stops at the last real position,
> and that seemed to work, althout the expression
> is more awkward and wordy!
>
> Your other example is this:
> >> for s a next a -1 [print s]
> 1 2
>
> which I am not sure I get.
> This would never get to next a by skipping -1.
> Either you have a typo here, or I missed the point.
>

Simple, For should stop immediately as for integers, because it is
already behind the limit.

> If this were integers, it would look like
> for x = 1 30 step -1
>
> >> for s a next a 1 [print s]
> 1 2
> 2
>
> What is the proper behavior of
> >> for s a next a -1 [print s]
> ???
>
> -Galt
>
> p.s. As far as the second-class vs. first-class values
> goes, I am inclined to agree with you.  There are some
> fishy issues that don't seem entirely cooked.  You are
> right to bring them up for discussion.  So far, however,
> in the programs that have come up naturally in my
> use of Rebol, I haven't been banging into these issues
> alot.  I have seen the errorhandling stuff e.g. try, disarm
> seems like it's more awkward than it should be.
> I could run smack into more of them at any moment,
> though!
>
> p.p.s.  I think the desire to share Rebol data and
> objects across the net between two instances of rebol.exe,
> or storing them and retrieving them later in native Rebol
format,
> will come up strongly in the near future.
> Even the RebMail program might be a lot simpler if
> you could just save your mail objects and reload later.
> Having to create extra functions for converting from
> Rebol to some other disk structure and then back
> again is a pain.  I think Rebol can do better.
> It just needs to make a few new tricks available...
>
You are right with data saving - even data copying in Rebol may be
an unsolvable problem.






[REBOL] Compress. What is REBOL's algorithm? Re:

2000-08-30 Thread allen


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 31, 2000 1:46 PM
Subject: [REBOL] Compress. What is REBOL's algorithm?


> What compression algorithm does REBOL use with
>  ? Given this, know any good on-line sources
> for that algorithm?
> 
> 

it is zlib
http://www.info-zip.org/pub/infozip/zlib/

Cheers,

Allen K








[REBOL] View/VID prebeta 5 is worth trying

2000-08-30 Thread carl

A new REBOL/View is posted in http://www.rebol.com/xpers/xpers.html.  This one is 
quite interesting because it contains many changes to VID.  It also has a test panel 
built-in to help you find tests without a hassle.  In addition, you can add your own 
test site to the panel... so the rest of us can try out your scripts!  Links are added 
on a first come first serve basis, so reserve your spot in history by adding your site 
link soon.

Click on the What's Up icon for more info about the release.

CONVERTING SCRIPTS:
--

Most VID scripts can be converted by knowing that:

1) STYLIZE has changed.  It now takes a line similar to a LAYOUT.  Examples:

stylesheet: stylize [
 red-btn: button red
 big-btn: button 200x40
 big-red-img-button: button red 200x40 %bay.jpg
 center-txt: txt center font-size 16
]

To quickly convert, you can use STYLIZ (no E)... which is the old function.  But, note 
that it will be vanishing soon.

2) Use face/data field for accessing the data of a VID face.  For instance, to print 
the choice made on a rotary button, you would write:

r: rotary "breakfast" "lunch" "dinner" [print first r/data]

This is true with all styles.

Note the multiple facets allowed for rotary here.  Try:

r: rotary "go" green "stop" red "yield" yellow
or
r: rotary "go" "stop" "yield" green red yellow

This is good stuff.  Makes VID now the most powerful user interface language ever 
created. Tell a friend.

3) There are many new styles.  For instance, TXT, H1, H2, H3, etc. will give you 
document face styles (black text without shadows).


CREATING A TEST SITE


I want you to create your own test site, even if you only have one VID script. REBOL 
needs you.  It's important.  And, it's fun too.

Here's how to create a site:

1) Create a file called index.r in the format:

REBOL []
icon "Big Test" %bigtest.r
icon "Image" %photo.jpg
icon "Link" %docs.html
icon "Reply" %replier.r image %myicon.jpg
icon "Files" dir %index2.r  ; links to another index file

2) Upload the file and any scripts/images to your website.

3) Publish your test site by using the "Add a Site" icon in View (found on the REBOL 
site page in the sites directory).  Give the URL for your index.r file.  You can 
provide an icon for your site as well.

4) Verify that it works, then tell us about it here on the list.

5) Write a lot of scripts and add them to your site.


OTHER DOCS
--

I have a much better VID document nearly ready.  Watch for it to appear in View under 
the REBOL site.  There are also entirely new CORE chapters to be published very soon.


FEEDBACK


Feedback has never been easier. Click on the feedback icon.


GO FOR IT
-

I need your help... REBOL needs your help.  Now is the time to go for it.  Start 
working on REBOL view scripts today.  Publish them toay on your site or on someone 
else's site.  Tell your friends about REBOL.  Tell your press contacts about REBOL.  
Get them helping out.

The time for REBOL is now.

-Carl







[REBOL] Multimedia quality (was) One disk OS + REBOL Re:(11)

2000-08-30 Thread jkinraid

Hi Bo,

> I believe that was the Akiko chip, but I think it required a special
> hardware call to perform the conversion.  Hence, I would be surprised
> if you would see a speed increase on the CD32 unless REBOL/View was
> modified to make that call when running on the CD32.
> 
> Once again, Holger probably knows more about this than I do.

I don't think the Akiko chip can handle 32 bit per pixel chunky pixel
format, just 8 bits per chunky pixel (palette based).

Julian Kinraid




[REBOL] Compress. What is REBOL's algorithm?

2000-08-30 Thread civicminded4

What compression algorithm does REBOL use with
 ? Given this, know any good on-line sources
for that algorithm?




[REBOL] Encryption with REBOL

2000-08-30 Thread aparman

With the recent talk about encryption I thought I'd send along this little script.  
For details read the header.

PLEASE READ THE HEADER OF THIS SCRIPT BEFORE USE!

It will send and receive encrypted email, and encrypt or decrypt any file.

I consider it beta, and would appreciate any feedback.
Any one who uses it may modify it, but please email me with a copy of your 
enhancements.

I retain all my rights of original authorship on this script, but make no claims as to 
it's use.

__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

 cipher-beta.r


[REBOL] Challenging script idea Re:(4)

2000-08-30 Thread galtbarber

Well, there is the trivial case of identical source,
assuming that it is run in the same context.

This is interesting!
Could you please elaborate?

Isn't checking to see if two different programs 
are doing "the same thing" rather difficult for 
all but the dullest cases, in practically 
any programming language?

-Galt

>= Original Message From [EMAIL PROTECTED] =
>Hello [EMAIL PROTECTED]!
>
>On 30-Ago-00, you wrote:
>
> g> And since one can look at
> g> the template of any defined function at run time, it
> g> seems possible to determine which tokens have
> g> significance in a context, and which have none or
> g> less.  Sort of like being able to determine that "the
> g> names have been changed to protect the innocent", but
> g> the story's the same.  What dost thou think?
>
>If you want to determine if two scripts are doing the same thing,
>you'd at least have to simulate their execution. That is, you
>can't determine that by just statically analyzing REBOL code.
>
>If you really find a way to do so, then you've found a way to
>compile REBOL code.
>
>Regards,
>Gabriele.
>--
>Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
>Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] Rolling your own ideal looper: does Repeat still have a bug? Re:(5)

2000-08-30 Thread galtbarber

Ladislav,

That is an impressive For function!
your example of using
>a: [1 2]
>for s a tail a 1 [print s]
as a test is very amusing bug, looks 
like an infinite loop on windows, just 
keeps printing newlines without ever ending.

Just for kicks, I just tried this:
>> for s a back tail a 1 [print s]
1 2
2

so that it stops at the last real position,
and that seemed to work, althout the expression 
is more awkward and wordy!

Your other example is this:
>> for s a next a -1 [print s]
1 2

which I am not sure I get.
This would never get to next a by skipping -1.
Either you have a typo here, or I missed the point.

If this were integers, it would look like
for x = 1 30 step -1

>> for s a next a 1 [print s]
1 2
2

What is the proper behavior of
>> for s a next a -1 [print s]
???

-Galt

p.s. As far as the second-class vs. first-class values 
goes, I am inclined to agree with you.  There are some 
fishy issues that don't seem entirely cooked.  You are 
right to bring them up for discussion.  So far, however, 
in the programs that have come up naturally in my 
use of Rebol, I haven't been banging into these issues
alot.  I have seen the errorhandling stuff e.g. try, disarm
seems like it's more awkward than it should be.
I could run smack into more of them at any moment, 
though!

p.p.s.  I think the desire to share Rebol data and 
objects across the net between two instances of rebol.exe,
or storing them and retrieving them later in native Rebol format,
will come up strongly in the near future.  
Even the RebMail program might be a lot simpler if 
you could just save your mail objects and reload later.
Having to create extra functions for converting from 
Rebol to some other disk structure and then back 
again is a pain.  I think Rebol can do better.
It just needs to make a few new tricks available...





>= Original Message From "Ladislav Mecir" <[EMAIL PROTECTED]> =
>2. For loop. Here is my version working properly for series (just
>a minor improvement):
>
>Nobody uses For to traverse a series, I guess. OTOH, the
>implementation of For should be correct.
>
>; Example of incorrect behaviour:
>a: [1 2]
>for s a tail a 1 [print s]
>for s a next a -1 [print s]
>
>My correction:
>
>for: func [
>{Repeats a block over a range of values.}
>[catch throw]
>'word [word!] {Variable to hold current value}
>start [number! series! money! time! date! char!] {Starting
>value}
>end [number! series! money! time! date! char!] {Ending value}
>bump [number! money! time! char!] {Amount to skip each time}
>body [block!] {Block to evaluate}
>/local result do-body op cond
>][
>if (type? start) <> (type? end) [
>throw make error! reduce ['script 'expect-arg 'for 'end
>type? start]
>]
>do-body: func reduce [[throw] word] body
>op: either positive? bump [:greater-or-equal?][
>:lesser-or-equal?
>]
>either series? start [
>if not same? head start head end [
>throw make error! reduce ['script 'invalid-arg end]
>]
>cond: op index? end index? start
>while [cond] [
>set/any 'result do-body start
>cond: op index? end (index? start) + bump
>start: skip start bump
>]
>] [
>while [op end start] [
>set/any 'result do-body start
>start: start + bump
>]
>]
>get/any 'result
>]
>




[REBOL] Rolling your own ideal looper: does Repeat still have a bug? Re:(5)

2000-08-30 Thread galtbarber

Hello, Ladislav,

>It is telling For, that instead
>of taking Exit as a signal for itself to exit, it must throw it
>further (to F).

I think I either don't understand the problem properly,
or else RT heard you and corrected the problem already.
When I tried to do

f: does [print "Hello" for i 1 10 1 [exit] print "You won't see this"]

and run it, it exits f properly.
I am assuming that in an old version it would 
exit the for loop and keep running, so that 
the user would in fact see:
>>f
  You won't see this

Is that the case?
If so, RT has fixed it in my View and Core,
which are 09931 and 23031 respectively.

I may be all wet here, but if they have fixed it,
it is probably in part due to your hard-won research 
and reporting of the problem.

-Galt


>= Original Message From "Ladislav Mecir" <[EMAIL PROTECTED]> =
>Not exactly. The problem is, what can be considered a Rebol bug.
>
>1. Exit/Return: the normal behaviour is, that any function
>encountering Exit takes it as an instrunction for itself to exit
>like:
>
>f: does [print "Hello" exit print "You won't see this"]
>
>The "problem" is, that some functions like For, Forskip, Foreach,
>Forall, While, Repeat, Loop, Any, All, If, Either, ... take a
>Rebol code as their Block argument (or whatever name they use for
>it). Now an example:
>
>f: does [print "Hello" for i 1 10 1 [exit] print "You won't
>see this"]
>
>Here the function encountering the Exit you see on the line is not
>F as you might think at first, but For. For this code to work
>"properly", For shall know, that the Exit it encountered is meant
>as a signal for another function (F in this case). That's the
>reason d'etre for Throw attribute. It is telling For, that instead
>of taking Exit as a signal for itself to exit, it must throw it
>further (to F).
>
>So, once again: Throw is a Carl's solution of the "foreign
>Return/Exit" problem and you should use it whenever you program
>your own "Rebol control functions" ie. the functions that take
>Rebol code blocks and interpret them.
>
>FYI: there is a similar problem of "foreign Break", that remains
>unsolved. (I found a work-around, when I programmed
>www.rebol.org/general/pif.r).
>




[REBOL] PGP encryption from REBOL Re:(2)

2000-08-30 Thread ryanc

And of course decrypts...

--Ryan


 decrypts.r


[REBOL] Challenging script idea Re:(6)

2000-08-30 Thread jeff


 
   Howdy, Sterling:

> If  it's a GPF that  takes down the  universe, you would be
> implying  that we're  all  living  in  MS  Universe 2000 or
> something like that.  Maybe that's  why we die, eh?  It's a
> bug in the system.

  That theory sounds as good as any to me -- or maybe a bus
  error in the brain.

  If Microsoft created the universe, then we all know that
  there could be no heaven.  "Welcome to heaven, click the
  start button to begin."  Sounds like hell to me.
  
  -jeff




[REBOL] Multimedia quality (was) One disk OS + REBOL Re:(10)

2000-08-30 Thread bo


Steve,

I believe that was the Akiko chip, but I think it required a special
hardware call to perform the conversion.  Hence, I would be surprised
if you would see a speed increase on the CD32 unless REBOL/View was
modified to make that call when running on the CD32.

Once again, Holger probably knows more about this than I do.

Take care!

-Bo

On 28-Aug-2000/8:27:14-5:00, [EMAIL PROTECTED] wrote:
>I think the CD32 had a special chip (HP or ?) which did chunky to
>planar.
>So maybe Rebol runs cool on CD32...I will have to give that a spin and
>see.
>
>Thanks for the explanation,
>Steve Shireman
-- 
   Bohdan "Bo" Lechnowsky
   REBOL  Adventure Guide
   REBOL Technologies 707-467-8000 (http://www.rebol.com)
Download the REBOL Messaging Language
   The Official Source for REBOL Books (http://www.REBOLpress.com)




[REBOL] PGP encryption from REBOL Re:

2000-08-30 Thread ryanc

[EMAIL PROTECTED] wrote:

> Hi I would like ... rephrase that: In order to impress my higher-ups, I MUST 
>demonstrate the ability of REBOL to encrypt a file and ftp it to a host. I can handle 
>the FTP part.
>
> Vis-a-vis the PGP part, from Perl we were making system calls to a PGP binary. But 
>REBOL does appear to make system calls.
>

PGP system calls? sounds like a job for /Command.  Otherwise if you just want to show 
off your encryption capabilities, use the attached scripts.  Encryption is very slow 
though,
and decryption could kill you, although the routine is not optimized at all. Maybe you 
could speed it up.  Its not PGP, but it does have the nice feature of dialing in your 
level
of protection--if your willing to wait.

--Ryan

Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400


 encrypts.r
 make-crypt.r


[REBOL] Challenging script idea Re:(5)

2000-08-30 Thread sterling


If it's a GPF that takes down the universe, you would be implying that 
we're all living in MS Universe 2000 or something like that.  Maybe
that's why we die, eh?  It's a bug in the system.

Sterling

> Actually, I think one can make a stronger statement.  I suspect
> (without spending many brain-cycles on it) that the GENERAL
> question "Does function f1 do the same thing as function f2?"
> is formally unsolvable, in the same way that the halting problem
> has no general solution.
> 
> If you can really find a way to do so, you'll cause a general
> protection fault that will crash the universe.  ;-)
> 
> -jn-
> 
> [EMAIL PROTECTED] wrote:
> > 
> 
> > 
> > If you want to determine if two scripts are doing the same thing,
> > you'd at least have to simulate their execution. That is, you
> > can't determine that by just statically analyzing REBOL code.
> > 
> > If you really find a way to do so, then you've found a way to
> > compile REBOL code.
> > 
> > Regards,
> > Gabriele.
> > --
> > Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
> > Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] Challenging script idea Re:(4)

2000-08-30 Thread joel . neely

Actually, I think one can make a stronger statement.  I suspect
(without spending many brain-cycles on it) that the GENERAL
question "Does function f1 do the same thing as function f2?"
is formally unsolvable, in the same way that the halting problem
has no general solution.

If you can really find a way to do so, you'll cause a general
protection fault that will crash the universe.  ;-)

-jn-

[EMAIL PROTECTED] wrote:
> 
...
> 
> If you want to determine if two scripts are doing the same thing,
> you'd at least have to simulate their execution. That is, you
> can't determine that by just statically analyzing REBOL code.
> 
> If you really find a way to do so, then you've found a way to
> compile REBOL code.
> 
> Regards,
> Gabriele.
> --
> Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
> Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] Re: Is REBOL interpreted or byte-compiled?

2000-08-30 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 29-Ago-00, you wrote:

 p> Is REBOL interpreted or byte-compiled?

It is interpreted. Compiling REBOL is virtually impossibile,
unless you want to do some magic (but that wouldn't be very fast,
I think).

 p> The reason I ask this is I see get word called 800,000 times
 p> below and I hope that each invocation does not incur the
 p> overhead of a function call.

Well, SOURCE isn't certainly a critical function. :-) Anyway, you
could use the following "optimized" version if you really want to.

source: func [
   "Prints the source code for a word."
   'word [word!]
][
   prin join word ": "
   if not value? word [print "undefined" exit]
   word: get word
   either any [native? :word op? :word action? :word] [
   print ["native" mold third :word]
   ] [print mold :word]
]

Regards,
Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] Re: Challenging script idea Re:(2)

2000-08-30 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 30-Ago-00, you wrote:

 g> And since one can look at
 g> the template of any defined function at run time, it
 g> seems possible to determine which tokens have
 g> significance in a context, and which have none or
 g> less.  Sort of like being able to determine that "the
 g> names have been changed to protect the innocent", but
 g> the story's the same.  What dost thou think?

If you want to determine if two scripts are doing the same thing,
you'd at least have to simulate their execution. That is, you
can't determine that by just statically analyzing REBOL code.

If you really find a way to do so, then you've found a way to
compile REBOL code.

Regards,
Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] /deep versus /only Re:

2000-08-30 Thread jeff



  Just to throw in some more commentary from "the boys" :-) :

  The /only refinement is used for more than just referring to
  nested blocks. It means to consider the item in question as
  a single series type, instead of as a bunch of separate
  items. Change/only means to apply the changes as a single
  series, and not as individual items, for example:

 >> ser: ["str1" "str2" "str3"]
 >> change ser [1 2]

 >> ser 
 == [1 2 "str3"]

 ;-- CHANGE took the 1 and 2 and applied the change
 ;   to ser like two separate changes. 

 >> ser: ["str1" "str2" "str3"]
 >> change/only ser [1 2]

 >> ser
 == [[1 2] "str2" "str3"]
 

 ;-- Change/only took the [1 2] and thought of it as a single
 ;   value which it changed the first value of ser to. 

  The /only refinement is like saying "There's ONLY one value
  here, not many values".

  "Deep" really is very different. 


  -jeff


> Thought you would like to hear what "the  boys" have to say
> about /deep versus /only
> 
> 
> - Forwarded Message -
> 
> DATE: Mon,  28  Aug 2000 17:21:39  From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> 
> 
> princepawn,
> 
> The /only refinement  is   used for a block  nested  within
> another block.  The  /deep refinement is used for recursing
> through any number of nested blocks.
> 
> This may  not  sound like much  of a  difference, but it is
> felt  that the difference is sufficient  enough  to note by
> two different refinements.
> 
> If you  have any additional questions/comments/suggestions,
> please let us know!
> 
> REBOL Support --




[REBOL] Rebol/Command - accessing all records in the queue??

2000-08-30 Thread mdb

Hello,

Using the latest experimental version of Rebol/Command, i'm able to connect
and access records from an Oracle Database.

using one-rec: first db-port will correctly return the next record

but using something like

all-recs: copy db-port

should return all the records according to the documentation, but it only
returns 1 record. Any ideas?

Thanks.

Mike Berrisford






[REBOL] /deep versus /only

2000-08-30 Thread princepawn


Thought you would like to hear what "the boys" have to say about /deep versus /only


- Forwarded Message -

DATE: Mon, 28 Aug 2000 17:21:39
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


princepawn,

The /only refinement is used for a block nested within another block.
The /deep refinement is used for recursing through any number of nested 
blocks.

This may not sound like much of a difference, but it is felt that the
difference is sufficient enough to note by two different refinements.

If you have any additional questions/comments/suggestions, please let us know!

REBOL Support
-- 

On 28-Aug-2000/11:44:39-8:00, [EMAIL PROTECTED] wrote:
>The REBOL Helpdesk has preprocessed this message.
>
>append/only and copy/deep
>It would be more uniform for these refinements to have the same name as they do the 
>same thing: ie, append/only should be named append/deep
>or copy/deep should be named copy/only for consistency
>
>
>
>Get your FREE Email and Voicemail at Lycos Communications at
>http://comm.lycos.com
>
-- 
   Bohdan "Bo" Lechnowsky
   REBOL  Adventure Guide
   REBOL Technologies 707-467-8000 (http://www.rebol.com)
Download the REBOL Messaging Language
   The Official Source for REBOL Books (http://www.REBOLpress.com)


- End Forwarded Message -



Get your FREE Email and Voicemail at Lycos Communications at
http://comm.lycos.com

- End Forwarded Message -



Get your FREE Email and Voicemail at Lycos Communications at
http://comm.lycos.com




[REBOL] Rolling your own ideal looper: does Repeat still have a bug? Re:(4)

2000-08-30 Thread galtbarber

Thanks, Gabriele,

I have enjoyed studying this foreach code you created!
Excellent!  I appreciate your help, it's very valuable.
I wanted to say, sorry for not getting back to you 
immediately, there's a lot going on right now!!!

Ciao!

-Galt

p.s. The way you use bind on this-context is something 
new to me, it seems, I am enjoying this kind of enlightenment.


>= Original Message From [EMAIL PROTECTED] =
>Hello [EMAIL PROTECTED]!
>
>On 28-Ago-00, you wrote:
>
> g> By the way, do you know how Rebol itself
> g> does foreach internally? Do they use a function
> g> like you did, or is it done some other way?
>
>Probably they're doing something like:
>
>  foreach: func [
>"Evaluates a block for each value(s) in a series."
>'word [get-word! word! block!] {Word or block of words to set each time 
(will be local)}
>data [series!] "The series to traverse"
>body [block!] "Block to evaluate each time"
>/local amount
>  ] [
>if get-word? word [word: get word]
>use compose [(word) this-context] [ ; of course the native code
>; doesn't need the extra word
>  bind body 'this-context
>  amount: either block? word [length? word] [1]
>  while [not tail? data] [
>set word data
>do body
>data: skip data amount
>  ]
>]
>  ]
>
>Obviously the native code might look a lot different. ;-)
>
>Also, since they're probably not calling the WHILE native, there
>will be some magic code to make BREAK etc. work as expected.
>
>Regards,
>Gabriele.
>--
>Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
>Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] PGP encryption from REBOL

2000-08-30 Thread princepawn

Hi I would like ... rephrase that: In order to impress my higher-ups, I MUST 
demonstrate the ability of REBOL to encrypt a file and ftp it to a host. I can handle 
the FTP part. 

Vis-a-vis the PGP part, from Perl we were making system calls to a PGP binary. But 
REBOL does appear to make system calls.

---

; run this in your
; http://www.rebol.com>REBOL Interpreter!
terrence-brannon: [ [EMAIL PROTECTED] perl-refugee myth-gamer ]
perl-refugee: [ 'loved href perl discovery: (metaperl = rebol) 'hates href perl ]
myth-gamer:http://www.bungie.net/bin/stats.pl?player=princepawn

; angles makes this a href instead of code! use ur imagination!
href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ]
perl: href http://www.perl.com "Perl"


On Wed, 30 Aug 2000 8:37:13   
 grantwparks wrote:
>Could this script evolve in the following ways?
>
>1.  Ignore header info like author, date and comments
>2.  Ignore a difference in URLs, filenames, etc. when
>they are the target of a particular verb.  I.E. if I
>read a URL, but the specific value differs, the 2
>scripts are still doing the same thing.  In fact the
>coolest thing I can think of in this case would be
>reporting that "these 2 scripts are functionally the
>same, but the first operates on URL:
>http://www.url1.com and the second on
>http://www.url2.com..."
>
>Don't mean to put the work on others, but I have
>barely had the time to even dabble with Rebol, yet
>(hey, 'dabble with Rebol' has a cool ring to it!).  I
>do, however, have a knack for grammars and other
>meta/abstraction concepts.  And since one can look at
>the template of any defined function at run time, it
>seems possible to determine which tokens have
>significance in a context, and which have none or
>less.  Sort of like being able to determine that "the
>names have been changed to protect the innocent", but
>the story's the same.  What dost thou think?
>
>--- [EMAIL PROTECTED] wrote:
>> 
>> Well, it sounded fun so here's what I've got.  The
>> output running it
>> on the two files you talked about is at the bottom. 
>> The diff shows a
>> list of blocks with tokens and a number which is how
>> many times that
>> token was in the file.  You may see the same token
>> listed in the diff
>> for each file if the number of appearances is
>> different.
>> 
>> Well, enjoy!
>> 
>> Sterling
>> 
>> REBOL [
>>  Title: "Simple token diff"
>>  Purpose: {
>> I don't know, really.  It just tries to
>> figure out how many REBOL tokens are different
>> between two files.  Somebody thought it would
>> be neat. ;)  Maybe they'll ake it complete and
>> fix whatever lurking bugs there are in this code.}
>>  Author: "Sterling Newton"
>> ]
>> 
>> a: ask "File or URL #1? "
>> b: ask "File or URL #2? "
>> 
>> get-type: func [item [string!]] [
>>  switch/default true reduce [
>>  found? find item "://" [item: to-url item]
>>  found? find item "%" [item: to-file next item]
>>  ] [a: to-file a]
>>  item
>> ]
>> 
>> a: get-type a
>> b: get-type b
>> 
>> ; the unique tokens and totals blocks
>> foreach item [a-tokens b-tokens a-totals b-totals] [
>>  set item copy []
>> ]
>> 
>> file1: load/next a
>> file2: load/next b
>> 
>> tokenize-block: func [
>>  blk [block!] tokens [block!] totals [block!]
>>  /local tmp idx]
>> [
>>  while [not empty? blk] [
>>  either block? blk/1 [
>>  tokenize-block load/next form blk/1 tokens totals
>>  ] [
>>  either tmp: find tokens blk/1 [
>>  idx: index? tmp
>>  totals/:idx/2: totals/:idx/2 + 1
>>  ] [
>>  append tokens blk/1
>>  repend/only totals [blk/1 1]
>>  ]
>>  ]
>>  blk: load/next blk/2
>>  ]
>> ]
>> 
>> tokenize-block load/next file1 a-tokens a-totals
>> tokenize-block load/next file2 b-tokens b-totals
>> 
>> print ["The two files differ by:" length? difference
>> a-tokens b-tokens "tokens."]
>> print ["- Tokens in" a "not in" b "-"]
>> foreach item intersect diff: difference a-totals
>> b-totals a-totals [
>>  probe item
>> ]
>> 
>> print ["- Tokens in" b "not in" a "-"]
>> foreach item intersect diff b-totals [
>>  probe item
>> ]
>
>
>> == results from the two web page emailing
>> scripts ==
>> 
>> >> do %/home/moses/temp/diff.r
>> File or URL #1?
>> http://www.rebol.com/library/html/mailpage.html
>> File or URL #2?
>> http://www.rebol.com/library/html/websend.html 
>> The two files differ by: 14 tokens.
>> - Tokens in
>> http://www.rebol.com/library/html/mailpage.html not
>> in http://www.rebol.com/library/html/websend.html
>> -
>> [Email 2]
>> [a 2]
>> [Page 1]
>> [mailpage.r 1]
>> [10-Sep-1999 1]
>> [page. 1]
>> [(simple) 1]
>> [http://www.rebol.com/releases.html 1]
>> - Tokens in
>> http://www.rebol.com/lib

[REBOL] Dialling Out Re:

2000-08-30 Thread lmecir

Hi,

my copy of Windows 98 dials out whenever Rebol asks. No user
intervention needed. It depends on the settings of Win 98 IMHO.

Regards
Ladislav

- Puvodní zpráva -
Od: <[EMAIL PROTECTED]>
Komu: <[EMAIL PROTECTED]>
Odesláno: 30. srpna 2000 10:08
Predmet: [REBOL] Dialling Out


> Hi
>
> I am a newcomer to REBOL and would like to use it
> to solve a particular programming problem.  I have
> a stand-alone application, which is not attended
> by a user, which occasionaly needs to send or
> receive e-mails.  Rather than programming all the
> code at a low level, REBOL seemed ideally suited
> to performing the network interaction processes
> through an application generated script and a
> CREATE_PROCESS call to REBOL.EXE
>
> My problem is that the machine does not have a
> permanent connection to the network, but needs to
> dial out when required.  Does anyone have a
> suitable script, or a technique which can be used
> to get the machine to dial out a connection (using
> a connection defined in DUN) without requiring any
> user interaction?
>
> I woud have thought that this would be a very
> common requirement (most networking tools have the
> ability to dial out if they are not connected,
> although simply invoking DUN still requires a user
> confirmation) and I would suggest that it would be
> a very worthwhile enhancment to REBOL.
>
> Regards
>
> Justin
>
> *
> * Justin A. T. Halls*
> * Millennium Homes Project Manager  *
> * Brunel Institute for Bioengineering   *
> * Brunel University *
> * Kingston Lane *
> * Uxbridge  *
> * Middx. UB8 3PH*
> * UK*
> * Tel. +44 (0)1895 271206   *
> * Fax  +44 (0)1895 274608   *
> * e-mail: [EMAIL PROTECTED] *
> *
>
>




[REBOL] Dialling Out Re:

2000-08-30 Thread d95-mjo



I don't know if this is what you're looking for in this particular
case, but I have made a tiny DLL to make it easier to call the Win32
RAS functions from REBOL/Command without all the annoying
Win32 structs.

The DLL currently has function wrappers for RasDial, RasHangup and
RasGetConnectStatus. You can find the source for the DLL here:

http://www.d.kth.se/~d95-mjo/rebol/dlltest.cpp

and the /Command example script here:

http://www.d.kth.se/~d95-mjo/rebol/dialup_example.r

I've only tested it in Win98 and Win2000, but it seems to work.
Obviously, this requires the /Command experimental version for
Win9x/NT/2000. :-)

/Martin Johannesson, [EMAIL PROTECTED]



On Wed, 30 Aug 2000 [EMAIL PROTECTED] wrote:

> IMHO the ability to connect to or disconnect from
> the
> network connection is something one should be able
> to do from a script.  Of course that still leaves
> the
> question of which system functions the implementor
> chooses to use to implment it.
> 
> Anyway, I am stillleft with the problem of getting
> a connection in some way.  Even (my copy of) Win98
> does not have an 'Automatic Connection' button and
> insists on some sort of user intervention.
> 
> I am looking into the RASDial(...) function which
> appears to do the job, but the documentation is
> obscure.  I had just hoped that someone had trod
> the
> path before me.  Heh Ho.





[REBOL] Challenging script idea Re:(2)

2000-08-30 Thread grantwparks

Could this script evolve in the following ways?

1.  Ignore header info like author, date and comments
2.  Ignore a difference in URLs, filenames, etc. when
they are the target of a particular verb.  I.E. if I
read a URL, but the specific value differs, the 2
scripts are still doing the same thing.  In fact the
coolest thing I can think of in this case would be
reporting that "these 2 scripts are functionally the
same, but the first operates on URL:
http://www.url1.com and the second on
http://www.url2.com..."

Don't mean to put the work on others, but I have
barely had the time to even dabble with Rebol, yet
(hey, 'dabble with Rebol' has a cool ring to it!).  I
do, however, have a knack for grammars and other
meta/abstraction concepts.  And since one can look at
the template of any defined function at run time, it
seems possible to determine which tokens have
significance in a context, and which have none or
less.  Sort of like being able to determine that "the
names have been changed to protect the innocent", but
the story's the same.  What dost thou think?

--- [EMAIL PROTECTED] wrote:
> 
> Well, it sounded fun so here's what I've got.  The
> output running it
> on the two files you talked about is at the bottom. 
> The diff shows a
> list of blocks with tokens and a number which is how
> many times that
> token was in the file.  You may see the same token
> listed in the diff
> for each file if the number of appearances is
> different.
> 
> Well, enjoy!
> 
> Sterling
> 
> REBOL [
>   Title: "Simple token diff"
>   Purpose: {
> I don't know, really.  It just tries to
> figure out how many REBOL tokens are different
> between two files.  Somebody thought it would
> be neat. ;)  Maybe they'll ake it complete and
> fix whatever lurking bugs there are in this code.}
>   Author: "Sterling Newton"
> ]
> 
> a: ask "File or URL #1? "
> b: ask "File or URL #2? "
> 
> get-type: func [item [string!]] [
>   switch/default true reduce [
>   found? find item "://" [item: to-url item]
>   found? find item "%" [item: to-file next item]
>   ] [a: to-file a]
>   item
> ]
> 
> a: get-type a
> b: get-type b
> 
> ; the unique tokens and totals blocks
> foreach item [a-tokens b-tokens a-totals b-totals] [
>   set item copy []
> ]
> 
> file1: load/next a
> file2: load/next b
> 
> tokenize-block: func [
>   blk [block!] tokens [block!] totals [block!]
>   /local tmp idx]
> [
>   while [not empty? blk] [
>   either block? blk/1 [
>   tokenize-block load/next form blk/1 tokens totals
>   ] [
>   either tmp: find tokens blk/1 [
>   idx: index? tmp
>   totals/:idx/2: totals/:idx/2 + 1
>   ] [
>   append tokens blk/1
>   repend/only totals [blk/1 1]
>   ]
>   ]
>   blk: load/next blk/2
>   ]
> ]
> 
> tokenize-block load/next file1 a-tokens a-totals
> tokenize-block load/next file2 b-tokens b-totals
> 
> print ["The two files differ by:" length? difference
> a-tokens b-tokens "tokens."]
> print ["- Tokens in" a "not in" b "-"]
> foreach item intersect diff: difference a-totals
> b-totals a-totals [
>   probe item
> ]
> 
> print ["- Tokens in" b "not in" a "-"]
> foreach item intersect diff b-totals [
>   probe item
> ]


> == results from the two web page emailing
> scripts ==
> 
> >> do %/home/moses/temp/diff.r
> File or URL #1?
> http://www.rebol.com/library/html/mailpage.html
> File or URL #2?
> http://www.rebol.com/library/html/websend.html 
> The two files differ by: 14 tokens.
> - Tokens in
> http://www.rebol.com/library/html/mailpage.html not
> in http://www.rebol.com/library/html/websend.html
> -
> [Email 2]
> [a 2]
> [Page 1]
> [mailpage.r 1]
> [10-Sep-1999 1]
> [page. 1]
> [(simple) 1]
> [http://www.rebol.com/releases.html 1]
> - Tokens in
> http://www.rebol.com/library/html/websend.html not
> in http://www.rebol.com/library/html/mailpage.html
> -
> [Page 2]
> [Emailer 1]
> [websend.r 1]
> [20-May-1999 1]
> [Fetch 1]
> [a 1]
> [and 1]
> [it 1]
> [as 1]
> [email. 1]
> [email 1]
> [http://www.rebol.com 1]
> 


__
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/




[REBOL] Dialling Out Re:(2)

2000-08-30 Thread justin . halls

IMHO the ability to connect to or disconnect from
the
network connection is something one should be able
to do from a script.  Of course that still leaves
the
question of which system functions the implementor
chooses to use to implment it.

Anyway, I am stillleft with the problem of getting
a connection in some way.  Even (my copy of) Win98
does not have an 'Automatic Connection' button and
insists on some sort of user intervention.

I am looking into the RASDial(...) function which
appears to do the job, but the documentation is
obscure.  I had just hoped that someone had trod
the
path before me.  Heh Ho.

Justin

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 30, 2000 2:54 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Dialling Out Re:
>
>
>
> > My problem is that the machine does not have a
> permanent connection to the network,
> but needs to
> dial out when required.  Does anyone have a
> suitable script, or a technique which
> can be used
> to get the machine to dial out a
> connection (using
> a connection defined in DUN) without
> requiring any
> user interaction?
>
> IIRC Holger had replied to this topic
> along the lines that automatic
> dialing should be an operating system
> task and doesn't belong in REBOL. If
> you want automatic dialing, set it up
> in your operating system. If your
> operating system doesn't support it
> then, well, I guess you can write a
> script for your modem
>
> - Michael Jelinek
>
>




[REBOL] Dialling Out Re:

2000-08-30 Thread jelinem1


> My problem is that the machine does not have a
permanent connection to the network, but needs to
dial out when required.  Does anyone have a
suitable script, or a technique which can be used
to get the machine to dial out a connection (using
a connection defined in DUN) without requiring any
user interaction?

IIRC Holger had replied to this topic along the lines that automatic
dialing should be an operating system task and doesn't belong in REBOL. If
you want automatic dialing, set it up in your operating system. If your
operating system doesn't support it then, well, I guess you can write a
script for your modem

- Michael Jelinek





[REBOL] How to count properly slider args solution ....

2000-08-30 Thread Petr . Krenzelok

Hi,

as I was receiving unexpected behavior of lists while trying to scroll
it (when using 'supply for dynamic list creation), I played a little bit
with what should be the right arg which should go into slider ...

I surely don't know how /View scrolls internally, but imho following
aproach used even by Carl's file-requestor is imho buggy and will not
show all items. If I am wrong, I will be glad you will correct me please
:-)

Carl uses following technique:

 vv: slider 16x400 (to-integer vx/size/y / file-name/size/y)
  [print vv/data num: vv/data - 1 show vx]

while num and count being initialised to zero

So, current aproach gave me 58 items of my directory 

I took another aproach:

1 + (length? files) - (to-integer vx/size/y / file-name/size/y)

Explanation:

1) "1" is the constant - it simply works ;-)))
2) Now we have to count, how many rows our visible list area can display
 (to-integer vx/size/y / file-name/size/y)
3) We have to substract value 2) from the length? of block we want list
be filled with ...

If I count items in display now, it give more proper result of 154 files
...

Still one file missing though  :-)

Hmm, what about this one?:

- there's some reminder as a result from 2) (to-integer vx/size/y /
file-name/size/y). Let's say we can ignore those few pixels with small
listings, but - going thru some 5 screens gives me:

reminder vx/size/y file-name/size/y . 400 // 14 = 5 pixels ... 5
pixels * 5 screens =  25 displays ... hmm, it's one more item for the
display ...

So:

length? read %.  155 files
y-size-of-list / item-size  400 / 14  28 items per screen 
reminder 8 pixels ...
155 files / 28 items  5 full screens to display 
5 screens * 8 pixels  40 pixels ...
40 pixels / 14 pixels per item . 2 more items ...

so, let's code it:

items-per-screen: to-integer vx/size/y / file-name/size/y
full-screens: to-integer (length? files) /  items-per-screen
remainder-per-screen: remainder vx/size/y file-name/size/y
constant: to-integer full-screens * remainder-per-screen /
file-name/size/y
range: constant + (length? files) - items-per-screen

resulting code in file-request.r:

do [
items-per-screen: to-integer vx/size/y / file-name/size/y
full-screens: to-integer (length? files) /  items-per-screen
remainder-per-screen: remainder vx/size/y file-name/size/y
constant: to-integer full-screens * remainder-per-screen /
file-name/size/y
range: constant + (length? files) - items-per-screen
]

 vv: slider 16x400 range
  [print vv/data num: vv/data - 1 show vx]
]

Im my aproach si corrent, VID could support some func to count all above
automatically by specifying list-face, block which goes for display,
widest-item(row) ...


Anyone?

PS: aproach with 'constant is not correct ... have no further time to
play with it right now  :-)
-pekr-




[REBOL] major Rebol programming projects Re:(4)

2000-08-30 Thread hen

PNG's are still poorly supported as far as I'm aware.
Especially on the more mainstream PC/Mac machines. Although browsers and 
programs will claim to support PNG's, they only partially support them and
don't handle the more complex areas of gamma correction and partial
transparancies.
I believe they can sometimes crash when they meet a PNG they can't handle.

However the PNG support is improving and maybe my information is even now
out of date. If not, hopefully it will be by this time next year.

Also probably issues with .gif files compression patent.

Hen

On Tue, 29 Aug 2000 [EMAIL PROTECTED] wrote:

> Will it be possible, in the future, to have a CGI-script prepare a /View-like 
>picture and send it back as a PNG, GIF or JPEG?
> Does anyone on this list have browsers *not* capable of displaying PNGs? Do you know 
>anyone who has one? In other words, is PNG good for everyone *now*? (I hope so...)




[REBOL] Dialling Out Re:(3)

2000-08-30 Thread Al . Bri

Justin wrote:
> OK, this may be a bit more subtle than I had expected.  I had omitted to
mention that I am using the Windows CE (MIPS on a Packard bell EasyMate
800).
>
> When I do the same as above I get:-
>
> connecting to: smtp.freeserve.co.uk
> ** Access Error: Cannot connect to
> smtp.freeserve.co.uk
> ** Where: smtp-port: open [scheme: 'smtp]
> if email?
> >>

You might have something set up wrong on your rebol setup. Perhaps your
password or username is incorrect? Or you've incorrectly specified your pop
and smtp servers (though the smtp looks OK)? Do you have any firewalls or
proxies in the way? Try Rebol on a PC with Windows to confirm.

> On the other hand if I run: pmail -to "[EMAIL PROTECTED]" I get
the dial-up networking dialog box asking if I want to connect.  I still need
manual intervention at this stage of course.
> With your rebol setup as above do you still need to click the 'connect'
button in the DUN dialog box, or does it all work silently for you?

If I've clicked off the "connect automatically" check box on the DUN dialog
box, I then have to click the DUN connect button with Rebol or my browser or
email client.

I prefer to click on "connect automatically", as I've got a "all you can
drink" dial up connection, and my email client works better this way with
HTML email with embedded advertising.

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




[REBOL] Dialling Out Re:(3)

2000-08-30 Thread Al . Bri

pekr wrote:
> What about built-in serial port support? Can we implement own dialer? :-)

Sure. Just find the manual for your modem, and send the right codes through
the serial port.

Then write the several layers of software to communicate through the serial
port and implement TCP etc.

Andrew Martin
I'm _NOT_ volunteering! :-)
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-




[REBOL] Dialling Out Re:(2)

2000-08-30 Thread justin . halls



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 30, 2000 9:21 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Dialling Out Re:
>
>
> Justin wrote:
> > I would have thought that this would
> be a very common requirement (most
> networking tools have the ability to
> dial out if they are not connected,
> although simply invoking DUN still
> requires a user confirmation) and I would
> suggest that it would be a very
> worthwhile enhancement to REBOL.
>
> In Windows 98, while not connected to
> the net, I typed in the Rebol console:
>
> >> send [EMAIL PROTECTED] {Re: [REBOL] Dialling Out
> {This was sent through Rebol using:
> {send [EMAIL PROTECTED]
> {followed by this message
> {
> {It works for me.
> {
> {Andrew Martin


> Rebol connected and sent the email.
>
> Of course, I had previously told Window
> 98 to connect automatically. Perhaps
> you should do the same as well?
>
> Andrew Martin


OK, this may be a bit more subtle than i had
expected.  I had omitted to mention that
I am using the Windows CE (MIPS on a Packard bell
EasyMate 800).

When I do the same as above I get:-

connecting to: smtp.freeserve.co.uk
** Access Error: Cannot connect to
smtp.freeserve.co.uk
** Where: smtp-port: open [scheme: 'smtp]
if email?
>>

On the other hand if I run: pmail -to
"[EMAIL PROTECTED]"
I get the dial-up networking dialog box asking if
I want to connect.  I still need manual
intervention at this stage of course.

With your rebol setup as above do you stil need to
click the 'connect' button in the DUN dialog box,
or does it all work silently for you?

Regards

Justin




[REBOL] Dialling Out Re:(2)

2000-08-30 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

> Justin wrote:
> > I would have thought that this would be a very common requirement (most
> networking tools have the ability to dial out if they are not connected,
> although simply invoking DUN still requires a user confirmation) and I would
> suggest that it would be a very worthwhile enhancement to REBOL.
>
> In Windows 98, while not connected to the net, I typed in the Rebol console:
>
> >> send [EMAIL PROTECTED] {Re: [REBOL] Dialling Out
> {This was sent through Rebol using:
> {send [EMAIL PROTECTED]
> {followed by this message
> {
> {It works for me.
> {
> {Andrew Martin
> {ICQ: 26227169
> {http://members.xoom.com/AndrewMartin/
> {-><-
> {}
>
> Rebol connected and sent the email.
>
> Of course, I had previously told Window 98 to connect automatically. Perhaps
> you should do the same as well?
>

What about built-in serial port support? Can we implement own dialer? :-)

-pekr-

>
> Andrew Martin
> Look for me in Rebol - The Official Guide.
> ICQ: 26227169
> http://members.xoom.com/AndrewMartin/
> -><-




[REBOL] Dialling Out Re:

2000-08-30 Thread Al . Bri

Justin wrote:
> I would have thought that this would be a very common requirement (most
networking tools have the ability to dial out if they are not connected,
although simply invoking DUN still requires a user confirmation) and I would
suggest that it would be a very worthwhile enhancement to REBOL.

In Windows 98, while not connected to the net, I typed in the Rebol console:

>> send [EMAIL PROTECTED] {Re: [REBOL] Dialling Out
{This was sent through Rebol using:
{send [EMAIL PROTECTED]
{followed by this message
{
{It works for me.
{
{Andrew Martin
{ICQ: 26227169
{http://members.xoom.com/AndrewMartin/
{-><-
{}

Rebol connected and sent the email.

Of course, I had previously told Window 98 to connect automatically. Perhaps
you should do the same as well?

Andrew Martin
Look for me in Rebol - The Official Guide.
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-




[REBOL] Dialling Out Re:

2000-08-30 Thread Al . Bri

Re: [REBOL] Dialling Out
This was sent through Rebol using:
send [EMAIL PROTECTED]
followed by this message

It works for me.

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




[REBOL] Dialling Out

2000-08-30 Thread justin . halls

Hi

I am a newcomer to REBOL and would like to use it
to solve a particular programming problem.  I have
a stand-alone application, which is not attended
by a user, which occasionaly needs to send or
receive e-mails.  Rather than programming all the
code at a low level, REBOL seemed ideally suited
to performing the network interaction processes
through an application generated script and a
CREATE_PROCESS call to REBOL.EXE

My problem is that the machine does not have a
permanent connection to the network, but needs to
dial out when required.  Does anyone have a
suitable script, or a technique which can be used
to get the machine to dial out a connection (using
a connection defined in DUN) without requiring any
user interaction?

I woud have thought that this would be a very
common requirement (most networking tools have the
ability to dial out if they are not connected,
although simply invoking DUN still requires a user
confirmation) and I would suggest that it would be
a very worthwhile enhancment to REBOL.

Regards

Justin

*
* Justin A. T. Halls*
* Millennium Homes Project Manager  *
* Brunel Institute for Bioengineering   *
* Brunel University *
* Kingston Lane *
* Uxbridge  *
* Middx. UB8 3PH*
* UK*
* Tel. +44 (0)1895 271206   *
* Fax  +44 (0)1895 274608   *
* e-mail: [EMAIL PROTECTED] *
*




[REBOL] using find/only to match blocks Re:

2000-08-30 Thread lmecir

Hi,

   find/only C [2 3 4]

should work


> Supposedly find/only treats a series as a single value, but I am
not sure how this is done. I was interested in find the place in a
series at the place where a block is found:
>
> >> C: [ 1 [ 2 3 4] 5 6 ]
>
> >> find C "234" ; what I want to do
> >> find C [ 2 3 4 ] ; or this ... whatever works
> ---
>
> ; run this in your
> ; http://www.rebol.com>REBOL Interpreter!
> terrence-brannon: [ [EMAIL PROTECTED] perl-refugee
myth-gamer ]
> perl-refugee: [ 'loved href perl discovery: (metaperl = rebol)
'hates href perl ]
> myth-gamer:http://www.bungie.net/bin/stats.pl?player=princepawn
>
> ; angles makes this a href instead of code! use ur imagination!
> href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ]
> perl: href http://www.perl.com "Perl"
>
>
>
> Get your FREE Email and Voicemail at Lycos Communications at
> http://comm.lycos.com
>
>




[REBOL] forall should have a refinement /then-reset Re:(3)

2000-08-30 Thread lmecir

Hi,

what about:

forall: func [
"Evaluates a block for every value in a series."
[throw]
'word [word!] {Word set to each position in series and changed
as a result}
body [block!] "Block to evaluate each time"
/former
/head
/local fmr
][
if former [fmr: get word]
while [not tail? get word] [
do body
set word next get word
]
if former [set word fmr]
if head [set word head get word]
]

Regards
Ladislav

> Excellent question that I did not even think about!!!
>
> how about these two:
>
> >> forall/then-former  ;- put back to state before loop
> >> forall/then-head  ;- put back to head
>
>
> ---
>
> ; run this in your
> ; http://www.rebol.com>REBOL Interpreter!
> terrence-brannon: [ [EMAIL PROTECTED] perl-refugee
myth-gamer ]
> perl-refugee: [ 'loved href perl discovery: (metaperl = rebol)
'hates href perl ]
> myth-gamer:http://www.bungie.net/bin/stats.pl?player=princepawn
>
> ; angles makes this a href instead of code! use ur imagination!
> href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ]
> perl: href http://www.perl.com "Perl"
>
>
> On Tue, 29 Aug 2000 12:06:01
>  joel.neely wrote:
> >H...
> >
> >Reset to what?  The position of the series just before the
forall loop,
> >or the beginning of the series?
> >
> >-jn-
> >
> >[EMAIL PROTECTED] wrote:
> >>
> >> I'm sure you've seen the REBOL idiom:
> >>
> >> forall line [
> >>   ...
> >> ]
> >>
> >> line: head line
> >>
> >> I would appreciate it if I could type:
> >>
> >> forall/then-reset line [
> >>...
> >> ]
> >>
> >> Get your FREE Email and Voicemail at Lycos Communications at
> >> http://comm.lycos.com
> >
> >--
> >; Joel Neely  [EMAIL PROTECTED]  901-263-4460
38017/HKA/9677
> >REBOL []  print to-string debase/64 decompress #{
> >789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC
> >B6F4F574CFC888342AC949CE74B50500E1710C0C2400}
> >
> >
>
>
> Get your FREE Email and Voicemail at Lycos Communications at
> http://comm.lycos.com
>
>