I would use x0, x1... and X, Y.... to avoid conflicts

2006/9/16, Cliff Reiter <[EMAIL PROTECTED]>:

I have taken a peek at the image3 addon under J601 and 90% of things
work and many users woulld be able to use it as is -- some minor changes
are needed to get the labs working and then 99% of things work. Still,
some more subtle things go wrong and I need to spend more time before
offering a first J601 version of the scripts which I would like
to do soon. Since I use the image addon everyday, and I have J
things I want to write about and scripts
I want to share, it makes sense to try to move to J601 quickly.
However, I also hope to take a more leisurely look at the scripts
and move them to J601 style in a more substantial revision later.

The image addon is only one of many large things I will need to move
over, but it is the top priority, and here is my first peek at the more
substantial move over to 601. The addon is almost 4000 J lines organized
into 14 scripts. A quick search for LF,'x=.'  etc led to a couple dozen
suspect places. First was a function in color_spaces.ijs that had a
suspect x=.  (I haven't looked further)

NB. contrast expansion
NB. using optimal contrast
con_exp=:3 : 0
'y u v'=.0 1|:RGB_to_yuv y.
cft=.+/\(%+/) freq_tab to255 y
x=.(i.%])256
y=.(x;cft)pw_lin y
yuv_to_RGB 0|:y,u,:v
)

Now that I see it, the function also had three hidden y=., u=. v=.
discouraged assignments. What would be the encouraged style for
rewritting the function for J601? It works as is,
I could just change y. to y, but then I use y for two different
meanings on the first line which I usually avoid,
or I could rename y u v and x, but it seems kind of strange to avoid
y u v as variable names in yuv color space.
I know there is no correct answer to my query -- since it involves
style, but I really do want to know what others think.
Best,
Cliff

--
Clifford A. Reiter
Mathematics Department, Lafayette College
Easton, PA 18042 USA,   610-330-5277
http://www.lafayette.edu/~reiterc

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
         /|_      .-----------------------------------.
        ,'  .\  /  | Með léttri lund verður        |
    ,--'    _,'   | Dagurinn í dag                     |
   /       /       | Enn betri en gærdagurinn  |
  (   -.  |        `-----------------------------------'
  |     ) |        (\_ _/)
 (`-.  '--.)       (='.'=)
  `. )----'        (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to