Writings

Technology, open source, personal essays, and everything that isn't climate.

OpenSim Infrastructure Updates: fresh os, git mirror, and automated release building

Yesterday I upgraded the opensimulator.org machine (kindly provided by Adam Frisby) to the latest version of Debian.  The upgrade went seemlessly.  Now that we are on Debian 5.0 we've got some fresher software on the machine to make it possible to provide a few new things as part of the basic OpenSim infrastructure.

OpenSim via Git

We are now mirroring the experimental upstream code (aka subversion trunk) via git.  At least 5 of us on the OpenSim core team have been using git personally with the git-svn bridge for our own OpenSim work (I started doing this nearly a year ago).  Git provides some advantages in making it easy to try things out in a local tree, and throw away branches if things go wrong.  If you read my blog, you know, I love git. :)

While subversion remains our main tree, this git mirror will make it easy for developers (or budding developers) to experiment with this alternative source system.  You can use viewgit to see the git mirror, or clone this via:

git clone http://opensimulator.org/git/opensim

In addition, the viewgit system provides a very handy rss feed for changes, which is another way you can keep up to tabs on what's changing in trunk.  There is an up to 10 minute lag in changes getting into the git mirror from svn, but hopefully that won't bother anyone.

Automated Release Building for OpenSim

Something else I threw together last night was an automated release builder for OpenSim.  One of the challenges we had was getting all the parts of the release sorted out once a release tag was made was sometimes onerous, and meant that a release might only be an subversion tag for days or even weeks before source tarballs of that saw their way into the world.

I've now got a system in place that looks for all numeric tags in our source tree, checks them out, runs prebuild on them, and bundles them up as both a .zip and a .tar.gz.  This means they should be ready to compile with nant or MSVS.  This is running hourly on the OpenSim machine, and publishing all results to http://dist.opensimulator.org.  One of the immediate things you'll see is that it now gives us a full set of historically populated releases.

I'm hoping you enjoy these extra bits of infrastructure for the project.  Please feel free to drop me a comment here if you have any thoughts or questions on them, feedback is always appreciated.

Related: OpenSim moves to git · The next stage in OpenSim community growth - OpenSim Forge · OpenSim 0.4 Released!

Hey Folks, Please Get a Sense of Humor

There has been some interesting and amazing "outrage" by a bunch of people today of the OpenSim April Fools joke, which was:

  • non destructive change of avatar appearance (no data on disk changed)
  • temporary
  • never put into any release version, or stable tag
  • only in the unstable upstream raw subversion tree

Lots of people got bent out of shape over it, many throwing temper tantrums on the opensim lists.

I'm very glad that so many people feel so entitled that they should be able to run unstable code that the core team says "never run this in production, ever, only run it if you want to help test", not follow any dev discussions, the commit list, or irc (where many people were happily point to the patch to change this), and if anything is out of the ordinary someone owes them.  But that's really not the case.

This is an open source project that a lot of people put a lot of love into, and it's also an open source project in a technology space that is defined in most people's minds by flying purple penises.  This violent reaction to a small amount of fun in trunk is just crazy.  I do hope that everyone who is outraged wrote nasty letters to youtube, google, cnet, and the rest of the internet today.

I we had changed this in a release version, I would consider that over the line.  But trunk is fair game for all manner of experimentation, on April 1 or any other day of the week.  Sometimes fair warning is given, sometimes it isn't.  I was personally responsible for a 5 hour outage on osgrid because the Asset migration that I didn't think would be an issue, and I've broken trunk my fair number of times.

Before you get self-righteous about "you people that have, for free, provided a viable, commericially friendly 3D engine, decided to do something in your unstable tree that doesn't hurt my data", think about the fact that people are doing this on their spare time, and for the love of it.  The net effect of all this grumbling isn't changing whether or not there is an April 1 next year, it's mostly changing whether or not people feel there is a fun loving community here that they still want to support.  Fortunately there has been more user support for being fun loving than against, so the whiners aren't ruining it for everyone, at least not completely.

It really reminds me of a great picture that Roo Reynolds took at the Rails Conf a while back:

Why so serious?

Now really, "why so serious?". :)

Related: OpenSim Infrastructure Updates: fresh os, git mirror, and automated release building · OpenSim moves to git · Software in the era of drive by contribution

Ruby Typed Accessors

Pat Ladd started IMing me a week ago looking for a simple Ruby solution to the following problem:

  • He was building objects of a SOAP web service
  • SOAP in Ruby returned everything as strings
  • He wanted his objects to have numbers be numbers, not strings

You could do a lot of manual conversion, but it really seemed like there should be a simple way to say "this is an int, do the conversion for me".  While ruby is dynamically typed, it is also strongly typed, so String + Int causes an exception, typically in a place you weren't expecting.

He and I googled around for a while and found that no one seemed to have tackled this yet.  Later that day Pat sent me the first version of this, all done with some fun meta programming.  He and I both realized that this was probably useful enough that we should share, so I signed up to help package it as a gem.

Announcing Typed Accessors Gem A quick example of how this works is below:

class Foo
float_accessor :float
date_accessor :date
end
>> f = Foo.new
=> #
>> f.float = "1.4"
=> "1.4"
>> f.float
=> 1.4
>> f.float = "1"
=> "1"
>> f.float
=> 1.0
>> f.date = "2009-10-30"
=> "2009-10-30"
>> f.date
=> #
>> f.date.to_s
=> "2009-10-30"

The full documentation can be found on rubyforge, and the source tree on github.  It's even got unit tests as of this weekend (which already found and fixed one bug).  This is released under MIT license, so do with it what you will.

If you want to use typed accessors just:

gem install typed_accessors

And require it in your environment.  It works as a mixin on Class, so very seemlessly fits in your environment.

Related: 700 Ruby Hobos · Ruby gymnastics · In praise of github

The Daily Show: ending the war on science, the only war we were winning

.cc_box a:hover .cc_home{background:url('http://www.comedycentral.com/comedycentral/video/assets/syndicated-logo-over.png') !important;}.cc_links a{color:#b9b9b9;text-decoration:none;}.cc_show a{color:#707070;text-decoration:none;}.cc_title a{color:#868686;text-decoration:none;}.cc_links a:hover{color:#67bee2;text-decoration:underline;}

The Daily Show With Jon StewartM - Th 11p / 10c

Stem Sell

🔗💀 Comedy Central video embed

Daily Show Full Episodes
Important Things w/ Demetri Martin

Political Humor
Jim Cramer

Or directly linked here.

Related: The Daily Show: What is Science Up To? · Jon Stewart on SOPA · Balloon Boy, you have met your new freak out match

Adding alternating table row colors dynamically with prototype

Alternative table row colors (also known as zebra tables) are very handy.  Recently I ran into an issue with redmine where it generates tables in a way that prevents you from tagging the rows as "even/odd" when you create them.

You can fix this after the fact with the following prototype function (redmine is a rails app, so I used prototype, it should be pretty easy to do in jquery as well).

function colorTable() {
    var EvenOddCount = 0;
    $$('.splitcontentleft tr').each(function(element) {
            if(EvenOddCount % 2 == 0){
                element.className = "even";
            }else{
                element.className = "odd";
            }
            EvenOddCount++;
        });
}

I use your own css selector where appropriate in the $$ function.  Then you can set tr.even and tr.odd in your css file and give it your color scheme.  Just set onload="colorTable();" in your body declaration, and off you go.

Related: Learning to not hate Java · Book Review: The Disappearing Spoon · Is the Sky Blue?

That's the Futurama I remember

Susan and I finally watched Into the Wild Green Yonder last night.  Typically I had watched these on release day, but after Bender's Game, it didn't feel like it had the same sense of urgency.  I love Futurama, have bought everything in the past, but the 3 previous movies left me wanting.  One of the brilliances of Futurama was the sheer density of funny, and trying to get that with a 90 minute plot is tough.  Each movie previously had seemed a little worse than the one before, which made me sad.

But, by the time they got to Into the Wild Green Yonder, they seem to have figured it out.  It felt more like the original Futurama than any of the other movies to me.  Maybe it's the fact that the Futurama gang could always do environmentalist humor well.  At any rate, it was good.  And for anyone that enjoyed the show, I'd highly recommend buying that DVD (if you haven't already).  The possibility for future Futurama is all about DVD sales at this point.  So if you like this stuff, don't download it, don't netflix... buy it.

Related: Sweet Zombie Jesus! · Sweet three-toed sloth of ice planet Hoth · A new breath of life for my A3 HD-DVD player