Saturday, July 07, 2007

Plans Plans Plans

Not much of one. I'm planning to go snorkeling tomorrow again. This time I will be taking my underwater camera, so hopefully I'll be able to share the view from sixty feet down... hopefully I can go lower though now that I feel a bit more comfortable diving. Going that deep also depends on the scuba divers around. So far I don't cut things close enough to be too concerned about problems, but as my mom says, "Accidents happen." If there are scuba divers around that would notice me passed out and sinking, it gives a person an extra bit of confidence for dangerous and insane stunts!

In other personal news: jump roping is fun! Especially now that I've gotten used to it and have the skill to do more than ten at a time (go ahead and laugh. You try it!). At a very slow rate, I've been able to jump rope more than 20 minutes at a time. I was going to opt for running, but apparently jump roping isn't as hard on the joints as running. That makes a certain amount of sense I guess... jump rope jumping may be constant ups and downs, but it is always on the balls of my feet. While running, I'm landing on my heal at every step.

Training-wise, I am being a little more careful about the 'how' of my training. I started looking into exercise routines to improve my heart health, but mostly just news on what I can do to lower my heart rate (for longer snorkel dives!) I put my current resting heart rate is 54. Oddly enough, I only get that rate while working. While sitting in my room, upstairs, outside, or in the car, my resting hear rate is 60. It's like clockwork. I can do push-ups and curls in the morning, take a shower, go to work and sit in my chair, wait ten minutes, and I only count 54. Just before I go to lunch? Still 54. Walk upstairs, sit a half hour and read, and my heart rate is at 60. It just doesn't make sense.

Friday, July 06, 2007

Thursday, July 05, 2007

1st Timothy

There is a lot of information and insight available in the tiniest pieces of the Bible. While I was jumping rope today, I was trying to memorize a verse of 1st Timothy. Since I'm just starting, I am still on verses one and two. In those two verses are an incredible amount of information, and I wanted to share my thoughts on those two verses.

vs 1. Paul. The first thing he says is that he is an apostle by command. It wasn't his choice, he was going his own way, when boom! Jesus Christ stepped in and blinded him and told him what he wanted done. I find that reassuring. In all of our weakness and failures and sin, God can still step in and redeem us and put us back on the right path.

vs 2. Paul says an odd thing to Timothy, and it's something that I'm going to look into further tomorrow: "grace, mercy, and peace." What didn't occur to me until about minute 30 of jumping (at that point, the brain starts loosing focus and going onto tangents) was Paul's repetition. I always considered grace and mercy to be identical. If someone is merciful, he is showing grace. Likewise if someone is showing grace, he is being merciful. I can't see the difference between the two concepts - yet Paul, in wishing three good things upon Timothy repeats himself with "grace" and "mercy". Such basic concepts, and yet my understanding about the simplest?/greatest of God's gifts is lacking.

vs 1 and 2: In order, Paul refers to God as God our Saviour, Jesus Christ our Hope, God the Father, and Jesus Christ our Lord. In those four phrases is a great layout of who God is. For Christians, He is a savior, a hope and our lord - but he is everyone's father. Everything and everyone around us had our source in God. Those that follow Him have even more though: they can count look to god as a savior, a hope, and a lord. I find that a very comforting thought.

Thursday, June 28, 2007

Parents and Philosophy

My parents are at a craft show right now, unloading, unwrapping, painting, organizing, and tarping their work, just to name a few of the things they need to do before Saturday comes around. I think this is the first year that Mom and Dad have done all the setup by themselves. They've usually had me or one of the other kids to help out with the work. I hope everything goes well for them - four days of setup may sound like a lot, but the time flies while setting up.

I'm readying a book right now "Voyage From Yesteryear". It's a pretty good book portraying how the author sees a near-perfect human world operating. There are problems that come in from the outside, but by the end of the book, you see that the "Chironians" (residents of the planet Chiron) had everything well in had, and there wasn't even much worry about the final outcome from the Chironian side. I would like to quote from the book, a line I think is pretty accurate describing man and his capabilities.

I said the mind was an infinite resource, but only if you don't squander it. Don't you think that makes an interesting paradox?


My lunch break is almost over, so I need to get prepared for work again. I hope everyone has a good weekend. I'm planning to go snorkelling again this Saturday. Remember I said I had some friends down here, just not my own age? Well, it looks like there is an outside possibility one of those friends would go snorkeling next weekend/July 4th - around that time. Time will tell. Now I must go exercise my brain cell through work.

Tuesday, June 26, 2007

The Unplanned Life

I've been down in Florida for five months (almost). I can't say that is has been anything special, but there are a few things that I've learned/grown used to.
  • I've gotten used to washing my own clothes on a regular basis. I don't go home weekends any more, so I can't give my mom the joy of doing something for her kids. :-)
  • Sandals have become a new love in my life. I had to wear them after I had my surgery, and I found I really like wearing sandals. Getting used to the sandals was a three day process, but after breaking them in, I wear sandals all the time now.
  • Excess weight keeps stalking my every move. If only I could give up Taco Johns. It is still a work in progress.
  • Gave up cable TV. TV just sucks up all the free time in an evening, and I enjoy working on my hobbies far more than sitting in front of a TV - so I gave TV up. I still watch movies though.
  • Web sites are tougher than I thought. I tried designing one for my sister, but I just couldn't keep slogging through it. I tried designing one for myself - that didn't even get off the ground. I assumed it would be like programming, but I can't keep up website design like I do programming. Maybe I just need to get better at HTML and CSS.
  • Programming is enjoyable. I've found that I really do enjoy the challenge of programming. I especially enjoy moving from topic to programming topic - I don't master any of them, but I do learn enough to be satisfied before I move on. Example: My IO language kick earlier moved into some OpenGL push which is moving into a vector graphics format interest (all done within the framework of the cool IO language). Why are there no general purpose vector graphic formats available?
  • I found that I enjoyed scuba diving and snorkelling. I'm planning to go snorkelling again this weekend if anyone wants to join me.
  • Without constant extemp pressure, I don't keep up on current events nearly as well as I should.
  • It is definitely lonely without someone to accompany me on weekends or evenings. I have made a few friends, but none my age with my interests, so the friendships are more a "I'll say hi and ask what's going on, then leave". After mulling it over this weekend, I'm going to go swing dancing to meet people my age. At least conversation won't center around what work is like... and hopefully conversation won't center around sports either.

Sunday, June 24, 2007

Snorkeling or Snorkelling

I went snorkeling ( spelling can also be snorkelling ) at Blue Springs this weekend and found it to be a blast! When I was doing my training dives, I did some snorkelling then, but with the wetsuit, I could barely go 15 feet. Without the wetsuit, it was quite easy to dive down deep. In fact, I go lower than I did scuba diving. 60 feet down to be exact. Getting down that far though didn't give any time to look around though, so usually I tried to hang out about 50 feet. There were some rock ledges that I could hold onto so I didn't start floating up. There really isn't much to see at that depth other than the rock formations the spring carves.

If I ever go snorkeling with a scuba diving buddy, I want to try a cave that is thirty feet down. I don't know how long it is, but it took the scuba instructors about 3o seconds to do it with scuba equipment. At only thirty feet down, I figure a 30 second jaunt through the cave is definitely doable, but I would want someone to be able to rescue me if I didn't come out!

For those of you who thing snorkeling might be fun - some warnings.
  1. Don't hyperventilate to hold your breath longer and stay under. Hyperventilating fools your body into thinking there is more oxygen than there really is. When you reach the point that 11 percent of the air in your lungs is oxygen, your body realizes that it got out of sync with your brain, so it knocks you out so you don't keep trying to do crazy stuff like hold your breath too long: unfortunately for you, you're underwater at that point, and the body's technique fails. This usually happens about 15 feet, because divers tend to cut the dive close, and 15 feet is where your brain and body happen to catch up.
  2. Don't accept air from a scuba diver. The air at 60 feet down is under 3 atmospheres. If you hold your breath at all coming up, your lung can be damaged from expanding air. While scuba diving, we're told not to hold our air at all, because even while we're floating, waves on the surface can be changing our effective pressure. Even 4 foot differences is enough for small damage. It takes years for that much to be a problem, but snorkelers can cover 15 coming up within a second. (The rate you rise continues to increase as you float towards the surface)
  3. For the same reason as number two, don't use air pockets you find underwater. The cave I want to dive through has an air pocket. If desperate, I would use it, but then again, I already know what to do if I'm rising to the surface with compressed air in my lungs (blow small bubbles out constantly.) This year, a kid had a problem because he used that air pocket at blue springs and didn't know what scuba divers know.
There are some advantages that you get while snorkeling, that you don't get above the surface. When you put your face under the surface, a few survival features your body has kicks into gear
  1. Bradycardia - a 20 percent drop in heart rate occurs while under water - nice!
  2. Vasoconstriction - your blood vessels start supplying the vital parts of your body by constricting the vessels in your arms and legs. If you're in and emergency and in cold water a long time, this can save your life (at the cost of your appendiges possibly.) While snorkeling, it just means your oxygen consumption drops.
  3. Splenic contraction - One function of your spleen is to hold oxygenated red blood cells in reserve until needed. Diving underwater triggers this mechanism and boom! You have even more oxygen saturated blood cells than you did before! Apparently in seals, the spleen has been seen to contract to 16% of it's original size. I have no idea how much contraction occurs in humans
  4. Blood shift - occurs because of the pressure drop. blood plasma fills up the vessels in the lungs to reduce volume. This keeps your lungs from collapsing in on itself at depths greater than 30 feet. Doesn't help you stay under longer, but it does mean you can have a fun experience if you go beneath 30 feet!
That is all folks! Hope it was an informative lesson on snorkeling. If you have any questions, just ask in comments. I'm sure Wikipedia also has something very informative and better arranged than my lists.

Fun fact: Umberto Peliazari's heart rate drops to 8 beats a minute while diving.

Friday, June 22, 2007

IO Language - Open GL

I've been experimenting with the OpenGL addon for IO and my result is below.
There is no actual code behind this to enter text or anything. This was just a test program to see if I could get IO's implementation of OpenGL running. I don't know the problem was before, but the last version of IO I had was a bit buggy when importing addons. Last week I downloaded a new version, and everything in OpenGL was working wonderfully.








Here is my IO code for those who are interested.

Thursday, June 21, 2007

Planned Parenthood Problems

I've never been a fan of Planned Parenthood. Their whole philosophy is against what I believe as a Christian. Their "birth control" options include emergency contraceptives and abortion, both of which happen after conception. They go so far as to say that "Today, abortion is legal nationwide and is one of the safest of all available medical procedures.

This is hardly a newly acquired dislike of Planned Parenthood, but yesterday I came across some more information on Planned Parenthood that was chilling - the operators on the phone were willingly ignoring rape and doing all they could not to know about it and telling the person on the phone to not tell anyone about it. This wasn't just one or two instances; apparently over 800 operators country wide were found to ignore statutory rape AFTER they knew about it (and told the reporter how to not get their boyfriend in trouble) . The setup was a 13 year old girl getting pregnant with a 22 year old boyfriend.

Widespread corruption and dismissal of laws by Planned Parenthood. Never a good situation, especially in an organization dealing with human life.

Wednesday, June 20, 2007

Hate Crimes

I've been following/catching up on news lately and there were a few issues that I thought I would share with readers.

The first issue is that of hate crimes. I've always had a strong dislike for hate crime laws because of the principle involved: the government mandates different punishments based solely on what you are thinking. I don't have a problem with differing punishments for the same crime... maybe I should elucidate a few of my philosophies and beliefs first.

beliefs:
1) Sin deserves punishment.
2) Mercy is quality man can show

Personal idea (as far as I can tell it is based on the Bible)
1) The mortal punishment for sin is based on actual action.
2) The punishment for an action may be based on the belief
behind an action, but we're only given physical actions to
judge.
3) Government has never been shown or told to be merciful
4) Man should be merciful (and wise, don't forget that part)

Conclusion ( short at this point, since I spent so long on the first part ):
1) Government should mandate punishment based only on physical action
2) Government can mandate a range of punishment so that the implementors of the law (men such as judges and juries) are able to show mercy.
3) Governments role is not to differentiate punishment for the same actions through the thought, which is the definition of what hate crime laws do.

A general overview of the issue
Overview according to HSLDA
The text of the law at issue - HR 1592 RFS
The definition of a hate crime the above law uses - H.R. 3355

Whew - OK. its getting late now, I'll post the next issue tomorrow. Let me know if I made some huge flubs or if my conclusions or basis don't flow together well

Tuesday, June 19, 2007

Family Visit Plans

Another big program done for my boss. It still needs to be tested, but I managed to finish it in four days - and that includes a new feature my boss wanted added - user defined pictures displayed on the dialogs. That took a full day. The good thing about it is that features that I would have said were impossible without a big program are now able to be found and implemented by me! Six months back, I had tried the same project of adding pictures and spent three or four days on it before my boss told me to move onto something more productive. Six months later? One day to find, implement, and test!

I know most of you aren't interested in my slowly advancing programming skills, so I'll move onto something a bit more family oriented.... MY SISTER IS COMING DOWN!!!! She is planning to visit sometime in August, and M seems set to come down. It's going to be cool! I guess she just can't get enough teasing from mom and dad - it's up to the master to properly tease and poke her! (Maybe not poke... she's can catch up to me and poke me back. Must be all that lifting at work... or I'm out of shape? Or both! )

I just hope that she has enough fun and see enough sites and enjoys my sophisticated and calm company enough that she is glad she came down. It's a bit nerve racking thinking that she would come all this way to visit and not have fun. :-(

But! Margaret is Margaret and she will do what she wants, and I hope you have fun! I'll see you in August!

And as official notice - Blue Springs this weekend. I am going to try snorkeling, and if my sister likes it enough, maybe she'll want to try it at a spring or the ocean.


A picture of me preparing to scuba dive, I wasn't quite ready for a picture, or I would have shown off my sculpted body a bit better. ;0)

Thursday, June 14, 2007

Zoom

I watched "Zoom: Academy for Superheroes" tonight, and I have to say, I'm putting it up there just above "Shark Boy and Lava Girl." In case of mistake, I did want to mention that "Shark Boy..." was high on my enjoyment radar. What I found impressive about "Zoom" was the fact that the producers didn't skimp on special effects when needed. I don't remember seeing any wimpy special effects during the whole thing.

And for a final update on the car... perfect! It has been a full week since I repaired the brakes and wheel cylinder and I don't see any leaks at this point. Whoo hoo!

Workwise, I've spent about sixteen hours working on a big inventory program, and I'll guess another few days before finishing. For a big master program, a week. That portends good things for smaller programs!

Sunday, June 10, 2007

Car Repair - Part Two

'Tis done! I had to disassemble the brakes a few more times during the test phase of the tires - but I think I fixed all of my brake fluid leaks. It is extremely nice to be able to pull up to a stop light and push on the breaks and not have to keep pushing the brakes over and over to push more break fluid into the lines. It does make me pay a lot more attention to the small sounds the car makes... "Is that small knocking sound every time the wheel goes around from changes I've made these last two days or was it there before and I never noticed it?"

I have a new life's ambition - daredevil gymnastics

When I saw the Chinese gymnastics at the boat races a month or two back, I saw some of the kids practicing, and they did some moves just as neat as these, but nothing quite as risky. My favorite move I saw a few months back was seeing the boy lay on the ground on his back with his elbows on the ground and his hands up, and the girl do a hand stand on his hands. At this point, the boy would roll over and over, keeping the girl on his hands. At this point, I can't remember exactly how he managed to do that while on his stomach? I don't even have a video of it. I'll bring a camera next year though!

Saturday, June 09, 2007

Car Repair - Part One

Today I took the first big steps of becomeing self-sufficient: I tried to repair my car. Specifically, my back brakes were leaking, so I'm replacing the back wheel cylinders and brake pads. Starting about eleven, and going until 7:30, I managed to do one back wheel. In the process, I stripped screw and broke a break line. The last two, I'm not going to count against my car repair ability, since my overseer was 99% certain the last car repair place I took my car to did it to make it harder for me ( long story, maybe I'll elucidate one day ).

lessons learned from this experience?
1) Estimations on time are always short
2) You can't repair a car and keep your hands clean
3) Even the cleaning materials get your hands dirty
4) Thank my boss over and over for having me get a car repair manual first
5) A car repair manual for a complicated job like this is VERY useful
6) Not having all the tools makes car repair extremely hard
7) I now know how my back braking system works
8) I have a car repair manual for other fixes ( such as air conditioning fan )
9) I still have a long way to go tomorrow for the other side's repair
10) I feel confident that I could repair something if I needed to do so

Friday, June 08, 2007

Debit, Credits, and Calculator Troubles

The debits and credits aren't so much trouble, but setting up the file access protocol for my program is a bear. I think a solid day would be a big step forward - unfortunately I don't have day.

For work, I've spend the last 12 hours programming a calculator. It's a lot harder than it looks. Most of the time was just trying to figure out how things were supposed to work together. Simple you say? Only a calculator you say? Let me share but one of the problems I had. I STARTED with a simple order of operation, on 3 separate calculators, along with their results. I posted my final version at the bottom.

# - is any number you enter - I tend to use nine because it is the easiest for me to reach.
() - between the parenthesis is the result of the buttons pressed. Try it out on your calculator. See what format you get into. My second boss was also following along on a second calculator and had a different format than listed, but I didn't bother to catalog it, since my boss had already decided on a general format by then.

Casio Calculator
#= (#)
#/= (1/#)
#*= (#*#)
#+= (#)
#-= (#-#)

Window Calculator
#= (#)
#/= (#/#)
#*= (#*#)
#+= (#+#)
#-= (#-#)

Adv Calculator - our old software's calculator
#= (0)
#/= (#/0)(Divide by zero error)
#*= (#*0)
#+= (#+0)
#-= (#-0)

The calculator format my boss chose and I programmed
#= (#)
#/= (#)
#*= (#)
#+= (#)
#-= (#)

Such simple operations vary so much. The more involved such as a double equals, square root, percentage, varied drastically. The "%" especially was loco - though the button looked the same on different calculators, they didn't even do close to the same operations.

Monday, June 04, 2007

Keeping is Lazy

I'm staying lazy involuntarily. I had a hang nail and went to a podiatrist to get it removed, thus I now have to stay away from strenuous activities that involve toes. Fortunately, by carefully ignoring doctor's orders, I managed to bike six miles yesterday... and walked three today. I did make one small concession to the doctor and wore sandles for both activities. Unfortunately, I had to cancel my trip to blue springs this weekend and skip pain class. This coming weekend, I really want to go to SeaWorld, so I'm going to move my trip to Blue Springs back two weeks. I can't wait to try out my underwater camera in clear water - my earlier pictures were too dark.

In other exciting news: I now know the difference between a credit and a debit without a doubt. Very useful - especially since my job is programming accounting software!

Wednesday, May 23, 2007

Random Plans

I've officially started my new workout regamin. I was thinking about switching my home workout routine around a bit, making the workout more structured. After a week of mulling it over, I decided to try a new format - compound interest! Every week I'm going to increase the numbers involved by 3% and see how long I can keep up the exercises, but I'm cheating some because I'm starting with an easy 20 of everything: 20 push ups, 20 leg lifts, 20 setups, 20 second handstand, and whatever I can get for curls. This isn't close to a full or balance workout, but I think it will be good enough for an experiment.

What started me thinking about switching my workout was when I learned when I would be going home. I have a little over a month to get in shape for my homecoming. The vacation this time will be for over a week! I want to get my airline reservations finished before the week is out, but it may get put off a bit longer. :-)

I don't have many more random plans to share - I'm heading to WalMart after work to get a CD of some pictures from my camera so I can send them off to a friend. The pictures are of the Cinco de Mayo party... Oooo. I never posted about that. Maybe another day.

One final bit of news to remind my readers that I am a law abiding (cough), honest citizen.
During my last trip to WalMart, I bought StarCraft. I didn't buy it because I wanted to play the game more, but because I have played the *free* versions of the game a lot and I wanted to make restitution.

Tuesday, May 22, 2007

Scuba Diving 101

Ta-Da!

I've completed my first open water dive. My class went to Blue Springs and went
down the into the spring... but I get ahead of myself.

The class met at our lovely diving shop at the dreadful hour of 7:00 AM Sunday morning and I carpooled with another person and we all drove down to the spring together. When we got to the entrance, we stood in line to sign a release that we wouldn't take anything, disturb the environment, dive safely, etc. The park only lets in 35 divers at a time so the spring doesn't get too crowded. Of course, if you are a snorkeler or a swimmer, you can walk straight in. We parked at the entrance to the spring, got suited up, learned how to use an underwater compass, and walked a tenth of a mile to the source of the stream. The walk was the hardest part of the whole trip. We're suited up in 5 mil two-piece wet suits, with all of our equipment and extra
weight, and we walked... and walked... The wet suits are meant to conserve warmth in cold water, not in a warm May day in Florida. Everyone was happy to step into the cold spring water.

We got our masks and flippers on and did our skills testing in a shallow area of the spring, only 6 or 7 feet deep. Then we got to suit up and go into the spring depths!

Diving into the spring was an experience. The opening was 6 feet by 20, looking like a big scar in the ground, and we had to swim down against the spring water coming up to reach our desired depth. We swam facing down, and as we went down, it just kept getting darker and darker. There is NO way I would go down a black cavern with black hidden recesses unless I knew it was safe like this one. As we got near our lower limits for this dive, we could continue to look down into the spring openings and we could see other divers practicing their caving skills. More accurately, I could see the beams from their headlights shining around and moving. My description does the experience little justice, suffice it to say, it was great to watch and also highly tempting to drop a small, loose stone to see I could hit the invisible divers below.

I would have loved to have gone deeper, but 55 feet was the limit for this class. We held onto the side ledges or swam around so we didn't continue our free fall into the depths. When we came up, there were quite a few more divers arriving and snorkelers galore! The water was freezing and I have no idea how the snorkelers handled the cold without wet suits. It was pretty cool to see a snorkeler come down 40 feet into the spring and turn around about face level and wave just as he goes up again. :-) I just read this morning, that the deepest unaided dive record (no snorkel or fins ) was just set at 82 feet. At that point, it would be completely black. Along with contortion, hip hop, and Aikido, deep snorkeling is my new goal!

One unexpected problem was when I had a full wet suit on, snorkeling was very hard. The wet suit is mostly small pockets of air, and it was hard getting down the 15 feet necessary to meet the course snorkeling requirements, but the effort of swimming down was worth it. You could swim really fast towards a catfish, and if you coasted the last foot down or so, I could occasionally touch the catfish before he swam off. While scuba diving, I also saw two big crabs. The shell was probably 8 inches across. He was just sitting on a ledge about 25 feet down, just watching us pass him up and down. The swim back to the cars was pretty neat also. I saw two more big crabs and 3 schools a fish. Two of the schools were in the distance to the side and hard to see, but just seeing a wall of silver flashing was pretty cool. I swam towards a third one and got close and saw all the fish. It was a fun trip.

This Saturday we'll be diving a reef in the ocean. Whoo hoo!

Saturday, May 05, 2007

Cinco de Mayo Party

Today is Cinco De Mayo! The fifth of May is a big celebration of Mexico's victory over Napoleon III's army. American helped out and let any serviceman leave the army if they wanted to help in the Mexico's fight against the French.

Actually, it's only the fourth, but I moved the time ahead on this post so my history lesson would be relevant for the day. Since I've moved the post date ahead, I'll stay in the future and tell you what's happening at 10:00 AM on Cinco De Mayo!

I've just gotten back from pain class. Except for the one week we worked on wrist locks, it hasn't be too painful, but I enjoy using that name for the class. I'm taking a book on scuba diving down to south-east Orlando. I need to read a chapter and turn in homework at my next scuba diving class. So far, I've met my snorkeling requirement, and I've put on the diving equipment and stayed under for over 20 minutes in the deep end of a pool. Very cool. Some lessons I've learned from my class so far: A wet suit is way, way cool, Being able to clear out a facemask full of water, while still under the water is wonderful, and fins are hard to use.

I'm off to visit a friend in another half hour. I've just finished with my post-Aikido shower and will reach the destination by 12:00 hopefully. Her older sister is holding a large Cinco de Mayo party and we're all going to go out to eat at a Mexican restaurant and stay the rest of the day and overnight at their "party house". From McM's description, the house is huge and has all sorts of water equipment - boats, sailboats, skis, canoes... and stuff. I'm looking forward to the visit/party.

Wednesday, May 02, 2007

10/29/05

Here is an old post that was in my "drafts" folder for my blog. I remember this day. I'll add one little detail, every time we've played the arcade at the theater, he has always won. And this day was no exception. :-) I'm proud of you Dad.

--------------
Earlier today, as I went to see Zorro on the big screen, and in the car ride with my dad, I was asking about what work he was doing at the moment and I started thinking of all the years and long hours. There were times that he had to stay up very late and get up very early and when we couldn't help him much during those long hours. I'm sure that comes in all businesses, but I was listening to some music tonight and one of the songs recalled this afternoon with my dad, and I hope that one day I have the courage and patience of Dad to stand up and keep working even though I am weary and the work is tiring.

The lyrics are below... My translation: "I said I would avoid trouble, but sometimes trouble can't be avoided, soI'll stand up and meet it head on without flinching, and I know you understand - I remember what you've said"

"I walk away from trouble when I can.
Now please don’t think I’m weak,
I didn’t turn the other cheek,And papa,
I sure hope you understand:
Sometimes you gotta fight when you’re a man. "

Tuesday, May 01, 2007

IO Language

I have been living this last week in a pleasant fiction: I live in a world populated by regular updates, intelligent conversation, educated topics, and unlimited ice-cream. This pleasant fiction sustained me for a whole day, then I blew the rest of the week in learning a new programming language and researching what makes good language design vs bad language design, pros and cons of programming languages, and compilers for making my own language. You may be saying "Boring!", and in truth I often wonder why I find it so fascinating, but I still keep going back to the internet night after night trying to compile, learn, and educate myself about a language that will probably have no real application in ANY job I have, but leaning an entirely new language is quite informative.

In fact, for the last month, I've been growing frustrated with the rigidity of C++ and was looking for something similar to Squeak without the big footprint. The only languages I had heard about that might be able to help were dolphin (smalltalk variant) and Self. Neither of which are currently freely available for the windows system. My conclusion: develop my own programming language. I've had been making quite good progress until I ran across the IO programming language, and everything I was planning had been implemented and then some!

Warning: The following post will be technical and boring to those un-initiated into the world of computer programming. I also don't hold out much hope if this being interesting to those who are interested in programming.

IO Language: How is it different from C++ and Java? Let's do a quick comparison. C++ and Java are class based languages using function calls as the main process of execution. The IO language is completely different. The closest similarity I've seen is the language Self. (Javascript is also a similar language, but I don't know enough about it to vouch for that). IO is a prototypical, message based language. Everything is an object, and a message is required to do anything. There are no function calls - which makes for a very powerful threading pardigm. Hello world is an example of the language; just keep in mind that this is an interpreted language that a virtual machine translates (like Java).

"Hello World!" println

prints: Hello World!
Wasn't that cool? Let's try a larger, more typical example using obvious procreate a generic object we can use. the clone message create an exact copy

Hat := Object clone // create a "Hat" object
Hat size := 8 // size & 8 are Number classes
Hat refit := method( newSize, // we create a function here
Hat size = 9
)
"Hat size started out at " print
Hat size println

"Hat size after refit is " print
Hat refit
Hat size println

The output:

Hat size started out at 8

Hat size after refit is 9

Remember - even though the code looks like it uses function calls it doesn't. Let's take a look at the last line: Hat size println. Hat is an Object. size is a message sent to Hat which has a result of evaluating the code in the "size" slot which has a final value of the Number object 9. println is a message sent to Number which prints a number on the screen. You may say, "What does it matter? function calls and methods end up do the same thing." Ha. You've never worked with threads in MFC then. :-)

I would have given up on this language except for two breakthroughs. My first breakthrough came around hour six in trying to get IO to do things beyond simple assignments and methods: I managed to get the addons (like OpenGL) working! 3 hours later, I was ready to give up. I really, really, really wanted to be able to do a simple console application. And I found it. I'll post the answer below, but first I just have to explain my genius ( random luck) in figuring it out. I'm looking at the online reference for IO, and I see a core prototype called CLI. It was undocumented and I didn't have the source in the download I had, but no worries! The IO language provides self inspections. I can print ANY io code used/declared in the current object. I'm looking through the various functions and I see about 5 lines of code that composes the main loop to the entire program. Turns out that CLI is the main window! I quickly copied the CLI code and made my own, simple, easy, short console application template that does not depend on any addons! The cumulative effort of 9 solid hours of research and grunt work:

//Do the prototype creation and setup here
stdout := File clone standardOutput
stdin := File clone standardInput
while(true,
write("Your next wish? ")
line := stdin readLine
if(stdin isAtEnd, writeln; Lobby exit)
// Do actions here depending on user's typing
)

My next goal: implement Legends11. Legends11 is an unpublished game that my brother got for me about 10 years ago. It was text based, short (under 4 hours), simple, and fun. I've played it though 5-10 times and I still enjoy playing it.

Hint: doFile("filename.io") is a lifesaver if you decide to try out IO