[REBOL] Is there a rebol email client app yet? Re:

2000-08-19 Thread pa . russo

>I thought there was a Rebol email client app project underway. I was
>wondering if anyone knows if it has produced something.
>
>Brett.
>
>--
>>>  my-rebol-stuff
>== http://www.zipworld.com.au/~bhandley/rebol

We're just at the beginning of the development cycle... and yet have 
to organize our cohordinate efforts. There's plenty of space, 
anyway...

Today or tomorrow, I'll post a very preliminar sketch/proposal of 
user interface, based on Carl's drafts.
If you are curious, you can join the mailing list (Rebmail) at www.egroups.com.
-- 
Paolo Russo
[EMAIL PROTECTED]
_
PERD s.r.l.
Virtual Technologies for Real Solutions
http://www.perd.com




[REBOL] Find/any doesn't seem to find strings in blocks.. Re:(2)

2000-08-19 Thread rebol

Hi etcha,


>> help find
[...]
 /any -- Enables the * and ? wildcards.  
[...]

Case 1:
>> string: "xdefgjkljyjkljweruiouz"
>> find/any string "y*z"
== "yjkljweruiouz"

Case 2:
>> block-with-string: reduce [string]
== ["xdefgjkljyjkljweruiouz"]
>> find/any block-with-string "y*z"
== none

Should find's behavior be the same in both cases? 

At 12:00 PM 8/20/00 +1000, you wrote:
>whats wrong with:
>
>>> blah: "my-string"
>== "my-string"
>>> blah: parse blah "-"
>== ["my" "string"]
>>> if find blah "my" [print ["yes"]]
>yes
>>>
>
>its not what you want, but you cant search the string for something thats
>not there,
>eg "my*" :)
>
>etcha
>
>-Original Message-
>From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Sunday, August 20, 2000 11:42 AM
>Subject: [REBOL] Find/any doesn't seem to find strings in blocks..
>
>
>>I would have expected this to work. Am I missing something?
>>
>>>> find/any ["my-string"] "my*"
>>== none
>>
>>Brett.
>>
>>--
 my-rebol-stuff
>>== http://www.zipworld.com.au/~bhandley/rebol
>>
>
>
>

;- Elan [ : - ) ]
author of REBOL: THE OFFICIAL GUIDE
REBOL Press: The Official Source for REBOL Books
http://www.REBOLpress.com
visit me at http://www.TechScribe.com





[REBOL] Enhancement Request - Range! datatype Re:(2)

2000-08-19 Thread dynalt

>I like the range idea but would suggest the use of a different operator
than
 > '-' - possibly ',,' which is used in several other languages?

 I really meant '..' rather then ',,'.
Sorry.

Thanks,

Garold (Gary) L. Johnson
DYNAMIC Alternatives
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 19, 2000 2:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [REBOL] Enhancement Request - Range! datatype

Currently there's a XY datatype in Rebol/View. Eg: 100x123 for 100 X, 123 Y.

It would be nice to have a range, describing two endpoints. For example,
Dates:
12/Jan/2000-24/Dec/2000
Integers:
1-10
Time:
09:00-17:00
Money:
$10.00-$56.00

These would have refinements like:
/Start or /Begin
/End or /Finish
/First
/Last
to access the first or last part of the range.

'first on:
12/Jan/2000-24/Dec/2000
like:
first 12/Jan/2000-24/Dec/2000
would produce:
12/Jan/2000
and 'last on
12/Jan/2000-24/Dec/2000
like:
last 12/Jan/2000-24/Dec/2000
would produce:
24/Dec/2000

Operations like:
if now in 12/Jan/2000-24/Dec/2000 [print "mostly in this year!]
would be nice as well.

This has been CC-ed to [EMAIL PROTECTED]

Any comments?

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




[REBOL] Find/any doesn't seem to find strings in blocks.. Re:

2000-08-19 Thread etcha

whats wrong with:

>> blah: "my-string"
== "my-string"
>> blah: parse blah "-"
== ["my" "string"]
>> if find blah "my" [print ["yes"]]
yes
>>

its not what you want, but you cant search the string for something thats
not there,
eg "my*" :)

etcha

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Sunday, August 20, 2000 11:42 AM
Subject: [REBOL] Find/any doesn't seem to find strings in blocks..


>I would have expected this to work. Am I missing something?
>
>>> find/any ["my-string"] "my*"
>== none
>
>Brett.
>
>--
>>> my-rebol-stuff
>== http://www.zipworld.com.au/~bhandley/rebol
>




[REBOL] A novice question Re:

2000-08-19 Thread bhandley

Hi Vik,

Did you retry your program in a fresh session of Rebol? It may have been
that during your writing/testing of your program you got to a point that
triggered the Rebol GC bug (which I understand is being looked at by RT).

Regarding the keywords are they tags or text? This might change the
approach. If say your keywords are part of the text, are immediately before
and after your job posting information, and are unique enough, then you
could just ignore the tags completely and parse based on your keywords.
Something like this maybe:

parse-rules: [
some [
thru keyword-one-text
copy text
to keyword-two-text
(print text)
]

Also, it may not be relevant, but note that the parse function as used in
script examples ignores spaces by default (use parse/all if you want parse
to process spaces).

On a different track, Rebol version 2.3 has the ability to load markup. Like
this,

>> loaded-page: load/markup http://www.abc.net.au/news

loaded-page is now a block that contains values of type tag! and type
string!.

foreach item loaded-page [ if not tag? item [ print item ] ]

or use parse in block mode rules

abc-news-headlines: [
thru 
some [ thru  copy text to  (print text)]

to end
]

>> parse loaded-page abc-news-headlines
Supply ship approaches rescue site as hopes fade
Muslim extremists collapse hostage release talks
Monsoon bus tragedy in central India
US bushfires not letting up
Gore pulls ahead in US presidential poll
Man falls overboard in crocodile-infested waters
Fighting couple force jumbo jet to land
Sport news

This is good if you know exactly what the value of some items in the block
are, but not sood good if you need to do pattern matching. For example
finding the title text is easy because we know a tag  exists in the b
lock.

>> copy/part find/tail loaded-page  1
== ["ABC Online News - Latest Bulletin"]

Brett.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 20, 2000 8:27 AM
Subject: [REBOL] A novice question


> I was trying to modify the web parser code from the
> User's Guide. The original code is like this:
> tag-parser: make object! [
> tags: make block! 100
> text: make string! 8000
>  html-code: [
>  copy tag ["<" thru ">"] (append tags tag) |
>  copy txt to "<" (append text txt)
>  ]
>  parse-tags: func [site[url!]] [
>   clear tags clear text
>   parse read site [to "<" some html-code]
>   print text
>  ]
> ]
> My aim is to pick up listings from the web site to
> pick up jobs which begin with "keyword_one" and end
> with "keyword_two", but I would still like to get rid
> of the tags. So I tried this
> html-code:

> copy tag ["<" thru "keyword1"] (append tags tag) |
> copy txt to "keyword2" (append text txt)
> ]
> etc.. and then use tag-parser/parse-tags modified-url.
> But this now hangs.
> Any help welcomed by this novice.
> -Vik
>
> __
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>




[REBOL] Enhancement Request - Range! datatype Re:

2000-08-19 Thread dynalt

I like the range idea but would suggest the use of a different operator than
'-' - possibly ',,' which is used in several other languages?


Thanks,

Garold (Gary) L. Johnson
DYNAMIC Alternatives
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 19, 2000 2:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [REBOL] Enhancement Request - Range! datatype

Currently there's a XY datatype in Rebol/View. Eg: 100x123 for 100 X, 123 Y.

It would be nice to have a range, describing two endpoints. For example,
Dates:
12/Jan/2000-24/Dec/2000
Integers:
1-10
Time:
09:00-17:00
Money:
$10.00-$56.00

These would have refinements like:
/Start or /Begin
/End or /Finish
/First
/Last
to access the first or last part of the range.

'first on:
12/Jan/2000-24/Dec/2000
like:
first 12/Jan/2000-24/Dec/2000
would produce:
12/Jan/2000
and 'last on
12/Jan/2000-24/Dec/2000
like:
last 12/Jan/2000-24/Dec/2000
would produce:
24/Dec/2000

Operations like:
if now in 12/Jan/2000-24/Dec/2000 [print "mostly in this year!]
would be nice as well.

This has been CC-ed to [EMAIL PROTECTED]

Any comments?

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




[REBOL] Find/any doesn't seem to find strings in blocks..

2000-08-19 Thread bhandley

I would have expected this to work. Am I missing something?

>> find/any ["my-string"] "my*"
== none

Brett.

--
>> my-rebol-stuff
== http://www.zipworld.com.au/~bhandley/rebol




[REBOL] What does Circular forwarding Detected mean?

2000-08-19 Thread vkmodgil

Wondering what is happening here. Tried the read line
of the Raging-bull script.
read
http://www.ragingbull.altavista.com/mboard/boards.cg
i?board=AMZN&read=1
Error.  Target url:
http://www.ragingbull.altavista.com/mboard/boards.cg
i?board=AMZN&read=1 could not be retrieved.  Circular
forwarding detecte
d.
** Where: read
http://www.ragingbull.com/mboard/boards.cgi?board=AMZN&re
ad=1

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




[REBOL] A novice question

2000-08-19 Thread vkmodgil

I was trying to modify the web parser code from the
User's Guide. The original code is like this:
tag-parser: make object! [
tags: make block! 100
text: make string! 8000
 html-code: [
 copy tag ["<" thru ">"] (append tags tag) |
 copy txt to "<" (append text txt)
 ]
 parse-tags: func [site[url!]] [
  clear tags clear text
  parse read site [to "<" some html-code]
  print text
 ]
]
My aim is to pick up listings from the web site to
pick up jobs which begin with "keyword_one" and end
with "keyword_two", but I would still like to get rid
of the tags. So I tried this
html-code: [ 
copy tag ["<" thru "keyword1"] (append tags tag) |
copy txt to "keyword2" (append text txt)
]
etc.. and then use tag-parser/parse-tags modified-url.
But this now hangs. 
Any help welcomed by this novice.
-Vik

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




[REBOL] Enhancement Request - Range! datatype

2000-08-19 Thread Al . Bri

Currently there's a XY datatype in Rebol/View. Eg: 100x123 for 100 X, 123 Y.

It would be nice to have a range, describing two endpoints. For example,
Dates:
12/Jan/2000-24/Dec/2000
Integers:
1-10
Time:
09:00-17:00
Money:
$10.00-$56.00

These would have refinements like:
/Start or /Begin
/End or /Finish
/First
/Last
to access the first or last part of the range.

'first on:
12/Jan/2000-24/Dec/2000
like:
first 12/Jan/2000-24/Dec/2000
would produce:
12/Jan/2000
and 'last on
12/Jan/2000-24/Dec/2000
like:
last 12/Jan/2000-24/Dec/2000
would produce:
24/Dec/2000

Operations like:
if now in 12/Jan/2000-24/Dec/2000 [print "mostly in this year!]
would be nice as well.

This has been CC-ed to [EMAIL PROTECTED]

Any comments?

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




[REBOL] finding, adding string. Re:

2000-08-19 Thread Al . Bri

balayo wrote:
> I would like to add a meta tag just under "" to a directory full of
html files, via ftp. I'm struggling a little...can some kind soul help me
out?

>> MyDirectory: copy Original
== {


My Directory


My Directory
Blah blah


}
>> parse MyDirectory [
thru "" AfterHead: (insert AfterHead "^/") to end
]
== true
>> MyDirectory
== {



My Directory


My Directory
Blah blah


}

I hope that helps!

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




[REBOL] spaces in file names Re:

2000-08-19 Thread brian . hawley

[EMAIL PROTECTED] wrote:
>   I know you have to enclose file names with spaces within brackets.
>   %"/c/test/test test.txt"
>
>   But how do you manage file names with spaces in URLs.
>   For example,
>
>   ftp://usr:[EMAIL PROTECTED]/test/test test.txt

ftp://usr:[EMAIL PROTECTED]/test/test%20test.txt

Brian Hawley




[REBOL] spaces in file names Re:

2000-08-19 Thread ralph


>  Hi,
>
>  I know you have to enclose file names with spaces within brackets.
>  %"/c/test/test test.txt"
>
>  But how do you manage file names with spaces in URLs.
>  For example,
>
>  ftp://usr:[EMAIL PROTECTED]/test/test test.txt
>
>   Thanks a lot
>-- 
>Fantam
>

escape the spaces out with a '%20' such as:

ftp://usr:[EMAIL PROTECTED]/test/test%20test.txt



--Ralph Roberts




[REBOL] spaces in file names Re:

2000-08-19 Thread Al . Bri

Fantam wrote:
> But how do you manage file names with spaces in URLs?

>> type? ftp://usr:[EMAIL PROTECTED]/test/test%20test.txt
== url!

>> to url! join ftp://usr:[EMAIL PROTECTED]/ %"test/test test.txt"
== ftp://usr:[EMAIL PROTECTED]/test/test%20test.txt

I hope that helps!

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




[REBOL] spaces in file names

2000-08-19 Thread Fantam

  Hi,

  I know you have to enclose file names with spaces within brackets.
  %"/c/test/test test.txt"

  But how do you manage file names with spaces in URLs.
  For example,

  ftp://usr:[EMAIL PROTECTED]/test/test test.txt

   Thanks a lot
-- 
Fantam





[REBOL] context of a function Re:(2)

2000-08-19 Thread agem



hey, thats tips! funally i can dump my functions after error!
Thanks, Elan!
.. ugly addings by me :)

[REBOL [
title: "a func with dumpable context :)"
author: "Elan, Volker"
purpose: {

[dump-func a-func] will source & dump locals, if defined
with debug-func (alias Elan's cfunc). you can set
func: :debug-func because there is a original-func
set too.

}
version: 0.0.0.4
file: %/home/volker/w/rebol/dump-func.r
date: 19-Aug-2000/13:32:44+1:00
]

if not value? 'original-func [original-func: :func]

dump-func: func ['f1] [
do compose [source (f1)]
f1: get f1
locals: copy first :f1
bind locals first second :f1
? locals
forall locals [if word? first locals [
probe first locals probe get first locals]]
]

[ ;Elan, bit modified
]
debug-func: func [spec body /local found] [
  either found? found: find/tail spec /local [
insert found [function-self]
  ][
insert tail spec [/local function-self]
  ]
  insert body [function-self]
  make function! spec body
]

print "---"
f1: debug-func [a b] []
f1 "the a" "the b"
dump-func f1

f2: debug-func [/local a /opt b] [a: "in f2"]
f2
dump-func f2


[; or use func allways, but
func: :debug-func
func: :original-func
]

()]


--- [EMAIL PROTECTED] wrote on 18-Aug-2000/12:55:03-7:00

> Hi Frank,
> 
> 1. The Problem:
> To associate the word a with the context of the f function's body, you
> would have to use bind. The bind function requires a sample word that is
> boudn to the target as its second argument. Because your body block of the
> function is empty, there is no sample word, and therefore there is nothing
> to bind to.
> 
> 2. The Solution:
> 1. If REBOL Technologies added the following ability to the fourth
> function, the problem would be solved: 
> 
> a) Like an object has a default word self defined, which is the object
> itself, there should be a default word self defined for a function, and
> that word self should be a sample word for the function's context.
> b) If fourth receives a function argument, it should return the default
> word self that is defined for the function's context.
> c) We don't need to worry about people defining a local word self for the
> function, since that word self can take over the rule of the default word
> self. The fourth function will return the user defined word self instead of
> the default word self, and that word is just as much sample word for the
> local context of the function, as the default word self is.
> d) A problem arises if the function is intended to manipulate a  global
> word self, since the default local word self will hide the global version
> of self. I haven't seen anyone complain about not being able to use a
> global word self from within the context of an object, and therefore I
> doubt that anyone will complain, if the same is true for a function.
> 
> e) Another solution would be to provide a default refinement /self for
> every function that returns a sample word for the function's context.
> 
> 3. An immediate solution
> We can use this approach to implement our own solution. We define a cfunc
> function, which emulates the func function and adds a /local word self like
> this:
> 
> cfunc: func [spec body /local found] [
>   either found? found: find/tail spec /local [
> insert found self
>   ][
> insert tail spec [/local self]
>   ]
>   insert body [self]
>   throw-on-error [make function! spec body]
> ]
> 
> Now we can create f as a cfunc:
> 
> >> f: cfunc [a] []
> >> insert tail second :f compose [print (bind 'a first second :f)]
> == []
> >> f 3
> 3
> 
> Hope this helps,
> 
> At 06:31 PM 8/18/00 +0200, you wrote:
> >Hi!
> >
> >Is there a way to get the words of the context of a function?
> >
> >Example:
> >   f: func [a] []
> >   g: func [a] [print a]
> >
> >Does anyone know a way to change function f AFTER its definition in that
> >way, that it will work like function g?
> >
> >The following does not work:
> >  insert second :f reduce ['print first first :f]
> >
> >Because the first (and third) of a function is not bound to the functions
> >context.
> >
> >I think there is no direct way to get the word with binding, I could only
> >get the words out of functions body :(
> >
> >I am working at a serialize script, which also serializes contexts etc.
> >
> >CU,
> >Frank
> >
> >
> >
> 
> ;- Elan [ : - ) ]
> author of REBOL: THE OFFICIAL GUIDE
> REBOL Press: The Official Source for REBOL Books
> http://www.REBOLpress.com
> visit me at http://www.TechScribe.com
> 
> 
> 
> 




[REBOL] finding, adding string.

2000-08-19 Thread balayo

Hey guys,

I would like to add a meta tag just under "" to a directory full of html files, 
via ftp.
I'm struggling a little...can some kind soul help me out?

thanks!




[REBOL] Re: Is there a rebol email client app yet?

2000-08-19 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 19-Ago-00, you wrote:

 b> I thought there was a Rebol email client app project underway.
 b> I was wondering if anyone knows if it has produced something.

Not yet. (We're waiting for Carl, actually, but perhaps we should
try implementing Carl's ideas by ourselves, since he has something
better to do at the moment.)

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




[REBOL] Re: Sherman Re:(2)

2000-08-19 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 18-Ago-00, you wrote:

 c> So once existed a REBOL compiler. This is good to know.

 c> Who knows at this very moment someone has a new version "on
 c> the oven"?

It's unlikely. REBOL 1.0 was very close to Scheme, and Sherman is
a REBOL to Scheme compiler, written in Scheme. It has some
limitations with respect to the interpeted REBOL 1.0, too.

REBOL 2.0 is very different, and is probably more difficult to
translate to Scheme (mainly because it's more powerful :). This
doesn't mean that a translator for a subset of REBOL isn't
possible, but IMHO it wouldn't be very useful. (Not that I am an
expert of Scheme, but I assume compiled Scheme has its
limitations, too.)

I'd more likely create a new compiled language, if that's really
needed.

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




[REBOL] Official guide in the UK

2000-08-19 Thread Sanghabum

Some asked last week where to get the Official Guide in the UK

I found a copy in my local Waterstone's bookshop, sandwiched between Perl and 
Rexx, which is about right when you think about it.  Price was GBP25.99.

Colin.




[REBOL] Is there a rebol email client app yet?

2000-08-19 Thread bhandley

I thought there was a Rebol email client app project underway. I was
wondering if anyone knows if it has produced something.

Brett.

--
>> my-rebol-stuff
== http://www.zipworld.com.au/~bhandley/rebol




[REBOL] error when processing multiple web pages!! Re:(2)

2000-08-19 Thread Al . Bri

> >  if exists? join http:// [url] [
> 
> Don't need '[ and '] around 'url.

And this is better:

if exists? url [

> > print ["@" "fut trouver sur" url]
> > newline
> > print " "
> 
> Above is better as:
> print ["@" "fut trouver sur" url newline

And, of course, don't forget the '] at the end, as I did. :-)

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




[REBOL] error when processing multiple web pages!! Re:

2000-08-19 Thread Al . Bri

akhar wrote:
> REBOL [
> Title:   "e-mail finder"
> Date:13-May-2000
> Author:  "Stephane Jolicoeur"
> File:%octo.r
> Email:   [EMAIL PROTECTED]
> Purpose: {
> To find urls within a file!!!
> }
> Comments: {
> do not use for SPAM
> }
> ]
> urls: make block!

Need a integer size after 'block!.

> text: make string! 0
> html-code: [
>  thru "http://" copy url to newline (append urls url) |
>  copy txt to "http:" (append text txt)
> ]
> page: read %urls.txt
> parse page [to "http://" some html-code]
> foreach url urls

Need a '[ after 'urls, as you're repeating the below code for each URL.

Have the line:
url: join http:// url
as it simplifies code.

>  if exists? join http:// [url] [

Don't need '[ and '] around 'url.

>   as: read join http:// [url]

Better as:
as: read url

>;print url
>if find as "@" [

Above is better as:
either find as "@" [
BTW are you looking for URLs or email addresses in the page?

> print ["@" "fut trouver sur" url]
> newline
> print " "

Above is better as:
print ["@" "fut trouver sur" url newline

>] print "cannot find it"

Above is better as:
] [print "cannot find it"]; Other branch of 'either.

>   clear as

No need for above line

>   ][print ["je ne peux acceder ce site:" url]]

I'm fairly sure this line isn't needed.

> ];

No need for semi-colon in above line.

> as: ask "done??"

This line should be moved above the '[ above.

Fix these problems and your problem should be solved for all sites that
don't require cookies, or that don't require specific browsers.

I hope that helps! Good luck.

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