Log <-

Archive for the ‘libre software’ Category

RSS   RSS feed for this category

pyBrainfuck v0.2 released

I just released v0.2 of pyBrainfuck.

PyBrainfuck is a speed-optimized Brainfuck interpreter written in Python.

Some other Python interpreters already exists for Brainfuck, but they are either obfuscated or awfully slow. PyBrainfuck has been optimized for speed by doing various preprocessing on the code such as pre-caching loop instructions, removing non-instructions, etc. PyBrainfuck also has configurable memory size, infinite loop protection and a somewhat spartan debugger.

PyBrainfuck can be used both as a stand-alone Brainfuck interpreter or as a python library. It can read from standard input or from a string (in library mode) and write to standard out or to a string buffer (in library mode).

Changes in this release:

  • Improved exception throwing. Exceptions now include an error number.
  • A bug was fixed in the jump instruction pre-processor where it would sometimes scan beyond the end-of-line of the code.
  • A bug was fixed where a brainfuck program could increase the memory value beyond the byte boundary. It now wraps to 0 at 256 and to 255 at -1.

Update: Direct link to the interpreter code for those who are interested.

MiniOrganizer v0.1 released

I just released the first version of MiniOrganizer.

MiniOrganizer is a small no-nonsense personal digital organizer written in GTK2, featuring appointments, todos and notes. It uses iCalendar files as its native back-end, supports multiple alarms per appointment/todo and has recursive todos.

MiniOrganizer currently features:

  • Appointments.
  • Hierarchical Todos.
  • Multiple alarms per appointment and todo.
  • Alarm notification.
  • (Gnome) Panel docking.

You can visit its homepage at http://miniorganizer.electricmonk.nl.

Remember that this is only v0.1 – the first released version – so it will contain some bugs and other problems. Any feedback is greatly appreciated.

Transmission 1.x on Ubuntu 7.10

For some reason Ubuntu 7.10 has an ancient version of Transmission. Version 0.74 or somesuch. Unfortunately, that version of Transmission contained some bugs so it's blocked by certain bittorrent trackers. In order to install a more recent version:

You can download a more recent version from the gutsy backports package pool.

  • Uninstall transmission:
    sudo aptitude purge transmission transmission-gtk
  • Download transmission-common 1.04
  • Download transmission-gtk 1.04
  • Install the packages:
    sudo dpkg -i "transmission-common_1.04-0ubuntu1~gutsy1_all.deb"
    sudo dpkg -i "transmission-gtk_1.04-0ubuntu1~gutsy1_i386.deb"

And you'll have a more recent version of Transmission.

VeeDee-Eyes.com: VirtualBox VDI images for download

VirtualBox has been getting more and more attention as of late. It is vastly superior to other virtualization programs due to the simple fact that it actually runs on my system. All the others either don't install (VMWare), crash (QEMU), or are a real bitch to set up properly (Xen). VirtualBox is Open Source, easy to install, fast, runs on Linux and Windows and it has both a very nice GUI and a very decent commandline interface. VirtualBox is what VMWare (for Linux) could have been, but better.

Now, WMWare has pre-built images online at their Appliances site. Qemu has the Free OS Zoo. Now there's one for VirtualBox too:

veeDee-Eyes.com:

The VirtualBox "Virtual Disk Image" Index

VDI images of pre-installed "Open Source" Operating System distros.
It's a computer inside your computer.

-Instantly run another operation system on your desktop in a window, on almost any computer.
-Implement full Linux functionality on an existing Windows Desktop or server.

I've been looking for this for a while. All it's currently missing are OpenSolaris and various BSD images. I'm sure these will be added rather quickly.

PS: It appears Innotek, the creators of VirtualBox, have been acquired by Sun. I'm not sure yet whether Sun's acquiring of Open Source companies is a good or bad thing. Guess we'll have to see where it goes. Perhaps they should get the benefit of the doubt since they did free the source of StarOffice (Open Office), Java (in part) and Solaris (in part). I'm just not sure whether Sun understands the Open Source philosophy and community.

DVTM – dynamic virtual terminal manager

I do a lot of remote UNIX administration on various servers and even some desktop machines. This usually means that I'm doing a lot of SSHing into machines, often opening multiple sessions to the same machine at the same time. It quickly becomes tedious to keep having to type 'ssh fboender@some.machine.com' four times in order to get four sessions.

Of course there is Screen, but Screen's split screen abilities are very limited and don't really work for me. While scanning Freshmeat.net, I found a tool called DVTM: dynamic virtual terminal manager.

DVTM
DVTM is a kind of window manager for the console (or xterm) which allows you to quite easily split your terminal into multiple split screens.

DVTM has some limitations though:

  • Configuration is done using C code. (Though you'll probably never need to change anything; the defaults are quite sane)
  • It doesn't seem to support ANSI colouring. I use a red background at my prompt when I'm root, which I now have to miss.
  • It also doesn't seem to support line-drawing. This probably has something to do with the terminal type.
  • DVTM has no internal support for detaching and reattaching to running DVTM instances like Screen can. (But see the Tips and tricks section on the homepage).
  • There are a couple of small bugs, one of which is a problem with repeating keys when switching between split windows with the mouse.

But make no mistake: despite these shortcomings, DVTM is an absolutely fantastic tool. Some of the neat stuff it supports is:

  • Mouse support for switching between split windows / maximizing and unmaximizing, etc.
  • Maximize/unmaximize the currently active window (Default: Ctrl-g m / Ctrl-g g)
  • Various window layouts (you can probably add your own by hacking the source code)
  • Almost no dependencies except for ncurses.

The only thing I'd really like to see changed about DVTM are custom run-time splitting (for instance, Ctrl-g-MINUS to split the current window horizontally and Ctrl-g-PIPE to split the window vertically) and detaching/reattaching.

All in all, DVTM is an awesome tool. Go download it if you do a lot of remote administration.

Update: There also appear to be two bugs:

  • On the latest Ubuntu: Sometimes when exiting DVTM, it will hang for a while, and the cursor will blink like mad. An strace shows that IO Errors are occuring on file descriptor 3. I've filed a bug report with the author. This bug doesn't appear on Debian stable.
  • When using DVTM in combination with dtach, reattaching doesn't redraw the screen. This appears to be a problem with DVTM, but it would probably be easier to solve in dtach (which could just signal a screen resize event without actually resizing the screen). This is also the workaround for this bug: just resize the window. I'll see if I can file a bug report with either DVTM's author or dtach's author.

Update II: Here's a little patch/workaround for the first bug (exiting DVTM hangs for a while):

--- dvtm.c      2008-02-06 17:30:25.000000000 +0100
+++ ../dvtm-0.4/dvtm.c  2008-02-11 23:33:45.000000000 +0100
@@ -896,6 +896,7 @@
                Client *c;
                int r, nfds = 0;
                fd_set rd;
+               struct timeval tv;

                if(need_screen_resize)
                        resize_screen();
@@ -996,6 +997,13 @@
                        wnoutrefresh(sel->window);
                }
                doupdate();
+
+               // One microsecond delay so this loop doesn't hang context-switching
+               // when the last child dies and the SIGCHLD signal is prevented from
+               // being caught on time.
+               tv.tv_sec = 0;
+               tv.tv_usec = 1;
+               select(0, NULL, NULL, NULL, &tv);
        }

        cleanup();

Save to ~/patch.diff and in the dvtm-0.4 directory run:

~/dvtm-0.4$ patch -p0 < ~/patch.diff

Update III:

I was incorrect in stating that dvtm doesn't support ANSI coloring. It's just the bash prompt which doesn't work. Perhaps because there is a Xterm-styled window title ANSI sequence in there. Will update when I know more.

Update IV:

Marginally better patch:

diff -Naur ./dvtm.c ../dvtm-0.4/dvtm.c
--- ./dvtm.c	2008-02-06 17:30:25.000000000 +0100
+++ ../dvtm-0.4/dvtm.c	2008-02-12 22:08:54.000000000 +0100
@@ -982,7 +982,10 @@

 		for(c = clients; c; c = c->next){
 			if(FD_ISSET(c->pty, &rd)){
-				madtty_process(c->term);
+				if (madtty_process(c->term) < 0 && errno == EIO) {
+					/* client probably terminated */
+					client_killed = c;
+				}
 				if(c != sel){
 					draw_content(c);
 					if(!isarrange(fullscreen))

Android

Android is here.

There's been a lot of rumours about a Google mobile phone. Now, it appears that there is no gPhone (thank god), but there is a Google Mobile Phone Software Development Kit!

The SDK appears to have everything you need to build third-party applications for your mobile phone. The SDK is created in Java, has rich 2D and 3D graphics layers and, naturally, the default Google API stuff such as Google Maps. There's also an emulator that allows you to test your application. Why can't all SDK's be as cool as this one? And the best thing: it's Open Source!

So, here's the homepage; the presentation by Sergei Brin and an overview of the architecture (Part 1, Part 2, Part 3).

Not only is Google providing this SDK for free and as Free/Open Source Software.. they're also offering a total ten million dollars in sponsoring to the best and most original mobile applications built with it! Put that in your pipe and smoke it Apple!

Now, all we need is a phone that runs Android. Are you listening mobile phone builders? Nokia? HTek?? We need a phone that can run Android!

History of the Free Software Movement

Found an interesting read over at O Reilly's website:

The GNU Operating System and the Free Software Movement, by Richard Stallman.

Finally a good Bittorrent client for Debian

I finally found a good Bittorrent client for Debian. Freeloader. The original homepage doesn't appear to be live anymore, so perhaps it is unmaintained. But, it's written in Python, so if I need some functionality that it doesn't have, I can just add it myself. Here's a screenshot:

foo.png

Things that are missing (which I'll probably add myself):

  • Direct downloading of torrents by retrieving a .torrent URL
  • Auto resuming when I've closed down the client.
  • Auto (or manual) downloading of torrents via RSS
  • Automatic seeding upto a certain ratio

Dutch consumer rights organisation recommends Ubuntu

The dutch consumer-rights organisation 'Consumentenbond' has recommended Ubuntu as a possible alternative to Vista after it received 4200 complaints about Vista in four weeks. Translation of the dutch Nu.nl article:

Flood of complaints about Windows Vista

AMSTERDAM – Consumer organisation 'Consumentenbond' has collected 4200 complaints about Vista in four weeks. Vista still isn't a viable replacement for XP, according to the organisation.

More home users are confronted with the new operating system, as Windows Vista comes pre-installed on most new computers. In august the Consumentenbond opened an online report form where customers with problems can report their problems.

Especially non-working software and peripherals have led to problems. For 59% of the complainers some computer programs refused to work. 46% experienced non-working peripherals such as printers and videocards. Slow computers and repeated network failures where also a big source of complaints.

The Consumentenbond remarked: "Obviously, Vista isn't a viable replacement for XP yet". In a letter to Microsoft, the consumer organisation has requested that Microsoft allows unsatisfied customers be allowed to downgrade to XP without cost..

Alternatives

The consumentenbond advises consumers to only get Vista if they're sure that their hard- and software works under the operating system. The consumer organisation also recommends consumers to look into alternatives such as Apple's Mac OS X or Ubuntu Linux.

Disappointed

Microsoft is disappointed about the investigation. "Microsoft had hoped to learn more about the user's experience with Vista. The complains however only focus on peripheral compatibility. The conclusion that Windows Vista wouldn't be a viable replacement for Windows XP cannot be determined from the investigation."

A spokesman is surprised that the consumer organisation now sought contact with Microsoft in order to discuss the outcome of the investigation. "The whole summer we've tried to get into contact with the Consumentenbond, but they have not responded".

According to Microsoft, there are now close to a million Vista users in the Netherlands. "The Consumentenbond does not mention how many users are content with Vista". Microsoft points users with problems to their support website.

NU.nl: Klachtenregen over Windows Vista; 7 september 2007 14:53

GNOME/GTK hack: Smaller icon sizes

Icons are freaking huge in Gnome. Since I'm not blind, I'd like them a bit smaller. Unfortunately, GNOME doesn't seem to offer an easy way to do this.

There's the desktop/gnome/interface/toolbar_icon_size in the gconf-editor, but it doesn't appear to do anything, so that's not really gonna work. Besides, I have no idea what I should set the integer too. Fortunately, we can tweak everything using GTK's Resource files. The nice thing about this is that it works for all GTK 2.0 apps as well as Gnome apps.

Create a file .gtkrc-2.0 in your homedir, and put the following in it:

gtk-toolbar-icon-size=small-toolbar

That makes the toolbar buttons smaller, though not by much. You may not even notice it. Try starting some GNOME program with a toolbar (gedit is a good one; don't use the File Browser (Nautilus) because it's already loaded) to see if it's satisfactory. If it's not small enough for you, you can tweak it even further. Just add the following to the same file:

gtk-icon-sizes="gtk-small-toolbar=16,16"

That will make icons 16 by 16 pixels. Small enough for my tastes.

You can modify more than just the toolbar icons:

gtk-icon-sizes="\\
    gtk-menu=16,16:\\
    gtk-button=16,16:\\
    gtk-small-toolbar=16,16:\\
    gtk-large-toolbar=16,16:\\
    gtk-dnd=16,16:\\
    panel-menu=16,16:\\
    panel=16,16:\\
    gtk-dialog=16,16\\
"

You'll have to figure out for yourself what they do though. Most should be obvious. Some don't work anymore in newer gnome versions.

Changes you've made won't affect Nautilus (the file browser, the desktop and everything else powered by Nautilus) until you restart Gnome. Maybe you could killall -HUP nautilus, but I didn't dare try that.