[REBOL] Re: informal /View desktop survey

2002-09-12 Thread Kemp Watson

XFML looks to be quite interesting - based on RDF, which has the potential
to tie it to the Semantic Web. There's been some criticism however that 1)
RDF is less rich than RSS, and that the Semantic Web is doomed to failute if
it uses RDF, and 2) that topic maps don't use the full potential of RDF.

I dunno, gotta read more.

I WILL play with this stuff in REBOL.

K.

-Original Message-
From: Jason Cunliffe [mailto:[EMAIL PROTECTED]]
Sent: September 12, 2002 1:54 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [REBOL] Re: informal /View desktop survey


Hi Kemp, Sorry about the delay in responding. Yes I like your version...

I'll dive into dublin core. Meanwhile, have your heard about Peter Van
Dijck's
XFML?
I'd like to get you opinion since you know about XFML, and how well you
think it
relates to REBOL metadata engineering

XFML: [EXchangeable Facet Map Language ]

http://xfml.org/
XFML allows for easy creation of advanced, automatically generated
navigation
for your website. You can even automatically generate links to related
topics on
other websites. It also allows for merging of metadata between different
websites.

XFML is designed to be easy to understand, and easy to code for, yet
powerful
and flexible. XFML is an open, free format, like SOAP or RSS, and is based
on
the topicmaps standard.

The tutorials are handy..
http://xfml.net/index.php?page=XfmlTutorials

./Jason

 Another crack at it:

 REBOL [
 File:%index.r
 Description: Rebsite index with MetaData in block header
 Author:  [EMAIL PROTECTED]
 Date:2002-09-08
 Metadata:[
 %rebsites.net/dublincoreengine.r [
 title some title
 creator K. Watson
 subject Rebsite, indexing
 description Rebsite index with MetaData in block header
 publisher K. Watson  Friends Inc.
 contributor J. Smith
 contributor Hay Uthere
 date/created 2002-09-04
 date/modified 2002-09-08
 type Software
 identifier http://wherethislives.com
 language en-US
 rights K. Watson  Friends Inc.
 ]
 %anotherrebsite.org/generickeyvalueengine.r [
 'somekey 5
 'someotherkey a text value
 'anotherkey [ block values ]
 'andonemore 'key
 ]
 ]
 ]


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




[REBOL] Re: parse crash - (was: Re: parse consumption)

2002-09-12 Thread Ladislav Mecir

Hi Anton,

thanks for your example. I think, that it can be reduced to:

parse/all / [start: skip opt (remove start) to *]

It is interesting, that the following code doesn't cause the crash:

parse/all / [start: skip opt (remove start) to #*]

Cheers
-L

- Original Message -
From: Anton

Well, here is a simple example, tested
on a clean  REBOL/View 1.2.8.3.1 3-Aug-2002 (beta)
and a clean REBOL/View 1.2.1.3.1 21-Jun-2001

I could probably do some more experiments
and figure out some more details, but
anyway:
---
crash: func [demonstrates a bug in parse that crashes rebol
target [any-string!] {try /../}
/local start post
][
parse/all target [
start: /
any [
../ post: (remove/part start post)
| to / ; to or thru will cause the crash
]
]
]

crash /../
---
Maybe someone can reduce it further.

Anton.

 I am sure it can crash rebol. I just don't have a
 simple example yet. I will try to strip it down
 to a small example.

 Anton.

  It has been discussed with RT, but they preferred to explain the current
  behaviour rather than to change it (compatibility reasons?). If you (or
  others) let them know that you prefer simplicity, they may change their
  mind. (Please, do!) OTOH, I am not sure if any crashes can happen
  this way?
 
  - Original Message -
  From: Anton...
 
  
   I agree with your proposed behaviour for parse.
   I suppose you have submitted this idea
   to feedback a long time ago?
   It might also be submitted with more urgency
   because such a dangerous removal can crash rebol.
  
   Anton.


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




[REBOL] Re: Beginner's questions on REBOL/Core and REBOL/View

2002-09-12 Thread Anton

Andrew, what does XP stand for?

Anton.

 Actually, I'm almost sure that some people on this list could
 write a single
 stepping and debugging version of Rebol, using 'do/next and
 'load. I think I
 could, but I've got no spare time and I'm getting enough debug information
 at the moment, by using some XP techniques (like repeated code and test).

 Andrew Martin

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




[REBOL] Re: Error trapping (Was: Beginner's questions on REBOL/Core and REBOL/View)

2002-09-12 Thread Ladislav Mecir

Hi Anton,

I almost did, see the DEFAULT2 function I posted some time ago :-). But,
seriously:

1) we are unable to handle crashes

2) we are unable to catch some errors (especially throw-errors)

3) do/next cannot handle cases like:

do/next [
do [
lots-of-code-here
]
]

with sufficient granularity.

4) it would really be better to traverse the interpreter stack:

a: func [x] [1 / x]  a 0
** Math Error: Attempt to divide by zero
** Where: a
** Near: 1 / x

I would prefer the message to be:

** Math Error: Attempt to divide by zero
** Near: 1 / x
** Where: a 0

Another (more complicated) example:

a: func [f x] [f x] a func [x] [1 / x] 0
** Math Error: Attempt to divide by zero
** Where: f
** Near: 1 / x

Similarly as above, the two-level message I prefer would be:

** Math Error: Attempt to divide by zero
** Near: 1 / x
** Where: f x

, but a three-level message:

** Math Error: Attempt to divide by zero
** Near: 1 / x
** Where: f x
** Where: a func [x] [1 / x] 0

would be more helpful in this case.

Cheers
-L

- Original Message -
From: Anton

We could probably make our own line by line,
or expression-by-expression interpreter.
Check out do/next.

Anton.

 Unless I'm way off, REBOL has a stack-based architecture to it - could we
 not have a Smalltalk-like walkback window that shows the call
 sequence, and
 what lines each call is related to (where they are related)?

 Clicking on a line item shows the context/state of all relevant store at
 that point. Very handy.

 Kemp


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




[REBOL] Re: ...

2002-09-12 Thread Anton

Anyone on linux?

Anton.

 On 12-Sep-02, Jason Cunliffe wrote:
 
  I just noticed some other subtle funkiness...
 
  what-dir
  == %/C/rebol/view/
  change-dir %../
  == %/C/rebol/
  what-dir
  == %/C/rebol/
 
  ok now try this
 
  change-dir %.../
  == %/C/rebol/view/.../
  what-dir
  == %/C/rebol/view/.../
 
 Hmmm.  What are three dots supposed to give? ...
 
  what-dir
 == %/Dev/View/
  change-dir %./
 == %/Dev/View/
  change-dir %.../
 ** Access Error: Cannot open /Dev/View/.../
 ** Near: change-dir %.../
  change-dir %../ 
 == %/Dev/
  change-dir %../   
 == %/
 
 That's on Amiga.  Oh, have you a directory called ... in your view
 directory?
 
 -- 
 Carl Read

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




[REBOL] Re: Beginner's questions on REBOL/Core and REBOL/View

2002-09-12 Thread Petr Krenzelok

Anton wrote:

Andrew, what does XP stand for?

Extreme Programming? Kind of a special aproach to programming?

-pekr-


Anton.

  

Actually, I'm almost sure that some people on this list could
write a single
stepping and debugging version of Rebol, using 'do/next and
'load. I think I
could, but I've got no spare time and I'm getting enough debug information
at the moment, by using some XP techniques (like repeated code and test).

Andrew Martin



  




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




[REBOL] Re: ...

2002-09-12 Thread Joel Neely

Hi, Anton,

... half a mo' while I reboot ...

 list-dir %.../
** Access Error: Cannot open /home/jn/.../
** Where: throw-on-error
** Near: list-dir %.../
 change-dir %.../
** Access Error: Cannot open /home/jn/.../
** Near: change-dir %.../


and the same thing happens on Mac OS/X (Core, of course).

I must admit a preference for ../../ versus .../ on simple
human engineering grounds:

1)  it's more visually distinct (less easy to miss at a glance),
2)  it's extensible.

Combining those two, think about the likelihood of misreading
something like ./ versus ../../../../ (especially if .. is
pronounced parent or up).

-jn-

Anton wrote:
 
 Anyone on linux?
 
   what-dir
   == %/C/rebol/view/
   change-dir %../
   == %/C/rebol/
   what-dir
   == %/C/rebol/
 
   ok now try this
 
   change-dir %.../
   == %/C/rebol/view/.../
   what-dir
   == %/C/rebol/view/.../
 
  Hmmm.  What are three dots supposed to give? ...
 
...
  That's on Amiga.  Oh, have you a directory called ... in your view
  directory?

-jn-

-- 
Sic biscuitus desintegrat.
 -- Ian Mitchell
joelFIXPUNCTUATIONdotneelyatfedexdotcom
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: ...

2002-09-12 Thread Joel Neely

Hi, Anton,

... half a mo' while I reboot ...

 list-dir %.../
** Access Error: Cannot open /home/jn/.../
** Where: throw-on-error
** Near: list-dir %.../
 change-dir %.../
** Access Error: Cannot open /home/jn/.../
** Near: change-dir %.../


and the same thing happens on Mac OS/X (Core, of course).

I must admit a preference for ../../ versus .../ on simple
human engineering grounds:

1)  it's more visually distinct (less easy to miss at a glance),
2)  it's extensible.

Combining those two, think about the likelihood of misreading
something like ./ versus ../../../../ (especially if .. is
pronounced parent or up).

-jn-

Anton wrote:
 
 Anyone on linux?
 
   what-dir
   == %/C/rebol/view/
   change-dir %../
   == %/C/rebol/
   what-dir
   == %/C/rebol/
 
   ok now try this
 
   change-dir %.../
   == %/C/rebol/view/.../
   what-dir
   == %/C/rebol/view/.../
 
  Hmmm.  What are three dots supposed to give? ...
 
...
  That's on Amiga.  Oh, have you a directory called ... in your view
  directory?

-jn-

-- 
Seen in a foreign hotel: Visitors are expected to complain at the
office between 9 and 11 am daily.
  -- [EMAIL PROTECTED]
joeldotneelyatfedexFIXPUNCTUATIONdotcom
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Brett Handley

Tiny correction to my code so as not to confuse. It does not change the
result or conclusion.

set value any! to end

should read

set value any-type! to end

Brett.

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




[REBOL] More dialects than you think, validating function input.

2002-09-12 Thread Brett Handley

I have a function that takes a block! as an argument. This block! should
contain only numbers. The question is how do I check for valid input and
throw an error on encountering a problem in an efficient manner?

My first thought was something like this:

f1: function [
[catch]
block [block!]
] [kount] [
kount: 0
repeat value block [
if not number? value [
throw make error! F1 can only process numbers.
]
kount: kount + 1
]
]

After reflecting on this, I thought about how a block! passed to a function
is one sense is being interpreted by the function according to an implied
grammar. That is my requirement in the above function for only numbers, in a
sense, implies that my function is processing a fairly simple REBOL based
grammar (ie dialect). I don't think it is too outlandish to say every
function that processes a block! is implementing grammar processing even if
trivial. Hence, the subject title of this message.

As a side note, I reckon every offline script can be considered as an out of
memory block! ready for loading.

Anyway, this thought leads me to PARSE, REBOL's grammar validator. So I
recoded my function to look something like this:

f2: function [
[catch]
block [block!]
] [kount value] [
kount: 0
if not parse block [
any [set value number! (kount: kount + 1)] |
set value any! to end
] [throw make error! F2 can only process numbers.]
]

Then I did some quick and dirty testing to see which was faster. On my
machine, F2 takes half the time that F1 does.

Just thought I'd share my little ramble. Test code below.

Cheers,
Brett.

REBOL []

data: copy []
repeat i 2000 [insert tail data i]

f1: function [
[catch]
block [block!]
] [kount] [
kount: 0
repeat value block [
if not number? value [
throw make error! F1 can only process numbers.
]
kount: kount + 1
]
]

f2: function [
[catch]
block [block!]
] [kount value] [
kount: 0
if not parse block [
any [set value number! (kount: kount + 1)] |
set value any! to end
] [throw make error! F2 can only process numbers.]
]

timeit: func [f] [
t1: now/precise
repeat i 300 [error? try [f data]]
t2: now/precise
t2/time - t1/time
]

print [f1 timeit :f1]
print [f2 timeit :f2]
insert at data 1001 'a-word
print [f1 - error half way timeit :f1]
print [f2 - error half way timeit :f2]

---
Website: http://www.codeconscious.com
Rebsite: http://www.codeconscious.com/index.r

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




[REBOL] Re: ...

2002-09-12 Thread Carl Read

On 12-Sep-02, Jason Cunliffe wrote:

 Hmmm.  What are three dots supposed to give? ...

 .../  = ../../= grandparent

 / = ../../../ = great grandparent 

 etc

 If you are too close to root / you'll get an error.

Hmmm.  It looks like REBOL's behaviour with this is very
OS-dependant...

 what-dir
== %/Dev/View/
 change-dir %.../
** Access Error: Cannot open /Dev/View/.../
** Near: change-dir %.../
 what-dir
== %/Dev/View/
 change-dir %../../
== %/

That's Amiga again.  As someone requested, what happens with Linux?

-- 
Carl Read

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




[REBOL] Re: ...

2002-09-12 Thread Anton

I agree, Joel.

Anton.

 I must admit a preference for ../../ versus .../ on simple
 human engineering grounds:
 
 1)  it's more visually distinct (less easy to miss at a glance),
 2)  it's extensible.
 
 Combining those two, think about the likelihood of misreading
 something like ./ versus ../../../../ (especially if .. is
 pronounced parent or up).
 
 -jn-

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




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Ladislav Mecir

Hi Brett,

I don't know, why you didn't write it as follows:

f3: func [
[catch]
block [block!]
] [
if not parse block [any [number!] end] [
throw make error! F3 can only process numbers.
]
]

The parse rule contains END only for compatibility with my proposed PARSE
behaviour, otherwise it isn't necessary.

Cheers
-L

- Original Message -
From: Brett Handley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 12, 2002 2:05 PM
Subject: [REBOL] More dialects than you think, validating function input.


I have a function that takes a block! as an argument. This block! should
contain only numbers. The question is how do I check for valid input and
throw an error on encountering a problem in an efficient manner?

My first thought was something like this:

f1: function [
[catch]
block [block!]
] [kount] [
kount: 0
repeat value block [
if not number? value [
throw make error! F1 can only process numbers.
]
kount: kount + 1
]
]

After reflecting on this, I thought about how a block! passed to a function
is one sense is being interpreted by the function according to an implied
grammar. That is my requirement in the above function for only numbers, in a
sense, implies that my function is processing a fairly simple REBOL based
grammar (ie dialect). I don't think it is too outlandish to say every
function that processes a block! is implementing grammar processing even if
trivial. Hence, the subject title of this message.

As a side note, I reckon every offline script can be considered as an out of
memory block! ready for loading.

Anyway, this thought leads me to PARSE, REBOL's grammar validator. So I
recoded my function to look something like this:

f2: function [
[catch]
block [block!]
] [kount value] [
kount: 0
if not parse block [
any [set value number! (kount: kount + 1)] |
set value any! to end
] [throw make error! F2 can only process numbers.]
]

Then I did some quick and dirty testing to see which was faster. On my
machine, F2 takes half the time that F1 does.

Just thought I'd share my little ramble. Test code below.

Cheers,
Brett.

REBOL []

data: copy []
repeat i 2000 [insert tail data i]

f1: function [
[catch]
block [block!]
] [kount] [
kount: 0
repeat value block [
if not number? value [
throw make error! F1 can only process numbers.
]
kount: kount + 1
]
]

f2: function [
[catch]
block [block!]
] [kount value] [
kount: 0
if not parse block [
any [set value number! (kount: kount + 1)] |
set value any! to end
] [throw make error! F2 can only process numbers.]
]

timeit: func [f] [
t1: now/precise
repeat i 300 [error? try [f data]]
t2: now/precise
t2/time - t1/time
]

print [f1 timeit :f1]
print [f2 timeit :f2]
insert at data 1001 'a-word
print [f1 - error half way timeit :f1]
print [f2 - error half way timeit :f2]

---
Website: http://www.codeconscious.com
Rebsite: http://www.codeconscious.com/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] Re: informal /View desktop survey

2002-09-12 Thread Jason Cunliffe

The Weblog MetaData Initiative
http://www.truthlaidbear.com/blogmd/ConceptualDM.html

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




[REBOL] Re: informal /View desktop survey

2002-09-12 Thread Jason Cunliffe

Hi Kemp, Sorry about the delay in responding. Yes I like your version...

I'll dive into dublin core. Meanwhile, have your heard about Peter Van Dijck's
XFML?
I'd like to get you opinion since you know about XFML, and how well you think it
relates to REBOL metadata engineering

XFML: [EXchangeable Facet Map Language ]

http://xfml.org/
XFML allows for easy creation of advanced, automatically generated navigation
for your website. You can even automatically generate links to related topics on
other websites. It also allows for merging of metadata between different
websites.

XFML is designed to be easy to understand, and easy to code for, yet powerful
and flexible. XFML is an open, free format, like SOAP or RSS, and is based on
the topicmaps standard.

The tutorials are handy..
http://xfml.net/index.php?page=XfmlTutorials

./Jason

 Another crack at it:

 REBOL [
 File:%index.r
 Description: Rebsite index with MetaData in block header
 Author:  [EMAIL PROTECTED]
 Date:2002-09-08
 Metadata:[
 %rebsites.net/dublincoreengine.r [
 title some title
 creator K. Watson
 subject Rebsite, indexing
 description Rebsite index with MetaData in block header
 publisher K. Watson  Friends Inc.
 contributor J. Smith
 contributor Hay Uthere
 date/created 2002-09-04
 date/modified 2002-09-08
 type Software
 identifier http://wherethislives.com
 language en-US
 rights K. Watson  Friends Inc.
 ]
 %anotherrebsite.org/generickeyvalueengine.r [
 'somekey 5
 'someotherkey a text value
 'anotherkey [ block values ]
 'andonemore 'key
 ]
 ]
 ]


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




[REBOL] XFML + FacetMaps = was {Re: Re: informal /View desktop survey}

2002-09-12 Thread Jason Cunliffe

FacetMap is both a data model and a software package, created to let users
browse complex metadata while retaining a simple, familiar, menu interface.

http://facetmap.com:8080/index.jsp


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




[REBOL] Re: ...

2002-09-12 Thread Jason Cunliffe

 Hmmm.  What are three dots supposed to give? ...

.../  = ../../= grandparent

/ = ../../../ = great grandparent 

etc

If you are too close to root / you'll get an error.

./Jason

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




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Brett Handley

Hi Ladislav,

I was less than clear. The kount stuff was to simulate other processing.
The value needs to be set for processing and to report the type in the error
message. My mistake for over simplifying the examples, and for stuffing them
up. Here is the actual function I was working on:

bayes: function [
{Calculate combined probability.}
[catch] probabilities [any-block!]
] [p0 p1 d] [
p0: p1: 1.0
if not parse probabilities [
any [
set value number! (p0: value * p0 p1: 1 - value * p1) |
set value any-type! to end skip
]
] [throw make error! reduce ['script 'cannot-use 'bayes mold type?
get/any 'value]]
if zero? d: add p0 p1 [throw make error! The probabilities cannot
be combined.]
divide p0 d
]

Sorry for the confusion.
Brett.


 Hi Brett,

 I don't know, why you didn't write it as follows:

 f3: func [
 [catch]
 block [block!]
 ] [
 if not parse block [any [number!] end] [
 throw make error! F3 can only process numbers.
 ]
 ]

 The parse rule contains END only for compatibility with my proposed PARSE
 behaviour, otherwise it isn't necessary.

 Cheers
 -L


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




[REBOL] Re: informal /View desktop survey

2002-09-12 Thread Jason Cunliffe

 XFML looks to be quite interesting - based on RDF, which has the potential
 to tie it to the Semantic Web. There's been some criticism however that 1)
 RDF is less rich than RSS, and that the Semantic Web is doomed to failute if
 it uses RDF, and 2) that topic maps don't use the full potential of RDF.

I don't quite follow that last sentence. Probably bacause my grasp is still slim
on the most of these XML meta-kits. Can you elaborate please

Here's some brief comments about XfmlAndOtherTechnologies
http://xfml.net/index.php?page=XfmlAndOtherTechnologies

 I dunno, gotta read more.

me too..
Peter Van Dijk has set up a  mailing list for XFML. A good place to put any of
your questions, since there is small but appreciative audience who are really in
to this stuff. His site and blog are worth visiting:
http://poorbuthappy.com/ease/ [yesteday's account of his MS interview]
http://petervandijck.net/

 I WILL play with this stuff in REBOL.

 K.

Great to hear that:-)
My impression is that XFML might be very well suited to a REBOL implementation
and vice versa
./Jason


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




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Gabriele Santilli

Hi Brett,

On Thursday, September 12, 2002, 2:05:39 PM, you wrote:

BH if not parse block [
BH any [set value number! (kount: kount + 1)] |
BH set value any! to end
BH ] [throw make error! F2 can only process numbers.]

The  second  part  of the rule will never be reached. ANY does not
fail if it matches 0 elements.

In your trivial example, your code could look like:

   if not parse block [any number!] [ ...

provided you are accepting empty blocks as input too. Of course, I
imagine  your example was actually cut down form something bigger,
that needed the SET VALUE ... and the count (which you could maybe
do faster by just using LENGTH?...).

Regards,
   Gabriele.
-- 
Gabriele Santilli [EMAIL PROTECTED]  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

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




[REBOL] parse crash proposed new parse behaviour

2002-09-12 Thread Anton

Hello, run the first parse below for a nice crash. :P
Crashes on these windows versions:
- a clean REBOL/View 1.2.8.3.1 3-Aug-2002 (beta)
- a clean REBOL/View 1.2.1.3.1 21-Jun-2001
- Rebol/Link 1.0.2.3.1 25-Mar-2002/14:58:06-8:00

(clean meaning no user defined functions in user.r etc.)

 parse/all / [start: skip opt (remove start) to *]

 It is interesting, that the following code doesn't cause the crash:

 parse/all / [start: skip opt (remove start) to #*]

 Cheers
 -L

I agree with Ladislav's proposed behaviour for parse.

Ladislav's proposed behaviour for parse:

---Original Message -
From: Ladislav Mecir

this is an old parse glitch. The difference between your rules is, that
the second one didn't cause the internal pointer to get past the end of
the input and therefore it didn't fail.

Current parse behaviour:

1) If a rule causes the internal pointer to get past the end of the input,
PARSE considers it a failure. This means, that even a PAREN! rule can fail,
if it removes a part of input.
2) to yield TRUE PARSE must
2a) get successfully through the whole rule
2b) get to the end position of the input

My favourite behaviour looks different:

1) past end position doesn't mean a failure
2) to yield TRUE PARSE has to get successfully through the whole rule


Anton.

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




[REBOL] Re: ...

2002-09-12 Thread Jason Cunliffe

%.../ won't work on Linux RedHat 7.2 or Debian/GNU either.

Jason

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




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Gregg Irwin

Brett, et al

A very good post, and related to the discussion on error handling to boot!
:)

I can see at least two major ways to apply this approach.

1) Parse drives the processing of the function, automatically validating the
correctness of the argument block as it goes.

2) Parse is used only to validate the block at the entry point, like a
precondition in a Design by Contract design, and the operation of the
function is separate. You could also use parse to validate return values
(i.e. as a post-condition processor).

In a large system, and as more things are driven by dialects, this could
prove very useful indeed. Now, does anyone have a model they use to return
helpful context information when a parse operation fails? Programmers are OK
with Syntax error: expected integer! but users are probably better served
by I understood the first part (sell 400 shares of MSFT at), but then I
was expecting to see a monetary value for the sell price (e.g. $50.00), and
I didn't, so I couldn't process your request. I'm sorry for any
inconvenience this might cause you. Have a nice day. Or maybe just No sell
price was specified in your request. or even a prompt for the missing info.

In any case, I agree that this is a good tool to keep in mind.

--Gregg


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




[REBOL] Re: More dialects than you think, validating function input.

2002-09-12 Thread Ladislav Mecir

Thanks.

-L 

- Original Message - 
From: Brett Handley
...
Here is the actual function I was working on:

bayes: function [
{Calculate combined probability.}
[catch] probabilities [any-block!]
] [p0 p1 d] [
p0: p1: 1.0
if not parse probabilities [
any [
set value number! (p0: value * p0 p1: 1 - value * p1) |
set value any-type! to end skip
]
] [throw make error! reduce ['script 'cannot-use 'bayes mold type?
get/any 'value]]
if zero? d: add p0 p1 [throw make error! The probabilities cannot
be combined.]
divide p0 d
]

Sorry for the confusion.
Brett.


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




[REBOL] Re: ...

2002-09-12 Thread Carl Read

On 13-Sep-02, Carl Read wrote:
 On 12-Sep-02, Jason Cunliffe wrote:

 Hmmm.  What are three dots supposed to give? ...

 .../  = ../../= grandparent

 / = ../../../ = great grandparent 

 etc

 If you are too close to root / you'll get an error.

 Hmmm.  It looks like REBOL's behaviour with this is very
 OS-dependant...

 what-dir
 == %/Dev/View/
 change-dir %.../
 ** Access Error: Cannot open /Dev/View/.../
 ** Near: change-dir %.../
 what-dir
 == %/Dev/View/
 change-dir %../../
 == %/

 That's Amiga again.  As someone requested, what happens with Linux?

Thinking more about this, I'd say REBOL decides the %.../ is not a
valid attempt according to REBOL syntax to access a parent directory
and so gives it to the OS to sort out, the OS either making sense of
it or returning an error, which REBOL reports.

Moral of the story - only use %../ %../../../ etc. in your REBOL
scripts as a way of accessing parent directories.

-- 
Carl Read

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




[REBOL] Re: Beginner's questions on REBOL/Core and REBOL/View

2002-09-12 Thread atruter


 what does XP stand for?

eXperience (WindowsXP);I think they got the *experience* bit
down pat
eXtreme Processing (AthlonXP) ;how many degrees does *extreme* equate
to?
eXtremely Portable (RebolXP)  ;just for fun, as everyone else is doing
the XP thing nowadays


Regards,

 Ashley

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




[REBOL] Rebol Primer

2002-09-12 Thread Jim Shaw


Can anyone suggest a good primer on Rebol for experienced programmers?  I've
been a professional programmer/software engineer for thirty plus years and
have worked in many languages.  Both Rebol, The Official Guide, and Rebol
For Dummies are far too wordy and written as introductory text on
programming.  From what I've been able to learn about Rebol to date, it
appears that a 50 to 100 page primer should be plenty; especially if you are
familiar with Lisp and Forth.

Thanks in advance for your help.

Jim


-- Binary/unsupported file stripped by Listar --
-- Type: application/ms-tnef
-- File: winmail.dat


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




[REBOL] Re: Rebol Primer

2002-09-12 Thread atruter


The REBOL core manual, http://www.rebol.com/docs/core23/rebolcore.html
(also in PDF or available paperpack), is a tad more than 100 pages but it
gets pretty much to the point for those who just want the manual.


Regards,

 Ashley

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




[REBOL] ANN: Rebol/flash dialect updated

2002-09-12 Thread RebOldes

Hello rebol-list,

  I've fixed some small bugs in the dialect
  I will be offline a few weeks so don't expect any updates soon.

-- 
do [send to-email join 'oliva [EMAIL PROTECTED] BESsssT REgArrrD, RebOldes]

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




[REBOL] REBOL FAQ updated

2002-09-12 Thread Carl at REBOL

The REBOL Language FAQ is alive again.
Check it out at http://www.rebol.com/faq.html.
Now that the FAQ is stored in REBOL format, it will get updated more often.

-Carl

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




[REBOL] Re: REBOL FAQ updated

2002-09-12 Thread Larry Morgenweck

Carl
Look like the links are broken
Larry

Carl at REBOL wrote:

 The REBOL Language FAQ is alive again.
 Check it out at http://www.rebol.com/faq.html.
 Now that the FAQ is stored in REBOL format, it will get updated more often.

 -Carl

 --
 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 FAQ updated

2002-09-12 Thread atruter


Odd. The FAQ works fine under IE but Opera (6.0.5) doesn't reposition the
document on the clicked item (although it does redisplay the page). Anyone
else have similar issues?


Regards,

 Ashley

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