28 May 2015

Ghosts Forge

So today, I see news that SourceForge, once the mightiest of Free Libre Open Source Software distribution platforms, has basically Hijacked the GIMP for Windows account and is bundling adware with the installer. They don't want to close the project and have decided that it has been 'unmaintained'. This is really shady behaviour.

I guess I was one of the last hangers-on to SourceForge - when GitHub came out it was the latest trendy thing and anyone who's anyone uses GitHub for their work - except to be completely honest, I kinda find Git to be obtuse and annoying. DVCS is not simply 'better' than a centralised VCS, especially not when everyone using Git seems to be reliant on GitHub being the centre of their world anyway! But rants about version control systems can wait until a later post. SourceForge's behaviour is now quite belligerent. I think I should dig up some of my old (abandoned-for-now) SF.net projects and move them elsewhere.

But where? Well, there's an alternative to GitHub that is really quite shiny - bitbucket.org. It's got an excellent web UI, I've used it for a few of my little blog-post scripts already, and more importantly it supports Mercurial as well as Git. I haven't used Mercurial a whole lot yet, but it feels a lot nicer than Git. Everything in the interface is just laid out a lot more sensibly, and that's important when you have something complex like a revision control system. You don't wanna take Git's approach of "Well, if you just learn all the guts and how the internal file structures are laid out everything will make more sense".

Oh dear, this is heading into rant territory. Let's leave it at this. Flee SourceForge now, it's a sinking ship.

26 April 2015

Cheryl's Birthday

blogdown: cheryl.md So for some reason, the entire internet (possibly an exaggeration) has latched onto this Cheryl's Birthday Problem. It's a logic puzzle where you can deduce the solution while knowing only a few facts about what other people in the puzzle know. I first stumbled across this Prolog solution which explains the problem quite nicely - and then found people had already started implementing their own solutions in e.g. Java, which made me decide to spend a lazy Monday afternoon hacking away on my own Perl 5 version.


27 August 2014

Jailing Java

Just a short post today. Aside from all the other distressing things happening in my life I've recently learned I'm getting kicked out of my apartment. Joy. I'll keep blogging to keep me sane, but they might not be as technical or in-depth as some of my other series.

Have you looked at your homedir lately? Cluttered with dotfiles, isn't it? If you don't know what a 'dotfile' is, look at your home files with ls ~/ ... now look again with ls -a ~/ . Quite a difference, right? In theory we have some modern XDG standards that will take a lot of that clutter and put them in ~/.config, ~/.local, and ~/.cache but that requires the programs to adhere to the XDG spec. Since we're in The Year Of The Linux Desktop we're actually in an exciting time where we are seeing a lot of developers making software (including games!) for Linux without actually being in the ecosystem from the start. So a lot of them aren't necessarily using Linux day-to-day. They aren't aware of how your homedir can get littered with crap from software that doesn't understand that ~/ is not the same as "My Documents" on other operating systems.

09 August 2014

MPD Mix-up

MPD Mix-up MPD is a favourite bit of software of mine. It stands for Media Player Daemon, and is exactly that - a tiny bit of daemon software that plays your collection of music. That's it. It keeps a database of song names and tags, but does not impose order on your collection. It doesn't even have a GUI - in true UNIXy tradition, you use a separate client program to connect to it. This means that rather than deal with each music-playing app's own databases and quirks about how it manages your music, you set up MPD once and can then go shopping for the interface you want. Now that I've switched to KDE I use Cantata, but I could still use Ario from my other laptop or CuteMPD on my phone - they can all connect to and control the same music server. It's lovely.
It's been a while since we had a screenshot of anything. Let's have a screenshot of Cantata. Look how pretty it is!

So anyway... most recently I was setting it up on a machine I've recommissioned to hold all my files. And I ran into a bit of trouble. From my old nemesis, PulseAudio.

31 July 2014

Find Bug!

No-one is perfect. Sometimes you'll write code and think it works fine; you've tested all the edge-cases you can think of and nothing seems amiss. It won't be until months later that you're using that code and see it stumble over something it shouldn't. Something that couldn't possibly go wrong just did, right before your eyes.

In my case, the vigil.pl program I wrote in Integrating Integrity stumbled on some directories with Unicode in their names. It's a good thing I noticed it, because I'd started to rely on my little program more and more recently. Let's figure out what happened and fix the bug.

20 July 2014

Get S.M.A.R.T.

As followers of this blog may know, I've been having a cacophony of hardware problems lately. Most of them revolve around that one inevitability of packing more and more data into tinier and tinier spaces: Hard disk corruption. I've been busy moving my vital datas onto an older machine of mine and setting it up to host all my source code, so now is a great time to get paranoid about disk integrity.

10 July 2014

Oh no not again

So, I was doing a routine upgrade of my (very) old laptop the other day. It no longer has a working battery and doesn't quite have the power I want for modern day-to-day stuff, but it's served me very well as a SSH gateway, Subversion server and a place to keep my IRC session idling. Old laptops can make really nice servers since they're typically quiet, draw little power, and come with their own keyboard and monitor.

But I digress.

I was upgrading the packages, and one of those was a kernel update, so I rebooted for the first time in months and...

Remember how I had hard drive problems recently? Yeah.

30 June 2014

Decimating Directories

Decimating Directories

Whenever you set up some automated system that produces files, there's always that nagging fear that you'll forget about it and it will run rampant, filling up your hard drive with clutter. One good example is using motion as a security system - you want to keep the most recent video clips in case you need to refer back to them, but there's little point in keeping the oldest ones.

Keeping only the most recent n videos and deleting the rest could be problematic, because the individual files could be large. Keeping anything younger than a certain number of days is no good, because there could be a burst of activity that creates a lot of files. So we want to make a script that will trim a directory of files down to a specific size.