[REBOL] Re: Simple XML

2004-03-10 Thread Vos, Doug

Reply to Joel -
My version of Simple-XML overcomes the problem you identify...

>>(given that you can use the block convention it creates -- see below).

With the library I provided, you can us XMLin and XMLout and you can also
easily handle the blocks created like
root/person/name/fname -- instead of some odd block structure 
with no easy way to point to the items you want to handle.

Again, it is not a full xml, but works for many simple XML situations like
config files, etc.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Joel Neely
Sent: Tuesday, March 09, 2004 4:48 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Simple XML



Hi, Terry,

No script needed.  PARSE-XML does what you're asking (given that you can use
the block convention it creates -- see below).

T. Brownell wrote:
> Is there any available scripts that turn xml into rebol blocks?  So 
> that ...
> 

 >> xml-stuff: {
 {
 {
 {
 {Bob
 {
 { Smith
 { 
 {   
 {
 {}
 == {
 
 
 
 Bob
 
  Smith
  > block-stuff: parse-xml xml-stuff
 == [document none [["root" none ["^/" ["person" none ["^/"
["name" none ["^/" ["fname" none ["^/Bob^/
...

The convention is that each XML element is represented by a 3-item block,
containing:

1)  the name of the element/tag as a STRING!
2)  attributes (as a block of name/value pairs) or NONE if no attrs
3)  contents (as a block of the content items -- strings for text
 and blocks for child elements) or NONE if no contents *AT*ALL*

IgnorableWhiteSpace is not ignored, but appears as STRING! content.

The entire XML string is wrapped in a mythical element whose tag is the
WORD! DOCUMENT with no attributes.  If you juat want the XML content, just
take FIRST THIRD of the result of PARSE-XML, as in (the line breaks were
added for email formatting, and should be eliminated if you try to cut and
paste):

 >> x: {
   down}
 == {
   down}
 >> print mold first third parse-xml x
["top" none [["middle" ["place" "between"] [["bottom" none ["down"]]  >>

HTH!

-jn-

-- 
Single bit errors are corrected. Joel Neely
Double bit errors are detected.  joel dot neely
Undetected errors are ignored. at fedex dot com


-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Simple XML

2004-03-09 Thread Vos, Doug

I think this does what you want.
Purpose: "Library analogous to perl XML::Simple."
Only works with simple XML.
Does not handle namespaces="values" inside tags.


REBOL [
  Title: {xml-test13.r}
  File:  %xml-test13.r
  Date:  21-Oct-2003 
  Requires: {rebol version 2.5.6 or higher}
]

do %/d/xml/xml-simple-v0.1.2.r

bklist: XMLin %/d/xml/booklist3.xml
probe bklist

XMLout %/d/xml/booklist4.xml bklist
;=

REBOL [
Title:   "XML-Simple (Library)"
Date:20-Oct-2003
Version: 0.1.2
File:%xml-simple.r
Author:  "Doug Vos"
Email:   [EMAIL PROTECTED]
Purpose: "Library analogous to perl XML::Simple."
History: [ 
   0.1.0 [18-Oct-2003 {Began script.} "DJV"]
   0.1.2 [20-Oct-2003 {Added XMLin function, added XMLout.} "DJV"]
]
]
;
end-tag?: func [
   {Test for an ending xml or html style tag. eg. }
   item [any-type!] {The item to examine}
][
   either (tag? item) [
  either (find item "/") [true][false] 
   ][ 
  false
   ]
]
;
begin-tag?: func [
   {Test for a begining xml or html style tag. eg. }
   item [any-type!] {The item to examine}
][
   either (tag? item) [
  either (find item "/") [false][true] 
   ][ 
  false
   ]
]
;
tag-to-string: func [
   {Convert a simple html or xml tag to a string.}
   xtag [tag!] {The tag to convert.}
][
   trim/all replace/all to-string xtag "/" ""
]
;---
simple-tag?: func [
   {Test for tag with simple structure like a few words} 
   item [any-type!] {The item to examine.}
   xml  [block!] {The whole block we are examining.} 
   /local atag ztag xs
][
   either (tag? item) [
  atag: to-tag (tag-to-string item)   
  ztag: to-tag rejoin ["/" (tag-to-string item)]  
  xs:  find xml atag
  either ( all [
   (tag? pick xs 1) 
   (string? pick xs 2)
   (ztag = (pick xs 3))] ) [true][false] 
   ][ 
  false
   ]
]
;---
multi-tags?: func [
   {Test for multiple occurences of tag like ... as found in
something like  ..}
   item [any-type!] {The item to examine.}
   xml  [block!] {The whole block we are examining.} 
   /local atag ztag xs 
][
   either (tag? item) [
  atag: to-tag (tag-to-string item)   
  ztag: to-tag rejoin ["/" (tag-to-string item)]  
  xs:  find xml ztag
  either ( all [
   (tag? pick xs 1) 
   (atag = (pick xs 2))] ) [true][false] 
   ][ 
  false
   ]
]
;
XMLin: func [
   {Provide a XMLin function analogous to perl XML::Simple XMLin().}
   xmli [url! file! string!] {The xml url, file or xml-text.}
   /local xstr xml item  
][
   xstr: make string! 1000
   xml:  load/markup xmli

   ; remove the strings that are only 'newline and empty space
   remove-each x xml [empty? trim x]

   ; Ignore the first tag, 
   ; which is always something like 
   xml: copy at xml 2

   append xstr "["
   foreach item xml [
 append xstr " "
 if (begin-tag? item) [
if (multi-tags? item xml) [append xstr " [ "]
append xstr tag-to-string item
if (not simple-tag? item xml) [append xstr " [ "]  
 ] 
 if (string? item) [
append xstr mold item
 ]
 if (end-tag? item) [
if (not simple-tag? item xml) [append xstr " ]"] 
if (multi-tags? item xml) [append xstr " ] "] 
 ]
   ]
   append xstr "]"
   load xstr
]
;
XMLout: func [
   {Provide a XMLout function analogous to perl XML::Simple XMLout().}
   xmlf [file!] {The xml file to create.}  
   xblock [block!] {The data to populate xml file.}  
   /local xstr item  
][
   xstr: make string! 1000
   append xstr {^/}
   XMLout.block xstr xblock
   print xstr
   write xmlf xstr
]
;--
XMLout.block: func [
   {Process the block according to rules.}
   xml.tree [string!] {The xml-tree we are creating.}
   item [block!]  {The pre xml-block.}
][
  either (multi-block? item) [
foreach x item [
   XMLOut.block xml.tree x
]
  ][ 
either (multi-word-pair? item) [ 
   foreach [w v] item [
  XMLOut.block xml.tree (reduce [w v])
   ]
][ 
   if (simple-word-value-pair? item) [
  append xml.tree rejoin ["<" item/1 ">" item/2 ""
newline] 
   ] 
   if (complex-block-pair? item) [ 
  append xml.tree rejoin [ "<" item/1 ">"]
  XMLOut.block xml.tree item/2
  append xml.tree rejoin [ "" newline]  
   ]
]  
  ]
]
;---

[REBOL] Re: Wake up ;-)

2004-03-03 Thread Vos, Doug

The plugin-guide is helpful and also mentions that there is no support for
proxy as yet.
All the problems I reported yesterday are related to proxy.

Here's what I found in testing the plugin.

When I tested everything at home last night, everything ran fine (on Win-98
and WinXP) 
   -- just doesn't work behind the firewall.

Also, if I download the .htmls and .r files and the .CAB file locally and
modify them, I can run behind the firewall as long as they don't point to
URL outside firewall.

BTW, this proxy and browser (at work) uses an autoproxy script config
setting in IE and points to a URL to load its proxy settings. Something for
plugin team to think about.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Carl Read
Sent: Tuesday, March 02, 2004 4:43 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



On 03-Mar-04, Bruno G. Albuquerque wrote:

> Well, I didn't. I still can't use it.

> Anyway, the plugins install itself in "C:\WINNT\Downloaded Internet 
> Files" (at least on my configuration) but there is no config file for 
> it or anything.

C:\WINDOWS\Downloaded Program Files

for me on Win98se.  I had no problems getting the plugin installed and
running using IE5.

For those who may not have noticed, there's a plugin guide here...

http://www.rebol.net/plugin/tests/plugin-guide.html

And DO report your problems to feedback...

http://www.rebol.com/feedback.html

else RT mightn't notice them.

And have you noticed this...

 http://www.rebol.net/plugin/tests/google.html

? (:

And my first reblet's here...

http://homepages.paradise.net.nz/left/rebol/reblets/rebol-anim-example.html

> -Bruno

> Vos, Doug disse:

>> How did you manually change the proxy settings?
>> What directory does rebol/plugin try to install in?
>> It tried to install, but can find it anywhere...

>> Running Windows/XP with IE-6


>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
>> Behalf Of Bruno G. Albuquerque
>> Sent: Tuesday, March 02, 2004 1:56 PM
>> To: [EMAIL PROTECTED]
>> Subject: [REBOL] Re: Wake up ;-)



>> Well, the problem being reported by me, at least, is simple. The 
>> plugin is not using a proxy server and  need it to do so. :)

>> Anyway, this is my configuration (I am sure it won't help).

>> Windows 2000 SP4
>> Internet Explorer 6 (latest fixes applied)
>> PIII 800 with 512 Mb

>> -Bruno

>> Jason Cunliffe disse:

>>> Please, anyone having trouble with the plugin *specify* how your 
>>> system is configured: Browser, OS version, cpu, ram etc

>> fyi, the new plugin runs ok here on two machines:

>> Win98se IE6.0.2 500mhz 256Mb ram
>> WinXP   IE6.0.2  3Ghz 512Mb ram


>> It loads and installs so quickly [about 15secs on WinXP notebook over
>> DSL]. Win98 I had to manually change my security settings to
>> enable ActiveX. WinXP there was nothing to do.

>> This is a happy day for Rebol :-)

Does happy dance - hurts knee.  Decides to wait till the Mozilla plugin
appears before dancing again...

-- 
Carl Read

-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Rebol/plugin install issues - was Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

The plugin will probably work on my home-PC running win-98 and IE-6, but the
plugin fails on my work-PC - looks like a proxy related issue. (NOT SURE YET
- just speculating).

Unknowns:
1. Where does the plugin attempt to install? What directory?
2. How would I manually configure the plugin to use proxy, if required?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Vos, Doug
Sent: Tuesday, March 02, 2004 1:14 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: [REBOL] Rebol/plugin install issues - was Re: Wake up ;-)



Yes, it downloads a full rebol/view interpreter and attempts to install it
as a plugin, however not sure were the loading and installing of the
rebol/view interpreter failes...

We need a few things to test when first installing the rebol/plugin.

Don't understand yet what is failing in the install

Any diagnostics or simple tests we can run , or files to inspect if we
suspect a partially completed install or proxy failure or 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Bruno G. Albuquerque
Sent: Tuesday, March 02, 2004 12:57 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Maxim Olivier-Adlhoch disse:

> I don't even get the rebol window...

I guess it only appears in the case of an error.

> does the plug-in expect a default install of rebol?.

I don't think so. Based on the size of the plugin itself I would guess it
has a complete REBOL interpreter inside it.

-Bruno



-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

How did you manually change the proxy settings?
What directory does rebol/plugin try to install in?
It tried to install, but can find it anywhere... 

Running Windows/XP with IE-6


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Bruno G. Albuquerque
Sent: Tuesday, March 02, 2004 1:56 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Well, the problem being reported by me, at least, is simple. The plugin is
not using a proxy server and  need it to do so. :)

Anyway, this is my configuration (I am sure it won't help).

Windows 2000 SP4
Internet Explorer 6 (latest fixes applied)
PIII 800 with 512 Mb

-Bruno

Jason Cunliffe disse:

> Please, anyone having trouble with the plugin *specify* how your 
> system is configured: Browser, OS version, cpu, ram etc
>
> fyi, the new plugin runs ok here on two machines:
>
> Win98se IE6.0.2 500mhz 256Mb ram
> WinXP   IE6.0.2  3Ghz 512Mb ram
>
>
> It loads and installs so quickly [about 15secs on WinXP notebook over 
> DSL]. Win98 I had to manually change my security settings to enable 
> ActiveX. WinXP there was nothing to do.
>
> This is a happy day for Rebol :-)
>
> thanks
> - Jason
>
> --
> To unsubscribe from this list, just send an email to 
> [EMAIL PROTECTED] with unsubscribe as the subject.



-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

Running windows/XP with IE-6.0.2800.1105...
Dell Precision laptop -- Pentium 4 with 1 GIG RAM 

Seems like the problem is related to proxy setting but there are no install
instructions on this alpha release, not complaining, just trying to provide
feedback helpful to those who are have not been able to use plugin yet. 
The plugin is NOT working for me yet.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Bruno G. Albuquerque
Sent: Tuesday, March 02, 2004 1:56 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Well, the problem being reported by me, at least, is simple. The plugin is
not using a proxy server and  need it to do so. :)

Anyway, this is my configuration (I am sure it won't help).

Windows 2000 SP4
Internet Explorer 6 (latest fixes applied)
PIII 800 with 512 Mb

-Bruno

Jason Cunliffe disse:

> Please, anyone having trouble with the plugin *specify* how your 
> system is configured: Browser, OS version, cpu, ram etc
>
> fyi, the new plugin runs ok here on two machines:
>
> Win98se IE6.0.2 500mhz 256Mb ram
> WinXP   IE6.0.2  3Ghz 512Mb ram
>
>
> It loads and installs so quickly [about 15secs on WinXP notebook over 
> DSL]. Win98 I had to manually change my security settings to enable 
> ActiveX. WinXP there was nothing to do.
>
> This is a happy day for Rebol :-)
>
> thanks
> - Jason
>
> --
> To unsubscribe from this list, just send an email to 
> [EMAIL PROTECTED] with unsubscribe as the subject.



-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Rebol/plugin install issues - was Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

Yes, it downloads a full rebol/view interpreter and attempts to install it
as a plugin, however not sure were the loading and installing of the
rebol/view interpreter failes...

We need a few things to test when first installing the rebol/plugin.

Don't understand yet what is failing in the install

Any diagnostics or simple tests we can run , or files to inspect if we
suspect a partially completed install or proxy failure or 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Bruno G. Albuquerque
Sent: Tuesday, March 02, 2004 12:57 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Maxim Olivier-Adlhoch disse:

> I don't even get the rebol window...

I guess it only appears in the case of an error.

> does the plug-in expect a default install of rebol?.

I don't think so. Based on the size of the plugin itself I would guess it
has a complete REBOL interpreter inside it.

-Bruno



-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

When I visit this link...

http://www.rebol.cz/plug-in/bounce-alpha.html

I see this and then the DO YOU WANT TO INSTALL PLUGIN? Dialogue. Which I say
YES, please install plugin.


and then ... The rebol window opens and I get this

** Access Error: Cannot connect to www.rebol.cz
** Where: open-proto
** Near: do/args script system/script/args
quit
>>

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Petr Krenzelok
Sent: Tuesday, March 02, 2004 11:44 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Vos, Doug napsal(a):

>Can't load this or install it, seems to fail on install or have proxy 
>problems.
>
>  
>
What you guys all are doing? W2K here, behind complicated proxy and 
firewall set-up, and works nicely here ...

IE 5.50

-pekr-

-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

Same exact error message I am getting. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Bruno G. Albuquerque
Sent: Tuesday, March 02, 2004 11:56 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



Petr Krenzelok disse:

>>Can't load this or install it, seems to fail on install or have proxy  
>>problems.
>
> What you guys all are doing? W2K here, behind complicated proxy and 
> firewall set-up, and works nicely here ...
>
> IE 5.50

Nothing, really. After installing and trying tro check the demo script it
loads the script but, then,the script itself tries to connect somewhere to
download some stuff. At this point it times out and a window very similar to
a REBOL console appears.

** Access Error: Cannot connect to www.rebol.net
** Where: open-proto
** Near: do/args script system/script/args
quit
>>

-Bruno



-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-02 Thread Vos, Doug

Can't load this or install it, seems to fail on install or have proxy
problems.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Petr Krenzelok
Sent: Tuesday, March 02, 2004 1:29 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Wake up ;-)



A J Martin napsal(a):

>>Anyone noticed something different on the main page ;-)
>>Yes there is a newborn tool around ...lets plug it in !
>>
>>
>
>Neato!
>
>Though at the moment, it does seem to fail after a while. :( The plugin 
>stopped working after about 30 - 40 seconds after the install.
>
>What could this plug-in be useful for? Please note this is not sticking 
>a knife into Rebol's back, I had the same question for Java applets as 
>well!
>
>  
>
to kill JS :-) Imagine VID forms with all its dynamic abilities. More 
complex styles as grid (list), tree, will be imo much better in rebol.

Now something for your eye - Cyphre's famous bounce-alpha demo :-)

http://www.rebol.cz/plug-in/bounce-alpha.html

-pekr-
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Full text indexing

2004-02-02 Thread Vos, Doug

The rebol source for this project is on another archive right now, so I will
have to upload in next 24 hours.

Can the index file be updated?  I know the Bible is immutable ...

This system works best when the complete length of text is known at the
beginning.
In the case of the Biblical text, it started as 6 megs and compressed to 1.5
megs.
(Also uses rebol compress/decompress -- compresses a chapter at a time for
fastest decompression).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Graham Chiu
Sent: Monday, February 02, 2004 2:08 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Full text indexing


Vos, Doug  wrote.. apparently on 2-Feb-2004/13:07:44-5:00

>If you want the source, I can dig it up and ship it to you or 
>re-package the basic functions for use by rebol.org.

Hi Doug,

that would be great if you could do this.

>
>This full text indexer parses all the words in the body of text first 
>and produces the index file (one time) and then compares query requests 
>to index before displaying the actual text.

Can the index file be updated?  I know the Bible is immutable ...


--
Graham Chiu
http://www.compkarori.com/cerebrus
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Full text indexing

2004-02-02 Thread Vos, Doug

Hello Graham and rebolers,

I did full text indexing in rebol back in 1999 or 2000 as one of my first
rebol learning projects.
(This is an old bunch of rebol code and I have not updated it since then.)

You can see the result here: http://vvn.net/bible/

(Works with rebol 2.x.x and up I think.)
If you want the source, I can dig it up and ship it to you or re-package the
basic functions for use by rebol.org.

This full text indexer parses all the words in the body of text first and
produces the index file (one time) and then compares query requests to index
before displaying the actual text.

- Doug



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Graham Chiu
Sent: Sunday, February 01, 2004 2:59 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Full text indexing



Has anyone done any full text indexing in Rebol, or implemented the Burrows
Wheeler transform for searching?

--
Graham Chiu
http://www.compkarori.com/cerebrus
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Rebol abuse - rebol virus??

2004-01-27 Thread Vos, Doug

That sounds like a reasonable explanation.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Didec
Sent: Tuesday, January 27, 2004 12:42 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Rebol abuse - rebol virus??


Re: Rebol abuse - rebol virus??

worm_mimail.R
R is only the revision of the Virus, not its file extension. The Q version
was "discovered" yesterday, so this one is the newer newer one.

Didec

> >
> > Got a few message this morning talking about worm_mimail.r
> >
> > Noticed the R extension on the file.
> >
> > Has anyone heard anything about a virus with a .R file extension 
> > today?
> >
> > - Doug
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Rebol abuse - rebol virus??

2004-01-27 Thread Vos, Doug

Got a few message this morning talking about worm_mimail.r

Noticed the R extension on the file.

Has anyone heard anything about a virus with a .R file extension today?

- Doug


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread Vos, Doug

Result of latest DocKimbel version on my Dell laptop...
>> Elapsed time for adding 20 records 0:00:01.221

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 19, 2003 4:58 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Profiling Rebol API to DyBASE



Hi Konstantin,

Here's a version executing 10 times faster. I just changed h series type
from 
hash! to list!. Looks like in your case, cost for adding data is much higher

than for searching keys...

Regards,
-DocKimbel

n: 20
h: make list! n
l: make block! n
start: now/time/precise
repeat i n [
oid: random n 
pos: find h oid
either pos [
obj: pick l index? pos
][
obj: make object! [__oid__: oid]
insert tail h oid
insert tail l obj
]
if zero? i // 100 [clear h clear l]
]
print ["Elapsed time for adding" n "records" (now/time/precise - start)]

Selon Konstantin Knizhnik <[EMAIL PROTECTED]>:

> 
> Hello Gregg,
> 
> I was able to isolate the problem.
> The following script shows almost the same time as testindex.r 
> searching for 20 objects.
> 
> 
> n: 20
> h: make hash! n
> start: now/time/precise
> repeat i n [
> oid: random n 
> obj: select h oid
> if none? obj [
>obj: make object! [__oid__: oid]
>insert insert tail h oid obj
> ]
> if (i // 100) = 0 [clear h]
> ]
> 
> print ["Elapsed time for adding" n "records" (now/time/precise - 
> start)]
> 
> At my computer execution of this script takes about 70 seconds. By 
> replacing it with:
> 
> n: 20
> h: make hash! n
> l: make block! n
> start: now/time/precise
> repeat i n [
> oid: random n 
> pos: find h oid
> either none? pos [
>obj: make object! [__oid__: oid]
>insert tail h oid
>insert tail l obj
> ] [obj: pick l index? pos]
> if (i // 100) = 0 [clear h clear l]
> ]
> 
> print ["Elapsed time for adding" n "records" (now/time/precise - 
> start)]
> 
> 
> 
> I was able to reduce execution time till 33 seconds.
> 
> Are there some better ideas how to improve performance of this peace 
> of code?
 
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Creation of object with unknown structure

2003-12-09 Thread Vos, Doug

Konstantin - have you tried this?

>> obj: make object! [x: 1 y: 2 z: 3]
>> x: mold obj
== {
make object! [
x: 1
y: 2
z: 3
]}

>> obj: do x
>> probe obj

make object! [
x: 1
y: 2
z: 3
]
>>

And other ways of examining objects:
>> first obj
== [self x y z]

>> third obj
== [x: 1 y: 2 z: 3]


-Original Message-
From: Konstantin Knizhnik [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 06, 2003 6:15 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Creation of object with unknown structure



Hello,

I am developer of object oriented database for dynamic languages
(www.garret.ru/~knizhnik/dybase.html)
Currently it supports PHP, Python and Ruby. Now I am going to develop Rebol
API for DyBASE.

I read Rebol manual but some questions are still not clear for me. Can some
Rebol guru suggest me the best way of dynamic instantiation of object (so
that structure of the object is not known at compile time)? For example I
have block containing field names and values: ["x" 1 "y" 2 "z" 3] I want to
construct object with these fields, so that result will be the same as after
creating object using "make":

obj: make object! [x: 1 y: 2 z: 3]  


So the question is actually how can I construct block which contains
variable assignments.

-- 
Thanks in advance,
 Konstantin  mailto:[EMAIL PROTECTED]

-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Awesome one liner!

2003-10-18 Thread Vos, Doug

Whoops that came though very odd looking. Trying again. (ms-outlook whacked
my email again)

foreach x remove-each x load/markup http://drudgereport.com [any [tag? x not
find x "..." find x "drudge"]][print x]

or

Print remove-each x load/markup http://drudgereport.com  [any [tag? x not
find x "..." find x "drudge"]]



Awesome one liner grabs all the latest news headlines from drudge, removes
all tags and non-news items, and displays each headline. Requires core 2.5.6
because uses 'remove-each (new function). 

Another variation...  How do these get added to the rebol one liner page at
http://www.rebol.com ??


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Awesome one liner! News harvester in one line. Requires 2.5.6

2003-10-18 Thread Vos, Doug

foreach x remove-each x load/markup http://drudgereport.com
  [any [tag? x not find x "..." find x
"drudge"]][print x]
Awesome one liner grabs all the latest news headlines from drudge, remove
all tags and non-news items, and displays each headline.
Requires core 2.5.6 because uses 'remove-each (new function).
Another variation...
Print remove-each x load/markup http://drudgereport.com
  [any [tag? x not find x "..." find x "drudge"]]
How does these get added to the rebol one liner page at http://www.rebol.com
   ??
Enjoy!

> Douglas Vos
> Email:   >
> 
> 
> 
> 
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FW: Rebol code - PLEAC contributions

2003-10-13 Thread Vos, Doug

Sounds great! Thank-you very much.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 13, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: FW: Rebol code - PLEAC contributions



Tom:

> may be the library at rebool.org could have a pleac section.  this may 
> be a good idea anyway so the code submitted can have a shot at  review 
> before/if it ever shows up at the pleac site.

Feel free -- anyone -- to contribute Pleac solutions to REBOL.org.

There isn't a filter to specifically find Pleac solutions in the navigation 
bar. But you can put Pleac in the title or purpose and the "Find scripts"
will 
find them all.

If there are enough contributions to merit a new Nav bar entry, we'll add
one.

Sunanda.
-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Pleac-discuss] FW: Rebol code - PLEAC contributions

2003-10-13 Thread Vos, Doug

Thank-you for proving my point.

By downloading the "PERL COOKBOOK" examples you are FREE-ly using a
propietary product.
There are many FREE products that many people use because the author,
publisher, or owner allows FREE use while retaining some copyright or other
rights.

(I use the PERL COOKBOOK examples software and I bought the book too.) 

The "PERL COOKBOOK" source code (from O'Rielly) is released under a similar
FREE license as rebol (as in FREE to download and use). The "PERL COOKBOOK"
is actually proprietary  -- owned by O'Rielly.

If you really are interested in the FREE exchange of ideas, I believe you
should allow a more open and inclusive definition of FREE languages. 
(eg. FREE to use for all projects, commercial, personal, and educational
AND/OR FREE as in GNU,GPL,etc.)

Your current definition of 'FREE' is too restrictive.

Please change your policy to allow a broader and more open, inclusive
definition of 'FREE'.

Thank-you.
-DV


-Original Message-
From: Guillaume Cottenceau [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 13, 2003 1:48 PM
To: Vos, Doug
Cc: 'Travis Whitton'; '[EMAIL PROTECTED]'
Subject: Re: [Pleac-discuss] FW: Rebol code - PLEAC contributions


"Vos, Doug" <[EMAIL PROTECTED]> writes:

> I am confused now more than before.
> It appears to me that NO compilers are required at all for many of the 
> languages in PLEAC.
> 
> Perl, ruby, PHP do not require any compiler (as do many other 
> interpreted languages in PLEAC).

Some perl documentation talks about compiling perl :) as in perlrun for
example: After locating your program, Perl compiles the entire program to an
internal form.

He meant compiler/interpreter of course.

> Also, the "PERL COOKBOOK" itself is FREE as in FREE beer (but 
> copyrighted by
> O'Rielly)

AFAIK it's not even free of charge - or this was a recent change. I didn't
find any link to download the full contents of the perl cookbook when
founding PLEAC - only the example source code.

> and does not have GNU, GPL, or BSD license.
> 
> So why not accept submissions from any FREE software, intrepreted or 
> compiled?

Well because this has little to do. We're working on implementing code
examples and we don't want that anyone force us to install proprietary
software on our machines to use them. Now the Perl Cookbook is not released
under a free license, well this is a different story, even if we can regret
it of course.

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] FW: Rebol code - PLEAC contributions

2003-10-13 Thread Vos, Doug

Here is the message I posted to the PLEAC list last Friday.
So far no one (from PLEAC) sent a reply.(As of Monday AM).

I will continue to gently pester the PLEAC people until they let us post all
the rebol code, or we can do all the perl cookbook items anyway on another
site.
- Doug

-Original Message-
From: Vos, Doug 
Sent: Friday, October 10, 2003 1:08 PM
To: '[EMAIL PROTECTED]'
Subject: Rebol code - PLEAC contributions


The statement in the PLEAC FAQ states that only code supported by FREE
scripting tools and languages should be contributed. Do this mean only GNU
licenses or other licenses also?

I own the Perl Cookbook (paper version from O'Rielly publisher) so I thought
this would be a fun and educational project.

Before I attempt to start contributing rebol (REBOL) scripts to the library,
I thought I should clarify what is meant by the following statement:


9. I'd like to contribute to Pleac using this particular compiler/library
Great! 
But, please double-check that this compiler/library is released under a free
(as explained by GNU, not free of charge) license, as we won't accept code
only usable under a non-free OS/compiling environment. 


Rebol/core 2.5.5 and rebol core 2.5.6 are FREE like in FREE beer. 
Does that pass the test?
(See http://www.rebol.com/download.html )

License: rebol/core 2.5.6
"Free for all uses (personal, commercial, educational)" 
"This release also amends the end user license agreement to allow the free
use of REBOL/Core for commercial and educational purposes. Separate
licensing for such end uses is no longer required."

See also:
http://www.rebol.net/cookbook/

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: pleac

2003-10-10 Thread Vos, Doug

PLEAC says this in their FAQ.

{ 9. I'd like to contribute to Pleac using this particular compiler/library 
Great! 

But, please double-check that this compiler/library is released under a free
(as explained by GNU, not free of charge) license, as we won't accept code
only usable under a non-free OS/compiling environment. }

Could that be why we don't see rebol on the list?
What do you think?

-Original Message-
From: bryan [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 9:36 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] pleac



Anyone seen this before, http://pleac.sourceforge.net/ PLEAC - Programming
Language Examples Alike Cookbook. No rebol entry sadly.  


-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: pleac

2003-10-10 Thread Vos, Doug

This reminds me of another project I started where I compare rebol side by
side with perl,php, and java.
http://vvn.net/egppr/jppr.php?id=5 or http://vvn.net/egppr/jppr.php?id=6

Using Java is sometimes like driving a SEMI-TRUCK-AND-TRAILER down to the
corner store, when all you really need is to hop in your Chevy Pickup
(rebol) to get the job done...That is why I love rebol  See for
example
http://vvn.net/egppr/egppr.php?id=5&l1=java&l2=rebol


Also, the problem (possible issue) I see with PLEAC is they don't have
examples that compare code side by side with similar pseudo code. 
All that said, I still think PLEAC is great idea, so I will begin to
contribute REBOL code to PLEAC 

... setting up myself to contribute some scripts to PLEAC in rebol right
now.
- Doug

-Original Message-
From: bryan [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 9:36 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] pleac



Anyone seen this before, http://pleac.sourceforge.net/ PLEAC - Programming
Language Examples Alike Cookbook. No rebol entry sadly.  


-- 
To unsubscribe from this list, just send an email to [EMAIL PROTECTED]
with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Rebol Server Pages

2002-10-08 Thread Vos, Doug

Can you provide some examples of how you use it?

-Original Message-
From: Andrew Martin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 12:15 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Rebol Server Pages


Here's a better version with Maarten's suggested change.
Rebol [
Name: 'RSP
Title: "Rebol Server Pages"
File: %RSP.r
Author: "Andrew Martin"
eMail: [EMAIL PROTECTED]
Web: http://valley.150m.com
Date: 8/October/2002
Version: 1.1.0
Purpose: {}
Category: [util 1]
Acknowledgements: ["Maarten Koopmans"]
]

Hide: func [Block [block!]] [
do Block
return; Deliberately returns unset! value.
]

RSP: function [Text [string!]] [RSP] [
RSP: make string! length? Text
use [StringScript ScriptString Script String] [
StringScript: "<%" ScriptString: "%>"
parse/all Text [
any [
end break
| StringScript copy Script to ScriptString ScriptString
(append RSP Script)
| copy String [to StringScript | to end] (append RSP mold
String)
]
]
]
form replace/all reduce load RSP unset! ""
]

Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: RE : Re: RE : MSSQL results

2002-10-02 Thread Vos, Doug

So what about another approach where you set up two ports:

sql-A: {select top 1 * from customers}
sql-B: {select count(*) nb from customers}
insert dbport-1 sql-A
insert dbport-2 sql-B
result-rows-A: copy dbport-1
result-rows-B: copy dbport-2

This seems like it would work OK.
Not familiar with your situation...
What do you lose from this approach?
-DV

-Original Message-
From: Franck MARCIA [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 4:09 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] RE : Re: RE : MSSQL results


Thank you for your answer, Doug,

Yes, I'm using ODBC to talk to MS-SQL.

But if you use something like:

sql: {
select top 1 * from customers
select count(*) nb from customers
}
insert dbport sql
result-rows: copy dbport

You can't retrieve the second set of data. And that's my problem.

Franck.

-Message d'origine-
De : Vos, Doug [mailto:[EMAIL PROTECTED]] 
Envoyé : mardi 1 octobre 2002 22:40
À : '[EMAIL PROTECTED]'
Objet : [REBOL] Re: RE : MSSQL results

So are you using rebol/command with ODBC?
That is the only way I have talked to MS-SQL.

I always use somethign like this when talking to a MS-SQL server:

sql: {SELECT field1,field2 FROM table_A}
insert dbport sql
result-rows: copy dbport

The same thing works for mySQL also.


-Original Message-
From: Franck MARCIA [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:04 PM
To: [EMAIL PROTECTED]
Cc: Cindy Sassenrath
Subject: [REBOL] RE : MSSQL results


Nobody's got an answer?

Is there something like the "mydb_next_result" of PHP with Rebol?

Franck.

-Message d'origine-
De : Franck MARCIA 
Envoyé : lundi 30 septembre 2002 09:41
À : [EMAIL PROTECTED]
Objet : [REBOL] MSSQL results

Hi all,

I'm trying to retrieve several sets of data from an unique stored
procedure.

For example, the following stored procedure:
CREATE PROCEDURE getOrder @MY_ID int
AS
SELECT * FROM orders where order_id = @MY_ID
SELECT * FROM orders_details where order_id = @MY_ID
GO

called by: insert command "getOrder 1234"

just returns the first set of data.

Is there a way to retrieve the two sets?

Franck.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.




[REBOL] Re: RE : MSSQL results

2002-10-01 Thread Vos, Doug

So are you using rebol/command with ODBC?
That is the only way I have talked to MS-SQL.

I always use somethign like this when talking to a MS-SQL server:

sql: {SELECT field1,field2 FROM table_A}
insert dbport sql
result-rows: copy dbport

The same thing works for mySQL also.


-Original Message-
From: Franck MARCIA [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:04 PM
To: [EMAIL PROTECTED]
Cc: Cindy Sassenrath
Subject: [REBOL] RE : MSSQL results


Nobody's got an answer?

Is there something like the "mydb_next_result" of PHP with Rebol?

Franck.

-Message d'origine-
De : Franck MARCIA 
Envoyé : lundi 30 septembre 2002 09:41
À : [EMAIL PROTECTED]
Objet : [REBOL] MSSQL results

Hi all,

I'm trying to retrieve several sets of data from an unique stored
procedure.

For example, the following stored procedure:
CREATE PROCEDURE getOrder @MY_ID int
AS
SELECT * FROM orders where order_id = @MY_ID
SELECT * FROM orders_details where order_id = @MY_ID
GO

called by: insert command "getOrder 1234"

just returns the first set of data.

Is there a way to retrieve the two sets?

Franck.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.




[REBOL] Re: Jabber client available

2002-08-21 Thread Vos, Doug

This should help explain jabber clients.
http://www.google.com/search?&q=jabber+client

>> What is a jabber client?

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: LDAP

2002-05-03 Thread Vos, Doug

I am still very interested in working on this.
Project is sort of on the back burner...

Also, not sure if Rebol Tech. is putting
LDAP into rebol/command 3.0 ??


-Original Message-
From: Gregg Irwin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 12:56 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: LDAP 


Hi Maarten,

<< Has anyone implemented LDAP?
Or interfaced to the openldap libraries? >>

Doug Vos started something on this a while back. Check
http://vvn.net/reboldap/.

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Reliable FTP of large binary files with REBOL/Core 2.5

2002-04-05 Thread Vos, Doug

Just completed three successful tests with this code:
;---
Transfered 160 Meg zip file in 4 minutes 53 seconds

 (650 megs unzipped).


164205447
FTP Transfer took:  0:04:53
>>
;--

modified from code by someone at rebol tech
and Petr K.

REBOL []

ftp-large-binary-file: func [
   {FTP large binary files - like the name says.
Could actually be used/modified to transfer large files without ftp
or using some other protocol...}
   ftp-site [url! file!] {The ftp site we are getting file from.}
   xfile-to [url! file!] {The target file we are writing to.} 
   /local buf-size buffer source target total size start 
][
   buf-size: 64000
   buffer: make string! buf-size
   source: open/binary/direct ftp-site
   target: open/binary/new/direct xfile-to
   total: 0
   size:  0

   start: now/time

   while [not zero? size: read-io source buffer buf-size][
   write-io target buffer size
   clear buffer
   total: total + size
   print total
   ]
   close source
   close target
   print ["FTP Transfer took: " now/time - start ]
]
;---
---

ftp-site: ftp://your.big.server.com/big-file.zip
lfile: %/d/data/local/big-file.zip

ftp-large-binary-file ftp-site lfile
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] FW: ftp dowlnoad of large file and read-io ....

2002-04-05 Thread Vos, Doug

Has this code been improved since Sept 12th 2001?

FTP of large files is apparently a "well guarded secret"
by rebolers.

I will fiddle some more with Petr's version here
and let you know my results.

-DV


-Original Message-
From: Petr Krenzelok [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 7:24 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] ftp dowlnoad of large file and read-io 


Hi,

So I just rewrote core.pdf example of ftp download of large file, and it
doesn't work, unless I clear the buffer each time. What am I doing
wrong?

buf-size: 2
buffer: make string! buf-size
source: open/direct ftp-site
target: open/new/direct join target-path [trim fl/text ".tra"]
total: 0
size: 0

start: now/time

while [not zero? size: read-io source buffer buf-size][
  write-io target buffer size
  clear buffer
  total: total + size
  p/text: to-string total
  t/text: to-string now/time - start
  show p show t
]

The problem is, that if I don't "clear buffer", the download of each
file stops at some 20479, and server probably closes the connection. It
even doesn't matter, if I define buffer as binary type, of size buf-size
+ 2 (btw: what is that additional 2 good for?)

Everything seems to work, once I add "clear buffer" line as above. The
question is - what is going on?

Thanks a lot,
-pekr-



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] FTP Large Files (the saga continues...)

2002-04-05 Thread Vos, Doug

Still think FTP of large files should be improved
in rebol/core 2.6 since I cannot get any code
to work reliably in version 2.5.

Does not mean 2.5 has a bug,
just means that it is difficult for
a person to make it work reliably.

If it ain't simple and reliable,
it still needs to be improved (in my opinion.)

Or does someone have a function
that implements a simple and reliable way 
to FTP large files using rebol/core 2.5

-DV


-Original Message-
From: Vos, Doug [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 4:44 PM
To: '[EMAIL PROTECTED]'
Subject: [REBOL] Re: FTP large files (Answering my own question)


Actually - this is really crazy...
Can you get this code to work?


rfile: ftp://bigserver/bigfile.zip
lfile: %/d/data/bigfiles/bigfile.zip


inp: open/binary/direct rfile
out: open/binary/new/direct lfile

total: 0
buf-size: 200'000'000  ; change this to any size you want

buffer: make binary! buf-size + 2

while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]

close inp
close out



-----Original Message-
From: Vos, Doug [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:29 PM
To: '[EMAIL PROTECTED]'
Subject: [REBOL] FTP large files (Answering my own question)


About FTP of large files.
Here is a quote from the rebol documetation...
(sorry I did not read...)
Transferring Large Files
Transferring large files requires special considerations. You may want to
transfer the file in chunks to reduce the memory required by your computer
and to provide user feedback while the transfer is happening.
Here is an example that downloads a very large binary file in chunks.
inp: open/binary/direct ftp://ftp.site.com/big-file.bmp
out: open/binary/new/direct %big-file.bmp
buf-size: 20
buffer: make binary! buf-size + 2
while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]
Be sure to use the /direct refinement, otherwise the entire file will be
buffered internally by REBOL. The read-io and write-io functions allow reuse
of the buffer memory that has already allocated. Other functions such as
copy would allocate additional memory.
If the transfer fails, you can restart FTP from where it left off. To do so,
examine the output file or the size variable to determine where to restart
the transfer. Open the file again with a custom refinement that specifies
restart and the location from which to start the read. Here is an example of
the open function to use when the total variable indicates the length
already read:
inp: open/binary/direct/custom
ftp://ftp.site.com/big-file.bmp
reduce ['restart total]
You should note that restart only works for binary transfers. It cannot be
used with text transfers because the line terminator conversion that takes
place will cause incorrect offsets.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: FTP large files (Answering my own question) - NOT!

2002-04-05 Thread Vos, Doug

Just tried this code snippet that I pasted
from official rebol documentation.

It does not work very well.
1. Zip files transfered with this method won't open.
2. buf-size - is not what it says it is
3. I thought write-io and read-io were not supposed to be used
Any suggestion on how to improve it?

So, I guess I still have questions.
How are people transferring large files (eg. 100 to 200 meg) 
with rebol ftp:// ?


==
About FTP of large files.
Here is a quote from the rebol documetation...
(sorry I did not read...)
Transferring Large Files
Transferring large files requires special considerations. You may want to
transfer the file in chunks to reduce the memory required by your computer
and to provide user feedback while the transfer is happening.
Here is an example that downloads a very large binary file in chunks.

inp: open/binary/direct ftp://ftp.site.com/big-file.bmp
out: open/binary/new/direct %big-file.bmp
buf-size: 20
buffer: make binary! buf-size + 2
while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]
Be sure to use the /direct refinement, otherwise the entire file will be
buffered internally by REBOL. The read-io and write-io functions allow reuse
of the buffer memory that has already allocated. Other functions such as
copy would allocate additional memory.
If the transfer fails, you can restart FTP from where it left off. To do so,
examine the output file or the size variable to determine where to restart
the transfer. Open the file again with a custom refinement that specifies
restart and the location from which to start the read. Here is an example of
the open function to use when the total variable indicates the length
already read:
inp: open/binary/direct/custom
ftp://ftp.site.com/big-file.bmp
reduce ['restart total]
You should note that restart only works for binary transfers. It cannot be
used with text transfers because the line terminator conversion that takes
place will cause incorrect offsets.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: FTP large files (Answering my own question)

2002-04-05 Thread Vos, Doug

Actually - this is really crazy...
Can you get this code to work?


rfile: ftp://bigserver/bigfile.zip
lfile: %/d/data/bigfiles/bigfile.zip


inp: open/binary/direct rfile
out: open/binary/new/direct lfile

total: 0
buf-size: 200'000'000  ; change this to any size you want

buffer: make binary! buf-size + 2

while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]

close inp
close out



-Original Message-
From: Vos, Doug [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:29 PM
To: '[EMAIL PROTECTED]'
Subject: [REBOL] FTP large files (Answering my own question)


About FTP of large files.
Here is a quote from the rebol documetation...
(sorry I did not read...)
Transferring Large Files
Transferring large files requires special considerations. You may want to
transfer the file in chunks to reduce the memory required by your computer
and to provide user feedback while the transfer is happening.
Here is an example that downloads a very large binary file in chunks.
inp: open/binary/direct ftp://ftp.site.com/big-file.bmp
out: open/binary/new/direct %big-file.bmp
buf-size: 20
buffer: make binary! buf-size + 2
while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]
Be sure to use the /direct refinement, otherwise the entire file will be
buffered internally by REBOL. The read-io and write-io functions allow reuse
of the buffer memory that has already allocated. Other functions such as
copy would allocate additional memory.
If the transfer fails, you can restart FTP from where it left off. To do so,
examine the output file or the size variable to determine where to restart
the transfer. Open the file again with a custom refinement that specifies
restart and the location from which to start the read. Here is an example of
the open function to use when the total variable indicates the length
already read:
inp: open/binary/direct/custom
ftp://ftp.site.com/big-file.bmp
reduce ['restart total]
You should note that restart only works for binary transfers. It cannot be
used with text transfers because the line terminator conversion that takes
place will cause incorrect offsets.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] FTP large files (Answering my own question)

2002-04-05 Thread Vos, Doug

About FTP of large files.
Here is a quote from the rebol documetation...
(sorry I did not read...)
Transferring Large Files
Transferring large files requires special considerations. You may want to
transfer the file in chunks to reduce the memory required by your computer
and to provide user feedback while the transfer is happening.
Here is an example that downloads a very large binary file in chunks.
inp: open/binary/direct ftp://ftp.site.com/big-file.bmp
out: open/binary/new/direct %big-file.bmp
buf-size: 20
buffer: make binary! buf-size + 2
while [not zero? size: read-io inp buffer buf-size][
write-io out buffer size
total: total + size
print ["transferred:" total]
]
Be sure to use the /direct refinement, otherwise the entire file will be
buffered internally by REBOL. The read-io and write-io functions allow reuse
of the buffer memory that has already allocated. Other functions such as
copy would allocate additional memory.
If the transfer fails, you can restart FTP from where it left off. To do so,
examine the output file or the size variable to determine where to restart
the transfer. Open the file again with a custom refinement that specifies
restart and the location from which to start the read. Here is an example of
the open function to use when the total variable indicates the length
already read:
inp: open/binary/direct/custom
ftp://ftp.site.com/big-file.bmp
reduce ['restart total]
You should note that restart only works for binary transfers. It cannot be
used with text transfers because the line terminator conversion that takes
place will cause incorrect offsets.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Core 2.6 - Last minute requests - take your chanc e!

2002-04-05 Thread Vos, Doug

All these really cool "hidden" features in rebol 2.5
I keep discovering.

Is there a link to a specific page of documentation
about the FTP handling of large 100 -200 meg files?

eg/more/info/on 
holger-said: {That is already possible. You need to use /direct and a
 copy/append loop for streaming.}



-Original Message-
From: Holger Kruse [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Core 2.6 - Last minute requests - take your chanc
e!


On Fri, Apr 05, 2002 at 12:57:32PM -0500, Vos, Doug wrote:
> What about FTP any size file?
> Not an easy way to FTP a 100 to 200 Meg ZIP file today.
> 
> Will that be easier in 2.6?

That is already possible. You need to use /direct and a
copy/append loop for streaming.

-- 
Holger Kruse
[EMAIL PROTECTED]
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Core 2.6 - Last minute requests - take your chance!

2002-04-05 Thread Vos, Doug

What about FTP any size file?
Not an easy way to FTP a 100 to 200 Meg ZIP file today.

Will that be easier in 2.6?

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: ftp map to local drive ....

2002-03-07 Thread Vos, Doug

You can read and write to lotus notes databases
via ODBC using REBOL/Command.

You need to get the ODBC layer installed on the notes server first.

Would that help?


-Original Message-
From: Petr Krenzelok [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 9:24 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] ftp map to local drive 


Hi,

I was asked by our Lotus Notes admin if there is any kind of tool which
will allow to map ftp connection as a local drive. They are so dumb,
that they will try to find so obscure solution, because Lotus Notes
can't simply read ftp protocol directly, nor it can write data in byte
mode (only two bytes at once I was told, but I can't believe it), so
.pdf attachement which will come thru RFC from our SAP system, can't be
stored directly to harddrive. So the solution no 1 is to map AIX fpt
drive to local drive or b) to find any kind of ODBC driver, which can
accept binary data and simply write it to disc under some name :-)

I told them to use small Rebol server for TCP communication or just
plain and simply do the thingy directly in Rebol, but it was refused. So
at the end, if they don't find any tool, they will create small Delphi
app (because it can be trusted :-) and run the executable, so basically
- they will achieve cgi mode functionality.

Eh, is it worth a comment? :-)

-pekr-

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: UPDATED QUICK PLOT DIALECT and Tutorial

2002-02-22 Thread Vos, Doug

What is full URL to find this?

-Original Message-
From: Licholai, LCDR [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 10:01 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'; 'Donald Dalley'
Subject: [REBOL] UPDATED QUICK PLOT DIALECT and Tutorial


All,
 
I updated the quick plot dialect (q-plot) and ez-plot tutorial posted on the
reboltech site.  Some of the changes to the quick plot dialect include:
 
* added pie charts and exploded pie charts
* added scatter plots
* added candlestick charts for displaying stock data
* added the ability to place axis in a border area 
* added logarithmic, and semi-logarithmic scale options (and also a dynamic
selection mode)
* modified text placement to accept relative positioning of the text
* added a style options to the title 
* better use of parse to implement the dialect
* internal code clean up 
 
The ez-plot tutorial has also been updated to reflect the changes in quick
plot.  Additionally, the tutorial has an expanded section on using quick
plot, get-stock.r  and condense.r (some functions to aggregate data) to
create a stock analysis application.
 
Although some of the internals of quick plot still look like spaghetti, I
have tried to improved the readability and REBOLness of the code.  In some
ways I again prove that you can write passable FORTRAN in REBOL.
 
Once again I welcome all comments on the usability, style and functionality
of the dialect and the code.
 
Thanks,
Matt
 
 
 
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: How to generate an Excel Spreadsheet from REBOL.

2002-01-16 Thread Vos, Doug

Very cool. Nicer than generating .CSV files.
Works great after fixing two lines that got munged
from emailing.

Thanks Allen!!

-Original Message-
From: Allen Kamp [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 7:00 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] How to generate an Excel Spreadsheet from REBOL.


Thought this might be usefull for others who want to do quick output of
Excel spreadsheets from REBOL . Windows only :-(

Watch the line wrapping!...

REBOL [
 Author: "Allen Kamp"
 Email: [EMAIL PROTECTED]
 Date: 12-Dec-2001
Purpose: {Show how excel sheet can be created dynamically from html
content in a file with .xls
  file extension on machines where excel is installed. Note the sum
calculations.}

]

data: [

 "State" "Jan""Feb""Mar""Total"
 "QLD"  $400.00  $500.00  $600.00
 "=sum(B2:D2)" 
 "NSW"  $430.00  $660.00  $600.00
 "=sum(B3:D3)" 
 "VIC"  $200.00  $300.00  $900.00
 "=sum(B4:D4)" 
 

"=sum(B2:B4)""=sum(C2:C4)""=sum(D2:D4)""=sum(E2:E
4)"

]

write %demo.xls data
browse %demo.xls


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Cool Cursor Console Counter

2001-12-17 Thread Vos, Doug

I needed a good progress indicator / counter mechanism today.
Here is what I came up with - works with CORE.
(this example just counts to 999,000 and shows every 1000)

REBOL []
count: 1
until [
  count: count + 1   
  if (count // 1000) = 0 [ prin ["^(1B)[7D" count] ] 
; count by 100's, 1000's or whatever you need
  count = 999000
] 

For more info on how this works - see:
   http://www.rebol.com/docs/core23/rebolcore-18.html#sect5.1.
  
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Perl is to stupid to understand this 1 liner.

2001-12-14 Thread Vos, Doug

Thought I would reply to both real quick.

John correctly interpreted my original remarks,
as simply being 'funny flamebait' - and provided a great reply
in the form of a usable perl 1 liner.

John Sequeira wrote thus {

  Can't... resist  ...  replying to  flamebait ...

  >> perl -MDate::Manip -e "print q(bad date) unless &ParseDate( q(
 29-Feb-1999 ) )"
}

I also want to commend the ever so wise,
poly-linguistic, Joel Neely, for his sage advise,
and practical reminder about ROI.

When we talk about ROI in real world business, there are
obviously situations where languages like Java and Perl
should be leveraged to get the job done quickly.
Because of the huge base of code already written
in perl for the past 14 years, it has advantages.

See for instance the reboLDAP gateway project,
http://vvn.net/reboldap
which is uses both REBOL and PERL to get the 
job done quickly for the fastest ROI ... 

When you talk about tools,
(eg. toothpick, toothbrush, hammer, chisel, 
 chain-saw, jack-hammer, duct-tape, paper-clip)
you must pick the right one for the job.

I have no interest in promoting a competition 
of one-liners.

Simplicity is what I'm after. Even organic simplicity.

Consider the lowly earthworm -- A great tool for 
converting garbage into good soil. 

Complex solutions don't impress me.
Simple solutions to complex problems impress me.

- Doug




 

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Quote (Paren) Benchmark

2001-12-13 Thread Vos, Doug

Sounds really good.
Please provide some script snips.

-Original Message-
From: Gregg Irwin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 1:54 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Quote (Paren) Benchmark


Hi Mark,

<< The quote paren word 'a is 100% faster in these
circumstances than the word 'b does function version.

Anyone care to try out some more heavy duty benchmarking
to see what avarage speed gains are overall by coding
without function calls? >>

The speed gains will be based on the amount of work you're doing in the
functions relative to the overhead of a function call. I.e. your benchmark
shows the maximum speed gain because the function call overhead should be
the only difference. If you put code in that takes 100 times as long to
execute as a function call, the speed gain will be minimal as the function
call overhead is such a small part of the big picture.

If you're using it in place of lots of simple little functions, it should
provide a good boost. I've already tried it out (not for benchmarking
purposes) and can see some really good uses for it. Another handy tool in
the toolbag.

Thanks!


--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Perl is to stupid to understand this 1 liner.

2001-12-12 Thread Vos, Doug

I love the simplicity of rebol's interaction with humans.

Many other scripting languages are so dumb,
you have to get down to the dumb level to understand them...

Example:

try this at the prompt. - Test for leap year
>> 29-Feb-1999
** Syntax Error: Invalid date -- 29-Feb-1999
** Near: (line 1) 29-Feb-1999

However there is a leap year in 2000, 
so rebol knows right away what you mean...

>> 29-Feb-2000
== 29-Feb-2000

>> Can perl do that?
== NO
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: IMAP mail, anyone?

2001-12-12 Thread Vos, Doug

rebol's IMAP looks rock-solid from here...

We are not having any problem running IMAP
against a MS$oft exchange email server... if that helps anyone.
-DV


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 1:05 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: IMAP mail, anyone?


On Wed, Dec 12, 2001 at 01:53:51PM -, Cassani Mario wrote:
> Hi Rebolers,
>my dummy windozed system administrators blocked the
> pop3 access (a NTLM proxy wasn't enought...) to the
> M$ Exchange mail server.
>I am trying with IMAP, but can't even open the port:
> 
> >> open imap://user:[EMAIL PROTECTED]/inbox
> ** User Error: No authentication method available
> ** Near: open imap://user:[EMAIL PROTECTED]/inbox
> >>
> 
> what's wrong?

One of two things: either your username or password are incorrect,
or the server you are connecting to does not support any of the
official IMAP authentication standards REBOL supports (LOGIN
and CRAM-MD5), but only Microsoft-proprietary methods. To identify
the exact cause type

trace/net on

then try open the port.

Near the top of the Net-log output you should see a line such as

* OK [(some text) AUTH=CRAM-MD5 AUTH=LOGIN] hostname (some more text)

Check whether at least one of CRAM-MD5 or LOGIN is listed in the
AUTH options. If not, and if the server only supports, say,
AUTH=NTLM, then you will not be able to connect. You would have
to contact your sysadmin and ask them to enable standard authentication
protocols in the IMAP server. CRAM-MD5 is at least as secure as anything
ever coming out of Microsoft, so sysadmin really have no reason not to
allow it.

The other possibility, a wrong password, should be apparent in the
trace/net output as well, usually from a line such as

A1 NO AUTHENTICATE CRAM-MD5 failed

or

A1 NO AUTHENTICATE LOGIN failed


A potential third possibility is that your mail account has not been
set up for IMAP in general or for CRAM-MD5 yet. When switching from
POP to IMAP user accounts often have to be set up again and passwords
reentered to account for different password file formats.

> In our network there are two different domains
> but I cannot try the other domain user/password because the
> password actually contains a square bracket...

Yes, you can. Just open it using a port spec block instead of a URL,
e.g.

port: open [
scheme: 'imap
host: "imap.server.com"
user: "john"
pass: "secret"
]

-- 
Holger Kruse
[EMAIL PROTECTED]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] New, improved phone # Parser - Try it - Comments?

2001-12-05 Thread Vos, Doug

I wrote a new phone-rule today for parsing
a great variety of phone numbers.
The script is attached below.

This one is improved over the phone parser shown in
rebol parser examples.

Looking for your comments and tests on things it does not catch.
Here are a few tests I have run already...

>> parse/all "+USA 01-312-999-1212" phone-rule
== true
>> parse/all " 01-312-999-1212" phone-rule
== true
>> parse/all "999-1212" phone-rule
== true
>> parse/all "312.999.1212" phone-rule
== true
>> parse/all "999.1212" phone-rule
== true
>> parse/all "999-1212" phone-rule
== true
>> parse/all "(312)-999.1212" phone-rule
== true
>> parse/all "(312)999.1212" phone-rule
== true
>> parse/all "+CANADA 001-312 999-1212" phone-rule
== true
>> parse/all "+CANADA 001-312 9991212" phone-rule
== true
>> parse/all "+CANADA 001-(312)9991212" phone-rule
== true
>> parse/all "+CANADA 001-(312)999-1212" phone-rule
== true
 parse/all "+CANADA 011-(312)999-1212" phone-rule
== true
>> parse/all "+CANADA +011-(312)999-1212" phone-rule
== true
>> parse/all "9991212" phone-rule
== true

parse/all "212" phone-rule
== false
>> parse/all "5212" phone-rule
== true

The next thing I want to add is the ability to break out the 
parts of the phone number and store them in proper category.
Need to append the data to blocks as I parse. 
Don't know how to do that, yet.

This is what I want as output, eventually..

Example: +001-312-677- or
  +USA 1 (312)677- or  
  312.677. or
  677. 

dial-one  area-code lata-code extension 
  = = =
001   312   677   

output should be ["001" "312" "677" ""]
  or [none none "677" ""]

or something like that. 

;---
REBOL []

dial-one: charset "01"
digit:charset "0123456789"
alpha-pn: charset ["+-.() " #"A" - #"Z" #"a" - #"z"] 
other-ps: charset  "+-.() "

area-c:[3 digit]
lata-c:[3 digit]
ph-suffix: [4 digit]
  

phone-rule: [
   some [ 
  any alpha-pn   ; +USA 312-999-999 
  any dial-one   ; 01-313-999-999 
  any other-ps   ;
  any area-c  0 3 other-ps   ; 1(313)999- 
  lata-c  0 3 other-ps ph-suffix |

  any alpha-pn
  any other-ps  
  lata-c  0 3 other-ps ph-suffix |   ;  281-1999,"281 1999",281   

  0 3 other-ps ph-suffix ;  "-1999","1999" 
   ]
   to end
]

;---
-
; Insert your phone list here:
; phones: []
;
;---
-

foreach ph phones [
   phone: parse/all ph phone-rule 
   if not phone [print ph]
]

; Thanks!
; Doug Vos
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: reboLDAP (LDAP for rebol)

2001-12-04 Thread Vos, Doug

More info added this morning at http://vvn.net/reboldap/
Deryk - where can we find rebauthd ?
or more about your work with pam_ldap/nss_ldap ?  


-Original Message-
From: Deryk Robosson [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 9:02 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: reboLDAP (LDAP for rebol)


> see: http://vvn.net/reboldap/
> 
> Also see: http://www.rebol.com/faq.html#8290838
> Q. Any plans to support IMAP? LDAP? 
> 
> A. Yes.
> (IMAP is built into core 2.5 --> so LDAP is coming in next version?)

Would be nice to have so I wouldn't have to maintain multiple authentication
methods across systems where Rebol is concerned (though my rebauthd is still
alive and kicking and can authenticate against slapd just fine through
pam_ldap/nss_ldap), native support for the rest of my directory would be
nice. :)

-- 
Regards,
Deryk Robosson

Deryk Robosson
22 Flemington St.
Albany, WA 6330 Australia
ABN: 56 728 377 499
PH: +61 0408429835  EMAIL: [EMAIL PROTECTED]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] reboLDAP (LDAP for rebol)

2001-12-03 Thread Vos, Doug

see: http://vvn.net/reboldap/

Also see: http://www.rebol.com/faq.html#8290838
Q. Any plans to support IMAP? LDAP? 

A. Yes.
(IMAP is built into core 2.5 --> so LDAP is coming in next version?)


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] REBOL Press Release today

2001-10-16 Thread Vos, Doug

new today!

http://www.rebol.com/news1a16.html
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: call/console in Windows opens the console window anyway

2001-04-19 Thread Vos, Doug

I reported this behavior during the /command beta testing period.
It was bothersome to me also... but maybe just a matter of personal
preference since the script
continues running and does not crash (not a bug - a feature)

However, I noticed in /command that the window IS SUPPRESSED when calling a
DOS command (like PING, DIR, TRACERT, etc.)
WHEN RUN as a CGI script.

YMMD (your mileage may differ)
-dv-


-Original Message-
From: Michal Kracik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 3:42 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] call/console in Windows opens the console window anyway


Hi,

when calling external program from View/Pro for Windows with
call/console, both input and output are correctly redirected to REBOL
graphics console. But an empty DOS/Windows console window still
appears.

Is this the correct behaviour or a bug? Other Windows programs that
redirect to their graphical consoles (WinCVS, Visual C++) don't do
this.

-- 
Michal Kracik


Holger Kruse wrote:
> 
> The View/Pro Library, Shell and Encryption docs have been updated to
reflect the
> new BeOS and AmigaOS ports and other recent changes. The new versions are
available
> from the web site now. Here are the changes in a nutshell:
> 
> Library:
> 
> BeOS works just like Unix. AmigaOS is similar, but requires an ".fd" file
for every
> library, either in the same directory as the library or in "FD:".
> 
> Shell:
> 
> BeOS and AmigaOS work like Unix, except that i/o redirection to/from REBOL
> is not supported (/input, /output, /error, /console refinements).
Temporary
> files have to be used instead, together with shell redirection.
> 
> Encryption:
> 
> No differences between platforms. Changes in the documentation include
clarifications
> and corrections regarding encryption strength (full version vs. export),
and
> documentation of the /padding refinement for 'rsa-encrypt, new in View/Pro
1.1.
> 
> --
> Holger Kruse
> [EMAIL PROTECTED]
> 
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Entropy [was Re: Compression]

2001-04-18 Thread Vos, Doug

What about including better image compression in REBOL/View?

I'm surprised nobody jumped on my comment yesterday about
image compression from http://www.lizardtech.com/index.html
that is 10 times better than JPEG (in many cases) ...

This technology would be a great add on for REBOL/View

-Original Message-
From: Holger Kruse [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 10:16 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Entropy [was Re: Compression]


On Wed, Apr 18, 2001 at 02:58:32AM -0500, Joel Neely wrote:
> Hi, all!
> 
> The result tells the minimum number of bits per character required to
> transmit without loss any message from a source having the same
> distribution as the supplied source.

Yes, but entropy is always calculated relative to some established
model, shared by compressor and decompressor. It looks like the model
you use is character-based, global and context-free, i.e. it does not
take character combinations or other contexts into account, and does
not attempt to calculate entropies of subsections.

This means those 4.8 bits per character of entropy are a lower bound
only for character-oriented compression. Compressors which look at
character combinations or which reset compression histories and thus
distribution statistics at certain times might get better results.
Basically the entropy in your model describes a bound on the compression
ratio of static, adaptive Huffman encoding. It does not say anything about
other types of compression.

These days good text compressors (ppm, dmc and even BWT) achieve
around 75% compression (using models with around 2 bits of entropy per
character) on typical English language reference texts (Canterbury Corpus,
novels from Project Gutenberg, e.g.).

The interesting question for text compression is what the minimum
entropy of English language text is relative to an optimum, algorithmic
model, i.e. a model that does not depend on the receiver having access
to large dictionaries, portions of text etc., but only a reasonably-sized
decompression algorithm. The current assumption is that a lower bound
is around 1 bit per character, leading to an upper bound on English
language text compression of around 87.5 %.

-- 
Holger Kruse
[EMAIL PROTECTED]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Compression

2001-04-17 Thread Vos, Doug

When can I buy a copy?

-Original Message-
From: Paul Tretter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Compression


Wow that sounds like a big number.  Actually though its more like 65
terabytes given some of REBOL's limitations with number size but feel thats
acceptable. :)

Can I hold you to that Nobel Peace prize? ;)

Actually, economics and time play the most inportant part in the amount of
compression needed.  For example it would take very long time to uncompress
2 gig worth of data from 400 bytes.  That may not be a the best means of
data handling depending on the situation.  However, I for example put an
entire CD image on a website (compress to less than 400 bytes) then download
it over a dialup line and uncompress it very easily with very little possibe
risk of corruption due to the small footprint.  I would be skeptical also of
this and had doubts and many road blocks. However, it can and will be
available soon.  Thanks for the comments.

Paul Tretter


- Original Message -
From: "Terry Brownell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 11:38 AM
Subject: [REBOL] Re: Compression


> I find this a bit hard to swallow.
>
> 2,340 Gigabytes on one floppy?
>
> Pull that one off SUCCESSFULLY and I'll see you get the Nobel Prize.
>
> T Brownell
>
> - Original Message -
> From: "Paul Tretter" <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 17, 2001 9:14 AM
> Subject: [REBOL] Compression
>
>
> >
> > Coming soon!  Image putting greater than 3600 CD's worth of data on a
> floppy disk.  Or take a Gigabyte worth of data and compress it to under
> 400bytes. I purchased /View/Pro and will most likely purchase runtime
> licenses once they are available for /View and begin distribution of NEW
> compression software depending on the licensing terms available.  Imagine
> with 400 byes of compressed data (representing a gig or more) what this
> could mean to handheld devices like portable mp3 players or digital
cameras.
> The capablity to store your entire mp3 collection in a portable device.  I
> know your interested but you will have to wait a bit longer.  Thanks to
the
> guys in the IRC REBOL channel on EFNET for your help and cooperation (you
> know who you are).
> >
> > Paul Tretter
> >
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Windows-2000?

2001-04-09 Thread Vos, Doug

I recently upgraded my desktop OS from win-98 to NT-4( sp.6.)

Everything is working good, but now it looks like I will
be upgrading to Win-2000 later this year...

Are there any know problems with Win-2000?
If not, why does is Win-2000? not listed in the supported platforms.
Or does the same code run exactly the same on Win-95/98/NT and 2000?

Just trying to plan ahead.


Doug Vos :: WebMaster - EDS/GMNA
eMail: mailto:[EMAIL PROTECTED]


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: HTTP Proxy to HTTPs

2001-03-23 Thread Vos, Doug

Also remember that you can always run REBOL/core
on your SSL enabled server in CGI mode.
It works because it is 'inside' the SSL (security layer).

We do it all day long.

Just can'tread https://whatever.com

So really the only thing that is lacking is the ability
to read https://


-Original Message-
From: David Vydra [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 3:59 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: HTTP Proxy to HTTPs


Paul,

If they use a VPN, REBOL will work fine, but for
HTTPs, I would hope that soon there will be a way to
run  REBOL inside a WEB page inside a browser and tap
into SSL that the browser already supports.

dv


--- Paul Tretter <[EMAIL PROTECTED]> wrote:
> Not sure of the answer.  However, I have approach a
> fortune 25 company about
> using REBOL/View for its intranet site and they seem
> interested but have
> some doubts that it could be handled with some of
> their existing stradegies.
> More importantly they use a VPN and use HTTPS.  Any
> ideas how or whether I
> should continue negotiating this any further.
> 
> Paul Tretter
> 
> - Original Message -
> From: "Travis Watkins" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 22, 2001 2:47 PM
> Subject: [REBOL] HTTP Proxy to HTTPs
> 
> 
> >
> > Does anyone know what is needed to make the HTTP
> proxy on www.rebol.org
> work for HTTPs?
> >
> > I can't seem to get past the CONNECT command.
> >
> > I am trying to make a simple method for creating
> scripts for automated
> access and processing of locations that require one
> or more levels of
> authentification.
> >
> > The HTTP works fine, I just write the Get commands
> out to a file delimited
> with specific tags( and ), but
> I can't seem to get a
> slightly modified copy to also run as a proxy for
> HTTPs.
> > (Modifications include changing the prot fom 80 to
> 443 and modification of
> the parsing to accept CONNECT strings in addition to
> the Http Get strings.
> >
> > The HTTP Proxy also identifies the simple Gif,
> Jpg, and Jpeg files so as
> not to add them to the script(atleast the ones with
> only one "." in their
> file name)
> >
> >
> >
> >
> >
> > --
> > To unsubscribe from this list, please send an
> email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
> 
> -- 
> To unsubscribe from this list, please send an email
> to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
> 


=
please reply to: [EMAIL PROTECTED]

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: HTTP Proxy to HTTPs

2001-03-22 Thread Vos, Doug

Hi Travis:
 I tried the same thing several months ago... 

https:// protocol uses SSL encryption.

REBOL/core does not support (include) SSL since then REBOL/core would bloat
up to over 2 MEGS.

However, a work around is to use a redirector such as stunnel.
see http://www.stunnel.org for more info.

Other may be developing other work arounds...
Let us know how it works out for you.


-Original Message-
From: Travis Watkins [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 3:48 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] HTTP Proxy to HTTPs



Does anyone know what is needed to make the HTTP proxy on www.rebol.org work
for HTTPs?

I can't seem to get past the CONNECT command.

I am trying to make a simple method for creating scripts for automated
access and processing of locations that require one or more levels of
authentification.

The HTTP works fine, I just write the Get commands out to a file delimited
with specific tags( and ), but I can't seem to get a
slightly modified copy to also run as a proxy for HTTPs.
(Modifications include changing the prot fom 80 to 443 and modification of
the parsing to accept CONNECT strings in addition to the Http Get strings.

The HTTP Proxy also identifies the simple Gif, Jpg, and Jpeg files so as not
to add them to the script(atleast the ones with only one "." in their file
name)





-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Generating words and global variable space

2001-03-22 Thread Vos, Doug

Why do you want to generate all the new words?
Why not use blocks or objects?

I have thousands of lines of rebol script and
rarely use more than 3 or 4 global words per script.

I mostly use local words and global objects.

Can you explain more what you are trying to do?
Then I'm sure people will be able to help...


-Original Message-
From: Gisle Dankel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 8:56 AM
To: '[EMAIL PROTECTED]'
Subject: [REBOL] Re: Generating words and global variable space



Hi Doug,

I don't think this is the solution.

Let me illustrate the problem:

forever [to-word join 'x counter: counter + 1]
>> counter: 0
== 0

>> forever [to-word join 'x counter: counter + 1]
** Internal Error: No more global variable space
** Where: to-word
** Near: to word! :value

>> use [new-word] []
** Internal Error: No more global variable space
** Near: to word! :value


I need to generate lots of new words without filling up the global
variable space. It seems this is not possible.


Gisle

On Thu, 22 Mar 2001, Vos, Doug wrote:

> Is this what you are looking for?
> >> help use
> USAGE:
> USE words body
>
> DESCRIPTION:
>  Defines words local to a block.
>  USE is a native value.
>
> ARGUMENTS:
>  words -- Local word(s) to the block (Type: block word)
>  body -- Block to evaluate (Type: block)
> >>
>
> -Original Message-
> From: Gisle Dankel [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 8:02 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Generating words and global variable space
>
>
>
> Hi list,
>
> do anyone know of a way to generate words without running out of global
> variable space?
> E.g. generating them in a local context?
>
> Gisle
>
>
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Generating words and global variable space

2001-03-22 Thread Vos, Doug

Is this what you are looking for?
>> help use
USAGE:
USE words body

DESCRIPTION:
 Defines words local to a block.
 USE is a native value.

ARGUMENTS:
 words -- Local word(s) to the block (Type: block word)
 body -- Block to evaluate (Type: block)
>>

-Original Message-
From: Gisle Dankel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 8:02 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Generating words and global variable space



Hi list,

do anyone know of a way to generate words without running out of global
variable space?
E.g. generating them in a local context?

Gisle


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Release date for core 2.5 ?

2001-03-13 Thread Vos, Doug

Whatever happened to release date for core 2.4?
I thought 2.4 was going to be the next stable release of /core.


-Original Message-
From: Will Arp [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 11:20 AM
To: rebol list
Subject: [REBOL] Release date for core 2.5 ?


Sorry I know everybody is really busy!

Thank you very much.
Will Arp

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] PING - no message on list since 27-Feb-2001

2001-02-28 Thread Vos, Doug

Mail forwarder needs a kick re-start?
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: zip-lookup function

2001-02-26 Thread Vos, Doug

try zip-lookup 95482

-Original Message-
From: Vos, Doug [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 9:04 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] zip-lookup function 


I wrote a zip lookup function over the weekend.

You provide the zip-code and it returns the "city, state".
Only works for USA addresses at this time...
However, may be of interest to all since it demonstrates a simple way
to grab and re-use information from a web-site.
(In this case maps.yahoo.com )

What I need...
1. Try this out and tell me about any bugs,
   and also suggest any improvements.
2. Need the latest version of an "http-post" to improve this
   function, by working with a "post" to usps.gov. 
   (no pun intended)

Try it out and somebody send me the latest and greatest 
version of http-post also.


REBOL [
Title:   "Get city and state from zip-code lookup."
Date:24-Feb-2001
File:%zip-looky.r
Author:  "Doug Vos"
Email:   [EMAIL PROTECTED]
Purpose: "Allow simple data entry with zip code lookups."
]


zip-lookup: func [
  {Return a [city state zip] block from a zip.}
  zip [string! integer!] {A zip code like 56789 or 9-.}
  /local data xblock i cs city state cs-parts
][
   data: load/markup copy/part (read rejoin [
 http://maps.yahoo.com/py/maps.py?BFCat=&Pyt=Tmap&addr=&csz=  zip
 ]) 4800

   xblock: make block! 100
   foreach i data [
 if string? i [
if not empty? (trim/lines i) [
   append xblock i
]
 ]
   ]

   cs: select xblock "Yahoo! Maps"
   cs-parts: parse/all cs ";"

   city:  first  parse/all (first  cs-parts) ","
   state: first  parse/all (second cs-parts) "&"
   reduce [city state]
]

probe zip-lookup "01001"
probe zip-lookup "02138"
probe zip-lookup 10012
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] zip-lookup function

2001-02-26 Thread Vos, Doug

I wrote a zip lookup function over the weekend.

You provide the zip-code and it returns the "city, state".
Only works for USA addresses at this time...
However, may be of interest to all since it demonstrates a simple way
to grab and re-use information from a web-site.
(In this case maps.yahoo.com )

What I need...
1. Try this out and tell me about any bugs,
   and also suggest any improvements.
2. Need the latest version of an "http-post" to improve this
   function, by working with a "post" to usps.gov. 
   (no pun intended)

Try it out and somebody send me the latest and greatest 
version of http-post also.


REBOL [
Title:   "Get city and state from zip-code lookup."
Date:24-Feb-2001
File:%zip-looky.r
Author:  "Doug Vos"
Email:   [EMAIL PROTECTED]
Purpose: "Allow simple data entry with zip code lookups."
]


zip-lookup: func [
  {Return a [city state zip] block from a zip.}
  zip [string! integer!] {A zip code like 56789 or 9-.}
  /local data xblock i cs city state cs-parts
][
   data: load/markup copy/part (read rejoin [
 http://maps.yahoo.com/py/maps.py?BFCat=&Pyt=Tmap&addr=&csz=  zip
 ]) 4800

   xblock: make block! 100
   foreach i data [
 if string? i [
if not empty? (trim/lines i) [
   append xblock i
]
 ]
   ]

   cs: select xblock "Yahoo! Maps"
   cs-parts: parse/all cs ";"

   city:  first  parse/all (first  cs-parts) ","
   state: first  parse/all (second cs-parts) "&"
   reduce [city state]
]

probe zip-lookup "01001"
probe zip-lookup "02138"
probe zip-lookup 10012
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Making money with Rebol?

2001-02-13 Thread Vos, Doug

First try saving your company money.

Just ask your boss for some extra work,
solving a few problems that everyone else
has neglected. Use a little observation,
and discernment. Then just write
the scripts in rebol and solve the business 
problem.  

That's all I did, and from that small beginning (1.5 years ago), 
I now have 147 smallish REBOL scripts in production and 2 people
in training (REBOL/web-development/training/internship).

To be honest, we are using other tools, like
Perl, Python, MacroMedia, Web-Objects, Java, etc.

But, there is nothing wrong with using REBOL...
... now that we are solving problems and saving
the company money!

It you try the above suggestions,
and you are still not happy.. maybe it's
time to get a "REAL JOB" at EDS.

see http://www.eds.com

-DJV-

Disclaimer: 
The above remarks are the personal
observations of the writer (DJV)
and may not necessarily reflect
the opinions of my employer.

-Original Message-
From: Jeff Rubin [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 4:55 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Making money with Rebol?


Anyone making money with Rebol?
Just curious.

Seems hard since basically no one looking to hire even has a clue as to what
Rebol is and are already well entrenched in other solutions.
Educating a potential client on the advantages of a new solution is
difficult at best.

Any ideas?

Jeff

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Ping?

2001-02-09 Thread Vos, Doug

Anybody have a good protocol for testing if a printer is alive.
We have about 400-500 HP Laser printers, and most
of them are telnet enabled, so you could modify testing the 
telnet port.

Any other ideas?


-Original Message-
From: GS Jones [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 2:40 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Ping?


Hi, Thomas,

Welcome to REBOL.  What were you wishing to accomplish with ping?  Perhaps
there is a better REBOL-way to achieve the task without ping per se.

--Scott

> So I am new to Rebol - I ahve gotten the rebol for dummies book (great),
and
> I was wondering how I could get Rebol to ping an address, and return the
> results to the rebol script.  Any light that someone could shed on this
> would be greatly appreciated.
>
> Thomas.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Ping?

2001-02-09 Thread Vos, Doug

We also use a lot of test for DNS to gather
a little more info about the "unknown" device,
but that will not tell you if it's alive...

eg. xdns: read dns://198.20.99.11


-Original Message-
From: GS Jones [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 2:40 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Ping?


Hi, Thomas,

Welcome to REBOL.  What were you wishing to accomplish with ping?  Perhaps
there is a better REBOL-way to achieve the task without ping per se.

--Scott

> So I am new to Rebol - I ahve gotten the rebol for dummies book (great),
and
> I was wondering how I could get Rebol to ping an address, and return the
> results to the rebol script.  Any light that someone could shed on this
> would be greatly appreciated.
>
> Thomas.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Ping?

2001-02-09 Thread Vos, Doug


... so here is a "way to ping with REBOL..."

1. REBOL writes the batch file
2. you run the batch/shell file
3. the last line in the batch file calls next REBOL script...

;
This script will ping every static IP address
in a DHCP tab file to see if the device is still there.
Then the DHCP admin can clean up DHCP for devices
that have been shut off or moved to a different
LAN segment

It works by creating a batch file (.BAT)
You could modify it for other platforms...
eg. UNIX/LINUX shell 

The main guts of the script is
the following few lines: {

fwrite rejoin [
 {echo. } ip/host-name { > }  fname newline
 {ping  } ip/ip-addr   { >> } fname  
  ]
}

It creates a file of ping results for each device,
like %/ping-result-path/198.99.1.11.txt

If you want the other files, that go along with this
let me know...



REBOL [
 Title: "Ping batch file creator."
  File: %ping-bat-maker.r
   Version: 0.1.1
  Date: 9-Feb-2001
Author: "Douglas Vos"
E-Mail: [EMAIL PROTECTED]
   Purpose: {Read in a file of devices from DHCP file
 and output a batchfile that will ping all the devices.}  
   History: [ 
   0.1.0 [2-Feb-2001 {Began script.}  "DJV"]
   0.1.1 [9-Feb-2001 {Now calls parse-dhcp-lib.r to parse DHCP tab file
   in native format rather than working from temporary file.}
"DJV"]
]
]

;
;--- DECLARE THE GLOBAL VARIABLES in object gv --
;

gv: make object! [
dhcp-native:%/c/data/dhcp/rc/rn1_dhcp3tab.txt  
outpfile:   %/c/data/pings/rc/pings.bat
]
;
; LOAD ANY REQUIRED EXTERNAL LIBRARIES --
;
do join pc-path %parse-dhcp-lib.r 

;
;- DEFINE ANY HELPER FUNCTIONS --
;
fwrite: func [
   {Write output to specified file.}
   item [string!] {String to write to file - c/r will be appended.}
][
   write/append/lines gv/outpfile item  
]
;
;- BEGIN MAIN PROCESS OF SCRIPT -
;
if exists? gv/outpfile [delete gv/outpfile]

print [{Reading DHCP file: } gv/dhcp-native ]
xips: filter-devices (parse-dhcp-file gv/dhcp-native) "STAT"

print [{Writing batch-file of STATIC addresses to ping: } gv/outpfile]

fwrite {DEL *.txt}

foreach ip xips [
  fname:   rejoin [ip/ip-addr ".txt" ] 
 
  fwrite rejoin [
 {echo. } ip/host-name { > }  fname newline
 {ping  } ip/ip-addr   { >> } fname  
  ]
]

fwrite {cd \rebol\core-2-3}
fwrite {rebol -s --script %/e/scripts/rs/pingxlate.r}







-Original Message-
From: GS Jones [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 2:40 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Ping?


Hi, Thomas,

Welcome to REBOL.  What were you wishing to accomplish with ping?  Perhaps
there is a better REBOL-way to achieve the task without ping per se.

--Scott

> So I am new to Rebol - I ahve gotten the rebol for dummies book (great),
and
> I was wondering how I could get Rebol to ping an address, and return the
> results to the rebol script.  Any light that someone could shed on this
> would be greatly appreciated.
>
> Thomas.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Running CGI-Script from outside CGI-BIN?

2001-02-07 Thread Vos, Doug

In some cases I run IIS under NT,
otherwise I run Apache under LINUX,
unless of course I am running NSS under SOLARIS
(which is the worst because then I have do run
 all cgi's inside /CGIWRAP/)...

And I understand it is all about permissions...
normally I do a >> chmod 775 filename.r

But if I want a shorter URL that hides the CGI-BIN
(or the CGI-WRAP) with maybe a re-direct or faking it
out with hiding the re-direct in an image?

Any ideas actually I don't want to do something that
would be insecure.

I want it to be secure, but hide the lengthly CGI-BIN url...

OK?

-Original Message-
From: andy york [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 1:49 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Running CGI-Script from outside CGI-BIN?


All a matter of directory permissions. Unless you can do it on a per file
basis you probably don't want to. For it to work the file has to be writable
but you may not want the whole directory to share that attribute. You can do
it with NT not 95/98/ME to put it bluntly. The scripts will run given the
proper permissions.

ay

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Vos, Doug
Sent: Wednesday, February 07, 2001 1:29 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Running CGI-Script from outside CGI-BIN?

This is perhaps more of a CGI question, than a REBOL question,
but has to do with implementing this in REBOL so here goes...

RE: running script that appears to be outside of cgi-bin

How to create a shorter URL that runs a REBOL script

Say I want the URL to be like: http://www.dom.com/x?123
or  http://www.dom.com/x?a12

instead of http://www.dom.com/cgi-bin/x.r?123

Anyway -- looking for ideas and tips on how to shorten URL's and still
have the REBOL script run properly.

Any suggestions?


Douglas Vos - EDS/GM-BSU Webmaster
e-Mail: mailto:[EMAIL PROTECTED]

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Running CGI-Script from outside CGI-BIN?

2001-02-07 Thread Vos, Doug

This is perhaps more of a CGI question, than a REBOL question,
but has to do with implementing this in REBOL so here goes...

RE: running script that appears to be outside of cgi-bin

How to create a shorter URL that runs a REBOL script

Say I want the URL to be like: http://www.dom.com/x?123
or  http://www.dom.com/x?a12

instead of http://www.dom.com/cgi-bin/x.r?123

Anyway -- looking for ideas and tips on how to shorten URL's and still
have the REBOL script run properly.

Any suggestions?


Douglas Vos - EDS/GM-BSU Webmaster 
e-Mail: mailto:[EMAIL PROTECTED]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: how do I get ampm format for time?

2001-01-19 Thread Vos, Doug

saves 8 characters from your version :)

ampm: func[t][join t // 12:0[pick"AP"t < 12:0"M"]]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 12:03 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: how do I get ampm format for time?



Before anyone else pipes in, I just realized I used a few extra 
characters.  If I'm gonna try to do this succinctly, I might as 
well go all out, eh? ;-)

time-ampm: func[dt][join dt // 12:0[pick"AP"dt < 12:0"M"]]

I don't recommend doing this for readability's sake, but it does show
the smartness of the language parser.  And I did challenge someone to
make it shorter...

-Bo

On 19-Jan-2001/4:52:34-6:00, [EMAIL PROTECTED] wrote:
>"Rebol/Core User's Guide" (page 63) also gives the following example:
>
>print either now/time < 12:00 ["AM"]["PM"]
>
>This approach could be easily adapted to:
>
>time-ampm: func [dt] [either dt < 12:00 [return join dt "AM"][return join
>dt - 12:00 "PM"]]
>
>
>>> time-ampm 8:00
>== "8:00AM"
>
>>> time-ampm 18:00
>== "6:00PM"
>
>Hope this is helpful.
>
>Scott
>
>
>- Original Message -
>From: "Bob Racko" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, January 19, 2001 12:51 AM
>Subject: [REBOL] how do I get ampm format for time?
>
>
>>
>>
>> how do I format dates to am/pm format
>> like: "hh:mm pm EST"
>>
>> is there a more succinct way to write this?
>>
>> time-ampm: func [ dt ]
>> [ rejoin [
>>
>>; handle  hh:mm part
>> ( replace ( copy/part (
>>   rejoin [
>>  (either dt/time < 10:00 [ "0" ] [ "" ])  ;  hh:mm vs [h]h:mm
>>   either dt/time > 12:59:59
>>   [ mold dt/time - 12:00 ]
>>   [ mold dt/time ]
>>  ]
>> ) 5 ) "00:" "12:" )   ; midnite-1am is special
>>
>>
>>; handle " pm EST" parts
>> either  dt/time > 11:59:59
>>   [ " pm" ]
>>   [ " am" ]
>>
>> " EST"
>> ]]
>>
>> yes this does the job, perhaps a mold could be factored out
>> and some parens are not needed.  now the challenge
>> is to write something that handles the exceptions
>> with less code. this version allows coding by deletion
>> since the two parts hh:mm vs am/pm indicator
>> are treated separately and simply concatenated.
>>
>> --
>> To unsubscribe from this list, please send an email to
>> [EMAIL PROTECTED] with "unsubscribe" in the
>> subject, without the quotes.
>>
>
>-- 
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the 
>subject, without the quotes.
>
-- 
   Bohdan "Bo" Lechnowsky
   REBOL  Adventure Guide
   REBOL Technologies 707-467-8000 (http://www.rebol.com)
   The Official Source for REBOL Books (http://www.REBOLpress.com)

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Rebol/Command

2001-01-12 Thread Vos, Doug

Have you used rebol/core for for free yet?
What about rebol/view free version?

If you like those, chances are you will like REBOL/Command.

REBOL is not like most commercial products anyway...
Most commercial products take up 30 Megs
and take 15 days to install and learn...

-Original Message-
From: David Vydra [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Rebol/Command


Does anybody know if there is a reason why
Rebol/Command does not have a 30 day trial like most
commercial products?

thanks

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Rebol at home

2001-01-05 Thread Vos, Doug

Just connect to AOL the usual way then
run your REBOL scripts as normal...

works fine last time I tested it.


-Original Message-
From: Earley, Walter [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 3:28 PM
To: '[EMAIL PROTECTED]'
Subject: [REBOL] Rebol at home


Any documents describe how, if at all, I can use Rebol at home, where the
only network connection I have is AOL? Thanks...

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Millennium + 1 ...

2001-01-04 Thread Vos, Doug

Does this have anything to do with the
probe info? ftp://user:[EMAIL PROTECTED]/file.txt  
2001 problem I am having?



-Original Message-
From: Gabriele Santilli [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 12:41 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Millennium + 1 ...


Hello Ladislav!

On 03-Gen-01, you wrote:

 LM> In a different wording: if I
 LM> don't have zero, I can't get a negative number.

This is a good point. We should let Carl know about this
problem...

 i: 1

 pick series i
 pick series i + 1
 pick series i - 1 ; ???

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

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Millenium Bug in "info?" function - returns bad date.

2001-01-04 Thread Vos, Doug

I've found a bug in the info? function. Returns bad date.

Example:
"info?" reports file date of 21-Dec-2001 for file created on 21-Dec-2000.

Background:
In my production web-server environment I run Sun-Solaris.
My local Win-95 PC also runs REBOL/Core 2.3 and does some
remote maintenance of files, refreshing files and deleting old files every
night.

After the Jan 2, 2001 I noticed that the remote file delete script was no
longer working.
Curious as to why I used probe to examine the results of info? via the ftp
connection
and discovered that the reason no old files were being deleted was because
all the files from Dec-2000 were now being intepreted as Dec-2001.

I verified this in a file by file check with my other FTP tools.

>> probe info? xfile
make object! [
size: 1024
date: 19-Dec-2001/14:27
type: file
]
>>
File ...COFG11214-201.txt... is -349 days old.

NOTE: This file is actually dated 19-Dec-2000

Files are supposed to be deleted if older than 5 days,
so now this calculation does not work and I must delete old
files manually until I get a bug fix.

This seems to be the case under REBOL/Core 2.2 and 2.3
Info? does not appear to have this problem on local files, 
   but only when used via FTP.

What is the real scope of this bug? Any other versions effected?

Has anyone else seen problems like this?

Any temporary work arounds? Suggestions?


Douglas Vos - EDS/GM-BSU Webmaster 
e-Mail: mailto:[EMAIL PROTECTED]



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: How to do CGI POST as client? - solved

2000-12-15 Thread Vos, Doug

Graham:

Thanks again... I was also asleep...
Please send out new http-tools.r or provide pointer.

Thanks.

-Original Message-
From: Graham Chiu [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 15, 2000 1:26 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: How to do CGI POST as client? - solved


On Fri, 15 Dec 2000 10:15:43 -0500
 "William F. Dudley Jr." <[EMAIL PROTECTED]> wrote:

> $data = "npa=\"732\"&nxx=\"842\"&process=Lookup";
> 

If you had used the http-tools.r script I posted, it would
have been

data: [ "npa" "732" "xx" "842" "process" "Lookup" ]
tmp: http-tools/post yourcgiscript data

I went to your url the other day, but didn't go further as
it was password protected!

--
Graham Chiu
http://www.compkarori.co.nz/index.r
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] FW: Re: Send errors

2000-11-22 Thread Vos, Doug

>> send [EMAIL PROTECTED] read %test

   "User Error: Server error: tcp 550 no local host hotmail.com, not a
   gateway."

You always get that error (on most remote email hosts) unless you do a read
first.
example of what to do:

 read pop://user:[EMAIL PROTECTED]

 send [EMAIL PROTECTED]


-Original Message-
From: Gary Miller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 22, 2000 10:41 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: Send errors


 Rachid said:

> Could it be you are using Outlook Express' Hotmail service?
>
> In that case, Outlook uses Microsoft's proprietary, non-standard way of
> sending an email, ie. it doesn't use a normally accessable SMTP server.
> Rebol requires a normal SMTP server. My guess is you've set the SMTP
> server in Rebol to hotmail? That would cause the error...

I must not have stated my problem well. Any email client works fine for me
going through third party mail servers.

 *** It is only Rebol that cannot send through some ISP mail servers.

 >> send [EMAIL PROTECTED] read %test

   "User Error: Server error: tcp 550 no local host hotmail.com, not a
   gateway."

I have not set anything in Rebol except the name of the ISP's mail server.
I am not running/using a Rebol mail server.

What seems strange is that I can point a mail client like Outlook to the
same ISP mail server & then message will go out without a hitch.

---
Gary L. Miller  |  filePro
The Miller Group|  APPGEN
(253) 939-2307  Fax (253) 735-8384  |  SCO
[EMAIL PROTECTED]|  Linux
http://www.groupmiller.com  |  Win95/98/NT/2000

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Rachid van Es
> Sent: Tuesday, November 21, 2000 11:52 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Re: Send errors
>
>
> Hello,
>
>
> Regards,
> Rachid
>
> - Original Message -
> From: "2Cool Direct" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 21, 2000 20:16
> Subject: [REBOL] Send errors
>
>
> > Some _valid_ email addresses fail with the message:
> >
> > "User Error: Server error: tcp 550 no local host hotmail.com, not a
> > gateway."
> >
> > Testing shows that if I change to a different outgoing mail server, I
> can
> > make error/problem go away.  It appears that some mail servers cannot
> > provide enough information to Rebol.  (If I use Outlook, I can send
> out to
> > the same address through the same mail server that is failing for
> Rebol.)
> >
> > I have a number of email host addresses that error, yet a lot of
> addresses
> > work properly.
> >
> > This works--
> > >>send [EMAIL PROTECTED] read %test.
> >
> > These _do not work_ ---
> > >>send [EMAIL PROTECTED] read %test
> > >>send [EMAIL PROTECTED] read %test
> >
> > Any ideas?
> >
> >
> > Thanks
> > ---
> > Gary L. Miller  |  filePro
> > The Miller Group|  APPGEN
> > (253) 939-2307  Fax (253) 735-8384  |  SCO
> > [EMAIL PROTECTED]|  Linux
> > http://www.groupmiller.com  |  Win95/98/NT/2000
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
> >
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: [REBOL]

2000-10-25 Thread Vos, Doug

Not only that but

There is already a graphical calendar for rebol/view in the demos.
Someone already wrote it.
Who has the pointer/link to it?

-Original Message-
From: Geoffrey Koplas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 9:35 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: [REBOL]


Just guessing here, jn, but I think he might mean the following issue:


>> thisday: now/date
== 25-Oct-2000
>> otherday: thisday + 5
== 30-Oct-2000
>> print otherday - thisday
5

-- perhaps he's looking for a way to obtain that "otherday - thisday"
results in the date format for October fifth, not the integer 5.

Just guessing on the nature of the original question,

-Geoff

>
> Hi, Sharriff,
>
> [EMAIL PROTECTED] wrote:
> >
> > Hi List!
> >
> > One cannot use the "+" or "-" operators on a Date! value, how does one
> > increase or step through date! values then? I´m trying to construct a
> > graphical calender.
> >
>
> How did you reach that conclusion?
>
> >> thisday: now/date
> == 25-Oct-2000
> >> thisday + 1
> == 26-Oct-2000
> >> thisday - 1
> == 24-Oct-2000
>
> -jn-

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: [REBOL]

2000-10-25 Thread Vos, Doug

I like Erin's ++ and -- function/operators - very cool!

Or the KISS method...
>> now/date + 1
== 26-Oct-2000
>> now/date + 2
== 27-Oct-2000



-Original Message-
From: Erin Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 7:34 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Re: [REBOL]



  I've found the attached REBOL library useful for things like
this. It's overkill if you just want to use it for dates, but
it can be used for a lot of other values.

  Cheerfulness,

--EAT

[EMAIL PROTECTED] wrote:
> 
> Hi List!
> 
> One cannot use the "+" or "-" operators on a Date! value, how does one
> increase or step through date! values then? I´m trying to construct a
> graphical calender.
> 
> Best regards
> 
> Sharriff Aina
> med.iq information & quality in healthcare AG
> 
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.

-- Attached file included as plaintext by Listar --
-- File: word-gradation.r

REBOL [
Title:  "Increment and Decrement (++) and (--) Functions"
File:   %word-gradation.r
Author: "EAT"
Date:   16-Feb-2000
Purpose:{Provide polymorphic ++ and -- gradation functions.}
Usage: {
Increment or decrement the value of a word by using the word
as the argument to ++ or --. 

Examples:

int: 1
probe ++ int

block: [a b c d e f g]
probe ++ block

money: $1.00
++ money

time: 11:11:11
--/skip time (60 * 60) ; hourly decrement
}
Category:   [util 3]
]

increment: func [
"increment a value by one"
val [number! time! date! money! char! tuple! pair! series! port!] 
"value to increment"
/prev "return value before incrementing"
/skip n [number!] "amount to skip per iteration"
][
jump: get bind 'skip 'rebol
if not skip [n: 1]
either any [port? val series? val] [jump val to-integer n][val + n]
]

decrement: func [
"decrement a value by one"
val [number! time! date! money! char! tuple! pair! series! port!] 
"value to decrement"
/prev "return value before decrementing"
/skip n [number!] "amount to skip per iteration"
][
jump: get bind 'skip 'rebol
if not skip [n: 1]
either any [port? val series? val] [jump val negate to-integer n][val -
n]
]

decimal-increment: func [
"increment decimal, money, or time value (default is by one tenth)"
val [decimal! time! money!] "decimal, money, or time value"
/prev "return value before incrementing"
/hundredth "increment by one hundredth"
/thousandth "increment by one thousandth"
][
if hundredth [return val + 0.01]
if thousandth [return val + 0.001]
val + 0.1
]

decimal-decrement: func [
"decrement decimal, money, or time value (default is by one tenth)"
val [decimal! time! money!] "decimal, money, or time value"
/prev "return value before decrementing"
/hundredth "decrement by one hundredth"
/thousandth "decrement by one thousandth"
][
if hundredth [return val - 0.01]
if thousandth [return val - 0.001]
val - 0.1
]

++: func [
"set word referenced by 'word to an incremented value"
'word [word!]
 "supports number! time! date! money! char! tuple! pair! series! port!"
/prev "return value before incrementing"
/skip n [number!] "amount to skip each iteration - rounds n with series"
/tenth "supports decimal! time! money! - ignores /skip"
/hundredth "supports decimal! time! money! - ignores /skip"
/thousandth "supports decimal! time! money! - ignores /skip"
/local v
] [
if not any [
if tenth [set word decimal-increment v: get word]
if hundredth [set word decimal-increment/hundredth v: get word]
if thousandth [set word decimal-increment/thousandth v: get word]
] [
set word either skip [
increment/skip v: get word n][increment v: get word]
]
either prev [return v] [return get word]
]

--: func [
"set word referenced by 'word to a decremented value"
'word [word!]
"supports number! time! date! money! char! tuple! pair! series! port!"
/prev "return value before decrementing"
/skip n [number!] "about to skip each iteration - rounds n with series"
/tenth "supports decimal! time! - ignores /skip"
/hundredth "supports decimal! time! - ignores /skip"
/thousandth "supports decimal! time! - ignores /skip"
/local v
] [
if not any [
if tenth [set word decimal-decrement v: get word]
if hundredth [set word decimal-decrement/hundredth v: get word]
if thousandth [set word decimal-decrement/thousandth v: get word]
] [
set word either skip [
decrement/skip v: get word n][decrement v: get word]
]
either prev [return v] [return get word]
]



-- 
To unsubscribe from this