libkibi 0.1 released

The first version of libkibi is released. This library is designed for formatting sizes in bytes for display. The user can configure a preferred prefix style. Packages for Debian unstable and Ubuntu 11.04 (maverick) are uploaded.

It contains a README for developers and a byteprefix man page for users, which can be read with man 5 byteprefix once installed. Thanks to Stefano Rivera for writing the man page!

For a demonstration how this library used by an application can look like, read my previous post.

Nautilus with libkibi

In this Ubuntu cycle, I work on getting the units policy implemented. For this I wrote a library called libkibi. Here are some screen shots how nautilus looks like with libkibi. Some changes are highlighted in red.

The file properties will show the file size in base10 and base2:

PS: I failed to launch nautilus in English. Therefore the screen shots are in German.

PS²: You can grab the modified nautilus package for Ubuntu 10.10 (maverick) from my experimental PPA (at your own risk!).

libkibi ready for testing

Yes, the library is finally called libkibi. The second poll ended with a tie between libbyteprefix (48 votes) and libkibi (45 votes). Then I decided to call the library libkibi.

libkibi is hosted on Launchpad. A working version can be pulled from lp:libkibi with bzr. Please test the library, reports bugs, and ask questions.

Why you should use libkibi instead of g_format_size_for_display (from GLib):

  • the users can configure their preferred prefix
  • rounds correctly (converting an integer to double, do some math, and then round again leads to rounding errors)
  • complies to Ubuntu’s Units Policy (except “historic” is selected)
  • is faster (between 15% and 35% depending on the processor)

Poll: libkibi VS libbyteprefix (or: How to call the library? 2)

Dear lazy web,

thanks for voting the best name for the library that helps implementing the Units Policy of Ubuntu. The winner with the most votes has been libkibi. There was one suggestion that got my attention: libbyteprefix. The suggestion came too late to have a chance. Therefore I ask you again to vote for the library name, but this time only these two names are open for voting: libkibi and libbyteprefix. libkibi is short and sounds good. On the other hand, libbyteprefix describes exactly what the library is supposed to do.

I was asked to use a free (as in freedom) poll-service. So please go to the Selectricity unitspolity vote and select your favorite. Thanks.

Poll: How to call the library?

Dear lazy web,

I am writing a library that implements the Units Policy of Ubuntu. This library can be used to format sizes (of files, disks, memory, etc.) for displaying them and the other way around. For example, the size 12345 bytes can be formatted to 12.3 kB, 12.1 KiB, or 12.1 KB depending on the configuration. An other function will give you the possibility to convert 12.3 kB, 12.1 KiB, or 12.1 KB back to 12345 bytes. The preferred binary unit can be configured by an text file (per system and per user) and by an environment variable. The library is written in C and doesn’t have any dependency. Therefore it can be used by any program on any desktop environment. Binding to other languages like C++, Python, Java are planned.

Before creating a project for this library, I need a name for the library. The current prototype is called libdisplayunits, but this name reflect only the half of the project. It does not indicate that the library can be used for inputting sizes. What do you think? What is the best name for the library? Please poll and/or comment below.