Home

Advertisement

Customize

Ben

Oct. 22nd, 2006

Feb. 4th, 2006

11:16 pm - Blog blog blog... over here

So I've jumped ship as it were and am now mostly blogging on my own site, so point your browser to http://benno.id.au/blog/ (or
your aggregator to http://benno.id.au/blog/feed/)

Dec. 9th, 2005

01:32 pm - NSW geocoding

So my maps stuff now lets you look up addresses in NSW.

Oct. 19th, 2005

07:10 pm - Posting from the air!

I'm currently flying somewhere over the black sea, en route to London. Singapore airlines is really cool and have the interweb on board. Rock!

Jul. 14th, 2005

09:20 am - GIMP and colour depth

So I'm playing with a new embedded board, which has a nice 16-bit 640x480 colour LCD. So to make
a nice splash-screen I fired up the GIMP did a nice gradient effect and some text. This looked
really nice on my 32-bit colour display, but once you move to a 16-bit display the gradient is
no longer nice and smooth.

So all I want to do is convert my 24-bit colour RGB image to a 16-bit colour RGB image, and get the
GIMP to do dithering. This is something that should be relatively straight forward. Alas I couldn't
find any way to do, and neither could anyone else in the lab.

I ended up using convert, which worked pretty well:

convert -treedepth 5 -colors 65535 -dither logo24.bmp logo.bmp

But it still amazes me that GIMP can't do this. If anyone knows how to do it please let me know!

Here is the image if you want to give it a try.

Jul. 8th, 2005

06:37 pm - OMG! You would not believe the picture of a shark I saw today!



In fact this whole shark site is pretty hilarious. Don't even ask why I was googling for sharks.

Jul. 7th, 2005

11:44 am - More GoogleMaps fun.

I've updated my google maps interface again.

There is a new tool "Handy Places" which gets a bunch of different map views from a backend database and gives you easy access to them. Of course I still need allow people to add their own bookmarks here, but that should be doable soon.

Length finder has some rudimentry UI for saving stuff, but this doesn't actually work yet :). Otherwise I still think its the best length finder available for google maps at the moment.

Current Place has been updated to correctly give you an idea of the size of the earth you are currently looking at. The coolest thing is seeing how the map gets distorted as you get closer to the poles.

Jul. 4th, 2005

Jul. 2nd, 2005

01:23 am - Google Maps Fun

Google maps is fun. Google maps API is even more fun!

Just so many cool things to do. My first Google maps hack lets you draw routes on the map (or sat image) and print out the distance associated with it. I've got some other cool things coming up, but I thought I'd get that one out now.

Oh, it is currently centered on work's new building, but zoomed out to see most of the city.

May. 12th, 2005

02:01 pm - Python Generators

Didn't understand the coolness of python generators today. I wanted to generate a list of
files in a directory. Previously I had to write a class and do __iter__ tricks. Now I can
simply do this:

def file_walk(path):
    for dn, ignore, files in os.walk(path):
        for fn in files:
            yield dn + os.sep + fn

May. 4th, 2005

04:18 pm - Python decorators

I love Python because it is so easy to write unreadable code in.

I wanted to handle sub-commands and didn't want to go to all the hassle of
maintaining a dispatch dictionary. So I decided I could be really seedy and
do:

globals()[args[0]](args[1:])

However this sucks if someone picks function that wasn't intended as a subcommand.

Python decorators to the rescue! My main problem with the dispatch dictionary was
having to update commands in two places. So with decorators I can do this:

commands = {}

def command(fn):
commands[fn.func_name] = fn

@command
def foo(args): pass

and then

commands[args[0](args[1:])

and I don't have to be so seedy. Of course I'm sure people still won't understand
what I'm doing, but thats ok ;)

Apr. 29th, 2005

10:52 am - Hoary Hedgehog

Today I decided to join the droves trying out hoary. I would love to say it was simple seamless experience, but it wasn't.

Not that it was particularly painful find you, just a couple of little annoyances.

Firstly SATA didn't quite work for me. My BIOS has somethign called "combination mode", which seems to make the SATA disks appear like normal ATA disks as well as SATA disks. Which confused the hell out of the kernel. By setting it to "Normal" mode in the BIOS this problem went away.

The other problem was buggy media. The CD seemed a bit scratchy but after retrying about 5 times it finally worked.

Anyway seemed to work and let me get at a terminal. I haven't got rid of the GNOME stuff and installed ratpoison yet, but this will mainly be a remote
login box anyway, so I don't care too much about the GUI.

Jan. 11th, 2005

04:24 pm - Switching ALSA audio outputs

While its all well and good mixing audio output, so you can hear both the CD you are listening too, and
the audio stream from a VLC stream, it can get kind of confusing listening to two things at once.

So I to write a simple shell script which would mute the currently active output
stream, and unmute the other, which I could then easily bind this to a key in ratpoison.

I thought it would be easy, which it was, but the result is fairly gross. Surely someone can show me a better way
to do this:

#!/bin/sh

if [ `amixer cget iface=MIXER,name="PCM Playback Switch" | tail -1 | cut -d\, -f2` "==" off ]; then 
    amixer cset iface=MIXER,name="PCM Playback Switch" 1 > /dev/null; 
    amixer cset iface=MIXER,name="CD Playback Switch" 0 > /dev/null; 
else 
    amixer cset iface=MIXER,name="PCM Playback Switch" 0 > /dev/null; 
    amixer cset iface=MIXER,name="CD Playback Switch" 1 > /dev/null; 
fi

Dec. 2nd, 2004

04:28 pm

Yay, I got my paper into LCA 2005. Hooray!

In other news I picked up my big day out tickets today. Hooray!

Finally, I leave you with a great (very nerdy) quote from Ted Ts:

The way the kernel will deal with C++ language being a complete
disaster (where something as simple as "a = b + c + d +e" could
involve a dozen or more memory allocations, implicit type conversions,
and overloaded operators) is to not use it.  Think about the words of
wisdom from the movie Wargames: "The only way to win is not to play
the game".

Nov. 27th, 2004

10:46 am

So instead of going to SLUG last night, Jamie and I went and played pool at the Clare Hotel. Anyway, long story short, it turns out we aren't the only
ones who play the penis game in Sydney.

Nov. 22nd, 2004

09:05 am - FTA is bad mmmkay

This is just depressing.

Nov. 14th, 2004

02:08 am - Random post

JJJ should simulcast rage again.

Current Music: Rage -- ZZ Top

May. 11th, 2004

09:48 pm - have cable!

of course i dont have a computer yet. i have a nice new powerbook on order which should show up soon.

so anyway this post is coming courtesy of my palm pilot connecting to cable via new dlink 624+ wireless router.

May. 10th, 2004

03:35 pm

This is a cool (though for very nerdy reasons), piece of art.

May. 6th, 2004

11:06 pm - Meme meme wonderful meme

So I was explaining to Suzy exactly what a meme was the other day, but now I have a more thorough example to show. It seems that the "23rd post, 5th line" meme, is a mutation, of another "grab nearest book, 23rd page, 5th line" (or more likely the mutation went the other way around.) The point of the story is look at how that meme managed to adapt to the livejournal environment to ensure its continued replication. (Or so the meme freaks would have you believe ;)

Anyway, the meme lives on and I will give it to you in book format, from the "PCI System Architecture; 4th Ed." (yes, I am that lame...)

"and the return of the bus to the idle state. It defined how a device must respond"

So there you go, benchmark still hasn't finished and Angel still isn't on TV yet.

Navigate: (Previous 20 Entries)