[REBOL] does REBOL run on Palm or not? Re:(6)

2000-09-11 Thread tbrownell

to-money random 100

TBrownell

--- [EMAIL PROTECTED] wrote:
> 
> 
>   Howdy, Ryan:
> 
> > > Under 20 ? I wish... Try 5 :-)
> > 
> > You all deserve a raise.
> 
>GRIN.
> 
>to-money make hash! []
> 
>-jeff
> 


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




[REBOL] Simple question regarding finding a replacing text between tags...

2000-09-11 Thread tbrownell

Ok, here goes...

some-html: "... some html with a  set of tags
 and some trailing text..."

Q. How can I find and replace the text between the
tags, while leaving the tags intact, so it ends up
like this...
some-html: "... some html with a  replaced text
 and some trailing text..."
?

Parsed seemed like the way to go, but ?

Replace seemed a bit clunky and added tag brackets
where they shouldn't be... just seems like the wrong
approach.

Thanks,

TBrownell


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




[REBOL] Rebol Tech, please answer. Two questions. Re:(5)

2000-09-11 Thread rishi

shoot. just realized that another reason for the comment like that is because:

(;) looks like a person winking (sideways). you usually wink when you have a secret. 
Code behind a
wink is secret to the interpreter!

cool.

my block theory still stands though...

(I'm sure all you rebol pioneers know all this stuff...)

Rishi



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 8:42 PM
Subject: [REBOL] Rebol Tech, please answer. Two questions. Re:(4)


> >Here's two of those kinds of questions I
> >   know the "answer" to, but let's see if any one else has some
> >   ideas:
> >
> >   Why is semicolon (;) the REBOL comment character?
> >   Why are square brackets ([]) used for REBOL blocks?
> >   What do the above reasons have in common?
>
> Oooh a quiz!!
>
> No idea..But from a usability point of view, is it just a coincedence that
> these chosen REBOL keys are all together for easy use of the right hand?
> Only need a few keys to do most things on a REBOL keyboard
> ; ' []
> shifted provides us with :"{}
>
> all datatypes! are grouped along the top of the keyboard with the maths
> operators too.
>
> (But this doesn't hold true for all non US keyboard layouts though does it?)
>
> Cheers,
>
> Allen K
>
> I'm left handed and this layout seems natural to me, is it the same for
> right handers?.
>
>




[REBOL] Rebol Tech, please answer. Two questions. Re:(5)

2000-09-11 Thread rishi

well...

I think the ";" is used as a comment so people who are comfortable with languages like 
java, c, C++,
etc can still end statments with a semi-colon if they want to. the rebol interpreter 
will just
ignore it.

ei.

print "hello";
ask "how do you do";

as for the brackets...[]... well when together, they look like blocks...don't they

take a look below


--[]
-[][]
[][][]

it looks like i stacked blocks on top of each other. My guess is carl chose [ and ] 
for blocks
because it looks like a block when put together...

Rishi
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 8:42 PM
Subject: [REBOL] Rebol Tech, please answer. Two questions. Re:(4)


> >Here's two of those kinds of questions I
> >   know the "answer" to, but let's see if any one else has some
> >   ideas:
> >
> >   Why is semicolon (;) the REBOL comment character?
> >   Why are square brackets ([]) used for REBOL blocks?
> >   What do the above reasons have in common?
>
> Oooh a quiz!!
>
> No idea..But from a usability point of view, is it just a coincedence that
> these chosen REBOL keys are all together for easy use of the right hand?
> Only need a few keys to do most things on a REBOL keyboard
> ; ' []
> shifted provides us with :"{}
>
> all datatypes! are grouped along the top of the keyboard with the maths
> operators too.
>
> (But this doesn't hold true for all non US keyboard layouts though does it?)
>
> Cheers,
>
> Allen K
>
> I'm left handed and this layout seems natural to me, is it the same for
> right handers?.
>
>




[REBOL] Rebol Tech, please answer. Two questions. Re:

2000-09-11 Thread bobr

both of these topics have been seen before. one of them recently.


At 07:53 PM 9/11/00 -0400, [EMAIL PROTECTED] wrote:


>The only thing is that
>I don't know of a way to add refinements to objects dynamically.
 
here is its X-selma number:  345023   
 aka http://rebol.org/userlist/archive/345/023.html



>Always
>creating a new object from the old one when I want to add a refinement
>doesn't appeal to me.

it bugs me too,
further it makes incorporation of that object into 
some other(s) a chore to track
if it is linked in multiple places.

does anyone have an elegant/quick way
to see who refers to an object? 
(IE who else has an == link to the same self' value?)



>P.S. One of the things that could go in a Rebol FAQ in a section entitled
>"For People Coming From Other Languages" could be questions like the ones
>I've asked above. X-selma number:   81447   with respect to folks (like
me) coming from other languages.
akahttp://rebol.org/userlist/archive/81/447.html


 
>I could imagine a question like: "I come from a Perl
>background. I'm used to using hashes for everything. What do I do in Rebol?"


I want to invite you to start such a thread.
I have a personal filter set to
look for messages that have "How do I" in the
subject line so you will definately get my attention with those.
[and likely my 2cents too]


;# mailto: [EMAIL PROTECTED]




[REBOL] Rebol Tech, please answer. Two questions. Re:(4)

2000-09-11 Thread allen

>Here's two of those kinds of questions I
>   know the "answer" to, but let's see if any one else has some
>   ideas:
>
>   Why is semicolon (;) the REBOL comment character?
>   Why are square brackets ([]) used for REBOL blocks?
>   What do the above reasons have in common?

Oooh a quiz!!

No idea..But from a usability point of view, is it just a coincedence that
these chosen REBOL keys are all together for easy use of the right hand?
Only need a few keys to do most things on a REBOL keyboard
; ' []
shifted provides us with :"{}

all datatypes! are grouped along the top of the keyboard with the maths
operators too.

(But this doesn't hold true for all non US keyboard layouts though does it?)

Cheers,

Allen K

I'm left handed and this layout seems natural to me, is it the same for
right handers?.





[REBOL] rebol weak points (i think) Re:(3)

2000-09-11 Thread brian . hawley

[EMAIL PROTECTED] wrote:
>no. The Math/Pie you have created is an instance variable not a static
>variable. It is associated with an instance of the class, not the class
>itself. A static variable means that there is a single copy of this variable
>associated with class itself. You do not need to instantiate a class to use
>static variable.

You have it backwards. REBOL doesn't have classes. OOP in REBOL is
prototype/delegation based, like Self, NewtonScript or JavaScript -
not class-based like C++, Smalltalk or Java.

Objects in REBOL are all unique. Their behavior is defined within
themselves using static variables, rather than through their class.
They are created from prototypes, not classes. Constructors are just
functions. You don't inherit the features of a class, you call them
directly - this is known as delegation. All fields are static - any
"instance" objects you create call the "class" objects directly.

This style of object-oriented programming, used properly, can be more
efficient than class-based programming. If you really need classes
they're a simple design pattern away.

>For example:
>
>make-circle: make func [
> radius
> /local blah-blah-blah
> /static num_circles  ;let's say this is how you create static var.
>] [
> num_circles: num_circles + 1 ;this may not be correct but you get the
>idea...
> return make object! [
> ;object code goes here
> ]
>]

There are techniques for making persistent values in functions -
most of them are arcane (but fun). Functions don't have static
variables as such but you can embed structured data in the code
of the function.

Most of the time it's better to use objects. Try this:

circle-class: make object! [
 num-circles: 0
 new: func [value [number!]] [
 num-circles: num-circles + 1
 make object! compose [
 class: (self)
 radius: value
 num-circles: func [] [class/num-circles]
 ]
 ]
]

(skipped a little...)

>The main disadvantage of having static variables is that perhaps it is an
>unnecessary complication. But I don't think so. Maybe because I come from
>java/javascript background. I'm still wondering though if there is a way to
>have static variables that I don't know.

It's interesting that you mention Java and JavaScript in the same
sentence here. Java is class-based like C++. JavaScript is more
like REBOL - all variables are static, constructor functions,
class factory objects instead of classes. The object model of
JavaScript has been traditionally confusing for those who think
OOP is only class-based...

>Regardless, the main problem that I wonder about is if rebol is suited for
>modular programming where people reuse other people's functions/code. Since
>everything is either global or local, it seems as though it would be
>unnatural to use rebol in this way. Java has packages and stuff...

Coming from a background of Oberon, Delphi and such (among many
others) I'd have to agree. Fortunately RT has listened :)

Look at this: http://www.rebol.com/reps/rep002.html

It's a little outdated - many changes have purportedly been made
already but they haven't been codified yet. I gather security
support will be much improved. Still, it's a taste of things to
come. I'm looking forward to it :)

>Perhaps I am not thinking straight and have too much java in my
>blood (which I have been doing to much of lately and finally got
>sick of all the abstractions that got in the way of doing simple
>stuff!!)

Tell me about it :(

I'm having the opposite problem. I just got put on a project that
is being done with ColdFusion, a web template language like ASP. I
can't go 5 minutes without running into some limitation that would
be trivial to overcome with REBOL. Maybe I can do the next round
with REBOL/Serve when it comes out...

Brian




[REBOL] Rebol Tech, please answer. Two questions. Re:(3)

2000-09-11 Thread jeff



   Howdy, Kevin:

  (REBOL also uses international date standards.)

> The  language  was   obviously   designed with this   as  a
> conscious  choice.  I'm dying  to  know what  the reasoning
> was. 

  That's a Q. only Carl can really A.  He's been figuring out
  how REBOL should work for more than a decade and a half, so
  that question is pretty deep in the philosophy.  What you
  say about deliberateness is true about most (but not all)
  things in REBOL.  Here's two of those kinds of questions I
  know the "answer" to, but let's see if any one else has some
  ideas:

  Why is semicolon (;) the REBOL comment character? 
  Why are square brackets ([]) used for REBOL blocks?
  What do the above reasons have in common?

> Could it be  possible that this  way is more natural  to me
> only because I'm a native English speaker?

  Holger would probably do [answer :your-question 'yes]

:-) 

-jeff




[REBOL] Rebol Tech, please answer. Two questions. Re:

2000-09-11 Thread allen

Hi Keith,

If you want an answer from RT, you can send your question to feedback.
do http://www.rebol.com/feedback.r
And choose (2) General Question.

But in terms of skip. this may help.
To quote Jeff
"The typical REBOL parameter arrangement is that which is operated
on followed by the things to operate on it with."

Once you are used to recognising this pattern, you may find that nested
skips are easy enough to read and use, as they are.

Cheers,

Allen K


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 12, 2000 9:53 AM
Subject: [REBOL] Rebol Tech, please answer. Two questions.


> Hey list, sorry to be annoying. I've asked these two questions before, but
> I've never really gotten an answer to them, and they're bugging me!
>
> 1. I'll just give an example.
>
> blk: [11 22 33 44 55]
> print skip blk 3
> 44 55
>
> Why not (print skip 3 blk) instead of (print skip blk 3)? What I'm getting
> at is that it seems like it would be easier to chain these things together
> if the arguments were in a different order (block last). For instance:
>
> >> blk: [1 2 3 4 5 6 7]
> == [1 2 3 4 5 6 7]
> >> elem: skip skip blk 2 3
> == [6 7]
>
> If you want to do nested skips, the 'skips keep piling up in the front and
> the numbers of elements to skip keep on piling up in the back. It seems
more
> natural to me for it to be:
>
> >> blk: [1 2 3 4 5 6 7]
> == [1 2 3 4 5 6 7]
> >> elem: skip 2 skip 3 blk
> == [6 7]
>
> Can any of the Rebol Tech guys explain why they made it this way? You guys
> must have thought of this, and I'd be really interested to hear why you
> chose against it. Plse let me know!
>
> 2. The lack of associative arrays in Rebol has bugged me from the
beginning.
> Last time I e-mailed the list about it I got suggestions for emulating
them
> with blocks. Last night I thought that I could just use objects to do what
I
> want. obj/index is just as good to me as obj{index}. The only thing is
that
> I don't know of a way to add refinements to objects dynamically. Always
> creating a new object from the old one when I want to add a refinement
> doesn't appeal to me. I know RT must have made a conscious decision not to
> include associative arrays in the language, I'm just wondering why. Blocks
> supercede their functionality, etc. Please let me know. I'd be really
> interested to hear the reasoning behind this.
>
> Thank you very very much.
>
> Keith
>
> P.S. One of the things that could go in a Rebol FAQ in a section entitled
> "For People Coming From Other Languages" could be questions like the ones
> I've asked above. I could imagine a question like: "I come from a Perl
> background. I'm used to using hashes for everything. What do I do in
Rebol?"
>
>
>




[REBOL] Direct! Re: FUDGE: Software for Testing Mechanics

2000-09-11 Thread Al . Bri

Hi, Jennifer, you wrote:
> Tell me more (off list is probably best) about Rebol.

This is quoted from Rebol - The Official Guide ISBN 0-07-212279-X, Page 4:
Rebol is a deceptively simple, user-friendly, effective and tremendously
powerful interactive scripting and programming language. It enables the
occasional scripter or professional programmer to rapidly create
Internet-oriented CGI scripts or small utilities with a minimum of overhead
and without being weighed down by formalisms or cryptic notations. ... Due
to its English-like vocabulary, Rebol is very well suited as a first
programming language for novices. Rebol is a very powerful tool that can be
learned quickly.
Seasoned programmers will find that Rebol also provides a collection of
useful advanced language features, such as a built-in BNF parser (BNF stands
for Backus-Naur Form, a notation used to express certain types of language
grammars), objects, and port access, that permit implementation of complex
and sophisticated programs. Self-documenting functions, optional type
enforcement in function interfaces, flexible and refined support for
high-level data structures (including lists, hashes, objects and contexts)
and Rebol's capability to support "small languages" or dialects provide the
foundation for sophisticated applications.

Here's how to send an email in Rebol:
send [EMAIL PROTECTED] "Hello friend"
Here's how to save data to a file:
save %friend.dat "Hello friend"
Here's how to read a web page:
read http://www.rebol.com

I hope that helps! If not, just let me know.

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




[REBOL] Rebol Tech, please answer. Two questions. Re:(2)

2000-09-11 Thread rebol

It's funny, I thought of writing functions like that too. The only thing is,
as you very appropriately point out, Rebol is very consistent in this. It's
not only 'skip that this applies to, but 'pick, 'select, 'find, etc. As far
as I know, every function that deals with a series, extending to words like
'insert and 'append, takes the series first, and then the modifier (whether
it's an index to return, something to append or insert, a value to select
on, a value to find, you get the idea).

The language was obviously designed with this as a conscious choice. I'm
dying to know what the reasoning was. Personally, and especially in light of
Rebol's desire to be similar to a natural language, I think it feels much
more natural to put the series last.

For examples:

English version:
append a value to a series:

Rebol version:
append 'value 'series

English version:
insert a value into a series:

Rebol version:
insert 'value 'series

English version:
find a value in a series

Rebol version:
find 'value 'series

and on and on.

Could it be possible that this way is more natural to me only because I'm a
native English speaker?

Keith

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 11, 2000 9:12 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Rebol Tech, please answer. Two questions. Re:
>
>
> Keith wrote:
> > Why not (print skip 3 blk) instead of (print skip blk 3)?
>
> Here's a 'skp function that does this as an alternative to 'skip.
>
> >> skp: func [
> [{Returns the series forward or backward from the current position.}
> [offset [number!] "Can be positive, negative, or zero."
> [series [series! port!]
> [][
> [skip series offset
> []
> >> blk: [1 2 3 4 5 6 7]
> == [1 2 3 4 5 6 7]
> >> elem: skp 2 skp 3 blk
> == [6 7]
>
> As for why it's like this, if you compare it to 'pick:
> pick blk 4
> it's very similar to:
> skip blk 4
> So I suggest that it seemed natural to continue it with 'skip?
>
> Andrew Martin
> ICQ: 26227169
> http://members.ncbi.com/AndrewMartin/
> http://members.xoom.com/AndrewMartin/
> -><-
>




[REBOL] SMTP and custom header not correct... Re:

2000-09-11 Thread Al . Bri

Jeff Rubin wrote:
> this is a snippet of code from the user manual online:
>
> send/header [EMAIL PROTECTED] "message." make
> system/standard/email [
> FROM: [EMAIL PROTECTED]
> subject: "This is my unique subject line."
> ]
>
> according to this you can specify the fields when sending out an email
thru Rebol but I get errors from this code
>
> Script Error: send expected header-obj argument of type: object.
>
> tried some other variations and none work

REBOL/View 0.10.31.3.1 6-Sep-2000
Copyright 2000 REBOL Technologies.  All rights reserved.
>> help send
USAGE:
SEND address message /only /header header-obj

DESCRIPTION:
 Send a message to an address (or block of addresses)
 SEND is a function value.

ARGUMENTS:
 address -- An address or block of addresses (Type: email block)
 message -- Text of message. First line is subject. (Type: any)

REFINEMENTS:
 /only -- Send only one message to multiple addresses
 /header -- Supply your own custom header
 header-obj -- The header to use (Type: object)
>> send/header [EMAIL PROTECTED] "Hello Andrew" make system/standard/email [
[from: [EMAIL PROTECTED]
[subject: "A subject line"
[]
>>

Return-Path: <[EMAIL PROTECTED]>
Received: from [203.96.110.124] by mta3-rme.xtra.co.nz
  (InterMail vM.4.01.03.00 201-229-121) with SMTP
  id <2912011639.LWFB898.mta3-rme.xtra.co.nz@[203.96.110.124]>
  for <[EMAIL PROTECTED]>; Tue, 12 Sep 2000 13:16:39 +1200
To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Date: Tue, 12 Sep 2000 13:17:39 +1200
Subject: A subject line
X-REBOL: 0.10.31.3.1 http://WWW.REBOL.COM
Message-Id: <2912011639.LWFB898.mta3-rme.xtra.co.nz@[203.96.110.124]>

Hello Andrew

Seems to work OK for me. Try restarting Rebol, you may have accidentally
redefined something.

I hope that helps!

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




[REBOL] Rebol Tech, please answer. Two questions. Re:

2000-09-11 Thread Al . Bri

Keith wrote:
> Why not (print skip 3 blk) instead of (print skip blk 3)?

Here's a 'skp function that does this as an alternative to 'skip.

>> skp: func [
[{Returns the series forward or backward from the current position.}
[offset [number!] "Can be positive, negative, or zero."
[series [series! port!]
[][
[skip series offset
[]
>> blk: [1 2 3 4 5 6 7]
== [1 2 3 4 5 6 7]
>> elem: skp 2 skp 3 blk
== [6 7]

As for why it's like this, if you compare it to 'pick:
pick blk 4
it's very similar to:
skip blk 4
So I suggest that it seemed natural to continue it with 'skip?

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





[REBOL] Encryption with REBOL Re:(5)

2000-09-11 Thread ryanc

Carnivore buster or Carnivore bait, I think we both agree this paper to
be accurate:

http://theory.lcs.mit.edu/~rivest/bsa-final-report.ascii

--Ryan

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

"Thought is free." -William Shakespeare





[REBOL] does REBOL run on Palm or not? Re:(6)

2000-09-11 Thread Al . Bri

Rebol-Crew-Salary: to money! 10.00

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




[REBOL] Rebol Tech, please answer. Two questions.

2000-09-11 Thread rebol

Hey list, sorry to be annoying. I've asked these two questions before, but
I've never really gotten an answer to them, and they're bugging me!

1. I'll just give an example.

blk: [11 22 33 44 55]
print skip blk 3
44 55

Why not (print skip 3 blk) instead of (print skip blk 3)? What I'm getting
at is that it seems like it would be easier to chain these things together
if the arguments were in a different order (block last). For instance:

>> blk: [1 2 3 4 5 6 7]
== [1 2 3 4 5 6 7]
>> elem: skip skip blk 2 3
== [6 7]

If you want to do nested skips, the 'skips keep piling up in the front and
the numbers of elements to skip keep on piling up in the back. It seems more
natural to me for it to be:

>> blk: [1 2 3 4 5 6 7]
== [1 2 3 4 5 6 7]
>> elem: skip 2 skip 3 blk
== [6 7]

Can any of the Rebol Tech guys explain why they made it this way? You guys
must have thought of this, and I'd be really interested to hear why you
chose against it. Plse let me know!

2. The lack of associative arrays in Rebol has bugged me from the beginning.
Last time I e-mailed the list about it I got suggestions for emulating them
with blocks. Last night I thought that I could just use objects to do what I
want. obj/index is just as good to me as obj{index}. The only thing is that
I don't know of a way to add refinements to objects dynamically. Always
creating a new object from the old one when I want to add a refinement
doesn't appeal to me. I know RT must have made a conscious decision not to
include associative arrays in the language, I'm just wondering why. Blocks
supercede their functionality, etc. Please let me know. I'd be really
interested to hear the reasoning behind this.

Thank you very very much.

Keith

P.S. One of the things that could go in a Rebol FAQ in a section entitled
"For People Coming From Other Languages" could be questions like the ones
I've asked above. I could imagine a question like: "I come from a Perl
background. I'm used to using hashes for everything. What do I do in Rebol?"





[REBOL] t-shirts Re:(2)

2000-09-11 Thread RChristiansen

8-P

> "> RT can set its own price for the t-shirt and keep every dollar minus
> $10.99 for > each t-shirt."
> 
> I like REBOL, its very very promising, but if they can manage to extract
> $10.99 from a dollar, I'm buying the company tommorrow :)
> 
> Cheers,
> 
> Chris Walker
> PHP/SQL programmer
> REBOL evangelist, UK
> 





[REBOL] does REBOL run on Palm or not? Re:(5)

2000-09-11 Thread jeff



  Howdy, Ryan:

> > Under 20 ? I wish... Try 5 :-)
> 
> You all deserve a raise.

   GRIN.

   to-money make hash! []

   -jeff




[REBOL] t-shirts Re:

2000-09-11 Thread chris

"> RT can set its own price for the t-shirt and keep every dollar minus
$10.99 for
> each t-shirt."

I like REBOL, its very very promising, but if they can manage to extract
$10.99 from a dollar, I'm buying the company tommorrow :)

Cheers,

Chris Walker
PHP/SQL programmer
REBOL evangelist, UK




[REBOL] does REBOL run on Palm or not? Re:(4)

2000-09-11 Thread RChristiansen

> > It must be a nightmare. With so many platforms to support, how can they
> > even have time to upgrade rebol? I don't understand how they can do it
> > (especially with under 20 programmers!)?
> 
> Under 20 ? I wish... Try 5 :-)

You all deserve a raise.




[REBOL] rebol weak points (i think) Re:(6)

2000-09-11 Thread chris . double

>So you want all of your script be compiled in a 400k executable?

No, I was just making the point that it seemed to be possible to compile REBOL,
not that it was a necessity. As an aside, Corman Common Lisp for Win32, the
console application (equivalent to Rebol/Core I guess) is a 600K executable. But
then it doesn't include the source as part of the executable, or the networking,
etc, etc.

>Anyway, that is not the problem. Let me know if you are able to
>compile the following code snippets:

Are you asking if it is possible to compile the code snippet you give in any
language or in Rebol? If any language, the following works fine in a compiled
Lisp and I can't imagine why the same wouldn't work in a compiled REBOL either:

  (defun print-odd (a)
(format t "~A is odd.~%" a)
(setf (symbol-function 'my-print) #'print-even))

  (defun print-even (a)
(format t "~A is even.~%" a)
(setf (symbol-function 'my-print) #'print-odd))

  (setf (symbol-function 'my-print) #'print-odd)

  (loop for i from 1 to 5 do (my-print i))

Gives:
  1 is odd.
  2 is even.
  3 is odd.
  4 is even.
  5 is odd.

Your other example, the amiga, unix, etc objects and binding the methods to the
code is quite neat. This could be compiled where 'do' is the equivalent to other
languages 'eval'. In a compiled language with 'eval', the 'eval' can either
interpret the results or wrap the eval into an anonymous function, compile that
function and then execute it. So the following would be the equivalent to
implementing an eval:

  (eval '(do-something))

  => becomes (funcall (compile (lambda () (do-something

The result of that compilation is executed. Obviously speed of compilation
becomes an issue.

Self modifying code as in your next example becomes a tad more difficult to
compile :-). I wouldn't know how to do it myself without changing the code to
use some sort of 'eval' type of thing.

Personally REBOL is fast enough to do the sorts of things I use it for anyway so
I don't have a problem with it being compiled or not compiled. It amazes me that
something like REBOL/View can fit into such a small package!

Cheers,
Chris.
--
http://www.double.co.nz/cl
http://www.double.co.nz/dylan





[REBOL] t-shirts

2000-09-11 Thread RChristiansen

OK. I know the guys at REBOL Technologies have more important things to 
work on, but...

We need a REBOL t-shirt!

RT could start out real simple by uploading a bitmap of the .r image to 
http://www.cafepress.com and call that a t-shirt.

RT can set its own price for the t-shirt and keep every dollar minus $10.99 for 
each t-shirt. Shipping is $4 for the first t-shirt and $1 for each additional shirt 
(United States.)

-Ryan




[REBOL] Standardize REBOL?

2000-09-11 Thread gmassar

Hi guys at RT,

Do you plan to submit REBOL specs to a standard committee? If
so, when will it be expected?

Thanks,
Geo...

PS: I am relatively new to REBOL. It looks a promise for a
better language.




[REBOL] read URL => error, exists? URL => false

2000-09-11 Thread princepawn

>> read ftp://1.1.1.1
connecting to: 1.1.1.1
** User Error: Failed login to 1.1.1.1 as anonymous.  Check your login.
** Where: read ftp://1.1.1.1
>> exists? ftp://1.1.1.1
connecting to: 1.1.1.1
== false
>>

is this a valid set of responses? Or, because there was a read error in both cases, 
should an error always be thrown?

I have a piece of code which behaves in certain ways based on errors and other ways 
based on failures and unfortunately the behavior for a failure is being triggered when 
the behavior for error should occur in both cases.



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




[REBOL] read URL => error, exists? URL => false (SAMPLE CODE ATTACHED)

2000-09-11 Thread princepawn

>> read ftp://1.1.1.1
connecting to: 1.1.1.1
** User Error: Failed login to 1.1.1.1 as anonymous.  Check your login.
** Where: read ftp://1.1.1.1
>> exists? ftp://1.1.1.1
connecting to: 1.1.1.1
== false
>>

is this a valid set of responses? Or, because there was a read error in both cases, 
should an error always be thrown?

I have a piece of code which behaves in certain ways based on errors and other ways 
based on failures and unfortunately the behavior for a failure is being triggered when 
the behavior for error should occur in both cases.


wait-duration: 0:5:00
host-cycle: func [  _until-b [block!] "we wait for this to happen" 
_then-b  [block!] "when until-b true, we do this"
/local until-b then-b connect-attempts error-count status 
quitting-time new-until-b ftp-host ] [ 
 
  print reform [ "here is until-b:" _until-b newline newline "and here is then-b:" 
_then-b ]
  quitting-time: now/time + wait-duration
  error-count: 0
  until [   
forall ftp-hosts [
ftp-host: first ftp-hosts
until-b: replace (copy _until-b) 'ftp-host ftp-host
then-b: replace (copy _then-b) 'ftp-host ftp-host
print reform [ "trying ftp host:" ftp-host newline "doing" until-b ]
either error? status: try until-b [ print reform "error attempting" until-b ][
either not status [
  error-count: error-count + 1
  print reform [ until-b "unsuccessful" ]
  wait 15
] [ 
  print reform [ until-b "successful... executing" then-b ]
  do then-b
  break
]
]
   ]
   ftp-hosts: head ftp-hosts
   any [ (now/time > quitting-time) (error-count > max-connect-retries) status ]
 ]
]


until-b: compose [  _url: form-url (ftp-username) (ftp-password) ftp-host (ftp-dir)
print reform [ "url is" _url ]
_upfile-url: to-url rejoin [ _url 
(upfile-name) ]
print reform [ "checking existence of" 
_upfile-url ]
exists? _upfile-url ] 
then-b:  compose [ upload-file (ftp-username) (ftp-password) ftp-host 
(pgp-outfile) (pgp-outfile) (ftp-dir) 
   upload-file (ftp-username) (ftp-password) ftp-host 
(upfile-name) (upfile-name) (ftp-dir) ]
host-cycle until-b then-b ;;; call host-cycle



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




[REBOL] rebol weak points (i think) Re:(6)

2000-09-11 Thread agem




[EMAIL PROTECTED] wrote on 11-Sep-2000/19:04:09+2:00

> Hello [EMAIL PROTECTED]!
> 
> On 11-Set-00, you wrote:
> 
>  c>> Try compiling this:
>  c>> 
>  c>> do ask "Please enter some Rebol code: "
> 
>  c> FORTH and Lisp systems don't seem to have a problem with this.
>  c> Most Common Lisp systems I know are compiled and have
>  c> interactive input. See Corman Lisp for an example
>  c> (http://www.corman.net). Generally the compiler is part of the
>  c> run time and compiles the entered code on the fly.
> 
> So you want all of your script be compiled in a 400k executable?
> 

Compiling the compiler into the runtime? Compilers can be small..

> Anyway, that is not the problem. Let me know if you are able to
> compile the following code snippets:
> 
>   my-print: print-odd: func [a] [
> print [a "is odd."]
> my-print: :print-even
>   ]
>   print-even: func [a] [
> print [a "is even."]
> my-print: :print-odd
>   ]
>   repeat i 5 [my-print i]
> 
> 1 is odd.
> 2 is even.
> 3 is odd.
> 4 is even.
> 5 is odd.
>

Wheres the problem? yes, by default you have to lookup
each call in a table. for speed, to inline the primitives,
there is a need for hotspot-style compilers. or marking
never-changing code by hand ("compile func"). (like
a stronger [protect 'if] which can't be removed (in
the module)). problems arise if you do

 a: func[a b][] ; 2 args
 user: func[][ a 1 2 ]
 a: func[a][] ; 1 arg
 user

do you?

> ---
> 
>   ; this is just an example...
>   amiga: make object! [
> send-to-par: func [something] [write/binary %/par something]
> play-sound: func [sample-data] [write/binary %/audio sample-data]
>   ]
>   unix: make object! [
> send-to-par: func [something] [write/binary %/dev/lp0 something]
> play-sound: func [sample-data] [write/binary %/dev/dsp sample-data]
>   ]
>   others: make object! [
> send-to-par: func [val] []
> play-sound: func [val] []
>   ]
> 
>   code: [
> send-to-par some-data-for-the-printer
> play-sound hello-sample
> play-sound goodbye-sample
>   ]
> 
>   current-system: get pick [
> ; going by memory, the actual table might be different...
> amiga
> others
> others
> unix
> ; etc.
>   ] system/version/4
> 
>   bind code in current-system 'self
>   do code
>

if bind is allways bind/copy this works. note we have early binding in rebol,
which gives very good hints what will be called (can be reduced to indirect addresses 
IMO).
Compiler has to insert calls beetween the addresses, yes.
 
> ---
> 
>   ; self modifying code

i know SM-code is possible, but is it usefull?
maybe usefull if rebol could access its callers
pc. do you know of some use? which can not be reduced
to some parts, allowing for something like "compile
func" for others?

if you know, can we apply a forthish way? :

make a block-entry big enough for some usefull code,
like add, if, .. and of course indirect call . if
you bind to a froozen primitive, copy its code, else
insert a call. if you store to a speed-block! , its
more costly, and you have to fight with code/data-cache-sync.
with fixed block-size one has to insert some nops
too. but modern prefetchers may like this way more
than interpreter-jumps?

>   code: [
> ; initialization, needs to be run the first time only
> random/seed now
> remove/part code 5
> print random 10
>   ]
>   print mold code
>   loop 5 code
>   print mold code
> 
> >> print mold code
> [
> random/seed now 
> remove/part code 5 
> print random 10
> ]
> >> loop 5 code
> 5
> 6
> 6
> 3
> 7
> >> print mold code
> [
> print random 10
> ]
> 

i think this would be hard:
caller: func[][my-dialect these are dialect-words!]
my-dialect: func[][ parse-caller[dialect stuff] ]
but it does not exists..

and finding the 'b in a/b very quick, as long as there
is no type-system with fixed offsets.

But, there is rebol/command with some typing stuff.

Carl in front of his C compiler:

Can't be long until he thinks that job can be done
by Rebol too. if he changes the language a bit.. If
he localizes the restrictions.. Components, Modules,
we can't change them too.. Speed by simplification
- he has done it before..

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

Volker




[REBOL] does REBOL run on Palm or not? Re:(3)

2000-09-11 Thread holger

On Mon, Sep 11, 2000 at 12:25:06PM -0700, [EMAIL PROTECTED] wrote:
> I personally think rebol technologies is either brilliant or insane. How the heck do 
>you support 40+
> platforms?

42 at the moment.

> It must be a nightmare. With so many platforms to support, how can they even have 
>time to
> upgrade rebol? I don't understand how they can do it (especially with under 20 
>programmers!)?

Under 20 ? I wish... Try 5 :-)

-- 
Holger Kruse
[EMAIL PROTECTED]




[REBOL] SMTP and custom header not correct...

2000-09-11 Thread jr

this is a snippet of code from the user manual online:

send/header [EMAIL PROTECTED] "message." make
system/standard/email [
FROM: [EMAIL PROTECTED]
subject: "This is my unique subject line."
]

according to this you can specify the fields when sending out an email thru 
Rebol
but I get errors from this code

Script Error: send expected header-obj argument of type: object.

tried some other variations and none work

Help!




Jeff Rubin, CTO & Co-Founder
Audiopia
Shutup and Listen...
http://www.audiopia.com
also check out my personal site Brainbyte!
http://www.brainbyte.com




[REBOL] does REBOL run on Palm or not? Re:(2)

2000-09-11 Thread rishi

I personally think rebol technologies is either brilliant or insane. How the heck do 
you support 40+
platforms? It must be a nightmare. With so many platforms to support, how can they 
even have time to
upgrade rebol? I don't understand how they can do it (especially with under 20 
programmers!)? With
the programs we are creating at work, I have a hard enough time just dealing with just 
one platform
(then again...it's windows...)

Actually, I think they are brilliant and insane. I don't know how they can do it, but 
I'm glad they
can!!

Rishi



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 12:05 PM
Subject: [REBOL] does REBOL run on Palm or not? Re:


>
> > I did not see a Palm release of REBOL/Core on the downloads page at
> > rebol.com... does it only run on Palms and Handhelds in theory for
> > the present time? If so, when is this going to become reality?
>
> Some time ago RT placed Palm development on indefinite hold due to
> some OS limitations (small stack size and non-standard file system
> were the two biggies, IIRC).  They did say that if Palm solves the OS
> limitations that they would consider putting it on the burner again.
>
> I'd like to see Rebol run on my Palm 3x, but with all the other
> projects RT has on the go right now, I'll wait and keep messing with
> Rebol on my servers and desk machines for now.  I doubt that handheld
> Rebol will be out any time soon.
>
> Regards,
> Kev
>
> 
> Kevin McKinnon, System/Network Administrator [EMAIL PROTECTED]
> Sunshine Communications http://www.sunshinecable.com
>
> PGP Public Key: http://www.dockmaster.net/pgp.html   PGP 6.0 www.pgp.com
>




[REBOL] does REBOL run on Palm or not? Re:

2000-09-11 Thread kevin


> I did not see a Palm release of REBOL/Core on the downloads page at
> rebol.com... does it only run on Palms and Handhelds in theory for
> the present time? If so, when is this going to become reality?

Some time ago RT placed Palm development on indefinite hold due to 
some OS limitations (small stack size and non-standard file system 
were the two biggies, IIRC).  They did say that if Palm solves the OS 
limitations that they would consider putting it on the burner again.

I'd like to see Rebol run on my Palm 3x, but with all the other 
projects RT has on the go right now, I'll wait and keep messing with 
Rebol on my servers and desk machines for now.  I doubt that handheld 
Rebol will be out any time soon.

Regards,
Kev


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

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




[REBOL] Re: Speed and Memory Management in REBOL Re:(2)

2000-09-11 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 11-Set-00, you wrote:

 j> Consider the "csv" file below, created by a Well-Known
 j> Spreadsheet from a Large Redmond Company:

Here's a parser for files generated by that monster. :-)

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

REBOL [
Title: "CSV parser"
Author: "Gabriele Santilli"
]

CSV-parser: make object! [
line-rule: [field any [separator field]]
field: [[quoted-string | string] (insert tail fields any [f-val copy ""])]
string: [copy f-val any str-char]
quoted-string: [{"} copy f-val any qstr-char {"} (replace/all f-val {""} {"})]
str-char: none
qstr-char: [{""} | separator | str-char]
fields: []
f-val: none
separator: #";"
set 'parse-csv-line func [
"Parses a CSV line (returns a block of strings)"
line [string!]
/with sep [char!] "The separator between fields"
] [
clear fields
separator: any [sep #";"]
str-char: complement charset join {"} separator
parse/all line line-rule
copy fields
]
]




[REBOL] Re: rebol weak points (i think) Re:(4)

2000-09-11 Thread g . santilli

Hello [EMAIL PROTECTED]!

On 11-Set-00, you wrote:

 c>> Try compiling this:
 c>> 
 c>> do ask "Please enter some Rebol code: "

 c> FORTH and Lisp systems don't seem to have a problem with this.
 c> Most Common Lisp systems I know are compiled and have
 c> interactive input. See Corman Lisp for an example
 c> (http://www.corman.net). Generally the compiler is part of the
 c> run time and compiles the entered code on the fly.

So you want all of your script be compiled in a 400k executable?

Anyway, that is not the problem. Let me know if you are able to
compile the following code snippets:

  my-print: print-odd: func [a] [
print [a "is odd."]
my-print: :print-even
  ]
  print-even: func [a] [
print [a "is even."]
my-print: :print-odd
  ]
  repeat i 5 [my-print i]

1 is odd.
2 is even.
3 is odd.
4 is even.
5 is odd.

---

  ; this is just an example...
  amiga: make object! [
send-to-par: func [something] [write/binary %/par something]
play-sound: func [sample-data] [write/binary %/audio sample-data]
  ]
  unix: make object! [
send-to-par: func [something] [write/binary %/dev/lp0 something]
play-sound: func [sample-data] [write/binary %/dev/dsp sample-data]
  ]
  others: make object! [
send-to-par: func [val] []
play-sound: func [val] []
  ]

  code: [
send-to-par some-data-for-the-printer
play-sound hello-sample
play-sound goodbye-sample
  ]

  current-system: get pick [
; going by memory, the actual table might be different...
amiga
others
others
unix
; etc.
  ] system/version/4

  bind code in current-system 'self
  do code

---

  ; self modifying code
  code: [
; initialization, needs to be run the first time only
random/seed now
remove/part code 5
print random 10
  ]
  print mold code
  loop 5 code
  print mold code

>> print mold code
[
random/seed now 
remove/part code 5 
print random 10
]
>> loop 5 code
5
6
6
3
7
>> print mold code
[
print random 10
]

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




[REBOL] rebol weak points (i think) Re:(6)

2000-09-11 Thread allen

> Someone once described FORTH as "not a programming language, but a
> programming language construction kit".  I think that there's more than
> a grain of truth in applying that description to REBOL as well.  It's
> just a matter of tradeoffs.
>
> Carl has given us a highly flexible, customizable, and extensible
> language.  The cost of all those virtues is that if you really WANT to
> make REBOL code behave according to your mental model of language X
> (for all X ;-) you must do some of the plumbing yourself.  That usually
> requires fairly sophisticated knowledge of BOTH languages.

Well said Joel!
REBOL as a tool of programing, much like paintbrush and paint are the tools
of painting. Some of us will be modernists, some pre-raphaelite, some
cubists and some will prefer water colours. REBOL (Unlike most art schools)
will let us work in a style that suits us.

Cheers,

Allen K




[REBOL] does REBOL run on Palm or not?

2000-09-11 Thread princepawn

I did not see a Palm release of REBOL/Core on the downloads page at rebol.com... does 
it only run on Palms and Handhelds in theory for the present time? If so, when is this 
going to become reality?



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




[REBOL] rebol weak points (i think) Re:(6)

2000-09-11 Thread youpi . technologies

Thanks I will look at that later on.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 3:05 PM
Subject: [REBOL] rebol weak points (i think) Re:(5)


> [EMAIL PROTECTED] wrote:
> > ... Toolbook has very advanced OOP concepts and at the same time
> > much simpler and more elegant than other languages. But the only
> > thing that was really awful was that he coped with object directly
> > without dynamic linking to some sort of prototype or class or
> > whatever you want to call the ancestor. For building complex
> > program with such a model is very easy but to maintain and reuse
> > components in multiple projects all alive is very difficult
> > without creating our own framework of MFC like in Visual C.
> >
> > I have exactly the same problem in Visual Basic which only knows
> > Interfaces but completly ignore inheritance which is implemented
> > in Visual C. So if you want to make some sort of industrial
> > softwares (automate part of software conception) with the classic
> > document-view architecture in VB and Rational Rose you will have
> > tremendous difficulties.
> > 
> 
> You can use object composition, as in the following (hypothetical,
> built-by-hand) fragment of code.
> 
> parent-object: make object! [





[REBOL] rebol weak points (i think) Re:(5)

2000-09-11 Thread joel . neely

[EMAIL PROTECTED] wrote:
> ... Toolbook has very advanced OOP concepts and at the same time
> much simpler and more elegant than other languages. But the only
> thing that was really awful was that he coped with object directly
> without dynamic linking to some sort of prototype or class or
> whatever you want to call the ancestor. For building complex
> program with such a model is very easy but to maintain and reuse
> components in multiple projects all alive is very difficult
> without creating our own framework of MFC like in Visual C.
>
> I have exactly the same problem in Visual Basic which only knows
> Interfaces but completly ignore inheritance which is implemented
> in Visual C. So if you want to make some sort of industrial
> softwares (automate part of software conception) with the classic
> document-view architecture in VB and Rational Rose you will have
> tremendous difficulties.
> 

You can use object composition, as in the following (hypothetical,
built-by-hand) fragment of code.

parent-object: make object! [
attrp1: 23
methp1: func [n [integer!]] [attrp1: attrp1 + n]
methp2: func [] [print ["now up to" attrp1]]
]

child-object-1a: make object! [
_parent: parent-object
attrc1: 10
methc1: func [n [integer!]] [attrc1: attrc1 - n]
methp1: func [args... [...whatever...]] [_parent/methp1 args...]
methp2: func [args... [...whatever...]] [_parent/methp2 args...]
]

child-object-1b: make object! [
_parent: parent-object
attrc1: 10
methc1: func [n [integer!]] [attrc1: attrc1 - n]
methp1: func [args... [...whatever...]] [_parent/methp1 args...]
methp2: func [args... [...whatever...]] [_parent/methp2 args...]
]

;... as many as you want

child-object-2a: make parent-object [
attrc1: 10
methc1: func [n [integer!]] [attrc1: attrc1 - n]
]

child-object-2b: make parent-object [
attrc1: 10
methc1: func [n [integer!]] [attrc1: attrc1 - n]
]

;... as many as you want

All of the "child-object-*" objects have the same interface, but
the "child-object-1*" objects all delegate  methp1  and  methp2
to a common, shared, distinct object.  In practice,  parent-object
is now fulfilling the dynamic role (NOT the initialization role)
of a class in such languages as Java and Smalltalk.

(The reason I emphasized "built-by-hand" is that you could write
metaREBOL code to automate much of the construction, but diving
into that level of detail right now would only obscure my point.)

However, all of the "child-object-2*" objects all have no class ;-)
since each is initialized with a COPY of the components of the
spec object, but each goes its merry way immediatly thereafter.
If you REALLY want to get obscure (and what good OO programmer
doesn't ;-) the above technique obviously extends to simulate
multiple inheritance.

child-object-3: make object! [
_mama: parent-object-1
_papa: parent-object-2
meth-m1: func [args... [...whatever...]] [_mama/meth-m1 args...]
meth-m2: func [args... [...whatever...]] [_mama/meth-m2 args...]
meth-p1: func [args... [...whatever...]] [_mama/meth-p1 args...]
meth-p2: func [args... [...whatever...]] [_mama/meth-p2 args...]
;... etc.
]

I'll stop there, as I can't come up this early in the morning with
good names for THREE parents... ;-)

>
> So I think I will encounter exactly the same problem in Rebol although
> I could make an architecture of messages sending that would implement
> some sort of inheritance as I did in VB. But as for now I didn't see
> enough advanced documentation in Rebol to be able to do it. The
> documentation is very well done but lack some advanced explanation
> about conception. So I look at some examples in rebol.org but still
> didn't see any example of architecture framework.
> 

Someone once described FORTH as "not a programming language, but a
programming language construction kit".  I think that there's more than
a grain of truth in applying that description to REBOL as well.  It's
just a matter of tradeoffs.

Carl has given us a highly flexible, customizable, and extensible
language.  The cost of all those virtues is that if you really WANT to
make REBOL code behave according to your mental model of language X
(for all X ;-) you must do some of the plumbing yourself.  That usually
requires fairly sophisticated knowledge of BOTH languages.

-jn-




[REBOL] rebol weak points (i think) Re:(5)

2000-09-11 Thread bhandley

Hi, Rishi...

> By the way, did anyone write a rebapp to read/post messages on this
newsgroups rather than having it
> come in my mail box? I am having to constantly subscribe/unsubscribe on
demand depending on when I
> need to send messages.

You could also stick around and help others new to Rebol. ;-)

Brett.




[REBOL] eScribe Rebol Archive vs rebol.org Archive Re:(6)

2000-09-11 Thread davidv

Hi Allen

Thanks for uploading the archive - I joined the list mid-January this year and
wouldn't mind getting hold the messages for early Jan so I would be grateful
if those could be uploaded too (message numbers 66224 to 74688). I've tried
using the "get msg x" command but all I get is replies saying that those
messages are not available (or am I doing something wrong?).

Thanks in advance

David

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 08, 2000 8:13 AM
Subject: [REBOL] eScribe Rebol Archive vs rebol.org Archive Re:(5)



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 08, 2000 4:02 PM
Subject: [REBOL] eScribe Rebol Archive vs rebol.org Archive Re:(4)


> would you be able to export just the rebol messages from Outlook?

According to the e-scribe faq they accept Outlook Express .dbx files.
This zip file contains the .dbx for messages from mid July-99 thru to end
Dec 99

http://www.rebolforces.com/archive/list/List%20Jul-Dec%201999.zip

I can upload other months if required, just let me know, I'll upload to the
same directory

Cheers,

Allen K








[REBOL] rebol weak points (i think) Re:(4)

2000-09-11 Thread youpi . technologies

Hello,

Thanks for this discussion. I am interested by that since I had already
posted a general question about OOP in Rebol.
I have used a language which is Toolkbok who was created by Paul Allen and
was the first Visual Language on Windows even before Visual Basic (Bill
Gates even said to Paul Allen "Your product is marvellous. I'm going to copy
it!"). Toolbook has very advanced OOP concepts and at the same time much
simpler and more elegant than other languages. But the only thing that was
really awful was that he coped with object directly without dynamic linking
to some sort of prototype or class or whatever you want to call the
ancestor. For building complex program with such a model is very easy but to
maintain and reuse components in multiple projects all alive is very
difficult without creating our own framework of MFC like in Visual C.
I have exactly the same problem in Visual Basic which only knows Interfaces
but completly ignore inheritance which is implemented in Visual C. So if you
want to make some sort of industrial softwares (automate part of software
conception) with the classic document-view architecture in VB and Rational
Rose you will have tremendous difficulties.

So I think I will encounter exactly the same problem in Rebol although I
could make an architecture of messages sending that would implement some
sort of inheritance as I did in VB. But as for now I didn't see enough
advanced documentation in Rebol to be able to do it. The documentation is
very well done but lack some advanced explanation about conception. So I
look at some examples in rebol.org but still didn't see any example of
architecture framework.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 6:27 AM
Subject: [REBOL] rebol weak points (i think) Re:(3)


> Hi, Rishi...
>
> Just a couple of points re REBOL objects that may be of some help:
>
> [EMAIL PROTECTED] wrote:
> >
> > no. The Math/Pie you have created is an instance variable not a
> > static variable. It is associated with an instance of the class,
> > not the class itself. A static variable means that there is a
> > single copy of this variable associated with class itself. You do
> > not need to instantiate a class to use static variable...
> >
>
> 1)  The distinction to which you keep referring -- "class variable"
> vs. "instance variable" -- doesn't exist at all in REBOL because
> REBOL doesn't use the class-based object model of Java or Smalltalk.
>
> There are other ways to think of objects than simply as instances of
> "classes".  In NewtonScript and Self, for example, objects exist
> completely as standalone entities without any enveloping class.
> Instead, in both of those langauges, objects can have "prototypes",
> other objects to which they refer for common (or default) attributes
> and methods.  In those languages, the object-to-prototype relationship
> is maintained throughout the lifetime of an object, so that changes
> to an attribute/method of an object are visible within any other
> objects that refer to the first object as their prototype (and that
> have not overridden the attribute/method involved).
>
> In REBOL, an object is a standalone entity.  It may be created
> directly, using  make object! ...  or may be created using another
> object as a model or specification.  However, it is cloned at the
> time of creation, and no longer maintains a relation to its model
> object.  For example:
>
> >> ob1: make object! [
> [attr: 23
> [meth: func [] [print attr: attr + 1]
> []
> >> kenobi: make ob1 []
> >> ob1/meth
> 24
> >> ob1/meth
> 25
> >> ob1/meth
> 26
> >> kenobi/meth
> 24
> >> kenobi/meth
> 25
> >> kenobi/meth
> 26
> >> ob1/attr: 2
> == 2
> >> ob1/meth
> 3
> >> ob1/meth
> 4
> >> kenobi/meth
> 27
> >> kenobi/meth
> 28
> >>
>
> Notice that  kenobi  has its own copy of  attr  and  meth  which
> are independent of those in  ob1  even though no explicit overriding
> was done at the creation of  kenobi .  Therefore all objects are
> created equal, without any "class" vs. "instance" distinction.
> Therefore the term "static" as used in Java or c++ is meaningless
> in REBOL.
>
> >
> > The main advantage of having static variables would be to prevent
> > name collisions and to group variables/functions that act on a
> > class (not an object) together for use in a more natural way.
> >
> > The main disadvantage of having static variables is that perhaps
> > it is an unnecessary complication. But I don't think so. Maybe
> > because I come from java/javascript background. I'm still wondering
> > though if there is a way to have static variables that I don't know.
> >
> > Regardless, the main problem that I wonder about is if rebol is
> > suited for modular programming where people reuse other people's
> > functions/code. Since everything is either global or l

[REBOL] rebol weak points (i think) Re:(5)

2000-09-11 Thread Al . Bri

Rishi wrote:
> By the way, did anyone write a rebapp to read/post messages on this
newsgroups rather than having it come in my mail box? I am having to
constantly subscribe/unsubscribe on demand depending on when I need to send
messages. If their is such a rebapp, please let me know! (or do I have to
write it?)

You could help us write it on:
[EMAIL PROTECTED]
Subscribe by sending email to:
[EMAIL PROTECTED]

> And is there a way to read older archives of this newsgroup (like several
months/years old) so I don't have to post questions that have been answered?

There's an searchable archive of [EMAIL PROTECTED] at:
http://www.rebol.org

I hope that helps!

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




[REBOL] rebol weak points (i think) Re:(4)

2000-09-11 Thread rishi

Thanks Joel! That was great help. I'm surprised I didn't think of using objects in 
that way. Rebol
is more powerful everytime I look at it ...Simple but Powerful... And that modular 
architecture
paper I just read (thanks Andrew...) sounds really interesting! I definately think 
I've found the
language I've been searching for...

Sorry about the html messages i've been sending to this list. My beos networking is 
down for some
reason and I am stuck in complicated microsoft outlook program. Look forward to 
switching to qnx
realtime platform soon!!

By the way, did anyone write a rebapp to read/post messages on this newsgroups rather 
than having it
come in my mail box? I am having to constantly subscribe/unsubscribe on demand 
depending on when I
need to send messages. If their is such a rebapp, please let me know! (or do I have to 
write it?)

And is there a way to read older archives of this newsgroup (like several months/years 
old) so I
don't have to post questions that have been answered?

Rishi

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 10, 2000 9:27 PM
Subject: [REBOL] rebol weak points (i think) Re:(3)


> Hi, Rishi...
>
> Just a couple of points re REBOL objects that may be of some help:
>
> [EMAIL PROTECTED] wrote:
> >
> > no. The Math/Pie you have created is an instance variable not a
> > static variable. It is associated with an instance of the class,
> > not the class itself. A static variable means that there is a
> > single copy of this variable associated with class itself. You do
> > not need to instantiate a class to use static variable...
> >
>
> 1)  The distinction to which you keep referring -- "class variable"
> vs. "instance variable" -- doesn't exist at all in REBOL because
> REBOL doesn't use the class-based object model of Java or Smalltalk.
>
> There are other ways to think of objects than simply as instances of
> "classes".  In NewtonScript and Self, for example, objects exist
> completely as standalone entities without any enveloping class.
> Instead, in both of those langauges, objects can have "prototypes",
> other objects to which they refer for common (or default) attributes
> and methods.  In those languages, the object-to-prototype relationship
> is maintained throughout the lifetime of an object, so that changes
> to an attribute/method of an object are visible within any other
> objects that refer to the first object as their prototype (and that
> have not overridden the attribute/method involved).
>
> In REBOL, an object is a standalone entity.  It may be created
> directly, using  make object! ...  or may be created using another
> object as a model or specification.  However, it is cloned at the
> time of creation, and no longer maintains a relation to its model
> object.  For example:
>
> >> ob1: make object! [
> [attr: 23
> [meth: func [] [print attr: attr + 1]
> []
> >> kenobi: make ob1 []
> >> ob1/meth
> 24
> >> ob1/meth
> 25
> >> ob1/meth
> 26
> >> kenobi/meth
> 24
> >> kenobi/meth
> 25
> >> kenobi/meth
> 26
> >> ob1/attr: 2
> == 2
> >> ob1/meth
> 3
> >> ob1/meth
> 4
> >> kenobi/meth
> 27
> >> kenobi/meth
> 28
> >>
>
> Notice that  kenobi  has its own copy of  attr  and  meth  which
> are independent of those in  ob1  even though no explicit overriding
> was done at the creation of  kenobi .  Therefore all objects are
> created equal, without any "class" vs. "instance" distinction.
> Therefore the term "static" as used in Java or c++ is meaningless
> in REBOL.
>
> >
> > The main advantage of having static variables would be to prevent
> > name collisions and to group variables/functions that act on a
> > class (not an object) together for use in a more natural way.
> >
> > The main disadvantage of having static variables is that perhaps
> > it is an unnecessary complication. But I don't think so. Maybe
> > because I come from java/javascript background. I'm still wondering
> > though if there is a way to have static variables that I don't know.
> >
> > Regardless, the main problem that I wonder about is if rebol is
> > suited for modular programming where people reuse other people's
> > functions/code. Since everything is either global or local, it seems
> > as though it would be unnatural to use rebol in this way...
> >
>
> 2)  I frequently use objects in my own REBOL programming to get
> exactly the benefit you're looking for: to partition the namespace.
> Most of my REBOL source files define objects to encapsulate all of the
> variables, subordinate functions, parse pattern blocks, etc. that make
> up the details of the main idea of the script.  A limited number (often
> only one!) of the functions within the object are actually intended for
> use by the clients of the object.  It's a handy way to structure and
> modularize libraries of code (and DOES offer a alternat