GnomeAbout stuff

As far as I can work out, this is a good handler to make sure that an About box is shown every time you select Help->About from the menu (i should really look at some other project’s code).

void on_about1_activate(GtkWidget *w)
{
GtkWidget *about;
GladeXML *xml = glade_xml_new (PACKAGE_SOURCE_DIR"/Finance.glade", "about", NULL);
about = glade_xml_get_widget (xml, "about");
gtk_widget_show (about);
gtk_object_unref(GTK_OBJECT(xml));
}

the next version of ubuntu

the preview live CD is out. got the ppc and x86 ones and tried it on my laptop and desktop respectively. Went pretty well. It did video mirroring (and not xinerama) on my desktop, which is annoying, but nobody else does it right either.

the pcmcia wireless card worked out of the box on my laptop. This is pretty impressive – i just had to put my WEP key in.

When Hoary Hedgehog is released, I’m actually very tempted to switch (assuming, of course, that i get sleep support!)

another hot day

Well… it’s nearly 1pm and it’s 32 degrees. It’s warm – probably feels like that because it’s been about 30 degrees since i started working. It’s a few degrees colder in the office (which is good).

public holiday tomorrow, which is good. Although if we should have a holiday for what is essentially Invasion Day is a bit undecided. Back in the 80s and 90s we would have had this debate – but Australian society has headed towards the lunatic right and seems incapable of proper thought, argument and debate. It also okay with human rights violations, torture and the imprisonment of children.

As we increasingly move towards an education system that’s based on ability to pay, not academic ability – i don’t think it’s a time for celebrating Australia as it is.

I’ll be with friends tomorrow, enjoying some time together, as we are fond to do.

MySQL port of MemberDB

Spent probably about 3 hours today porting the database schema to MySQL 5 along with finding some bugs in the process. Pretty minor ones, mainly to do with how things could be improved to improve compatibility with schemas written with postgresql in mind.

While chasing up some stuff on why the serial type alias in mysql wasn’t exactly the same as postgresql serial type (which is an integer with a sequence and default value) i found this gem in the postgresql docs:

Note: Prior to PostgreSQL 7.3, serial implied UNIQUE. This is no longer automatic. If you wish a serial column to be in a unique constraint or a primary key, it must now be specified, same as with any other data type.

Great huh? So upgrade postgresql and don’t go sifting through your tables (now come on, everybody uses a serial/auto_increment field in a lot of tables) you loose!

i.e. there’s bugs in memberdb now that weren’t there when i started and i didn’t change any code to make them. hrrm…

anyway, i’ll write at some time the few easy steps it took to get the schema across (it takes no time once you know what you’re doing – like a few commands and a few search and replaces).

for now, you can get stuff from arch: stewart@flamingspork.com–memberdb/memberdb–mysql–0.4

the schema loads, i’ll have to change one bit of code to make it all work – otherwise everything should be fine (but let me test first – or provide fixes, not complaints :)

RT2500 wireless PCI card on Ubuntu

Got the two cards today. Ordered from i-Tech (mob in Sydney, had it delivered here). Were $59AUD each (plus shipping, which was $15 for the two of them).

Really painless setup!

One was for the Ubuntu system my mum uses, the other for the Windows system my brother uses. Well, the Ubuntu setup was easier than the windows one (try to get Windows to tell you the MAC address of the adapter… well… *of course* it’s under “Support” – where else would it be?).

I got the drivers from CVS from http://rt2x00.serialmonkey.com as the CVS ones have a few more fixes (makes it easier to build for one).

I got the following packages:
build-essential
cvs
linux-source-(whatever version it was).

cd /usr/src
tar xfj linux-source-whatever.tar.bz2
ln -s /lib/modules/the-right-version-number/build /usr/src/linux-whatever
cd /usr/src/linux-whatever
cp /boot/config-whatever .config
make modules

(as long as it builds the first few you’re fine and can ctrl-c the rest)

then i got the CVS drivers and built it like their docs say (make with the -C parameters).

depmod -a

then used the GUI tool to set it up (the Ubuntu one). The ralink graphical utility (install the kde-devel package to build it) lets you monitor link quality etc.

so, success!

Free Software Wish List

This has been gathering in my brain, I figure I should write it all down:

X

  • Render everything using Composite and OpenGL
    basically then we can have output that doesn’t suck! Translucency is not only cool, but useful in some UI.
  • All 2D graphics to be drawn with Cairo.
    Enough said here – vector is the future.
  • A magnify screen function (look at MacOS X’s) except using Cairo et all so that everything is still smooth when you zoom (use those vector graphics baby, yeah!)
  • Graphics cards companies to pull their finger out and do full open source drivers.

GNOME (note that this is only long because I love it so much and spend so much time using it)

  • To be able to set emblems on files/folders in Nautilus via the contextual menu.
  • To have the Create Archive option in the contextual menu have a submenu with options such as “.tar, .tar.gz, .tar.bz2, .zip” (or just .gz, .bz2 if only a single file is selected)
  • Take less time to log in
  • Evolution to not leak memory.
  • Evolution to handle big maildirs better (where big is the multiple hundred of thousands of messages
  • For Evolution to not do “checking” stuff on mailboxes.
  • Gaim getting it’s contact list from Evolution
  • Nautilus having better graphics for open versus closed folders (at least in the theme I use – Industrial)
  • The applications menu to be faster
  • Get rid of the Window List and Virtual Desktop – they are broken UI elements. Windows 95 proved that the taskbar just doesn’t scale when you have enough memory to run more than one application. Maybe a NeXT style dock would be good? I don’t have the answer here
  • Dashboard and Beagle to become easily installable and usable. If there’s issues with shipping mono apps as part of core gnome, then lets rewrite them in something that isn’t mono. I want that functionality!
  • gThumb to become good – think iPhoto on steroids with links into Gimp. Also, some sane way to store metadata
  • Multisync to work properly with evo2
  • Multisync to sync photos (and their metadata)
  • GnuCash to be GTK2
  • xchat to get some HIG UI love
  • All settings that a user could care about to be in a user-visible folder and able to be easily backed up (e.g. by dragging to a blank CD with nautilus-cd-burner). i.e. put everything in a folder called “Settings” instead of buried around in dotfiles.
  • A good backup utility that my mother can use (that’s smart enough to split things over multiple CDs if needed)
  • GUI for ACLs
  • Open With to be file specific as well as global
  • Animation with UI events (drool at OSX’s effects, then make better ones)
  • A good RAD dev environment. Something involving Glade and Python and integrated. Think Visual Basic 3 (when it was actually good) but on steroids with GNOME love.
  • Gnome Time Tracker to scale better (and not corrupt it’s own data files – i.e. use rename and sync properly)
  • Rhythmbox to have iPod (or any MP3/Ogg player) integration. I want to plug my ipod in, and see it in both Nautilus and Rhythmbox (and have a big Sync button in RB, as well as being able to drag files to it).
  • The desktop background to be Xinerama aware and know not to stretch an image over both screens. let me set one for each screen!
  • Have “random” desktop backgrounds from a folder
  • a desktop background option to better “fill” the screen on widescreens (where the image isn’t widescreen)

General Utils

  • xfsdump to get DVD support (multi volume dumps directly to DVD)
  • g++ to be faster and use less than a squigabyte of memory
  • prism54 to have proper link monitoring (with the gnome panel applet)
  • GUI version of kismet

there’s more… i just can’t be bothered writing any more at the moment :)

getting rid of comment spam

If anyone wants to know my really brute force method of getting rid of comment spam, shoot us a mail. I’ll send you a script that will just about solve the problem for you.

I’d publish it… but then we’d have the spammers trying to work around it. This sucks.

I still maintain it should be legal to kill them.

Yes, that goes against my usual more non-harming ways (I’m vegan okay!) – it just seems like the morally correct thing to do with them….

effective bk usage

(inspired by jimw talking about it on Planet MySQL)

I take a bit of a different approach…

I’ve got directories for 4.0, 4.1 and 5.0, and within them, i have clones of the main ndb tree (called ndb, so there’s a path like “MySQL/5.0/ndb”). I don’t ever edit in this tree, it’s my clean one. I use it for pulling and pushing.

I then ‘bk clone -lq ndb foobar’ (where foobar is what i’m doing, or ndb-foobar, depending on mood). If i have a seperate part to foobar (e.g. stage2 foobar), i’d clone it off the foobar tree (e.g. ‘bk clone -lq foobar foobar2’). The idea being I can work on stage 2 before stage 1 is pushed (and find any problems with stage 1 and pull before i pull into stage2 and can no longer do work).

i use the -q option (quiet) to bk often because printing out a few thousand lines to screen tends to slow things down.

It would be interesting to investigate ways to improve hardlinking performance as a clone takes longer than it really should (read about 20000 inodes, write about 20000 inodes). Although (i haven’t checked this) – a clone probably *copies* the checked out files, not link them. So it’s really copy about 10000 files and link about 10000 files.

A ‘du -sh’ on a 5.0-ndb clone says 232MB. After ‘bk -r clean’ (i.e. have no files checked out) is 136MB. i.e. you are saving 136MB for cloning with the -l option. Now, if BK (and us really), we’d check out files always as read-only, which would also be hard linked across clones. This would further save 96MB per clone. When you check out a file for writing, it then creates a copy of it – so you only use the disk space for the files your editing (and only use the disk space for the sfile when you check in).

“What about directory disk usage?” I hear you ask. Well, a MySQL 5.0 clone has 1053 directories. So, for each clone, we’re using 1053 inodes. On XFS with 256 byte inodes (the default) this works out to be 263kb of disk space. Let’s consider a bad case where we need another block of disk space for each of these directories (to hold all those directory entries for those 10000 files). This would mean 4MB of disk usage.

For a really clever bk (and config) you could have a clean tree of 232MB and each clone only take up less than 5MB of disk space. As it is, the checked out files aren’t hard linked, so each clone takes up an extra 96MB of disk space.

In essence, we’re using 19 times more disk space per clone than we need to.

Now, if ccache is really clever (i don’t know if it is) it would hardlink object files so we use even *less* disk space for a compiled tree (a ‘du -sh’ on a compiled max-debug tree is about 1GB).

Why have I gone on about this so much? Well, disk is cheap – except in laptops where replacing disk or getting a big one isn’t easy or cheap.

Also, backup is expensive, slow and awkward.

maybe at some later time i’ll talk about the theoretical IO usage of some things….

A Linux Australia election spiel.

Given the growth and success of LA it has become apparent that the the way the managing committee is run needs to be changed. We need to become effective in concentrating volunteer effort. Committee members have taken a lot and they have been getting burnt out. Reaching out and engaging others in the community is crucial to the future of LA. This includes improving communication with conference organisers, the community at large and inside the committee itself.

Several specific tactics I plan include: reducing the number of formal committee meetings (reducing administrative burden), implementing efficient ways to decrease the length of meetings while increasing the amount achieved, implementing a better way to track tasks that we want to achieve and the progress made on them, starting informal conference calls to help co-ordinate projects, committee thoughts (so that everyone is on the same page) and community participation. Last but not least, it is the main goal of LA to make sure that linux.conf.au runs and is a success.

For those who don’t know:
Stewart lives in Melbourne, breathes code, has been VP of LA for two years and works for MySQL AB.