At the 2011 Desktop Summit in Berlin

Posted in Uncategorized on August 7th, 2011 by laszlo – Comments Off on At the 2011 Desktop Summit in Berlin

I am here in Berlin at the Desktop Summit. Thanks to the GNOME Foundation for sponsoring my travel and accommodation.

GNOME Foundation Sponsorship Logo

Actually the reason I wanted to come is to attend the GObject introspection hackfest starting on Tuesday. But the GNOME Foundation decided if we were coming to Berlin anyway, the hackfest participants should come a few days earlier and attend the talk on the weekend.

It’s great to be in Berlin for a few more days, and during the talks I’ve already started hacking on PyGObject in preparation for next week.

I also love that my employer, PreziPrezi Logo, has given me the whole week to attend the summit and hackfest. Visiting conferences is one of the perks of working at Prezi. Even though the Desktop Summit has little direct connection to my work there, they are paying me to go anyway.

Prezi is almost certainly the best place to work at in all of Hungary, and probably most of eastern Europe too. If you’re interested in working in Budapest, we are hiring.

Glipper 2.1 release

Posted in Uncategorized on April 22nd, 2011 by laszlo – 1 Comment

One of my favourite small utilities is Glipper. It is a little applet that records your clipboard history and let’s you reuse multiple things you have copied.

There are plenty of clipboard managers for Gnome, but this is the one I started using. And I like it enough that I don’t care to switch. But as a Gnome panel applet, Glipper does not work with Ubuntu’s Unity or Gnome Shell. Since it is written in Python, I figured it wouldn’t be too difficult to fix this.

Glipper 1.0 is a Gnome panel applet and has not been updated since 2007. After asking on the mailing list, I was able to get permission to take over maintenance. The sourceforge page was closed down, and I put everything on Launchpad. I moved the code to Bazaar and started cleaning up the code.

After removing the custom C code to bind global key presses (using python-keybinder instead), I was able to remove autotools and replace it with distutils. I then removed the deprecated Gnome libraries and Gnome applet code, and used Ubuntu’s appindicator library instead. This was really straight forward because appindicator accepts a Gtk.Menu, which Glipper was already using for the applet menu.

Glipper 2.1 screenshot

Last week I made a release on Launchpad, and figured out how to build a deb package. It was my first, and using distutils made it really simple. I made a PPA, and yesterday I requested that it be put in Natty.

Interestingly, when I asked for help to get it pushed into Natty, it was Martin Pitt (who I met at the PyGObject hackfest) who approved the feature freeze exception. And it was my old friend Daniel Holbach who did the actual packaging and upload. That dholbach; how is he everywhere all at once?

Unfortunately the new Glipper only works on Ubuntu or distributions with appindicator support (are there any but Ubuntu?). The Gnome Shell developers have not yet provided a way to make little menus in the panel of the shell. When they do I will try to have Glipper support it right away.

So there you go folks. You can find Glipper 2.0 in Natty universe. Maverick users can use the PPA. The source release is also available.

PyGObject Hackfest Report

Posted in Uncategorized on February 3rd, 2011 by laszlo – 3 Comments

GNOME Foundation Sponsorship logoThe week before last I attended the GNOME Python introspection hackfest in Prague. This was the first hackfest I have ever attended, and the first time I have been sponsored to attend an open source event. It was really nice of the GNOME Foundation to reimburse my travel costs, and of Collabora to pay for the conference.

Collabora logoAll of us who attended are really thankful for Collabora paying for the usual bits, as well as our beers for the week and a traditional Czech duck dinner on the Thursday evening. I don’t think the beer expenses came out to too much because beer is really cheap in Prague and we spent most of the time working and not drinking. Nonetheless Collabora was willing to pay for whatever we drank, and the dinner too, which was absolutely delicious.

The hackfest was at BRMLab, a local hardware hacking club, and although hard to find, was a comfortable space with good internet and a great place to get work done. It was really nice meeting so many cool hackers and talk about all sorts of interesting things over dinner every night.

How I spent my time at the hackfest

I asked to attend the hackfest when J5 asked on his blog for application developers to attend. The week before the hackfest I started porting Jokosher and asking about issues on IRC. By the time the hackfest started I had met a couple of the hackers on IRC, and was getting familiar with the how the introspection bindings worked.

The first three days of the hackfest I worked on Jokosher. It was really useful having Tomeu and J5 in the same room. When I came across issues, I could ask them right there. I quickly figured out that Cairo isn’t going to be wrapped, and so static bindings for cairo should be used. In addition, GStreamer support is lacking, but it isn’t so crucial at the moment because they develop their static bindings separately. The GStreamer Python bindings will still be available for the next major release, unlike with PyGTK, where there will be no static Python bindings for Gtk 3.0.

So for those three days I concentrated only on porting Gtk, and making sure it worked with Jokosher. After getting my patches reviewed and committing them all on Wednesday I was looking for something to do for the last two days. I had run into a few problems with drawing callbacks using Gtk 3 and introspection, and I wanted to work on something less specific to Jokosher and more generally useful.

Improving startup time

At dinner someone mentioned that right now startup time with introspection is way slower than with the static bindings, even though in theory it should be quicker, because most classes are only loaded when they are accessed, and not at startup. I said I’d look into it.

On Thursday hooked up Python’s hotshot profiler and figured out where the slowest parts of the code were. It turned out that most of the time during import was spent in only two functions, both of which were responsible for setting up virtual methods. Both were also recursive, which explained why they took so much time.

In the end, I removed most of the recursion in both functions (one of them will still recurse in the case of an interface virtual method), and managed to reduce the import time with Gtk 3 from 2.5 seconds to 0.4 seconds. That is timed on my computer, with a warm startup (everything still in kernel cache). But regarless, the startup time is now slightly faster than the static bindings for either cold or warm starts.

I managed to grab a power socket on my train back to Budapest to Prague on Saturday, and cleaned up my changes a bit. Then when everyone was back on Monday and Tuesday, I got both my patches committed. If J5 also finishes up his invoke rewrite branch soon, the next release of PyGObject introspection should be much faster.

Curious Linguistics

Posted in Uncategorized on September 9th, 2009 by admin – 1 Comment

A list of English phrases which have a literal opposite that means the same thing in common usage:

I’m down for some ice cream.
I’m up for some ice cream.
I could care less.
I couldn’t care less.
I filled in the form.
I filled out the form.

GeekDeck Issue 3: Brought to you by Pete Savage

Posted in Uncategorized on June 13th, 2009 by admin – Comments Off on GeekDeck Issue 3: Brought to you by Pete Savage

For more than two months now my good friend Pete Savage has been working hard on his new project GeekDeck, and he shows no sign of stopping. Since the beginning he has been bugging me to put together an article for his zine/blog thingy.

I finally got the time to get something I’ve been thinking about for a while down on paper (but not real paper of course), and my article discussing using undo on the desktop to reduce the annoyance of modal dialogs has been published in GeekDeck Issue 3, which was released today. Hope you enjoy it! Here’s a list of all the articles in this issue:

How to mount UDF format DVD+R on Ubuntu Jaunty

Posted in Uncategorized on May 17th, 2009 by admin – Comments Off on How to mount UDF format DVD+R on Ubuntu Jaunty

I was recently given a DVD+R disc created on a Windows XP machine. The volume label is ROXIO, so I presume the application used was Roxio Easy CD Creator. Problem is, when I try to mount this disc using Nautilus or manually on the command line, I get this error:

laszlo@sescento:~$ sudo mount /dev/dvd1 /media/cdrom
mount: block device /dev/sr1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Looking at the system log, shows the following message:

laszlo@sescento:~$ dmesg | tail
[588493.006569] UDF-fs: Filesystem marked read-only because writing to pseudooverwrite partition is not implemented.
[588493.214121] UDF-fs: No fileset found

After googling this problem for a while I found many Hardy users having this problem, and links to solutions which involve patching the filesystem driver and recompiling the kernel module. However I am running Jaunty, which was released just last month. It should have the latest driver necessary to read the new UDF format produced by Roxio.

After finding many Ubuntu Forums threads which were no help, I found a comment on this UDF format bug which apparently has been fixed in Intrepid. The comment mentions to make use of the “session” and “lastblock” mount options.

As the comment suggested, I tried running dvd+rw-mediainfo and getting the lastblock value of 1678800. The following command gave the same error message.

sudo mount /dev/scd1 /media/cdrom1 -t udf -o ro,user,noauto,exec,umask=0,session=0,lastblock=1678800

After playing around with this command for a while I figured out that 1678800 is one of the only values that doesn’t work. Specifying 0 or 1678800 or 1678801 causes the mount to fail. Specifying almost any other number allow the disc to be mounted and read. I can speculate that if the lastblock value seems valid, for example it is close to the end of the track it tries to use it. However with a value that is almost certainly wrong, it tries to search for the proper value. To me it still does not make sense why if the lastblock option is not specified, the disc cannot be mounted.

So for simplicity I will just use the value 1. Here is the command which allowed me to mount the disc successfully:

sudo mount /dev/scd1 /media/cdrom1 -t udf -o ro,user,noauto,exec,umask=0,session=0,lastblock=1

Now its time to listen to the music and watch the movies contained inside.

Ambiguous Adjective Phrase

Posted in Uncategorized on April 30th, 2009 by admin – Comments Off on Ambiguous Adjective Phrase

Yesterday I recieved an email from my university regarding recent news:

Carleton University’s Health Services and the university’s Administration continue to monitor the situation regarding Human Swine Influenza.

I did not realize we had human swine at our univeristy. Did a DNA splicing experiment in the biology department get out of hand? It’s good that health services is concerned for the well being of everyone including hybrid beings.

Good Customer Service is Refreshing

Posted in Uncategorized on May 8th, 2008 by admin – Comments Off on Good Customer Service is Refreshing

I recently moved out of my old house and into my new one, which is much closer to downtown. Of course this meant I had to change my address on all my credit cards, my bank account, bills and of course I had to get my new internet connection setup.

I dread moving my internet because the last time I moved into a new house I was originally planning on getting a Rogers high speed cable, but the guy who was supposed to install it never showed up. It turned out they called me the next week to confirm my appointment — they had scheduled it a week to late. But by that time I had already booked an appointment for another ISP called 3Web to install the almost identical cable high speed internet.

Finally after 21 days, my internet connection was active and I could get back to IRC, MSN and all surfing when I am bored. I lived in that house for two years and I kept 3Web service the entire time. The connection went out for about a day one time, but otherwise I had no problems with it. It was decent, but it wasn’t spectacular or impressive. Nothing to blog about.

Now two weeks before I moved, I called 3Web to let them know. They asked me what day I would like the service at the new house to be working. I said the first of May and they said okay. I thought, “That was too easy”. But on the day I moved, by the time I had a chance to open up the laptop and try it out, it was already working.

Contast this wonderful example of flawless service with my phone line. Bell recommends that you use the moving form on their site. So I did. However I got no response, no call to confirm from them or anything. When I got to my new house, the phone line was dead and I was still paying for the phone at my old house. As punishment I have decided I will no longer have a home phone. Right now I’m doing perfectly fine using Skype for outbound calls, but I still haven’t found a good provider of incoming VoIP lines for a 613 Ottawa number. I would be nice if SkypeIn was available in Canada. Maybe in the future I will get a cellphone, but it won’t be one from Bell.

There are certain companies which have such terrible service you dread dealing with them, and try anything to avoid it. Unfortunetly in Canada many of the monopolies are these kinds of companies, and these monopolies are so pervasive that everyone forgets what good service is like, or at least assumed there was no possible business model that would allow good support and cheap prices at the same company. My experience with 3Web, and flying with WestJet reminded me that is possible, so now I am voting with my wallet.

New Website

Posted in Uncategorized on August 12th, 2007 by admin – Comments Off on New Website

I now own http://laszlopandy.com, and my old blogspot blog redirects to here. All the old posts and comments have been imported. Everything should be exactly the same with the exception of the much nicer WordPress theme which I stole from http://jokosher.org/. Hopefully redirecting my old page to this one will not cause my new XML feed to mess up the planet.

It is nice to finally have a server to put my own programs on and have it accessible from anywhere through my domain name. I originally thought that I would be using Python for all my web stuff, but do far I have found PHP to be really simple to use. This is mostly because in Python you have to put all your HTML in doc-strings, which prevents you from having syntax highlighting, and breaking up the string when you need to insert a variable is not elegant. I find PHP method of allowing you to jump in and out of HTML mode to be a much nicer solution.

Right now I’m only playing with WordPress and few PHP web apps that I wrote myself. Maybe one day I’ll get around to trying out Django and all that jazz, but currently I like 99% of what WordPress does and I therefore only have to spent time tweaking the remaining 1%.

Speaking of time, because of work and generally being lazy, I haven’t put a lot towards Jokosher lately. Summer is almost over and I will soon be revving everyone to get ready for our unit testing and our beta releases in the fall. Otherwise everything is gonna slip past Christmas. Let us hope it doesn’t come to that.

Laszlo's Law of Urban Transportation

Posted in Uncategorized on March 22nd, 2007 by admin – 1 Comment

Behind programming and linguistics/syntax, planning urban transportation is my third favourite intellectual activity. This is of course why a spend a few days last year researching and designing a subway system for Ottawa. In no way is there sufficient population density in this field of urban sprawl they call the nation’s capital to make a subway cost effective, but it is still an exercise I enjoy. Trying to find the optimal routes for a number of subway lines it kind of like solving the travelling salesman problem. There are many close-to-perfect answers that are easy to find and only one perfect answer that is impossible to find, but the challenge of trying to get as close as possible is fun.

This week I have been researching flights and train voyages to get to LugRadio Live in Wolverhampton this summer. The trick is finding the fastest and cheapest route from Ottawa to Wolverhampton. Even though Ottawa is the capital, it is quite small and so the only direct flights to the UK from here go to London Heathrow. That would mean I would have to get off the plane after a 7 hour flight and get on the train for another 2.5 hours. If I want to get a plane to Birmingham or Manchester I will have to transfer in Toronto, Montreal or London Heathrow.

For $50 I could take the bus to Toronto, but the bus terminal is downtown, and the airport is 30 minutes west of the city with no rail links. Also for $20 I could take the bus to Montreal – at least there they have rail access to the airport. If I decide to transfer in London I would be able to easily take the tube to any train station which would lead me to Wolverhampton. I love the Tube. Travelling to London scores high on my list because of it as you’ll see below.

Okay finally on to the real reason for this article. I present Laszlo’s Law of Urban Transportation:

“The quality of urban transportation planning in any given city is directly proportional to the time it takes to get from the main passenger airport, to the main passenger train station, and from there to the city centre and back to the airport.”

In the paragraph above, train station can be replaced by bus/coach terminal and the law will still hold. You should notice that I didn’t specify the distance but instead it should be measured by time. This is because for big cities there is no option. The new Hong Kong airport is really far away from the city because with mountains on one side and the ocean on another, there isn’t much room. However there is a high speed train which will still get you to the airport in 24 minutes. This is about the same or maybe even less than Ottawa who’s airport is quite close to the city.

You should also notice that I didn’t exclude taxis or even specify that it must be public transportation. You could probably increase the ranking of a particular city by taking a taxi and shortening the time it takes to complete the airport-train-downtown loop. This is only because in some cities this is the only way. In Prague there are three subway lines that go north, south-west and south-east. Unfortunately the airport is a 20-30 minute taxi ride due east.

From what I have seen and guestimated so far, the cities that have the shortest airport-train-downtown loop are Geneva, Switzerland and Sydney, Australia. I have been to Geneva and I remember that the train station is a short walk from downtown and for a few Euros you can take a 5 minute train ride to the airport. Of course they had to put the airport close because of all the damn mountains. I suspect the same is true with Sydney but I have never been there. Based on looking at Google Maps, it seems that the airport is 4km from the train station and the train is only 1 km downtown. Way to go Sydney.