panel-composite-bin

so, a lot of people probably know that i’m playing around with some code that will let me test out ideas that we can merge into gnome-panel in the future. one of these ideas is the idea of using x compositing instead of the terrible hacks we have today to support transparency in the applets.

the approach, i thought, would be to simply paint alpha transparency onto the background of the applet. when the xembed was done, this would allow the background of the panel to be seen through the applet. or so my thinking went, at least…

turns out, this isn’t how it works at all. when you draw alpha onto the applet, it just draws the alpha straight onto the panel toplevel window. the result is that the panel itself becomes transparent (through to the desktop).

i got annoyed and started looking for places to complain about this insanity. i went to #cairo. there i found owen taylor, carl worth and keith packard, who all very patiently explained to me why i was wrong. after being told why what was happening was in fact the correct behaviour i went off and did an awful lot of learning. i now know what all of those xfixes, xdamage, xcomposite, xrender things mean.

i also coded a solution to the problem — an in-panel compositing manager. i’ve called it panelcompositebin. it’s a normal gtkbin. when you place a widget inside of it that has its own gdkwindow (like a gtkeventbox, or more usefully, a gtksocket/plug pair) it will composite the contents of that window onto the background of the parent containing it. the effect: real applet transparency without the awful hacks.

this code has potential to be used in other places, which is why i make it available here. i’ve also included a small test application. if you find other uses for it, please let me know. any feedback about bugs is also appreciated. you need gtc to build it.

one note: i don’t think anybody has ever done this before. as such, this code exposes a bug in the x.org server where expose events aren’t sent when they should be. it’s on keith’s todo list to fix it, but he’s a busy man. for now, in a fit of irony, i have added a timer to the code to generate synthetic expose events once per second :)

meta-note: keith thinks the bug lies in the miValidateTree code in xorg in mi/mivaltree.c. i find this code utterly incomprehensible, so i’m not much help there. if anyone else wants to try their hand at tracking the bug down, i’ve written a small test app to help you: exposetest. the goal is to get the parent to see the expose events.

panelcompositebin.

two questions about creative commons

question 1: when did creative commons start offering the No Derivative Works add-on to creative commons licenses?

question 2: how long until we see the iPodOnly add-on?

((ipod art lifted from rstevens of diesel sweeties))

edit: i understand that for some people and some types of work, “no derivatives” makes sense. i understand that even “you have to give me money” makes sense as a license. i don’t have anything against either. i merely think that someone who says “you can’t use my work in the creation of another work” isn’t really putting their work into what i would call a “creative commons”.

hilarious n800 ad

i got my “have a cheap n800” email today from nokia.

first let me say how fantastic nokia is. they absolutely don’t need to give us discounts on these devices which many of us would likely pay full price for anyway. they absolutely don’t need to make a huge contribution to guadec. but they do. that’s awesome. thanks, guys.

second, i have something hilarious to share with everyone. i was looking for information on if the n800 will be available for purchase from nokia in canada any time soon and i came across this hilarious video. watch this n800 ad on tigerdirect.

not only is it beyond corny — it goes into a very detailed explanation of how the device supports gsm and exactly which cell phone carriers you will and will not be able to use it with. priceless.

a possible googleabuse

i was talking with quim today when he mentioned the idea of keeping his old phone for “people calling to my current spanish number”. this made me realise how silly phone numbers are. they’re practically like ip addresses.

i got an idea for an interesting workaround to this problem.

i publish a specification with some word unlikely to appear on its own, like “phonenumbersearchsystem”. i then use this spec to encourage people to augment their normal homepages with the following two features:

  • cause the phrase “phonenumbersearchsystem your name” to appear in the page
  • insert a meta tag into the page for phone number (possibly even having multiple meta tags for home, business, cell, “default”, etc.)

then in order to call someone you i’m-feeling-lucky for “phonenumbersearchsystem quim gil” and look at the meta tags of the page that comes back. if you find a phone number, you make a call.

this means that you can call the person’s current number simply by using their name. by virtue of the fact that you use your own homepage, the google juice for your name already increases your chance of being the first result. in fact, it might turn out to be better not to use the special word at all and just google the person’s name and use the special meta tag. this prevents the person, though, from having a phone number page divorced from their normal homepage. it also prevents you from passing results that are irrelevant to you (for example, there are a couple of pages that still win against “desrt” which are simply misspellings).

some neat advantages:

  • phone number changes would be instantaneous and you’d have no need to keep your “old number”
  • you could even have your webpage be a cgi script that returned different phone numbers at different times of the day (for this reason, it might make sense for your homepage not to contain the number directly, but to refer to another document that does)

some obvious disadvantages:

  • google could pull the plug at any time
  • obviously not for people who don’t want their phone number made public

so this blog post is mostly meant as a question: does anybody know of any other system currently abusing google (or other general-purpose public search engines) in this sort of way?

My stance on Ubuntu and the Bad Vista campaign


From:     Ryan Lortie <desrt@desrt...>
To:       Bad Vista Contact <webmaster@badvista....>
Subject:  My stance on Ubuntu and the Bad Vista campaign



Hello FSF,

This is an open letter.

In the past year your organisation has seemingly taken a new stance on
what is important.  You have started participating in things that matter
to people other than hackers.  You are making attempts to reach normal
people -- wouldbe consumers of Trojan Horse technology products.  These
efforts are absolutely commendable.  There is no doubt that the fight
for freedom will be won only by convincing people that there are
practical alternatives to companies that are more interested in their
bottom lines than they are in providing a working product.

Your Defective By Design campaign is brilliant.  I've actually heard
people other than hackers (albeit, still geeks) talking about it.  Your
new Bad Vista campaign also hits the nail right on the head by letting
customers know what they need to know to make an informed decision.  A
distinct feature of these campaigns is that they don't spend time
harping about ideological freedom, but rather, stress real world
problems inherent in DRM.  You talk about practical problems that people
will encounter and be affected by.  You talk about practical solutions.

I am writing this letter because of a controversial decision that you
have made.

The Bad Vista page contains the following text:

     ...and provide a user-friendly gateway to the
        adoption of free software operating systems like
        gNewSense (http://www.gnewsense.org) and Ututo
        (http://www.ututo.org).

I'm not aware of what Ututo is, but by your recommending it, I'm going
to assume that it is subject to the same problems with gNewSense.

From the standpoint of focusing on real practical issues rather than
harping about ideology, gNewSense is basically exactly the same thing as
Ubuntu except that it doesn't work on most people's computers.

People have ATI and nVidia video cards.  Most people have laptops with
wireless cards that at least require firmware.

One of the real practical problems with closed source software is that
if there's a bug then you can't fix the bug and this might prevent you
from using your hardware.  In terms of practicality, this isn't really
much better then not being able to use your hardware at all in the first
place.

Another practical problem is that gNewSense isn't a rock star.  Ubuntu
is.

Let's face it -- no matter how good you are, you're not going to get the
average computer user to install a new operating system.  The people you
will convince to do this are people who are already technology geeks.
These are the same people who have read tech news sites talking about
this "Ubuntu" thing.

Faced with a recommendation to install gNewSense, they will say "huh?".
Faced with a recommendation to install Ubuntu, they just might say
"ya... I've been hearing a lot about that.  Maybe I should give it a
try."

Even if you manage to get people to install gNewSense, you're most
likely going to be harming your cause.  The overwhelming majority of
computer users have some hardware that requires some sort of binary-only
code to operate.  People will install gNewSense and, with very high
likelihood, some part of their system won't work.  They will get
frustrated and annoyed -- possibly turned off of free software forever.
I know people who still pass judgement on Linux as a whole based on
experiences from 5 years ago.

Ubuntu is more or less 99% free.  It doesn't even come anywhere close to
being as awful as Vista is.  Besides -- I bet your computer is already
at least a little non-free.  Is your BIOS open source?  The ROM firmware
on all your devices?  Your CPU's microcode?  We all put up with these
things in the meantime because we understand that the only chance of
success will be to get people on to our platform.  Without users, we
can't make demands.

I understand that it's quite a strange position to be in to be
condemning Ubuntu on one hand for their shipping of proprietary code,
while recommending them to people on the other hand.  To do so would
require swallowing some pride.  I hope that this is something that
you're capable of doing.

Through your campaigns of the past year you've indicated your
understanding of the fact that your key to success lies in public
acceptance.  Recommending Ubuntu instead of gNewSense will increase the
public's acceptance of your platform.  You have to make sacrifices --
that's just the way it is.

I'm sure you appreciate the importance of what you're trying to do and
that you realise what a unique opportunity you have right now.  Please
don't waste it.

I am an Ubuntu user and member.  This letter is my personal opinion.

Ryan Lortie
desrt@desrt...

svn

what’s the deal with svn? i seriously don’t understand why we are switching to it. basically everyone knows that we need to be using git or bzr (i don’t even care which one).

so seriously. someone please explain to me why we start using svn even though we all know it’s not the correct (final) solution.

ps: i like cvs just fine :)

"concerns about the election process"

i recently made a post to the foundation-list about concerns about the election process.

two of the issues that i brought up was that it’s impossible for a truly paranoid individual to know for sure that his vote has been properly counted or that nobody logged his choices.

the second issue is quite hard to solve but i’ve produced a proof of concpt for what a solution to the first problem might look like.

props go to behdad for the idea of encoding the user’s voting choices into their token (allowing the user to prove, later on, that their vote was incorrectly recorded).

so here it is: possible future voting system prototype.

there is no index file for that directory and in the same directory i’ve included .phps versions of all of the files so that you can inspect the source. consider the source as being under the gpl. please try to find problems with the system (both conceptual problems and code bugs) and let me know about them.

theoretical computer science cheatsheet by steve seiden

in response to a comment i made in class today one my professors emailed me the following document:

theoretical computer science cheat sheet.

it’s fantastically useful for anyone in theoretical computer science so i’m posting it here.

i went to look for an updated copy but it seems that the author, steve seiden, died in 2002 when he was hit by a truck. :(