[REBOL] Library
From: al:bri:xtra at: 20-Oct-2001 10:56
Gregg and Joel wrote:
> [We need a library of re-usuable units of code, that can be browsed.]
I store my library of rebol code in a directory, like:
%/Rebol/Values/
with View and Core in:
%/Rebol/View/Rebol.exe
%/Rebol/Core/Rebol.exe
They're all 'do-ne by Rebol at startup by this line in my %User.r file:
do %../Values/Values.r
%Values.r contains:
use [Patches][
Patches: %Patches.r
if exists? Patches [do Patches]
foreach File exclude sort read %. reduce [Patches
Rebol/Script/Header/File][
if find/last File %.r [do File]
]
]
Which 'do-es %Patches.r first, then every file in the %/Rebol/Values/
directory except for %Patches.r and %Values.r.
Each file in %/Rebol/Values/ is named according to the main function or
purpose within it. So my 'Average function is in %Average.r, 'Make-Object is
in %"Make Object.r", my 'Roll and dice functions are in %Dice.r, and so on.
I also have my site creation software, that automatically includes the
Values directory as part of my site. Currently, there's no index, it's just
sent to my web site -- so you'll find these functions in the directory at:
http://valley.150m.com/Rebol/Values/
but you'd have to know the names first.
It shouldn't be too hard to modify this software to create a HTML version of
each Rebol script, based on treating each Rebol script as if it were eText,
and to make a index. Then the lot could be browsed on line with a browser,
and clicking on the line found in the line of the header:
File: %"Values.r"
should allow retrieval of that script.
Because my contact details are in each script and that's processed by my
eText software to automatically generate email mail-to and links, I can be
contacted by people who like additional features, or want to report bugs.
Then after I've modified RIP to work as a function (instead of interactively
as it does now), to have a .RIP of the entire contents of my %Values/
directory available as:
http://valley.150m.com/Rebol/Values.rip
And also, perhaps, a %Index.r file at
http://valley.150m.com/Rebol/Values/Index.r
which contains links to each file, so as to allow Rebol scripts to
remotely interact with the scripts.
For a group situation, we probably need a wiki-like thing, which understands
Rebol script. This could allow people to interactively browse and
successively refine the Rebol Values available there.
I believe there was a provider recently that might volunteer this?
Andrew Martin
ICQ: 26227169 http://valley.150m.com/