New Host

Having discovered that my old host STILL hasn’t fixed their DNS problems, I’ve moved this blog to NearlyFreeSpeech.NET. Let me know if you find any problems.

However, keep in mind that the contact form is still on my old host (I need to make some changes before it will work with NearlyFreeSpeech.NET’s mailer) so it may exhibit the same intermittent 404 errors that forced me to move the blog. If you have trouble with it, try again later and it will work. I’ll have it moved over as soon as I’ve got the script updated.

UPDATE: The mail form is now hosted on the same server as the blog, so there should be no more intermittent 404 errors.

Posted in Site Updates | Leave a comment

Adbox

Yes, I have added an adbox to my blog. For those who are wondering, no, I haven’t become a hypocrite. I still don’t like big banner and skyscraper ads all over, but I don’t mind a few small buttons… especially when the advertiser pays per day, rather than per impression or per click.

Pay-per-day ads like the ones I’m using allow people who aren’t interested (in most cases, that means me) to use tools like AdBlock Plus without hurting anyone (the only effect is a few less views on the graphs shown to potential advertisers) and, since it’s Project Wonderful ads, even I don’t block them. (The Project Wonderful guys run their ad service the way I would) It also helps that I’ve set my profile to refuse animated GIFs.

Anyway, I’ve set a minimum price per adbox of 1¢ per day and I’m providing two boxes. Hopefully, there will be enough interest that I won’t have to switch to one box at 2¢. My goal is to make this blog pay for itself when hosted on NearlyFreeSpeech.NET.

Posted in Site Updates | Leave a comment

How to get Timidity to work (more or less) as a software synth with OSS 4

Note: This is still fragile, so I can’t help you if it doesn’t work on your system.

I finally got around to trying OSS 4 and I just can’t go back to ALSA. Not only is it less cantankerous, the mixer curve I get by leaving my soundcard on defaults and adjusting the vmix in-kernel mixer is much nicer.

Unfortunately, there was one problem. MIDI support for OSS 4 is still in development and I have old Windows games which use MIDI for their background music. With ALSA, I had been using Timidity as a software synth that Wine could hook into, but I couldn’t get that to work with libsalsa (the OSS 4 ALSA compatibility layer) so I decided to look for an alternative.

It’s a jerry-rig, but I figured out how to strap the ALSA userland onto OSS 4 so that Wine has a way to get MIDI events to Timidity. Details below…

Step 1: Install OSS

(Remember to symlink /dev/dsp to your preferred /dev/dspN if it forgets.)

Make sure alsa-lib (or your equivalent) stays installed and that the lines in /usr/sbin/soundon
for setting up libsalsa are commented out. (The ebuild on bugs.gentoo.org which I used comes with a patch to
do this)

If you want to do this yourself, find the line which says “# Use library based ALSA compatibility”
and comment out the block which follows it. If you don’t know how to do this, I suggest grabbing
the patch from bugs.gentoo.org.

If you want to use the ebuild, it’s at Bug 184123.

Step 2: Create an /etc/asound.conf

It should contain only the following:


pcm.!default {
        type oss
        device /dev/dsp
}

Step 3: Set up your ALSA kernel modules

Set up the following ALSA config in your kernel:


Device Drivers --> Sound -->
	<M> Sound card support
	Advanced Linux Sound Architecture  --->
		<M> Advanced Linux Sound Architecture
		<M>   Sequencer support
		[*]   Support old ALSA API

The following were something I tested but didn’t see any difference to. Your mileage may vary.


		<M>   RTC Timer support
		[*]     Use RTC as default sequencer timer

Everything else should be disabled.

Step 4: Adjust your init scripts

Make sure your init scripts successfully load OSS 4 and then adjust them to run “modprobe snd-seq” after it has checked and found no ALSA.

Step 5: Set up Timidity

This part took the the longest to figure out. Timidity is VERY fickle in this setup, so your mileage may vary. Here’s what I had to do:

  • Timidity had to be run from inside my KDE session. (not from an initscript)
  • I had to use artsdsp and set Timidity to use ALSA output

The command I used was “artsdsp timidity -iA -Os” but the -Os was just to make sure. (It was default on my system)

The second-best I found was “timidity -iA -Op” (Portaudio output without artsdsp) and it could be run from an initscript, but it would go silent after the first song or two.

Plain ordinary ALSA output had a similar problem, but also had timing glitches. Ironically, when Timidity is just playing a midi file directly as opposed to receiving MIDI events via ALSA, the timing glitches are absent.

Posted in Geek Stuff | 1 Comment

CineMassacre’s Monster Madness

Monster Madness, Part 1 @ YouTube

Yeah, I know most horror fans have probably already seen this, but whether or not you like Horror films, you should watch it. I’m not a Horror fan, but this provides a great way for fans to check if they’ve missed any classics, and non-fans to learn a little more about the history of this aspect of popular culture without having to actually watch the films.

Posted in Geek Stuff, Otaku Stuff, Web Wandering & Opinion | Leave a comment

Git and Comfortable Version Control

For those who aren’t familiar with git, I’ll start with a short summary. Git is the version control system that Linus Torvalds wrote when none of the existing alternatives were acceptable choices. Short enough?

Now, here’s why you should be using it: (Keep in mind that I realized this so recently that I’m still using Bazaar with a handful of Subversion repos still on the conversion TODO list)

  • Git is VERY fast… subsecond-response fast. Torvalds wrote it that way so he could get response times of a few seconds when working on the Linux kernel, which has a big tree.
  • Git is distributed. Every working copy doubles as a repository in full, so you can work offline just as easily as online and every time someone clones your source tree, they also make a backup of your repository.
  • Git doesn’t just take care of your data, it protects it. Unlike many other revision control systems, Git will notice and inform you of corruption due to faulty hardware. Then you can just pull a good copy from a co-worker, your public repo, or a user who likes to live on the bleeding edge. Every commit uses SHA1 hashes to ensure the integrity of both the newest commit, and all prior commits. (which also foils anyone might try to edit an old revision of the code for nefarious purposes)
  • Git makes it comfortable and easy to branch and merge as much as you want.
  • Git’s command-line interface is actually comfortable. Commands like `git stash` and `git commit` are designed by programmers for programmers.

Aside from it’s speed, that last point is actually the most important for me (I’m horrendously lazy) and, ironically, the one that I didn’t discover until I actually tried it. As such, let me explain what that means in more detail:

First, `git commit`. In most version control systems, the “add” subcommand (`git add`, `svn add`, etc.) tells the tool to start monitoring the files for changes which will be automatically committed by the “commit” subcommand. In git, you have to run “git add” every time you want “git commit” to pick up some changes. Confused? Good, now I’ll explain why this is a good thing.

to get the usual behaviour you’d expect from something like Subversion, Bazaar, and the like, you can run “git commit -a” (-a being shorthand for –all. I’ve used the git config file to alias it to `git ci` for comfort) but what if you’ve been happily hacking away at two different pieces of your program (Let’s call them “bob” and “steve”) and want to commit them separately?

That’s where git’s different approach suddenly makes sense. Commiting them separately is simple and comfortable…
$ git add bob/
$ git commit
...type in your description for bob's changes...
$ git add steve_*.c
$ git commit
...type in your description to steve's changes...

As with so many things in Git, it’s an example of a non-obvious but simple change which makes your life immeasurably more comfortable.

Second, `git stash`. This one is a much simpler. What if you’ve been coding away at something and, before your changes are ready to apply, someone (eg. your boss) rushes in and tells you to fix HEAD (the newest commited version) immediately? Without “stash”, it’ll take you at least six commands to temporarily “stash” your changes so you can work on HEAD without losing them. With stash, it takes just three and they’re easy to remember: (As taken from the stash manual)
$ git stash
... make the emergency fix ...
$ git commit -a -m "Emergency fix for the FOO problem"
$ git stash apply

Simple, easy to remember, and fast… just like the rest of git these days. Don’t take my word for it, drop by the git website and check out the crash courses yourself?

Of course, don’t let that stop you from using Zack Rusin’s Git Cheat Sheet. It’s always nice to have a quick reference card handy, after all.

UPDATE: As a Linux user, I almost forgot to mention that yes, the Windows port is quite usable. The big scary warnings are actually mainly messages that can be summed up as “Windows doesn’t have this feature that Linux git users might be used to”. There’s a slightly aged GMANE thread you can check if you want more details.

Posted in Geek Stuff | Leave a comment

Quick “Do Not Disturb” Sign

It’s a fairly safe bet that, at some point or other, everybody has wanted a “Do Not Disturb” sign for their room. Unfortunately, the kind you hang on your door handle tend to be difficult to make and don’t always work very well with certain doors. (Mine, for example. It eats them in a day or two.)

As such, I’m going to tell you about a quick and easy way to make something a little more interesting: The type of hanging flip-sign you always see in the movies with “Open” on one side and “Closed” on the other. One additional pleasant feature of this design is that most dollar store handy-persons will already have all the necessary materials.

Before I start, keep in mind that I am not including pictures because I can’t find my digital camera. However, this project only takes 5 minutes and costs about $5 if you have to buy all the parts brand new at the dollar store, so I decided not to wait.

What you will need: (Materials assume Canadian pricing and standards. Adjust as necessary)

  • 1 small hook (I used peel-and-stick adhesive ones meant for lockers. $1 for 4 at the dollar-store)
  • 4 paper clips ($1 for a package of at least 100 at the dollar store)
  • 18 inches of string ($1 for a 300-foot reel at the dollar store)
  • 1 US Letter-size piece of cardboard from the back of a pad of writing paper ($1 at the dollar store)
  • 2 pieces of US Letter-size photocopier paper (16¢ from a photocopier as a source of last resort)
  • Markers or a computer and printer

You may already have guessed how this is going to work.

  1. Install the hook on or near your door. I prefer the small metal adhesive hooks because they look nice and, though it’s not a problem for me, they are more parent/roommate/spouse-friendly than the screw-in kind or the rather ugly plastic adhesive kind.
  2. Tie two of the paperclips together with the string, placing them no more than 13 inches and no less than 11.5 inches apart. Double- or triple-knot both ends and then trim away the excess.
  3. Print your chosen back and front messages on the two pieces of paper. Attach them to the front and back of the cardboard by securing the corners with the paperclips.
  4. You’re done. Hang the sign on the hook and enjoy.

For those who are wondering, the reasons for not putting the message directly on the cardboard are threefold:

  • Cardboard is usually brown which makes for ugly signs.
  • By securing the messages with paperclips, we ensure that they can be easily changed if necessary.
  • Even if the top two concerns are negated, cardboard appropriate for making signs is too thick to fit into a computer printer
Posted in Lair Improvement | Leave a comment

Liberated Games

Liberated Games

I had a very nice post about this site, but I also had Javascript disabled to work around a WordPress bug, so there was no auto-save to protect me from myself. Therefore, you’re stuck with the short version.

In short, Liberated Games indexes games for which the original publisher has either released the source code (still need the game disc, but people can write Linux or Mac engines for it) or made the entire playable game available as freeware.

Notable examples include Tribes 2, Command and Conquer, The Elder Scrolls: Arena, and more. Enjoy!

Posted in Geek Stuff, Web Wandering & Opinion | Leave a comment