fogbound.net




Sat, 7 Jan 2006

Ker-Ash!

— SjG @ 12:03 am

So, courtesy of the DWP, the Meier Quagg was without power for about 7.5 hours today. It’s not clear what was wrong. The other side of the street had power, as did several parallel streets nearby, but this side of Meier was out, as were patches of Venice like the Oakwood.
Anyway, when the power came back up, most of the servers came back with it. Intervention was required for the Golem, Pylonhead, and Sekhmet. Sekhmet was the worst. I only got the “LI” of LILO, which says that the /boot/boot.b file was bad, or the drive geometry was hosed.

So I tried my trusty Debian rescue disk. Typed rescue root=/dev/hda1 at the boot: prompt. The boot failed with a complaint that /dev/hda1 was an MSDOS partition. uh-oh… MSDOS?

Of course, it turns out that I was using the wrong rescue disk. I was using a Woody ISO, and I had upgraded the machine to Sarge — and EXT3, which evidently was not compiled into the rescue disk. When I finally tried the correct rescue disk, it came up neatly, repaired the journals, and gave me my precious root prompt.

I did the LILO replacement trick (lilo -u /dev/hda; lilo), popped out the CD, rebooted, and held my breath. Then I decided to breathe. It’s my second fastest server, but it’s still a four-plus-year-old Dell Optiplex. In any case, it came up cleanly and there was much rejoicing.

Now it’s just a matter of waiting for the mail secondary to forward on all the queued up spam.


Thu, 24 Nov 2005

The Information Future

— SjG @ 10:17 am

In the not-so-distant future, the average person will find information falling into one of three categories:

  1. Forbidden Information (circuit diagrams, satellite ephemeris, “intellectual property,” etc.)
  2. Purchased Information (“Entertainment,” music, movies, games)
  3. Pushed, Mandatory Information (advertising, propaganda)

Forbidden information, while available to some small group in order to perform their jobs, will be increasingly restricted under the twin guises of Intellectual Property and Homeland Security. Within twenty years, it will be illegal to design even simple circuits outside of sanctioned workplaces; similarly, computer programming will require licensing and security clearances.

Purchased information will be controlled by The Almighty Google Corporation (TAGC). Even information that people are permitted to create on their own will only be sharable to the world through a Google-controlled mini-payment system. Purchased information will also be inextricably meshed with Mandatory Information — to view your cousin’s wedding pictures, you will be obligated to view advertising from banquet companies or wedding registry providers, or perhaps even a Public Service Announcement on the evils of divorce.

The twist on all this is that bandwidth will be free. TAGC will have the world blanketed in a high-speed wireless network. You’ll site down in an overpriced coffee chain, open up your computer, and immediately be connected to virtually unlimited bandwidth so you can download as much Entertainment as you can afford. TAGC will, of course, use you location and search histories to inform you that you’re only a mile from a franchise of your favorite Bagel place, and it’s nearly lunchtime, and if you go now, you won’t get anxious and depressed later, so you can quit taking Paxil (that is why you were searching for information on the side-effects, isn’t it? Admit it. You sent a Gmail Message to your doctor on the subject too). What’s more, on the way, you’ll pass a Multinational Flower Distributor Outlet on the way, and you might want to keep in mind that you had a bit of a spat with the significant other (based on the frequency of the Gmails the other day, and the mood-assessor’s analysis of the vocabulary used), so this would be a good opportunity to patch things up — we would have recommend the Fancy Chocolatier across the way, but your significant other has been searching for diet information, so better play it safe…


Tue, 22 Nov 2005

Space Trader on your Treo 650

— SjG @ 8:56 pm

I occasionally get asked about Space Trader, a great game for the Palm originally by Pieter Spronck. Several years ago, I helped him write some of the code that was released as version 1.2, way way back in October of 2002.

Evidently, version 1.2 doesn’t run on the Treo 650. I don’t even have a Palm development environment at the moment, so I haven’t had a chance to fix the code that crashes it. But never fear! It’s Open Source, and someone going by the name of DrWowe fixed it. In addition, it looks like Pieter has fixed a few outstanding bugs (that all look like they were in code I wrote… how embarrassing).

Read all about it at:

http://discussion.treocentral.com/showthread.php?t=55952
http://www.cs.unimaas.nl/p.spronck/picoverse/spacetrader/STDownload.html


Tue, 25 Oct 2005

PHP4 and PHP5 under Windows

— SjG @ 4:02 pm

There have been other articles on this, but I wanted to post my own approach, just because it’s such an ugly — yet effective — hack.

I wanted PHP 4 and PHP 5 to both live happily on my Windows 2k machine, and work under Apache 1.3x. Install them in c:\php4 and c:\php5, and there you go. It’s easy to create an httpd.conf that takes a define, and figures out which PHP to load based upon that define.

But then both PHPs want to use the same php.ini file, specifically, c:\WINNT\php.ini. This is only a problem when you’re using PHP extensions, because one version will try to load the wrong ones. There are registry tricks, supposedly, and environment variable tricks to get different .ini files going, depending on version. None of ’em worked for me.

So I opened up vim, and edited my php4ts.dll, and replaced the “php.ini” string with “ph4.ini”. Now I happily have two PHP installs, each with its own .ini file, and everything is copacetic — except for all that software that breaks the newly enforced reference rules. But that’s another story.


Sat, 24 Sep 2005

AJAX

— SjG @ 6:41 pm

So, while the core development of CMS Made Simple is undergoing some interesting (and pervasive) updates as we head towards a 1.0 release, I’ve been fixing modules to work correctly under PHP 4.4 and 5.0.5. Obviously, my understanding of references was weak, and I’m paying the price now. Damn, I wrote a lot of wrong code.

But now I’m playing with making an alternate Admin interface for CMS Made Simple using some of the fine AJAX and Javascript libraries out there.

I’m using xajax to marshall up objects and submit them nicely to PHP, and I’m using the script.aculo.us Web 2.0 and its underlying Prototype library for User Interface and special effects.

Some of it’s silly, like making the login box shake if you incorrectly enter your username or password (imitating Mac OS X login). But some of it is really slick — adding users to groups is now as simple as dragging’n’dropping items between lists. It could use a way of multi-selecting that worked with dragging, but an “add all” and “remove all” button mitigate that somewhat. Of course, the original interface will remain for non-Javascript users or people who prefer it.

I plan to do the same for assigning permissions to users. But the real challenge will be drag’n’drop content reordering. This will require a draggable tree. I haven’t yet found code to make this easy; even with all these great libraries, I have to be careful to select features that work equally well under the Evil of Internet Explorer, as well as Gecko-based browsers and Opera…