About Archive Tags RSS Feed


Entries tagged randomness

But still you'll never get it right

11 January 2007 21:50

Command of the day:

ls -sh

I didn't know /bin/ls could do that. Neat.

Now if I write it down often enough I'll be able to remember it when I need to use it. Hopefully.

| No comments


It eats the pain

29 September 2007 21:50

Randomisation is a good thing for media players, but it must be done properly.

What do I mean by this? I mean randomness which only works going forwards.

As an example consider the case where you have several films/videos in a directory and you run this:

xine --loop=shuffle *.mpeg *.avi

This appears to do what you want, showing each film in a random order but it is subtly doing the wrong thing.

If you're watching film "two", having just finished film "five" you'd expect to be able to return to film "five" by pressing "previous"/Page-Up - however that doesn't happen.

Xine decides that "moving backwards" in the playlist means selecting another film at random, rather than the previously viewed film which was selected at random - the two are different - and the current behaviour is both counter-intuitive and plain wrong IMHO.

I forget the name of the media player that I used briefly which also behaved like this, but it was enough to make me abandon it almost immediately.

So, think of the children. If you have a random mode, make sure that going to previous items actually does return to previously played items and not random ones.

| No comments


At first I was afraid

12 November 2007 21:50


I've just ordered a bluetooth adapter with the intention that my desktop machine will automatically screensaver & lock when I leave my desk.

This looks trivial. As does setting my gaim status automatically.

The challenge is to send a message to my work chatroom, via jabber, when the same thing happens. I think this should be straightfoward via xmpp but we shall see.

I guess run-parts invoked upon /etc/presence/present & /etc/presece/absent or similar.

Guitar Amps

I have a "rare" (read limited edition) Marshall Jubilee Mini-Stack I'm trying to sell.

From 198x.

But I have no idea what the current price should be .. My google-fu is weak this week, or I'd know.

The biggest issue is that I've found listings which just say "Call for price". Or expired Ebay auctions. I guess there can't be too many around so the price should be "high". But at the same time there can't be a huge market for them, so the price should be "low"...

Complicating that is the fact that the buyer would have to be extremely local - as shipping isn't a realistic option. The cab + 2xspeaker combo is >1m high.

Now what are the chances that somebody reading this would know how much one "should" cost..?

ho hum.

Still life is good, and that is the main thing.

| No comments


So here it is Merry Christmas

16 December 2007 21:50

Lars Wirzenius recently released, and packaged for Debian, a simple script to make release tarballs. He calls it Unperish.

It makes me wonder how many other people use that kind of system?

Of the top of my head the only similar thing I can recall using is Brad Fitzpatrick's ShipIt - another moduler/plugin-based system (Perl rather than Python this time.)

For my needs I tend to just write a Makefile which has a "dist" target, and then I have a simple script called "release". This runs:

  1. make dist / make release.
  2. creates a gpg signature of the release.
  3. scp's the resulting files to a remote source.

All this is configurable via a per-project .release file.

The configuration files are very simple, the script itself is almost trivial but being able to sit in a random project directory and have a new tarball on my webserver just by typing "release" is enormously useful.

There are times when I think I should make it a mini-project of its own, with the ability to auto-build Debian packages, etc. Other times I just think .. well its a hell of a lot better than my previous ad-hoc solution.

At the very least I think I will make the cosmetic change of updating the script to run "make test" if there is a test/ or t/ directory inside the generated tarball.

In real news - tomorrow I leave for a two week holiday with my partner's parents. Yesterday I got back from a night spent with her in York. The Bytemark staff night out. Lots of fun. Over too soon, but lots of fun.