home .. forth .. colorforth mail list archive ..

Re: [colorforth] ColorForth: if and -if


On 5/20/07, John Comeau <jc@xxxxxxxxxxxx> wrote:
Thanks Ray! Yes, I figured those things out eventually. What do you
mean "alive and back in the world"? Were you very ill? -- jc

Hi John, All,

Ya, I'm sick. Not life threatening, more quality of life threatening.

I never knew I had several medical problems. I've always been an
athlete. Never one to go to doctors. It's difficult for me to leave
the house now. A few of my problems stem from not knowing I've been
diabetic (2) most of my life. Weird, because I've always been in
shape, I've never been very fat, tho I did get up to 230 or so 10
years ago. I've lost 100 lbs since then. I've gone undiagnosed way,
way too long. I've developed serious neurosis. I have a hard time
seeing in daylight due to snowblindness, where everything bright just
blocks out everything else.

I don't drive any longer and I don't go to work anymore. I quit my job
a couple months ago when I knew I could no longer ambulate.

That's why I went offline. We're broke now. Nan is working harder then
ever and she's thinking of a second job as she doesn't earn very much.
It pains me to see her work so much because of me. We took on a
boarder to help pay the bills. My son and daughter are looking for
work to help support me. It will be near a year before I'll get
anywhere with social security, so I'm looking for ways to earn from
the house. I'll most likely start giving guitar lessons again. I have
three ideas for making money online, and I'm exploring those.

Medications, bed rest, learning how to prepare meals properly: that is
my life now. Very depressing. I hate even thinking about it. So, I try
to distract myself with forth and the internet. I imagine I'll have
plenty of time to do all of the projects that I've always wanted to
do.

Anyway...
I was excited to read the work you've done since i've been gone. I
can't wait to try it all out.
I've set up an office in my bedroom. There is a Pentium 4, 1 Pentium 3
( with out monitor ) and 2 pentium 1's set up now for testing
colorForth, RetroForth, and Toka stuff.

I've totally reworked the ChuckBot the Cursor application. Much better
coded now. I LOVE ColorForth. It's so much fun.

I had been doing most of my graphics in colorForth with ICONS and BOX,
but more recently I've been playing with LINE. LINE was new to me. If
you don't already know, it takes an X, and a Y, an offset from X and a
length, in that order.

I used LINE to create a word LINES that can draw several kinds of
parallelogram and triangle. LINES takes X, Y, Height, Width,
Offset-multiplier, and Effect-multiplier. Those multiplier words are
temporary names as I need to figure out better names. Here's what it
looks like in pseudo-forth:

Stack: effect width offset x y height

: LINES ( ef wt of x y ht -- )
            for 2dup i + at
           0 offset i * +
     width effect i * +
                line next ;

The values of offset and effect can turn on or off that portion of the
word LINES. They can be positive or negetive for different effects. As
the offset portion works against the X value there is nothing here to
re-adjust X when an offset is used. Either add that part of the word (
seems trivial ) or just work with the fact that an offset can start
new lines left of X,

The FOR/NEXT obviously adds the height by adding new lines on the Y
axis by adding i to Y every go around. After AT, the offset portion
starts out with zero to have somewhere to accumulate the offset value
times the current i and added to the zero. For positive offset values
the next Y will start offset pixels in the Y+ direction, and negative
values do as you would think, providing the offset slope to go in the
Y- direction. The next section takes the width, effect and i to slope
the other end of the lines, the Y+ end that is.

LINES called without any width but have a -1 offset and a +2 effect
make triangles. Add some width and you have a trapaziod. Swing the
offset or the effect the other sign and you have a parallelagram. I've
drawn a few things using this LINES word, and I'll post some pix and
code soon as I get all caught up here.

You scientist types might not get a lot of fun-mileage out of such an
exercise but for me... BLISS!

When you don't know anything, everything is a discovery. :-)

Ray out.

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com