(A cheesy homepage for Justin Collins)
New kams release and I’m sick

I’ve released a new version of kams (0.2.0).

Today is the first day of the new quarter, but I don’t have class and I’m sick. So I’m staying at home. Yay.


Ruby 1.9.1 Memory Savings?

Okay, in my last post I was talking about some changes I was making to kams to make it work with Ruby 1.9.1.

Today I happened to glance at the memory usage. This is just after starting up the server and I have about ~830 game objects in the world (I expect that to be a small number, given that I only have 152 rooms, 325 exits, and the rest are random things like clothing). Under Ruby 1.8.7, this takes ~36MB of memory. Under 1.9.1RC1, it’s only 16MB. Less than half.

Nice. Now to look for areas where memory may be leaking…


Some changes for Ruby 1.9.1pre2

Here are a few things I have found so far while making kams compatible with Ruby 1.9.1:

  • Small eventmachine change needed as shown here.
  • require 'md5' changed to require 'digest/md5' and MD5 changed to Digest::MD5 (this works with 1.8.7, too.)
  • Any hashes which were defined not using => (i.e., {'a', '1', 'b', '2'} ) have to now use =>
  • One issue required some version checking: the Observable module in 1.8.7 uses an array, in 1.9.1 it uses a hash. This doesn’t matter much to me, except when Observable objects are marshalled and this goes along with them. What I have done for now is set it to an array or hash as appropriate when loading the objects (there is no content for it, in either case).
  • Array#to_s has changed. In 1.8.7, [].to_s => ””. In 1.9.1, [].to_s => “[]”. Somewhat annoying, but easy to handle.
  • Have to deal with Object#instance_variables and Object#instance_methods returning arrays of symbols instead of strings.
  • Ran into an issue with Mutex#try_lock. Asking about a solution now…

Update – No one answered my question about Mutex#try_lock, but someone fixed it anyway :)


Neat Ruby Regex Tool

Rublar is a very neat little website for testing out Ruby regular expressions.


Oh, man

When I get back to a civilized Internet connection, I am definitely spending some time playing with this.


Turning off annoying sounds in Xfce

If you are getting annoying sounds in Xfce (like when opening/closing windows and such), just uninstall the canberra-gtk package. Something like sudo urpme canberra-gtk should do it.


RSS – I can think of a few things it ought to stand for

I typically use Liferea for keeping track of RSS feeds (works great at school so I don’t waste as much time browsing websites) but, for whatever reason it isn’t working right for me on my laptop. “So,” I thought, “why not create my own little dealie using some Ruby and some pairs of Shoes? I mean, I’m sure it will be straightforward, right?”

Ha. Ha.

First of all, I went looking for some Ruby RSS libraries. There are a few out there. I tried simple-rss, because it seemed nice and…simple. Installed just fine, ran it using this site’s feed. It crashed. Didn’t work at all. Lame. Looked a few others, but they seemed to have a few too many dependencies or were out of date.

But, wait! Ruby comes with it’s very own RSS parser (and generator) in the standard library! Great! Too bad the documentation is lacking and confusing at best. I managed to find a nice little article over at rubybook.ca (haven’t really investigated the site much) which has some details about parsing RSS and Atom with the standard library. Awesome.

Then I got sidetracked by something else. I wanted to be hip and not disturb the webservers too much, so naturally I wanted to use conditional GETs so that if a feed hasn’t been updated I don’t download the whole thing again. Seems like a great idea. Then I got seriously confused. Why? Because this ‘Last-Modified’ header is not something that is sent back all the time. I wasted a bunch of time trying to figure out if there is a way to request the information, but it doesn’t sound like it. If it’s there, great, if not, either make up your own timestamps or forget about it.

I managed to get back on track and even wrote up a nice little class for handling subscriptions when I found out the really bad part: My own website’s feed didn’t provide the data Ruby’s RSS parser expected. Great. I looked at a few others. It seems like RSS feeds are generally okay, but Atom feeds are all over the place. After fiddling around for a while, I made my code a little flexible and moved on.

I wrote a hideous shoes application.

Then I gave up, because I was tired of dealing with it. Maybe I’ll come back to it later.

However, I did change this site’s feed over to an RSS feed instead of Atom. If you were actually using the Atom feed, you can still do so, but the auto-discovery and link at the bottom are set to RSS.


Updates, slightly new design

I decided to merge this page and vice.presidentbeef.com. I managed to carefully squish the two databases together into something which made sense, so all the posts from there are now here.

Also, the look of the site has been updated slightly. I’ve added some convenient links to blog categories and even updated most of the tags in the archive. Probably a few more things will change along the way.


Adobe Flash player for 64-bit Linux? Soonish?

Adobe hasn’t given the 64-bit world a lot of love. Linux, in particular, tends to get the short end of the stick, typically receiving the latest version months after all the websites have upgraded.

But I just found out that Adobe just put out a new alpha version of Flash Player 10 for Linux (available here ) a couple days ago. It’s pretty raw (no installer), but I uninstalled the RPM version and copied the .so file from above to /usr/lib64/mozilla/plugins/

It seems to work alright so far.

Unfortunately, this may not be that great a cause for optimism. Other people thought 64-bit Flash was coming soon a few months ago.


Great Shirt

Ran across this intriguing reversal over here.


I only blog when I shouldn’t

Yeah, pretty much as the title says. I only think to do this when I am trying to think of anything possible I can do to avoid doing work.

So, in lieu of anything actually insightful to share, have a look at this, a little ways down. Note how the new 1.9.1 version of Ruby is blowing everything else away. Pretty awesome. I’m excited for the real release and for certain things (cougheventmachine cough) to have official support for it. Things are looking up in Rubyland.


More New Words

Yes, let us once again take a trip through rosy fields of wordly trees.

  • Ambergrised – (uncertain)
  • Argence – silveryness?
  • Apothegm – pithy instructive saying, maxim
  • Benison – blessing, benediction
  • Catafalque – funeral canopy
  • Chancrous – having an ulcer
  • Chrism – consecrated ointment
  • Crepitation – crackling
  • Etiolated – blanched, withered
  • Formication – feeling of ants on skin
  • Fructified – made fruitful, productive
  • Gavotte – old French dance
  • Knurling – small projection, knob
  • Incarnadine – dyed red
  • Inchoate – partial, just begun
  • Innominate – unnamed
  • Lambent – flickering, radiant
  • Limned – rendered artistically
  • Malison – curse, (antonym of benison)
  • Mephic – (uncertain) 2
  • Nacre – mother-of-pearl
  • Nacreous – like mother-of-pearl
  • Obbligato – persistent subordinate motif
  • Palliation – mitigation, hiding
  • Paucity – scarcity, insufficiency
  • Preterite – in the past
  • Redolent – scented, sweetly odorous
  • Roynish – mangy, mean
  • Sabulous – gritty, sandy
  • Stertorously – snoring, noisily breathing
  • Susurrus – whisper, sound of murmuring
  • Telic – purposive
  • Theurgy – miracle, sorcery
  • Thetic – setting forth, like a thesis
  • Threnody – song of lamentation, dirge
  • Travertine – white calcium carbonate

Ambergrised: Ambergris is “A substance of the consistence of wax, found floating in the Indian Ocean and other parts of the tropics, and also as a morbid secretion in the intestines of the sperm whale, which is believed to be in all cases its true origin. In color it is white, ash-gray, yellow, or black, and often variegated like marble. The floating masses are sometimes from sixty to two hundred and twenty-five pounds in weight. It is wholly volatilized as a white vapor at 212 Fahrenheit, and is highly valued in perfumery.” Make of that what you will.

Mephic: Really not certain on this one. Closest thing I could find is “mephis”, but it is more likely to mean something close to “mephitic”, which means noxious, poisonous, foul-smelling, etc.


The Eraser

So, over Thanksgiving I had part of “Black Swan” stuck in my head for no particular reason. I will admit that when I had listened to Thom Yorke’s solo album in the past I was not particular entranced. But when I got home from Thanksgiving (having been listening to it in my head off and on the whole time), I listened to it again.

Like most of Thom Yorke and Radiohead’s stuff, it takes a little while to “get” it. By the way, did you know “In Rainbows” has been nominated for a Grammy? Yeah, it has. For Best Album of the Year. Yay.

Anyhow, “The Eraser” is pretty good. I like it.


Gnome-terminal Blinking Cursor

Okay, I noted a few months back that I and many other people noticed and hated that the Gnome terminal all of a sudden did not have an option to turn off the cursor blinking, but was tied to a global option to turn all cursor blinking on or off.

Well, I recently installed Mandriva 2009 and guess what…the cursor still blinks and there is still no option to turn it off. However, I was able to find a way:

  • Run gconf-editor (you can install it with sudo urpmi gconf-editor)
  • Navigate to /apps/gnome-terminal/profiles/Default/
  • Set the key “cursor_blink_mode” to off (You can add the key if needed by right-clicking and selecting “New Key”)

Now I get to use the Gnome terminal (my favorite, for some reason) and not have to see that horribly blinking cursor. Yay.


Hehe

Check this out.

It’s so wildly inaccurate is makes me giggle.