Saturday, December 30, 2006

Makin' Wands

My son has really gotten into Harry Potter lately and has been begging for a wand. He was so motivated that he tried to make one out of paper. Which I tossed, of course. And then decided we needed to make a "real" wand.

Fortunately, it's real easy! Get two dowels. One is 3/4" in diameter and the other is 3/8". Cut to appropriate lengths -- 2" or so for length, 14-16" for wand body. Drill a hole in the 3/4" dowel. Use wood glue to glue together. Sand. Stain. Varnish. Done!

Result: Happy kids. :-)

If you have a lathe or turner (or can jig one together), I imagine you can shape the wand handle a bit to make it look nice.

Saturday, December 16, 2006

Subversion 1.4.2

For some reason, Subversion 1.4.2 does not appear to be available for Fedora Core 5. I'm guessing that it's because Fedora Core 6 is out, but really don't know. The base install has 1.3.2.

I have an interest in 1.4.2 because of some of the updates and because it will be what we use at work. Since I am the builder (literally) of that environment, it is good for me to have pre-existing experience.

At any rate, when I built 1.4.2, I thought all was well until I realized that Python couldn't find Subversion. Finally realized that the Python bindings need to be built separately. Then, I found out that the client couldn't hit external repositories with WebDAV. So I monkeyed around, got it to work from command line by using the "-dep" package. However, then Apache would segfault.

Finally found out tonight that I need to use the Apache 2.2 APR and APR Utils but keep the dependent Neon package (that is, ignore the one already installed in the system).

Whew! It's been a good week since things broke.

Sunday, December 10, 2006

New camera!

Christmas came a bit early this year! When my mom asked me what I wanted for a gift I suggested a new camera. Today was the day we went and did a little shopping...

I've had a trusty Olympus C-3000 Zoom since we moved into this house, basically - that's about 5 or more years old. It is still a good camera - but I wanted more zoom (like 10x instead of 3x), better movie mode (> 30 seconds), and more responsive. It has basically become dated and that's not surprising since this is tech we're talking about.

After doing a bit of review and reading on Digital Photography Review, I settled on a few cameras that appeared to be in the class I was looking at. After playing around with the Canon PowerShot S3 IS, along with the equivalent Sony and others, I settled on the Canon.

So far so good. We shot my mom's Christmas picture, printed it out on my photo printer and she's ready to go. (Old fashioned - she still cuts and pastes the photo... and then brings it to a copier business to duplicate!!)

The camera is snappy, movies (as far as I've been able to test them) are quite good, images appear good, and there's lots of features to explore. I think the only downside is that when shooting a movie and taking still pictures (yes, you can do that), the movie blanks out and you get the click sound. Other than than, it's been a pleasure playing with it.

Saturday, December 09, 2006

Backing up Windows XP ...

My wife's computer went a bit flaky on Friday night, and we suddenly realized she never got it backed up (a-hem!). After a bit of thinking, I decided the most reliable thing to do would be to schedule a script that archives her data and ships it to the Linux server.

Not wanting to hard-code passwords, I needed to do a little research in key exchanges for ssh/scp. What I came up with is this...

Initial setup:
1. Install Cygwin. Make sure to select the additional ssh, bzip2, and vim.
2. Generate ssh keys:
ssh-keygen -t rsa1
ssh-keygen -t rsa
ssh-keygen -t dsa
(I will admit that I'm not sure which of these keys are actually required, so I simply generate all three.) Note that if you provide no passphrase, it will not be required in the script -- hint, hint.

3. Copy ssh keys to the Linux server:
cat *.pub | ssh user@server "cat > ~/.ssh/authorized_keys"

Now you need to script the backup of files. Here's a copy of my backup script:
#!/bin/bash

PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

echo "Starting backup @ $(date)"

cd /cygdrive/c/Documents\ and\ Settings/Rob/My\ Documents

tar cjf - --exclude Emulators --exclude "Virtual CD*" * 2>/tmp/backup-errors.log |
ssh user@server "cat >rob/backup-new.tbz"

ssh user@server "cd ~/rob/
rm -f backup-old-2.tbz
mv -f backup-old-1.tbz backup-old-2.tbz
mv -f backup-current.tbz backup-old-1.tbz
mv backup-new.tbz backup-current.tbz
ls -lh"

echo "Completed backup @ $(date)"

echo -n "Press [ENTER]: "
read X
You'll note that I see the PATH - that's because launching from the XP scheduler gives a different environment than from the typical Cygwin environment. Also, the tar pipes the backup file directly into SSH and it gets written to a file on the Linux server. Finally, I move the files around to keep 3 weeks of backup.

Schedule the script: This is in the Windows XP control panel, Scheduled Tasks. Create a new task, start it in c:\cygwin\bin (where-ever Cygwin is installed). Then, I found it easiest to browse to the shell script and select it and then prepend bash to that value. My Run entry looks like this:
bash "C:\Documents and Settings\Rob\My Documents\bin\backup-rob.sh"
That's it! Test it a few times. Make sure you can untar it. Wait to make sure the scheduler kicks it off.

Monday, December 04, 2006

Installing Linux on antique hardware - Part 3

Finally found a distribution in which I was able to hack together a graphical version for the ThinkPad 760XL. This is a Pentium MMX 166 MHz machine with 48MB RAM, a Trident TGUI 9660 with 1MB of video RAM (that's 800x600 at 16bits best), and a 12.1 TFT panel. I got everything except sound working, but I've never actually worried about sound - Linux has been a server workhorse and Windows has been for games.

Anyway, I tried Fedora Core 6, Fedora Core 3, Ubuntu 6.10, Open SUSE 10.1, Damn Small Linux 3.0, and finally, Debian 3.1. It feels like I tried more, but each install took - potentially - 2-3 hours - I suppose that a week or so isn't too bad. (You know, I sort of have a job, a child, my wife, and other stuff to do!!)

The good the bad and the ugly of the failures:
  • FC6 needs 128MB RAM minimum to install. It told me. And that was very nice.
  • FC3 ran through the whole stinkin' install (that's a bit over 2 hours) and then booted into an X configuration that didn't work. I couldn't find a text console to log on to and I don't think I was able to telnet or SSH into the machine, so that was basically an installation that became a brick with an embedded fan.
  • The Ubuntu installer just plugged along... until it apparently wasn't doing anything anymore. I gave up after a good 30 minutes since the last activity (ie, no HDD lights or anything).
  • Open SUSE had an installer that looked great. But, it couldn't find the CD-ROM after booting from said CD-ROM!
  • DSL booted and installed just fine. This would probably be the best bet for a non-X (or limited X) configuration. But, we wanted a GUI to work from. I just couldn't figure out how to tweak XFree86. And then I realized it used some tiny XFree86 server and didn't have the config file. Poking around, it looks like I could install the full XFree86 - if I wanted to invest more time.
  • Debian (which I haven't used before) actually allowed a floppy-based network install. It booted, recognized the network card (as did the other Linux variants), and started chugging with the base install. After rebooting from the HDD, I realized I didn't have X. A couple of install sessions later, X was limping along (hint: Just install KDE or Gnome and I bet you have a better time than I had!!). It didn't really configure the optimum settings, and that took quite a bit of tinkering. I had multiple active XF86Config (??) files floating around. Once I figured that out and made it one, progress was made. I finally just commented out all the resolutions I didn't want and was able to get to 800x600 with 8 bits of color. (Not sure where that 16 bits of color went...)
I've installed a few games, verified network connectivity, left a few browsers available, and have the external mouse working, so I'm going to pass it back and call it good enough!

Anyone else gotten a modern install on the ThinkPad 760XL? I'd like to know how to get the full 800x600 with 16 bits of color (64K colors). I'm sure there is some mojo I don't know about - I'm most definitely just a hack when it comes to X configurations. Modern hardware is a lot easier! I think that XFree86 4.3 is distributed with Debian 3.1.

Friday, December 01, 2006

Yum unhosed!

Well, I finally figured it out. Let me restate that. I resolved the problem. Whether I actually figured it out is probably open to debate. :-)

Here's my final post at the FedoraForum - and just in case it gets lost at some point:
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
yum clean all
yum update

By line:
1. Delete existing RPM databases.
2. Rebuild RPM databases (-vv = more logging than you can ever use)
3. Clean the YUM databases (not sure if this was actually required)
4. yum update now functions.

Yaay!

Thursday, November 30, 2006

Note to self ...

And this may be interesting to other Science Fiction geeks out there. Pharyngula had a discussion regarding good Sci Fi and I want to hang on to it for a reference - lots of stuff I agreed with, so I suspect the books I have never read are worth checking out.

Science Fiction recommendations
Juvenile Science Fiction recommendations

And somebody also mentioned the SF Reviews site.

Installing Linux on antique hardware - Part 2

Fedora Core 3 did complete its install. BUT (and this is a big one) it doesn't appear to make it to the graphical login screen. The install took a good 2 hours, so by the time I finally got to boot, it was past midnight last night.

I'll give it another stab tomorrow. I may be able to telnet or SSH into the machine and correct stuff. Or I may not and may be off to do another try. But, tonight I have to work.

Tuesday, November 28, 2006

Installing Linux on antique hardware

This time I'm working on an install for an IBM Thinkpad 760XL for a friend at work who wants to impress his son.

Not sure on the CPU for this baby, but I think we've got a 2GB drive and 64MB RAM. This machine cannot boot from the CD drive... and the floppy and CD share a drive bay, so there is some juggling to do.

So far, I have successfully booted the CD. This took a bit, but I finally realized that Smart Boot Manager is capable of installing onto the boot sector of that hard drive. It also needs a bootable CD-ROM in the drive to show up in the menu. I had trouble with flopping the physical drives once it ran - not sure if that is a user error or a defect.

You'd think that that was the end of the story, but I Fedora Core 6 refused to allow me to install since I didn't have enough RAM to even get going.

I'm trying Ubuntu 6.06 right now, and we'll see how that goes.

If Ubuntu fails, I'm not messing around anymore and heading straight for Damn Small Linux.

UPDATE (11pm): Ubuntu kinda went off into la-la land and I ultimately tossed it. DSL does boot, but the graphical mode never comes up. If I need to go text-only, DSL is at least an option, but it was requested to go graphical. From a little further research and tinkering, I can get the FC1 installer to begin installing. I googled around a bit, and it appears that FC5 may also install with 64MB of RAM, so I will start working backwords. Bad news is that I need to download the FC5 CD's now.

Sunday, November 26, 2006

Yum hosed?

Somehow 'yum' got into a perpetual state of not functioning within the last week. Not sure what preceded this, except I had trouble updating FC5 for about a week before it finally worked. I posted my question to FedoraForum and have a few suggestions, but I'm not above trolling for more assistance. :-)

Anyway, I've removed the MythTV repositories from the most-excellent Fedora Myth(TV)ology HOWTO but that doesn't seem to matter much at this point.

My working theory is that something in the extra repositories 'upgraded' the base Fedora installation and the conflict is giving yum fits. Unfortunately, the 'fit' is expressed as doing ... nothing. :-/

Sunday, November 19, 2006

Backing up blogger (beta)

I upgraded this blog a few weeks ago, and forgot that my old automated script wasn't working very well. It is scheduled to run weekly, and it runs nearly forever after the upgrade. It also chews up over 4 gigabytes of space... no idea where it would stop since I typically find my Linux server is running slowly.

Anyway, I finally fixed up the backup script, and since I didn't find one quite like it, here it is:

cd `dirname $0`
TMP=/tmp/blogbackup
mkdir $TMP
cd $TMP

wget --progress=dot robgreene.blogspot.com
gawk '/([0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_archive.html)/ { \
match($0, \
"http://robgreene.blogspot.com/[0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_archive.html"); \
print substr($0,RSTART,RLENGTH); }' <index.html >toget
wget --progress=dot --page-requisites --span-hosts --convert-links \
-erobots=off --input-file=toget

cd -
tar czvf robgreene-blog-$(date +'%Y%m%d').tgz $TMP
rm -rf $TMP

Be careful of the word wrap.

Basically, I grab my index and then search for the monthly index links of the format ####_##_##_archive.html (# = digit). Once those are found, we download the monthly archives along with all of their images/css/javascript and other stuff.

Another visitor!

No, not the cousins. ;-)

Last night, the furnace was clunking a lot. We heard banging from - somewhere - in the basement. I finally headed down there with a flashlight and realized that something was caught in the furnace just in front of the air cleaner.

I came back down with a big garbage can, a stick, and big gloves. After turning off the furnace and the air filter, I opened it up and ... a flying squirrel?! Wow! It was pretty cagey, prowling around, but it wouldn't come by me.

I went upstairs to get my wife to standby (you know, just in case the thing jumped me) and went back down... the squirrel was now checking out the garbage can. One quick swoop and he was in the garbage can and I was hollering "open the garage door!!" Once I had a straight shot, I ran up and out. The poor fella was actually pretty cute. Don't want him inside though.

The good news? The furnace was nice an quiet the rest of the night.

The bad news? I bet we have a number of flying squirrels poking around. Boo!

Tuesday, November 14, 2006

Back to the compiler...

Building a compiler seems to be endlessly entertaining. There is always something to keep me busy - particularly so because I haven't really got a clue.

Here's one you may enjoy.

Working with a signed short, defined to be 2 bytes long, the range is -32768 (0x8000) to 32767 (0x7fff). What happens when you add one to the maximum value? How about subtract one from the minimum value? Multiply by 2? Divide by 2?

Simple, right? Well...

32767 + 1 = -32768
-32768 - 1 = 32767
-32768 * 2 = 0
-32768 * 3 = -32768
-32768 / 2 = -16384

Most of those should at least make you frown. It all makes sense and comes down to the fact that nobody wants to actually do a bounds check for every single computation done by a compiled program.

Starting with 32767 + 1. 32767 is, in hex 0x7fff, or 0b0111 1111 1111 1111 (binary). Add one to that, and you get 0b1000 0000 0000 0000. The high bit in a signed operation means negative. We just flipped from positive territory into negative territory. 0x8000 is the same value as -32768. Run that in reverse for -32768 - 1 becoming 32767.

-32768 * 2 is, essentially a bit-shift to the left. So, -32768 = 0x8000 = 0b1000 0000 0000 0000. Shifting the bit pattern to the left one bit yields 0b0000 0000 0000 0000, and this is easy, that is 0x0 or 0. Times three is the same as -32768*2 + -32768*1, so, by substitution, that becomes 0 + -32768*1, or -32768 (again the "times 2" part is shifted out of our value).

-32768 / 2, comes out right simply because dividing comes down to shifting to the right. So, 0b1000 0000 0000 0000 shifted to the right becomes 0b1100 0000 0000 0000 (the high bit is replaced), and we get the right answer of -16384.

Cool, huh? Real numbers have similar "gotcha's" that also make sense with a little thinking.

Thursday, November 09, 2006

I am so ashamed

I am so ashamed at the state of Wisconsin. We have allowed the hatred and bigotry of the majority to, essentially, dehumanize our fellow citizens.

Do you think homosexuals are incapable of forming a lifelong bond? Of course not. Do they have the same concerns about protecting each other throughout their lives? Of course they do. Do we judge any marriages within the law? Of course not. Should we infringe on the freedom of anybody because we don't like "them"? Absolutely not.

So, somebody, please explain rationally why they are not afforded the same protections the rest of us are, because I just don't see it. All I hear is FUD.

Shame on you.

Wednesday, November 01, 2006

What really bothers me...

Is that we have the opportunity to vote about what some one else is allowed to do. This is an activity that has no connection to the voters. Nobody gets hurt. The people in involved are both consenting adults. And, yet, because the group of people is a minority, we can disallow them from doing something.

I think that's why this gay rights deal really hits home.

I'm a left handed person - maybe all the "righties" should get together and disallow me from doing something innocuous? Same difference.

I got a letter...

One of my coworkers today was wandering around asking people if they had gotten a certain letter. It was a letter about gay marriage from a friend of mine - who happens to be gay. This coworker was confused why he seemed to be singled out. Well, he wasn't. I got one too!

The letter was well written. I cannot even conceive of how difficult a decision it was to write the it in the first place. With todays religiously motivated society, that takes guts.

The whole concept of "banning" gay marriage is ludicrous. This is just another wedge issue for Republicans. I really and honestly believe that, since their entire platform seems to be primarily one of fear and hate.

Anyway, anyone who knows me knows how I'll vote. And, as my coworkers will attest, I'm willing to argue with anyone about this.

Freedom is always a struggle.

Thursday, October 19, 2006

Sharing books

I've always enjoyed reading. It's doubly enjoyable when I can share a book with someone else. And it's trebly enjoyable if that person enjoys the story so much they want to pass it on.

Yesterday, one of my coworkers brought back Outlander by Diana Gabaldon. She had stopped by to drop off the book and request the next in the series (yes!). In the process of dropping the book off, her descriptions where enthusiastic enough that her manager requested the loan of the book (yes again!!).

<Big Happy Grin>

Anyway, if you haven't read the series, do yourself a favor and pickup the first in the series. I promise, you won't be disappointed. (Unfortunately, I don't leand my books to strangers - I want them to find their way home.)

P.S. I've only read Outlander, Dragonfly in Amber, and Voyager. I see there are three more to get!

Wednesday, October 11, 2006

Subversion + Subclipse + Eclipse weirdness

I'm not sure if this is a lack of understanding on my part, or if this is some funky issue with the Subclipse plug-in, or something intrinsic with Subversion. I'm not totally sure of the basic actions to take to replicate it, but...

If I update my Subversion repository outside of Eclipse, when I do a "Synchronize with Repository," I get a whole series of directories that need to be updated. "Fine," I usually figure, "I'll just update and be done with it." It makes sense because I've committed a transaction or two elsewhere, so it'll just bring my workspace up-to-date with the latest revision, right?

Nope!

It doesn't go away. Not with the update, not with the replace with latest from repository. The only "fix" I've found is to delete the project and re-add it.

Not a total show stopper, but it is extremely annoying.

What am I missing? I'm running the 1.1.7 version of Subclipse, which is a development branch. So, that could be it, but I'd think more people than myself would whine about it...

Writin' a compiler...

I've been working on a compiler for a few weeks now - 2 hours or so in the evening, sometimes a whole 4 hours when I stretch myself to midnight. Still have to get up around 6 or 6:30, so that's pushing it...

Anyway, the language is a basic-ish language to use in my embedded and small (read: ancient) computer projects. What I've implemented to date actually works and is using an assembler I had written before with a few touch-ups. I have the basic control statements (for-next, while-do, repeat-until, goto, gosub, return, addition/subtraction, comparison operators, logical operators, along with embedded assembly and minor peephole optimizations).

I haven't added the distinction of various datatypes. I originally planned for byte, short, integer, long, possibly real, and strings. Working standard sizes, that long becomes an 8 byte datatype which is a bit large for an embedded language -- think of 8 bit microcontrollers that may only operate on one byte at a time. Is there a 'standard' data typing for 1, 2, 3, and 4 byte numbers? I'm thinking byte (1), short (2), short integer (3), integer (4). But, I'm afraid that "short integer" is too confusing - since "short" is really a "short integer". Thoughts?

I can just skip it too - but in a constrained memory footprint I may want a 3 byte number with a range to 16 million.

Friday, September 29, 2006

Something's thumping on the wall...

We had a visitor tonight! I guess that on cold, wet, rainy nights, the raccoons cannot get enough to eat. So they go scrounge around in the neighbors' birdfeeders. Well, something like that.

Funny thing is that this is a squirrel-proof feeder. Now we need a squirrel-proof and raccoon-proof one! This one is going to be packed away. Or, at least moved somewhere a raccoon can't get. (Is there such a place??)

Oh well, at least they don't eat my wife's plants.

Tuesday, September 26, 2006

Most excellent!

I try to stay away from politics just because we're falling to the Right and I'm most definately not Right-leaning. So, to see an actual reporter actually lambasting our current president and his policies totally stunned me. That's a good thing. Just in case you missed it, here's a link to YouTube with the video:

Wednesday, September 20, 2006

GooglePages + JNLP = ?

Apparantly, that equation comes out to be something like "fizzle" for the answer, unfortunately. Looks like the JNLP MIME types aren't enabled from the google site. Anyone dealt with this yet?

Wednesday, September 06, 2006

Monday, September 04, 2006

Migrations...

I've spent the last few weeks migrating from two servers to one. (Ok, it's really a consolidation.) Everything now sits on the Compaq W6000 workstation and it seems to be stable.

I've also begun some serious repository conversion from CVS to Subversion. Pretty slick, but I've had to write a few scripts to deal with oddities. I've opted not to create a separate subversion repository for each of my projects (way too much overhead there) and instead am just using a single repository. I figure if something grows too big (or needs to be shared) that I will simply dump the data out and then import it into the new repository.

The structure I've chosen has, at a high level, a partitioning scheme based on the type of thing being stored. For instance, I have java-devel, unix-devel, and server-config at this time. Under each of these is the typical trunk/tags/branches directories. Under that exists whatever structure makes sense. java-devel is organized as Eclipse proejcts, server-config is organized by servers (which is now down to one), and unix-devel has files just dumped into trunk. I don't do too much Unix development anymore. :-/

Anyway, the partitioning scheme seems to make cvs2svn barf with an error. I've opted instead to use cvs2svn to create a dumpfile which gets tweaked and then loaded in via svnadmin. Just incase it's useful to others, here's a current copy of the script:

#!/bin/bash

# Import CVS projects into new SVN repository in my weird structure...
# /Grouping/trunk/Project/...
# tags/Project/...
# branches/Project/...

# Usage:
#

GROUPING="$1"
PROJECT="$2"

if [ -z "$GROUPING" -o -z "$PROJECT" ]
then
echo "Please include both the project grouping and the CVS project name."
exit 1
fi

# Dump out the project...
/usr/local/cvs2svn/cvs2svn --dumpfile=/tmp/${PROJECT}.dump --trunk=trunk/${PROJECT} --tags=tags/${PROJECT} --branches=branches/${PROJECT} /home/cvsroot/${PROJECT}

# We need to drop the trunk/branches/tags directory creation as they are
# already present, hence the gawk script.
cat /tmp/${PROJECT}.dump | gawk '
BEGIN {
ignore = 0;
}
{
if ($0 == "Node-path: trunk" || $0 == "Node-path: branches" || $0 == "Node-path: tags") {
ignore = 5;
}
if (ignore > 0) {
ignore--;
} else {
print $0;
}
}' | svnadmin load --parent-dir ${GROUPING} /home/svnroot/general

Wednesday, August 02, 2006

Lazy me...

We've spent a lot of time in the yard mulching our garden, working on mulching my mothers garden, retrenched and buried new drain pipe around our house, helped our neighbors split wood (and we got about 1 1/2 cords out of it, so we sorta mooched).

But, as far as tech goes, I've been very listless. Not sure why -- I think it has something to do with summer hours. Oh well.

Thursday, June 01, 2006

RobC v2

I've gotten a bit carried away on the demo program. I wasn't satisfied with the function implementation which consisted of a separate command-pattern class per function. For instance, the functions supported were width(), height(), min(), max(), and plot() which amounted to five separate classes as well as the factory-type method to construct the appropriate class.

Thus, RobC now has the concept of invoking a methods in the Java JVM. Function declarations are, of course, now available as well as the return statement.

When putting together these screenshots, I did realize that I'm missing some simple datatype conversions from a number to a string. (Or string and number concatenation.) I have a hunch those will come along at some point.

Anyway, I have attached a v2 IDE screenshot showing a couple of method declarations and the final display showing that a does, indeed, contain 3 squared.

Back from trip, finally got internet back too...

Wow, spent a few days at a conference in Las Vegas only to be greeted by a flooded basement when I came home! Nothing like running around to get a new sump pump and then hacking together newly sized pipes after a day of travel!

Fortunately, the basement is not finished. We had a few boxes with books in them and we haven't looked through it.

We also "lost" internet access in the same timeframe. I'm not certain any of our internal wiring or equipment was the culprit, either. I've been checking all week and putzing but haven't gotten it working. Last night I finally just grabbed the cable modem and connected it to the line that comes into the house (before any splitters) and it worked. I figured that the splitter was non-functional as a bidirectional splitter (TV worked, internet didn't). I hooked everything back up the way it was before - and things were still broken.

Today I came home... and everything is back to normal. Hmm. Then to make it more fishy, the cable company called me to see if everything was back to normal. Interesting. I wonder if the storms that came through last week caused some issues and they took a while in resolving them.

Anyway, it sucked not having the internet available for research!

Thursday, May 18, 2006

Russ Rocks!

We need a few more people to stand up and have a backbone. I continue to be very afraid of the conservative Christian agenda. My belief is that religion is extremely powerful. Unfortunately, it may be used for both good and evil and it's the latter that I fear.

Tuesday, May 16, 2006

JNLP

One of the little issues with RobC is that I'm using Java 5.0. Unfortunately, I haven't handled it the best from within the application. Even after fixing it, I still don't, but at least I pop up an error message instead of never showing up on the desktop.

One way to deal with it is to use JNLP and launch from the web. Once launched, a person can launch the application at any time from the launch manager, a short cut, or from the website. Not a bad solution. It even detects which version of the JVM is in place.

What really stinks is that the error messages while putting the jnlp description file really really suck. Who'd've thunk that "href" is telling me that there is a jar tag that requires an href attribute. Maybe if the would speak in English and tell me?? That'd be nice.

Now I'm finding out that Charter apparantly doesn't recognize the JNLP file and doesn't deliver it with the appropriate MIME type. Can't set the .htaccess file nor a PHP script nor a SHTML file.

Anyone with ideas? I'm going to see if I can get tech support to fix it. But first I gotta find tech support. :-/

Monday, May 15, 2006

Slight turn in the ANTLR road...

I've got a presentation in a couple of months and, surprisingly, I spent time to start planning out what I'm going to talk about. I would like to walk through the design of a language, implementation of the lexer, parser, and tree walker. That's a lot for an hour!

Anyway, I've created another tiny implementation of 'C' called 'RobC'. Yeah, not original on all fronts, but it is simplified. I'll probably have to tone it down for the presentation - and probably sugar coat a lot of it. (Plus, I'm pretty new to the topic myself.)

What I've got is a little IDE that runs 'RobC' too. You can type in a program, press Ctrl+R and it pops up in a graphic screen to show the results. Once complete, it dumps variables into a dialog box for a post-mortem. No debugger. If you write a tight loop, you need to kill the process. But, it's functional!

In the best world, I'd like to actually implement it completely within the allotted hour (the interpreter, however, would come pre-made and ready to go). So, I may shorten the requirements to just the expression elements used in the sample program(s), and it may be possible.

Friday, May 12, 2006

Found a bug in Spider soltaire...

I'm sure its nothing new, but I think this is the first time it has happened to me.

If you are able to remove enough cards that you have less than 10 in the playing field, any waiting cards cannot be dealt out because you must have one card in each position on the playing field.

Oops!

(I'm installing software, and believe me, there's a lot of spare time to mess around!)

Time to rebuild

I actually got the replacement harddrive earlier than HP said it would come (which is nice, seeing as I have time this weekend). The harddrive is, of course, blank. Meaning I get to start building it all up from scratch. That's not too bad - just time consuming - and I will be able to keep most of the software I'm not interested in off of the machine.

Wednesday, May 10, 2006

And another one bites the dust...

This is harddrive number 3 that died for me. :-/

The only good news is that HP has actually been pretty good. After losing two drives last year (February and April), I purchased the extended warranty.

I don't think I spent over 50 minutes total on the phone today. I called from work, and I think I was on the phone about 20 minutes before we concluded I needed to call from home so the technician could have me check some stuff. Tonight I was on the phone a whopping 24 minutes (my home phone has a timer). New drive is shipping out, I swap and send the old one back.

Oh yeah! If it happens again "they'll escalate it". I'm reading between the lines in thinking that they give up on the hardware and we go after another laptop. I actually just want this drive to last forever - this reconfiguring everything isn't fun.

Fortunately, my automated backups are every Sunday at around 2am, so I haven't lost too much data.

Sunday, April 30, 2006

ANTLR and very basic expression grammar

Writing compilers is such an interesting topic. For some reason I want to implement a version of BASIC that targets multiple architectures. Why? Why not!

Being a Java guy, some fishing around brought me to ANTLR a while ago and I was able to implement a simple expression interpreter that handles multiple data types. Rather neat, really.

I'd like to extend this into the realm of a full fledged compiler. Not only a compiler, but a multiheaded beast that targets the 6502 (read: Apple II+), 65c02 (read: enhanced Apple IIe), 65816 (read: Apple IIgs), Java bytecode (read: easy application testing), and possibly PIC 16/18 (read: microcontroller goodness). Not to mention that I want to design and build a 65c02 or 65816 based computer from scratch. Talk about crazy and I appear to be it!

At any rate, I started this concept a number of times in the past year. Each one stumbled and I got interested in something else.

This time, I am starting very, very simple and then adding the complicated pieces on. I intend to get a compiler that is just a portion of the language but one that is the full depth back to the code generation.

I've got a grammar for which I'm actually generating pseudo-code. The grammar consists of only two data types, expressions only for addition and subtraction, variables must be declared, and a print statement. This should allow me to deal with tracking variable types, throwing errors, generating output, structuring the AST, and how to write unit tests for it.

Now, I need to figure out better error handling and how to construct unit tests to do a better job of verifying any progress I make. I think I'm actually almost to the point of actually generating target code.

Hopefully I'll have good news to report in a few weeks!

New bike!

Well, maybe the story is that I got a bike at all. My wife and I came home with new Bianche Volpe bikes for each of us. Per Murphy's Law, that means that it must be crappy weather all weekend, and it has been.

However, we did get out for 30 minutes at the local schoolyard. Since my wife and I have never had clips for our bike -- actually, we haven't "had" bikes for about 15 years -- we expected to fall a few times. Our intention in going to the schoolyard was to get our falls in somewhere close to home and (hopefully) in grass. I lucked out and didn't fall -- just a stumble more than anything. My wife, unfortunately fell onto not-so-soft concrete.

That was Saturday. All day today (Sunday) she has had a really screwed up shoulder. As in she gets stuck laying down or sitting and I have to run over and get her on her feet. Not to mention the constant pain she is in.

What fun!!

Lesson learned: Don't fall on concrete. :-/

Monday, April 24, 2006

Zoomable picture from the Hubble...

This is really really cool. It's amazing whats "out there." Zoom in and then pan around a bit. There seem to be stars and galaxies everywhere.

Saturday, April 22, 2006

AppleCommander 1.3.4

Good news! I've gotten John to help with AppleCommander. He's made a number of patches to the code - both fixing my screwups as well as enhancements - which I have incorporated back into the project. Now he's a team member who can access the source code directly.

Plus, he works on the Macintosh, so he can make Mac OS X builds. I can continue to make Windows and Linux builds. That pretty much covers the entire world! (Yes, AppleCommander is written in Java, but we need to test on various platforms as well as package for those platforms. So it's write once, package a number of times.)

Ok, its more like a small village. But it's still pretty cool.

MediaMVP & MythTV

Well, I finally went ahead an purchased another MediaMVP. The intention is to have two MythTV stations hooked up - the existing on in the bedroom and now one in the greatroom.

Interesting thing is that Hauppauge updated to device. That's the good news.

The bad news is that the MediaMVP Media Center project has to extend their software to handle the booting. You see, my prior device booted via (what must be) mostly standard TFTP boot sequence. The new device doesn't. There's been some discussions about the revision just before mine, but nothing around mine. (I've got an H2 while the conversation was around the H1.)

Anyway, I chimed in and offered to act as a tester and general guinea pig. Not like I can do much else when it's network related! :-/

Sunday, April 16, 2006

A little ray of sunshine

Just to let you know, all is not dreary. I just came back from a quick trip to the local school where my son practices his biking. As of yesterday, he is stopping and starting on his own (a little miracle in and of itself).

He's also discovered how to make black skid marks as well as the exclamation "Sweet!"

Followup

I had a good discussion with my mom yesterday on how to handle my co-worker. I have trouble calling this person a friend as friends (in my view) are not cruel and crass to each other. Not where it counts, anyway.

Another email arrived. One that started out with inaccurate statements and then went downhill from there.

To begin, I will concede that when asked about the gay rights sticker I have up at work, this discussion was launched which, in turn, lead to a discussion regarding crime. I now realize I was nieve expecting the discussion to remain on crime by my will alone.

What I intended to be a continued discussion regarding crime rates magically expanded into the presupposition that homosexuals are (by definition) sexual predators and hardened criminals. Not sure how that connects, but that's where it started.

I then was lectured on how bigotry has a closed mind.

It then progressed to the world has gone to hell because prayer in school has been banned. This was even backed up with charts (didn't give me the source and I'm sure I don't want to know). You know, the kind that go up and down and up and down. Somehow that up and down behavior is assumed to have been a downward trend. Until school prayer was banned, then the charts skyrocketed (meaning that bad things were going on).

In conclusion, I stand accused of being a non-Christian. Not sure where that comes from. I'm honestly not sure if that was simply an ad-hominem personal attack or if it was a wide-open attack on all Catholics. I suspect the latter.

My wife councils not responding. Unfortunately, that doesn't seem to work. My mother coucils being firm and telling my co-worker that I really don't appreciate hearing these views and having them forced upon me. That seems more logical. After all, I never asked for this.

What would Jesus do? I think He would forgive. I think, in time, I will too. At the moment, however, I really just want to cry.

Hate is such an ugly thing.

Thursday, April 13, 2006

Defend Science!

Most excellent!! Looks like people are finally starting to get enough of the religious right trying to take over our lives. As it should be, the scientists are leading the way. Read the statement and sign on!

http://www.defendscience.org/index.html

I've been fed up with this for a very long while and I'm sure my wife will be quite happy that I can vent a tiny bit without having to chew her ear off. :-)

[Oh great, I think I just got myself warmed up.]

I've got a friend at work who I think has recently converted into a religion. That's wonderful. Really! The clues are:

It's against this persons' philosophy that humans could have evolved. (We're too special. Isn't that a sin or something??)

I get little presents consisting of DVDs on how evolution is wrong and creationism is right. (Returned immediately - really pissed me off.)

Then I start getting various emails. The latest one talked about how the USA is a Christian nation and all our laws are derived from the Ten Commandments. (Uh-huh, why isn't adultery against the law?? Shouldn't they be stoned to death? Not to mention all the internal inconsistencies. I may yet do a post detailing this one.) Nothing like seeing the beginning of our own Taliban.

It's frustrating that people are so insecure with their religious beliefs that they need to attack anything that seems to disagree with them. It's also scary since anything they do is motivated by their belief that God told them to do it. Religion is powerful. But, like anything powerful, it can be misused.

And that's where we sit today.