News flash: MP3 has improved in the last ten years

2011-12-11

I’m surprised at how good MP3 can be. I’ve just tried mp3ornot.com, which lets you do ABX tests between 128 and 320 kbps MP3 files. After getting one correct answer out of three, it was obvious that I was mostly guessing.

What’s surprising is not really the bitrate (I have previously ABX-tested Vorbis q2 (~96 kbps) and found it to be almost transparent); it’s that MP3 encoders have gone a long way since the last time I tried them. I guess most of their notoriety is carried over from the Napster era which, come to think of it, ended around ten years ago.

On a related note, MP3 and H.264 share an ironic trait: both are patent-encumbered, yet the best encoders for for them are free / open source software (LAME and x264). The difference is that MP3 is inferior to pretty much any of the other formats in use today.


Obscure-app-I-use of the day: atool

2011-10-18

atool is the command-line equivalent to WinZip-style programs—and it just works.

Most importantly, the aunpack tool (for extracting files) will first check the number of items in the archive root. If there is only one item (a directory or a file), it gets directly extracted to the target directory. If there are more than one, they are extracted to a new directory.

For example, if A.tar.xz only contains fileA, aunpack A.tar.xz will extract fileA to the current directory. If B.tar.xz contains fileB1 and fileB2, aunpack extracts them to a directory called B. This has saved me countless times from extracting truckloads of files to my home directory.


WebKit trademark filed in the US, no big deal

2011-09-08

Hm, I missed the news about Apple filing a US trademark for WebKit earlier this May. I think it’s not a big deal.

A lot of free software project names are trademarked by the authors in some part of the world. Most are used defensively so that others cannot file the same trademark, but some are used for preserving brand identity (see Iceweasel).

In the worst case, projects have changed names over trademark or even non-trademark name clashes. Phoenix→Firebird→Firefox, Gaim→Pidgin, and Ethereal→Wireshark are three high-profile examples.

If the WebKit trademark is granted, depending on how Apple decides to guard it, others in the US will probably go back to the KHTML name. Considering there are other big stakeholders in the WebKit world now (Google being the biggest one), I don’t think Apple will risk fragmentation, but who knows.

In my opinion, among “intellectual properties”, trademark is likely the least of our concern. I could be wrong though; I haven’t seen much discussion around it.


pasink, making PulseAudio sink management less painful

2011-08-26

I have three sound cards (on-board, HDMI, and external) and the only sane way to manage them was through pavucontrol. pavucontrol is amazing, but I wanted a command-line app that I can use in keyboard shortcuts and udev rules.

This bothered me enough that I created one myself. If you’re interested, check out pasink (direct link to code). It’s a Python wrapper to pacmd, the PulseAudio console. I’ve thought of using libpulse through Vala, but it’s probably overkill for now.

The script lets you do things like setting volume on each card and setting a particular card as the main output device. I suppose doing the same on input devices would be useful, but I skillfully dodged that responsibility by naming the app “pasink”. It’s not that I don’t see the value; I simply don’t have the motivation.

If you want to extend pasink to also cover audio sources, feel free. You’ll have to rework the interface; perhaps let the behaviour depend on whether the program is run as “pasink” or “pasource”.


SciTE for 64-bit Windows nightly builds

2011-08-05

For the foreseeable future, I will be providing x86_64 Windows builds of Sc1 (statically-linked version of the SciTE text editor).

I create and upload these builds semi-manually. Unless you have a very good reason (e.g. you need a specific recent bugfix), begging me to provide an update will result in your e-mail address being blocked.

The builds will be posted at a dedicated page.


If you get a PUSHL-related error…

2011-06-04

If you’re compiling a piece of code and getting an error message saying something about PUSHL or “invalid suffix for PUSH”, it means you’re feeding x86 assembly code to an x86_64 assembler.

Possible causes:

  • The code you’re trying to compile really does contain x86 assembly, perhaps inlined from C, but you’re targeting x86_64.
  • Your toolchain somehow contains a mix of x86 compiler and x86_64 assembler. Try cleaning up your PATH.

Inaccessibility

2011-05-27

In a bizarre turn of events, GNOME’s accessibility options suddenly made my desktop unusable.

If you hold down the Shift key for a number of seconds, GNOME will helpfully turn on the slow keys accessibility option, which causes each key press to require around one second to register. Needless to say, the result was massive confusion.

For reference, in MS Windows, an accessibility option being turned on via keyboard shortcut is followed by an obnoxious alert sound and a message box telling you what just happened and how to turn the option—plus optionally its shortcut—off.


strxfrm in Vala

2011-03-26

Here, let me save you some time: string.collate_key.

I spent hours trying to get Posix.strxfrm to work and still failed. It was actually so much easier to write a simple strxfrm wrapper in C and use it as an external function. While admiring my work on this wrapper, I found GLib’s g_utf8_collate_key, which in Vala translates to the aforementioned string.collate_key.

By the way, I’ve just realised that strxfrm stands for string transform.


Shoutcast support broken, removed in future Exaile

2011-02-04

If you’ve been using Exaile’s Shoutcast plugin, you would have realised that it hasn’t been working for a while now. This is due to a change in the SHOUTcast directory API.

However, SHOUTcast directory support is not coming back. It turns out we cannot comply with their terms of service, so there is no point in fixing the plugin. We simply follow what Amarok and VLC have done: remove SHOUTcast directory support.

Note, however, that Shoutcast/Icecast streams still work as long as you know the stream URI. It’s just the directory that’s not working; for the time being, you can use the Icecast Web-based directory for this purpose.

In the future, we would love to switch to the Icecast directory, but their documentation seems a bit sketchy. If you would like to help with this, feel free to contact us through IRC or at the wishlist report. There is an Amarok script that you may be able to use as reference.

Meanwhile, I have removed the Shoutcast plugin from Exaile’s list of installed plugins. The outdated code is still in the source tree, but it will not be installed by our makefile.

[Update: I am was working on an Icecast directory plugin. It's literally half-working (I can get genres but not individual stations, still figuring out why). For this plugin I'm screen-scraping the website because the actual YP directory seems to be incomplete.]

[Update 2: I've stopped working on the plugin for now as I'm occupied with something. Apparently there's a working Icecast plugin in the bugtracker somewhere; I haven't tested it.]


PyGTK 2.22+ binaries for Windows

2010-10-26

These are actually development versions of PyGObject and PyGTK as downloaded on 2010-10-27, not any specific release versions. Credits to John Stowers, who maintains PyGTK’s Windows port.

Update (2011-01-08): pygtk.org now provides official packages for PyGTK 2.22. I’ve removed all download links to my own builds.

NumPy dependency

PyGTK uses NumPy in one function and this is not documented in the Win32 README. There is some automated check to disable NumPy support if it’s not available, but it fails on my machine because I have NumPy’s binaries installed; PyGTK’s setup.py assumes I also have the include files, which I don’t.

No big deal; --disable-numpy.

pkg-config and space characters

pkg-config only gained support for space characters five months ago, and that’s still in their development version. (Insert expletives here.)

I don’t think I’ve used C:\PROGRA~1-style paths in years. Thanks for the nostalgia, pkg-config.


Follow

Get every new post delivered to your Inbox.