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

2003-10-19 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

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

2003-10-19 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/ http://valle

[REBOL] Re: paths & lookups & change

2003-10-19 Thread Joel Neely
Hi, Robert, Types are the issue... See below. Robert M. Münch wrote: > On Sat, 18 Oct 2003 11:28:07 +0200, Ingo Hohmann <[EMAIL PROTECTED]> wrote: >> >> >> change next pos: find test key pos/2 + 1 >>== [] >> >> test >>== ["Bug Report" 2] >> >>Though I'm sure, someone will come up with a better

[REBOL] Re: Testing block of types

2003-10-19 Thread Anton Rolls
This might help: foreach [cond code][ series? [print "series" break] number? [print "number"] ][if do reduce [cond value] code] when value is a series or number. Don't forget this either: value: 'hello switch type?/word value [int

[REBOL] Re: paths & lookups & change

2003-10-19 Thread Anton Rolls
Oh, I see what you're trying to do. I agree there seems to be missing a native to set the selected value. We have SELECT to get the value, but we have nothing to set the value, except the long solutions so far offered. Anton. > On Sat, 18 Oct 2003 19:57:52 +1000, Anton Rolls <[EMAIL PROTECTED]

[REBOL] Re: reduce/deep

2003-10-19 Thread Anton Rolls
Use SAME? a: b: [123] same? a b ;== true Anton. > On Sat, 18 Oct 2003 16:08:00 +1000, Anton Rolls <[EMAIL PROTECTED]> > wrote: > > > You just maintain a list of visited blocks. > > How do you this? I think you will need something like Ladislav's "equal" > function, right? Or how can you che

[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: nargs

2003-10-19 Thread Cyphre
ok here you are a newer version which also takes objects with functions ;) start of code- nargs: func [f [word! path!] /local rslt ref? args refs fn rf obj][ rf: copy [] fn: either word? f [ get f ][

[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

[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 writter

[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 meani