[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread A J Martin
Volker suggested: how about extending path syntax? a/5:10 How about these two alternatives: a/5-10 a/5..10 ? Both use reasonably common indicators which mean missing something out, which is very obvious. Andrew J Martin ICQ: 26227169 http://www.rebol.it/Valley/

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Brett Handley
As Max wrote: I love philosophy so, nothing here is personal... :-) Volker suggested: how about extending path syntax? a/5:10 How about these two alternatives: a/5-10 a/5..10 ? Both use reasonably common indicators which mean missing something out, which is very

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Gabriele Santilli
Hi Brett, On Monday, October 20, 2003, 8:29:41 AM, you wrote: BH So is a/5..10 one path of length two - the second value (5..10) being a new BH datatype? Something like a pair? There are two issues here that people seem to forget. First of all, REBOL is based on values, not on operators.

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Carl Read
On 20-Oct-03, Brett Handley wrote: As Max wrote: I love philosophy so, nothing here is personal... :-) Volker suggested: how about extending path syntax? a/5:10 How about these two alternatives: a/5-10 a/5..10 ? Both use reasonably common indicators which mean missing

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Brett Handley
PROTECTED] Sent: Monday, October 20, 2003 8:33 PM Subject: [REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions? On 20-Oct-03, Brett Handley wrote: As Max wrote: I love philosophy so, nothing here is personal... :-) Volker suggested: how about extending path syntax

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Gregg Irwin
Hi Max, MOA I love philosophy so, nothing here is personal... :-) Yes, same here. MOA a lot of the code I see from MOA the guru is hard to read for me, simply because it uses tricks I have not MOA stumbled on yet... The words are all similar, but when looking at them, they MOA seem to have

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-20 Thread Gregg Irwin
Hi Volker, VN Intersting: 'b/1:2/1:2 VN == b/1:02/1:02 VN a valid path. with time-values. VN now when i do a spreadsheed-dialect i could use rebol-syntax directly. VN with up to 60 columns :) I do kind of like the idea for a spreadsheet dialect. Have to think about how you could catch

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-19 Thread Gregg Irwin
Hi Volker, VN Gregg, cool . but how about parse? b: [1 2 3 4 5 6 7 8 9 10 11 12 13 14] VN == [1 2 3 4 5 6 7 8 9 10 11 12 13 14] parse b[ 4 skip copy v 2 skip] VN == false v VN == [5 6] That would work well for a single slice, but I'd still wrap it in a function to make the meaning clearer.

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-19 Thread Maxim Olivier-Adlhoch
before I start, I don't want you to know that I agree to most of what you say in theory, I'm just trying to see if there isn't a way to extend the base syntax in a way that code is shorter, and easier to read. Since we are in email, the tone gets perceived by the reader, not sent by the

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-19 Thread Ingo Hohmann
Hi Maxim, Maxim Olivier-Adlhoch wrote: ... advanced features get used by advanced users... a lot of the code I see from the guru is hard to read for me, simply because it uses tricks I have not stumbled on yet... The words are all similar, but when looking at them, they seem to have no

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-19 Thread Volker Nitsch
a[ 5 : 10 ] instead of copy/part skip a 5 skip a 10 ? how about extending path syntax? a/5:10 ? a/(5 + 7 + 29 + 3) is hard to read IMHO. the / is very hidden now. how about something spreadsheet-oriented? could even be a whole datatype. i would like to position inside a matrix, so having a: [

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-18 Thread Carl Read
On 18-Oct-03, Maxim Olivier-Adlhoch wrote: -Original Message- From: Carl Read [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 2:02 AM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions? On 17-Oct-03, Andrew Martin

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-18 Thread Anton Rolls
That looks like a new range selection dialect. I can imagine a range-pick function perhaps: range-pick: func [series dialect][...] blk: [a b c d e f g] range-pick blk [1 (3 5)] ;== [a c d e] That would be similar to Andrew's picks function. Anton. I'm

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-18 Thread Maxim Olivier-Adlhoch
That looks like a new range selection dialect. I can imagine a range-pick function perhaps: range-pick: func [series dialect][...] blk: [a b c d e f g] range-pick blk [1 (3 5)] ;== [a c d e] but now you can't leave the start and end infinite unless we do something like: blk/[ 1 (3 *)] I

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-18 Thread Volker Nitsch
Gregg, cool . but how about parse? b: [1 2 3 4 5 6 7 8 9 10 11 12 13 14] == [1 2 3 4 5 6 7 8 9 10 11 12 13 14] parse b[ 4 skip copy v 2 skip] == false v == [5 6] -Volker Am Samstag, 18. Oktober 2003 21:02 schrieb Gregg Irwin: Max et al, I agree that something more concise than raw REBOL

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread Carl Read
On 17-Oct-03, Andrew Martin wrote: Earlier I wrote: X[2] == b It looks like I'm solving problems which not yet exist. But it got me thinking anyway, so would this be useful... blk: [a b c d e] == [a b c d e] blk/[1 4 5] == [a d e] ? -- Carl Read -- To unsubscribe from this list,

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread A J Martin
Carl Read wrote: Earlier I wrote: X[2] == b It looks like I'm solving problems which not yet exist. But it got me thinking anyway, so would this be useful... blk: [a b c d e] == [a b c d e] blk/[1 4 5] == [a d e] blk: [a b c d e] == [a b c d e] picks blk [1 4 5] == [a d e]

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread Carl Read
On 17-Oct-03, A J Martin wrote: Carl Read wrote: Earlier I wrote: X[2] == b It looks like I'm solving problems which not yet exist. But it got me thinking anyway, so would this be useful... blk: [a b c d e] == [a b c d e] blk/[1 4 5] == [a d e] blk: [a b c d e] == [a b c d e]

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread A J Martin
Carl Read wrote: ? picks No information on picks (word has no value) Hmmm, seems to work OK for me: :-) source picks picks: func [ [catch throw] {Returns the values at the specified positions in the series.} Series [series! pair! event! money! date! time! object! port! tuple!

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread Maxim Olivier-Adlhoch
-Original Message- From: Carl Read [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 2:02 AM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions? On 17-Oct-03, Andrew Martin wrote: Earlier I wrote: X[2] == b

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-17 Thread Michael J. Mastroianni
Hi all - This thread reminds me of some of the very nice MATLAB notation for referencing matrix or array elements: A(1:10) - elements 1 thru 10 A(:,5:10) - all rows, only columns 5 thru 10 A(5:10,:) - all columns, only rows 5 thru 10 A(:) - all elements A'- all elements

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-16 Thread Maxim Olivier-Adlhoch
Andrew Martin wrote: It occurred to me as I was writing Rebol code, that it's possible to re-use these characters [], () {}, in useful ways. I've noticed that when I'm writing block!, paren! string values, I leave white space before and after the [], () {} characters. It would be

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-16 Thread Volker Nitsch
Hum. If this magic-char-thread is serious, could i borrow someone my perl-interpreter? ;) -Volker Am Donnerstag, 16. Oktober 2003 15:06 schrieb Maxim Olivier-Adlhoch: Andrew Martin wrote: It occurred to me as I was writing Rebol code, that it's possible to re-use these characters [], ()

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-16 Thread Andrew Martin
Volker wrote: Hum. If this magic-char-thread is serious, could I borrow someone my perl-interpreter? ;) With Rebol, my words mean what I want them to mean. :) :-/ But if I want to be understood and want to understand others, it's best that we all agree on what Rebol or R# words mean to all of

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-16 Thread Gregg Irwin
Hi Andrew, AM It occurred to me as I was writing Rebol code, that it's possible to AM re-use these characters [], () {}, in useful ways. I've noticed that AM when I'm writing block!, paren! string values, I leave white space AM before and after the [], () {} characters. It would be nice to

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-16 Thread Andrew Martin
Earlier I wrote: X[2] == b It looks like I'm solving problems which not yet exist. Andrew J Martin Attendance Officer Grail Jedi, fighting with laser swords... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-15 Thread Bohdan or Rosemary Lechnowsky
Andrew, That would break some existing Rebol scripts. Right now, someone might have some Rebol code written like: x: true either X[2][3] This would break with your implementation. Why not use X/2 ? It's shorter anyway. Bohdan Bo Lechnowsky Lechnowsky Technical Consulting At 05:05 PM

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-15 Thread Ashley Truter
X: [a b c] == [a b c] X[2] == b In other words, by running the block hard against the word, it's like: pick X 2 Why not simply use path (x/2 in the example above) notation, it saves a character at least. ;) As for finding other uses for [], () {}, if it makes sense in a

[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-15 Thread Elan
Hi Andrew. You wrote: I've noticed that when I'm writing block!, paren! string values, I leave white space before and after the [], () {} characters. After puzzling over your intro briefly, it appears to me that you see the additional space as being significant in distinguishing between