Rebol Enhancement Proposal - Embedding spaces in path! datatypes
[1/5] from: al::bri::xtra::co::nz at: 9-May-2001 21:04
Normal path! datatypes look like this:
word/sub-word/sub-sub-word
Currently Rebol doesn't understand strings in a path. I'm proposing that
Rebol should return things using a string as a path. For example:
block: [
"A string with spaces" [
Test [
Item 99
]
]
]
To refer to "99" it would be nice if Rebol understood the following as a
path:
block/"A string with spaces"/Test/Item
and for convenience the following format:
/"block/A string with spaces/Test/Item"
Both of the above will return "99. The last format is based on Rebol's
format for long filenames with embedded spaces, like:
%"Directory/Sub-Directory/My File.txt"
Opinions? Problems?
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/
[2/5] from: petr:krenzelok:trz:cz at: 9-May-2001 11:23
Andrew Martin wrote:
> Normal path! datatypes look like this:
> word/sub-word/sub-sub-word
<<quoted lines omitted: 16>>
> %"Directory/Sub-Directory/My File.txt"
> Opinions? Problems?
requested already for several times, proposed to [feedback--rebol--com] .... and I
don't remember if there was any answer from RT folks or not, but me too would
see it helpfull. So, RT - are there any technical problems?
even more crazy datatypes path examples: :-)
some-path/(evaluate code here)/sub-path ....
or ... some more general native extraction function ....
-pekr-
[3/5] from: joel:neely:fedex at: 10-May-2001 9:20
Hi, Petr and Andrew,
Petr Krenzelok wrote:
> Andrew Martin wrote:
> > Normal path! datatypes look like this:
<<quoted lines omitted: 9>>
> even more crazy datatypes path examples: :-)
> some-path/(evaluate code here)/sub-path ....
This last example is something I suggested quite a while back,
without
getting any response. It would do several nice things to clear up
some present referential-transparency-breakage situations.
For example:
>> now
== 10-May-2001/9:16:46-5:00
>> now/time
== 9:16:49
>> now/time/hour
** Script Error: now has no refinement called hour
** Where: halt-view
** Near: now/time/hour
>> foo: now/time
== 9:16:57
>> foo/hour
== 9
where NOW/TIME returns a TIME! value which has an /HOUR component.
However NOW/TIME/HOUR is interepted as asking NOW to apply two
refinements named /TIME *and* /HOUR. A nice usage of the paren!
type as a segment in a path would be
(now/time)/hour
which would avoid the need for another variable (e.g. FOO above)
just to get at the components of the function result.
-jn-
[4/5] from: cyphre:volny:cz at: 10-May-2001 17:55
Hello Joel ;)
> For example:
> >> now
<<quoted lines omitted: 16>>
> which would avoid the need for another variable (e.g. FOO above)
> just to get at the components of the function result.
but can use folowing without needing any variable...
>> pick now/time 1
== 17
>> pick now/time 2
== 51
>> pick now/time 3
== 12
>>
or
>> first now/time
== 17
>> second now/time
== 51
>> third now/time
== 35
>>
have fun
Cyphre
[5/5] from: ryanc:iesco-dms at: 10-May-2001 12:37
Seems that it already understands quoted strings to some degree...
>> a: [aa [aaa 1 bbb 2] "bb" [ccc 1 ddd 2] ]
== [aa [aaa 1 bbb 2] "bb" [ccc 1 ddd 2]]
>> p: to-path [a "bb"]
== a/"bb"
>> p
== [ccc 1 ddd 2]
--Ryan
Andrew Martin wrote:
> Normal path! datatypes look like this:
> word/sub-word/sub-sub-word
<<quoted lines omitted: 23>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
I am enough of an artist to draw freely upon my imagination.
Imagination is more important than knowledge. Knowledge is
limited. Imagination encircles the world.
-Einstein
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted
Librarian comment