[Radiance-general] Renaming "rview"
Greg Ward
[email protected]
Mon, 8 Dec 2003 04:08:32 -0800
--Apple-Mail-18-236316046
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
I only had a few responses to my request to run "radcollisions.csh" on
different machines. If you missed this message and are still willing
to help, I have attached the script (slightly modified) to look for
command name conflicts between Radiance on your machine. This will
help me determine what command need renaming for the next release.
It seems certain that we need to rename "rview," and from the responses
I received, also "gencat," "lam," "neat," and "calc." Here are my
suggestions for these others, along with my reasoning:
"gencat" -> "gencatenary"
This is a little-used, optional generator for catenaries. I see
nothing against making the name longer and more explicit. I don't
think anyone expected it to generate a feline, but I imagine quite a
few users wondered what the heck it did generate, as there's no man
page for it. (Saba Roufchaie wrote this little gem, and I find it
invaluable for making certain objects, like hanging chains and ropes.)
"lam" -> "rlam"
The other Unix program called "lam" fulfills the same function with a
different syntax, and isn't found on all systems, so we can't rely on
it as a replacement. I refer to it in a bunch of my C-shell scripts,
which of course will be updated with the new release to contain the new
name. (FYI, the "rlam" is meant to stand for "record laminator," not
"Radiance laminator," since it isn't a function specific to the needs
of Radiance in any way.)
"calc" -> "icalc"
Calc is a very useful, interactive version of rcalc, and I don't want
to lose it or make it's name harder to remember or much longer to type.
If anyone has a better idea, I'm all ears.
"neat" -> "neaten"
I also thought to rename it to "tidy," but that seemed a too big change
for an obscure little utility. If you've never checked this one out,
you might give it a look. I thought it was a cute little program,
which is how I named it.
This brings us to the biggie, renaming "rview." This is a tough one,
because it's a frequently used command, and one of the first commands
issued by new users as well. Besides "rad" and "objview," I probably
type "rview" more than any other Radiance command. Making it longer
would be annoying, but not terrible because by the time you've typed in
a few arguments, the finger-investment in the command name itself drops
to insignificance. At the same time, the tendency towards long
commands makes it that much worse to alter its name, because it means
that you'll have to start all over again when you end up opening "vim"
by mistake in the next Radiance release.
I'm thinking we'll want to include a symbolic link from the new name
back to "rview," for two reasons. First, old users like me are going
to have trouble with whatever we name it to because "rview" has become
so familiar to my fingers that they type it automatically. Second,
"Rendering with Radiance" and all the other documentation that's
floating about has only "rview" in it and will probably never be
updated with the new command name unless Radiance somehow outlasts us
all... I'm not particularly concerned about hiding people's use of
vim's "rview" link, since they can also type "rvim," "rgvim," or
"rgview" to get exactly the same behavior, and it's not a behavior most
users would want, anyway. (For the lucky users who don't have vim on
their system, I can tell you that "rvim" is a restricted version
prohibiting shell escapes for calling scripts and programs that provide
an editor for untrustworthy users. As such, it's probably always
executed by its explicit path as a security measure, so there would
never have been a conflict if it had been put somewhere else, like
/usr/etc -- or /dev/null!) Vim is such a command-name hog -- here are
the other names linked to it:
vi
ex
view
gvim gview
The first three are historical and therefore expected. Why they had to
add six other links is beyond me, especially when only two of them have
any different functionality. Grrrr....
OK, finally to the subject of this message, which is coming up with a
new name for an old friend. Below are listed some numbered
alternatives. I want you to write back with your favorite (pick just
one, please) and explain your reasoning. Consider it a chance to
contribute to the next release even if you've never written a line of C
code. Here are the candidates.
1. "rvu"
Possibly my favorite, because it's short and unique, and if you say the
letters, you get back the original.
2. "radview"
I'm less fond of this one, mostly because it's longer, but also because
it makes it sound like it's a subcommand of "rad," which it's not.
3. "rviewer"
This is better, because it stays close to the original meaning of the
command, which is "ray viewer," and also has the two extra letters
added at the end rather than the beginning, so you can remember the new
command name at the last minute, right as your fingers are leaving the
word and saying, "Hey -- you forgot something!"
4. "radiance_viewer_86FQ19GZ15"
Guaranteed never to have (Alias to "r" in your ~/.cshrc file.)
5. "your_name_here"
Your own suggestion if you don't like any of the others. (Not really
your personal moniker -- we aren't naming the command after you,
sorry.)
Well, those are my ideas. They're all included in the new
"radcollisions.csh" attached to this message. If you haven't run it on
your system yet, please do so and send me the output. It would be a
real shame to rename a command to conflict with yet another Unix
program, so even if you ran the last one, please indulge me again. (Do
it quickly, before "vim" takes over the world!)
And thanks!
-Greg
--Apple-Mail-18-236316046
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0755;
name="radcollisions.csh"
Content-Disposition: attachment;
filename=radcollisions.csh
#!/bin/csh -f
# Determine executable name collisions with Radiance 3.5
# Assume no one else has a program named this:
echo path was \( $path \)
set testp=macbethcal
while (1)
set mbc=`which $testp`
if ( $status ) then
break
endif
set radp="$mbc:h"
set newp=""
foreach i ($path:q)
if ("$i" != "$radp") then
set newp=($newp:q "$i")
endif
end
set path=($newp:q)
end
echo path changed to \( $path \)
echo Conflicting executables on `uname -a`
foreach i ( 3ds2mgf arch2rad bgraph calc cnt compamb cv dayfact \
debugcal dev dgraph dmake ev falsecolor findglare gcomp genbackg \
genblinds genbox gencat genclock genprism genrev genrhgrid gensky \
gensurf genworm getbbox getinfo glare glarendx glaze glrad histo \
ies2rad igraph lam lampcolor lookamb macbethcal markpath meta2tga \
mgf2inv mgf2meta mgf2rad mgfilt mkillum neat nff2rad normpat \
normtiff obj2mesh obj2rad objline objpict objview oconv oki20 \
oki20c pcomb pcompos pcond pcwarp pdelta pdfblur pexpand pextrem \
pfilt pflip phisto pinterp plot4 plotin pmblur protate psign psmeta \
psort pvalue ra_avs ra_bn ra_gif ra_hexbit ra_pict ra_ppm ra_pr \
ra_pr24 ra_ps ra_rgbe ra_t16 ra_t8 ra_tiff ra_xyze rad rad2mgf \
raddepend ranimate ranimove rcalc replmarks rhcopy rhinfo rholo \
rhoptimize rhpict rlux rmake rpict rpiece rtrace rview tabfunc \
thf2rad tmesh2rad total trad ttyimage vinfo vwrays vwright \
x11meta xform xglaresrc ximage xshowtrace xyzimage \
gencatenary rlam icalc neaten rvu radview rviewer)
set conflict=`which $i`
if (! $status ) then
echo $conflict
endif
end
--Apple-Mail-18-236316046--