Search Results: "xam"

1 May 2010

Sean Finney: Nouveau, Gallium3D, and Compiz on Debian

update: 20100503: It's been brought to my attention that there might have been a regression in one of the libraries, mesa, maybe, so that master might not be as reliable a reference point for this guide. so, just in case, here are the commit hashes that were used from the different projects: for the non-git-savvy: git checkout -b mybranch <hash> we now return to your regular broadcasting... A week or two ago I figured it was about time that I took the plung and tried out the latest nouveau drivers from experimental on my laptop. Unfortunately, it meant bidding adieu to compiz (apart from the bling it does actually provide some pretty damned useful features). I thought I'd give it a shot at least for a while on principal, since I've always had to think of the nvidia drivers as a necessary evil, and their lack of proper xrandr support is really, really annoying. Since then I haven't noticed any problems, apart from the following message after every suspend/resume:
[  931.213239] Uhhuh. NMI received for unknown reason 80 on CPU 0.
[  931.213240] You have some hardware problem, likely on the PCI bus.
[  931.213242] Dazed and confused, but trying to continue

No idea what's causing it, but otherwise the system is stable and functional. If anyone knows what can be done about this, I'd appreciate hearing from you. My graphics card, by the way:
01:00.0 VGA compatible controller: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)

In the time since then, the nouveau driver has made its way into unstable, and a lot of distros (ubuntu, fedora, ...) are even using it as the default driver. So before going any further with the 3d/compiz stuff, I highly recommend that you get the packaged version working first. This will not only make sure that the basic driver works, but it will also make recovery/rollback a lot easier. Since it's all packaged in the standard repositories, it's not much harder than installing a few packages and editing a few files... so come on give it a try :) Getting the 2d driver working in Debian sid Really, this is so easy it's hardly worth writing up, but i'm running with the -v flag this morning... Make sure you don't have any reference to nvidia in /etc/modules or other places that might cause it to be automatically loaded. Then remove the proprietary glx bindings, which would otherwise interfere with the nouveau driver.
sudo apt-get remove nvidia-glx

Next, you'll need to install a kernel that includes updated drm support. Normally this would require a kernel >= 2.6.33.1, but the debian kernel maintainers have graciously backported this code to the 2.6.32-4 kernel package. note this isn't the default kernel version in testing/unstable at the time of writing so you have to explicitly install it along with the nouveau driver.
sudo apt-get install linux-image-2.6.32-4-amd64 xserver-xorg-video-nouveau

If you are already running this kernel and using the proprietary nvidia drivers, via module-assistant or otherwise, you /might/ need to uninstall them first. On my system I left them installed in the old kernel version but did not install them on the new kernel version. Required xorg configuration I don't believe that nouveau is picked by default if available at the time of writing, so you have to have the following in your xorg.conf:
sudo sh -c "cat > /etc/X11/xorg.conf" << EOF
Section "Device"
    Identifier     "nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300]"
    Driver         "nouveau"
EndSection
EOF

This was all I needed to do, apart from rebooting into the new kernel. For those who don't want to venture outside the packaging system, this is about as far as you can go for the time being. Though really, if you're bothering to read this far along, you're probably more interested in what comes next :) Getting 3d working (without voiding your distro warranty) So I thought I'd give the 3d-accelerated gallium a go. Their wiki page certainly makes one think twice, but at this point I was seriously fiending to get my bling back (well, the compiz scale plugin, anyway) and figured it wouldn't hurt too much to try. Via google and trawling around in various forums I found a number of how-to documents for getting Gallium3d on debian/ubuntu systems, but most of them recommended doing things in a way that wasn't easily reversible and that could totally hose your system in a not-so-hypothetical worst-case scenario. It's pretty hard to roll back a make install done into /usr, for example, and subsequent package upgrades can leave your system even worse off as they will probably clobber half of what you just did, leaving the other half totally broken. And if you have a laptop which requires the gui for networking (i.e. network-manager), then fixing/rolling-back the changes is not entirely trivial, since you'd likely have to re-download the various drm/mesa/xorg packages. So enter the tried and true unix utility stow (apt-get install stow, of course). stow is a utility that lets you install software into arbitrary folders, and then manage the system-wide installation of the software via a farm of symlinks pointing at the installed location. It's probably more well known among the sysadmin crowd than the desktop user crowd, but it's incredibly useful for the task at hand as it will let us easily install multiple copies of different software in a way that's very easy to update and/or roll-back. RTFM stow(1) for more information. So, on to the juicy stuff... Install needed software, remove problematic packages, setup, etc At least on my system, I had to remove libdrm-dev to keep things from accidentally linking against it instead of the updated version that we install later on below. There's probably a way to override this with CFLAGS but I figure this is simpler.
sudo apt-get remove libdrm-dev
sudo apt-get install stow build-essential xorg-dev git-core libtool mesa-common-dev automake autoconf 
mkdir ~/nouveau

Compile a linux-2.6.34 RC kernel
cd ~/nouveau
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6
git remote add -f nouveau git://anongit.freedesktop.org/nouveau/linux-2.6
git checkout -b nouveau-master nouveau/master
make menuconfig

Enable device drivers -> staging drivers -> nouveau. Make any other changes you might want to make (I just took defaults for everything else).
make deb-pkg

The linux-firmware-free debian package ships some of the same stuff from the generated linux-firmware-image package. I decided to opt for the upstream firmware, though I'm not sure that this is necessary:
sudo apt-get remove linux-firmware-free
sudo dpkg -i ~/nouveau/linux-image*.deb ~/nouveau/linux-firmware-image*.deb
sudo update-grub

Install a copy of dri2proto
cd ~/nouveau
git clone git://anongit.freedesktop.org/xorg/proto/dri2proto
cd dri2proto
./autogen.sh --prefix=/usr/local/stow/dri2proto-20100428
sudo mkdir -p /usr/local/stow/dri2proto-20100428
sudo make install
sudo stow -d /usr/local/stow dri2proto-20100428

Install a cutting-edge version of libdrm
cd ~/nouveau
git clone git://anongit.freedesktop.org/git/mesa/drm/
cd drm
./autogen.sh --prefix=/usr/local/stow/drm-20100428 --disable-intel --disable-radeon --enable-nouveau-experimental-api
make
sudo mkdir -p /usr/local/stow/drm-20100428
sudo make install
sudo stow  -d /usr/local/stow  drm-20100428

Likewise for mesa
cd ~/nouveau
git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa
./autogen.sh --prefix=/usr/local/stow/mesa-20100428  --enable-debug --enable-glx-tls --disable-asm --with-dri-drivers= --enable-gallium-nouveau --disable-gallium-intel --disable-gallium-radeon --disable-gallium-svga --with-state-trackers=glx,dri --with-demos=xdemos,demos,trivial,tests
make
sudo mkdir -p /usr/local/stow/mesa-20100428 
sudo make install
sudo stow -d /usr/local/stow mesa-20100428

And now the xorg driver...
cd ~/nouveau
git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
cd xf86-video-nouveau
./autogen.sh --prefix=/usr/local/stow/xf86-video-nouveau-20100428
make
sudo mkdir -p /usr/local/stow/xf86-video-nouveau-20100428
sudo make install
sudo stow -d /usr/local/stow xf86-video-nouveau-20100428

Configuration Configure xorg to look in alternate location for xorg modules and set up DRI
sudo sh -c "cat > /etc/X11/xorg.conf" << EOF
Section "Files"
    ModulePath "/usr/local/lib/xorg/modules,/usr/lib/xorg/modules"
EndSection
Section "ServerFlags"
    Option "GlxVisuals" "all"
Endsection
Section "Device"
    Identifier     "nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300]"
    Driver         "nouveau"
EndSection
EOF

I've /heard/ that disabling TV out is a necessity on some cards, though I haven't seen this myself:
sudo sh -c "cat > /etc/modprobe.d/nouveau.conf" << EOF
# not entirely sure this is necessary, but heard it helped with vsync
options nouveau tv_disable=1
EOF

Finally, the one thing that can not be done in /usr/local is making the nouveau DRI driver available. From what I could tell the path that mesa uses to find the DRI libraries is hard-coded (corrections welcome). Since you won't already have this file (otherwise, why would you be following along here?), just drop in a symlink to the file in /usr/local:
sudo ln -s /usr/local/lib/dri/nouveau_dri.so /usr/lib/dri/

Finally, reboot, and hope for the best :) Riding the bleeding edge: how to upgrade later on Again, stow really shows its usefullness here. Using drm as an example case, upgrading an individual component would look something like:
cd ~/nouveau/drm
git clean -dfx
git pull
today= date +%Y%m%d 
./autogen.sh --prefix=/usr/local/stow/drm-$today --disable-intel --disable-radeon --enable-nouveau-experimental-api
make
sudo mkdir -p /usr/local/stow/drm-$today
sudo make install
sudo stow -d /usr/local/stow -D drm-20100428
sudo stow -d /usr/local/stow  drm-$today

Note how the old version is still installed, so you can switch components around pretty freely. Abort! Abort!: How to roll back changes In case your system becomes totally unusable, or you've decided that you just want to go back to the safe and cozy world of what's provided by the debian packages, simply do the following: Assuming that you're using the nouveau driver from unstable, this should be all that is necessary. Conclusion Overall impression I am very, very happy with the resulting setup. I was led to believe that this whole thing was much more unstable and unusable than it actually is! While there are certainly some glitches and missing features, I feel comfortable enough using it that I don't have plans to switch back. But if I find myself in a situation where I can't use the new setup, rolling back shouldn't be a problem either. I figure I'm happy with what I have now and it will only get better. What works, at least to a "kinda works" level. What still doesn't work Further reading, references Thanks A couple shoutouts to those who helped me with this on the way: Feedback / Corrections Unforunately, I've had to disable comments for the time being due to overwhelming quantities of spam. So please drop me a line via email or on IRC (seanius on oftc/freenode).

Benjamin Drung: How to send a command when pressing a key

Dear lazy web, How can I send a command when pressing a key? To make it more complex: I have two input devices A and B. The command should be only sent, when the keys of device A are pressed (and not device B). The devices A and B have the same key codes. For example, pressing the dot key on device A should run a command, but pressing the dot key on device B should just produce a dot. Is it possible to use device A as input device for lirc?

30 April 2010

Biella Coleman: Baby Panda wants YOU to submit to DEBCONF



bad mood destroyer, originally uploaded by the biella.
People s the deadline is fast approaching. Don t worry though, the best ideas come under deadlines and your proposal need not be lengthy. So get those typing hands out and submit a proposal (a few sentences suffices) for a presentation! The annual Debian conference is being held in NYC this year. First time
setting foot in the imperial empire. Are you doing something related to
free software that might be interesting to share, show off or talk about
at Debconf? I bet you are! We are looking for art installations,
performances, movie screenings, maybe you are wanting to host a
roundtable/panel discussion, coordinate a workshop (you dont have to
know the subject deeply to do this!). I know the deadline is soon, but don t let that scare you. The
submission requirement bar is very low, and we are flexible! here is the submission information: [1] ********************* Calling all potential contributors to DebConf10! One more week until
the final submission deadline! The DebConf team is excited to announce that we are now accepting
proposals for contributions to this year s Debian conference! We
invite you to submit proposals for how you would contribute until the
deadline: soon There are many ways you can contribute, you could present a technical
paper, host a panel discussion, put on a tutorial, do a performance,
an art installation, a debate, host a meeting (BoFS, or Birds of a
Feather Session), or other possibilities that you devise. This year we
are also accepting proposals for tracks=E2=80=94a thematic grouping around a
particular subject, and people to coordinate those tracks. If you are
looking for ideas of things that you could contribute, or have ideas
for things that you would like to see happen at DebConf, have a look
at the Contribution Brainstorm[0] page. DebConf talks will be broadcast live on the Internet where possible,
unless otherwise requested. Videos of the talks will be published on
the web along with the presentation slides and papers. =3D=3D Step 1. Submit Proposal =3D=3D Proposals should provide an overview of your proposed contribution,
similar to an abstract, and be no more than 600 words. Since
contributions can cover a range of issues, please describe what your
proposal covers, be it political (Free Software, law, advocacy,
access, etc.), technical (d-i, OpenPGP, etc.), social (Debian
structures and groups). It s okay to hit all three of these. Your
proposal should also include some information on why you re qualified
to present, or coordinate this topic. For example, you can include
links to posts you have made to Debian mailing lists or other material
that indicates your qualifications. Proposals and their abstracts will
be accepted until May 1st, 2010, 23h59 UTC. To submit your proposal, go to Penta[1] and register as an
attendee. Once you are registered, there is a Submit a proposal
link. You will see your proposal on the site. You can choose between
different presentation types. If you are unsure what type you should
use, please read our glossary of definitions[2]. If it s not there for
some reason, or you have questions, please contact us immediately at
mailto:talks@debconf.org. =3D=3D Step 2. Committee Review =3D=3D The review committee for this year will make its decision by May 1st,
2010. All correspondence will be done by email. =3D=3D Step 3. Paper Submission =3D=3D Like last year, we are asking for papers to be submitted along with
the presentations. A full paper is optional, however we strongly
encourage you to submit one if possible as we intend to provide
written information along with transcripts of the sessions for later
viewing. Having written papers in advance will allow us to get
translations done to help non-native-English speakers feel more
comfortable with the topics presented. Papers are due by July 1st,
2010, and should cover the topic in reasonable depth (3 pages A4 text,
plus pictures and diagrams). We will use LaTeX to typeset the
proceedings. Please submit your paper formatted in LaTeX. Should you
be unfamiliar with LaTeX earlier submission in plain text is also
fine. =3D=3D Step 4. Live Presentation =3D=3D Longer presentations may have a break in the middle and should include
workshop items that directly involve the participants. If using slides
or any other presentation, please consider that your audience will
consist of people who use free software, and your choice of
application to prepare and display the slides should reflect this if
at all possible. =3D=3D Fine Print Publication Rights =3D=3D DebConf requires non-exclusive publication rights to papers,
presentations, and any additional handouts or audio/visual materials
used in conjunction with the presentation. The authors have the
freedom to pick a DFSG-free license for the papers themselves and
retain all copyrights. The presentations will be recorded, and may be
broadcast over the Internet. Any copies of the presentation will be
made available =3D=3D Failure to Submit =3D=3D In the event that a deadline is missed we reserve the right to revoke
any offer to present. =3D=3D About DebConf =3D=3D The annual DebConf conference is a technical and social forum for
Debian developers, sponsors, affiliates, and friends. It allows
various groups within Debian a chance to come together, network, and
share their work. Until we see you in the big city,
DebConf Talks Team [1] introduction written by Micah Anderson

28 April 2010

Petter Reinholdtsen: Thoughts on roaming laptop setup for Debian Edu

For some years now, I have wondered how we should handle laptops in Debian Edu. The Debian Edu infrastructure is mostly designed to handle stationary computers, and less suited for computers that come and go. Now I finally believe I have an sensible idea on how to adjust Debian Edu for laptops, by introducing a new profile for them, for example called Roaming Workstations. Here are my thought on this. The setup would consist of the following: I believe all the pieces to implement this are in Debian/testing at the moment. If we work quickly, we should be able to get this ready in time for the Squeeze release to freeze. Some of the pieces need tweaking, like libpam-ccreds should get support for pam-auth-update (#566718) and nslcd (or perhaps debian-edu-config) should get some integration code to stop its daemon when the LDAP server is unavailable to avoid long timeouts when disconnected from the net. If we get Kerberos enabled, we need to make sure we avoid long timeouts there too. If you want to help out with implementing this for Debian Edu, please contact us on debian-edu@lists.debian.org.

27 April 2010

Ingo Juergensmann: Johan Schl ter: "Child pornography is great"

For many activists in net-politics it is apparent that the fight against child pornography is just an excuse for establishing a EU-wide content filtering infrastructure. This infrastructure for content filtering can be used to filter other content than child pornography as well. For example politicians in Germany already requested blocking gambling sites, Nazi sites, left extremistic political sites and others, when we had that kind of discussion last year over here. The proposal of a law putting up stop pages in front of child pronography sites by former minister for family Ursula "Zensursula" von der Leyen passed the parliament, but shortly after last years parliament elecetion all political parties didn't want that law anymore.
EU commissioner Cecilia "Censilia" Malmstr m introduced a similar proposal for a EU-wide blocking iinitiative a short while ago, as you might now. Christian Engstr m, member of the EU parliament of the swedish Pirate Party, wrote today on his blog that content right industry welcomes child pornography as a way to introduce content filter and blocking infrastructure:

Child pornography is great, the speaker at the podium declared enthusiastically. It is great because politicians understand child pornography. By playing that card, we can get them to act, and start blocking sites. And once they have done that, we can get them to start blocking file sharing sites .

The venue was a seminar organized by the American Chamber of Commerce in Stockholm on May 27, 2007, under the title Sweden A Safe Haven for Pirates? . The speaker was Johan Schl ter from the Danish Anti-Piracy Group, a lobby organization for the music and film industry associations, like IFPI and others.

[...]

Start with child porn, which everybody agrees is revolting, and find some politicians who want to appear like they are doing something. Never mind that the blocking as such is ridiculously easy to circumvent in less than 10 seconds. The purpose at this stage is only to get the politicians and the general public to accept the principle that censorship in the form of filters is okay. Once that principle has been established, it is easy to extend it to other areas, such as illegal file sharing. And once censorship of the Internet has been accepted in principle, they can start looking at ways to make it more technically difficult to circumvent.


If you already have not, then please act now and contact your local EU representive and kindly ask to refuse this directive of Malmstr m and enlighten them by supplying arguments such those MOGIS (MissbrauchsOpfer Gegen InternetSperren, abuse survivors against internet blocking) put up on their webpage (English and other languages).

The abuse of childs and the documentation of such abuse (child pornography is a bad term anyway) needs to be stopped! But access blocking is the wrong direction. Better take care of a more effective criminal prosecution. Documentation of child abuse needs to get removed from the web and the producers needs to get arrested.

So, please act now!

P.S.: there's a nice video on http://cleanternet.org/

25 April 2010

Vincent Sanders: XCB programming is hard

I have been looking at writing a program with XCB today. I seem to pick projects that are an exercise in undocumented frustration.

All I wanted to do was have an x window open and be able to plot an arbitrary changeable image to it (no I am not writing yet another image viewer!). The XCB documentation seems to be a cross between "good luck with that" and some rather erratic doxygen output.

The utility libraries are rather skimpy on examples and its tiresome worrying that when you feed any of the xcb function names into Google (web or codesearch) there are very, very few hits beyond the freedesktop API docs.

My favourite has to be the xcb_image_create documentation, go on I challenge anyone to follow that logic without going and reading the sources! The answer (afaict) is that if you pass a pointer in base that pointer will be freed by xcb_image_destroy otherwise the data pointer will be used, unless the bytes value is too small in which case memory will be allocated with malloc and the passed pointer ignored.
Anyhow, I have succeeded and the result is below, mainly so I do not loose it :-)

/* XCB application drawing an updating bitmap in a window
*
* Inspired by the xcb black rectangle in a window example
*
* Copyright 2010 V. R. Sanders, released under the MIT licence
*/

/* compile with:
* gcc -Wall -lxcb-icccm -lxcb -lxcb-image -o disp disp.c
*/

#include <string.h>

#include <xcb/xcb.h>
#include <xcb/xcb_image.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_icccm.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>

static xcb_format_t *
find_format (xcb_connection_t * c, uint8_t depth, uint8_t bpp)

const xcb_setup_t *setup = xcb_get_setup(c);
xcb_format_t *fmt = xcb_setup_pixmap_formats(setup);
xcb_format_t *fmtend = fmt + xcb_setup_pixmap_formats_length(setup);
for(; fmt != fmtend; ++fmt)
if((fmt->depth == depth) && (fmt->bits_per_pixel == bpp))
/* printf("fmt %p has pad %d depth %d, bpp %d\n",
fmt,fmt->scanline_pad, depth,bpp); */
return fmt;

return 0;


void
fillimage(unsigned char *p, int width, int height)

int i, j;
for(i=0; i < width; i++)

for(j=0; j < height; j++)

if((i < 256)&&(j < 256))

*p++=rand()%256; // blue
*p++=rand()%256; // green
*p++=rand()%256; // red
else
*p++=i%256; // blue
*p++=j%256; // green
if(i < 256)
*p++=i%256; // red
else if(j < 256)
*p++=j%256; // red
else
*p++=(256-j)%256; // red

p++; /* unused byte */




xcb_image_t *
CreateTrueColorImage(xcb_connection_t *c,
int width,
int height)

const xcb_setup_t *setup = xcb_get_setup(c);
unsigned char *image32=(unsigned char *)malloc(width*height*4);
xcb_format_t *fmt = find_format(c, 24, 32);
if (fmt == NULL)
return NULL;

fillimage(image32, width, height);

return xcb_image_create(width,
height,
XCB_IMAGE_FORMAT_Z_PIXMAP,
fmt->scanline_pad,
fmt->depth,
fmt->bits_per_pixel,
0,
setup->image_byte_order,
XCB_IMAGE_ORDER_LSB_FIRST,
image32,
width*height*4,
image32);


int
main (int argc, char **argv)

xcb_connection_t *c;
xcb_screen_t *s;
xcb_window_t w;
xcb_pixmap_t pmap;
xcb_gcontext_t gc;
xcb_generic_event_t *e;
uint32_t mask;
uint32_t values[2];
int done=0;
xcb_image_t *image;
uint8_t *image32;
xcb_expose_event_t *ee;
char *title="Hello World!";
xcb_size_hints_t *hints;

/* open connection with the server */
c = xcb_connect (NULL, NULL);

if (!c)
printf ("Cannot open display\n");
exit (1);


s = xcb_setup_roots_iterator (xcb_get_setup (c)).data;

/* printf("root depth %d\n",s->root_depth); */

/* create image */
image = CreateTrueColorImage(c, 640, 480);
if (image == NULL)
printf ("Cannot create iamge\n");
xcb_disconnect(c);
return 1;

image32 = image->data;

/* create window */
mask = XCB_CW_BACK_PIXEL XCB_CW_EVENT_MASK;
values[0] = s->white_pixel;
values[1] = XCB_EVENT_MASK_EXPOSURE
XCB_EVENT_MASK_KEY_PRESS
XCB_EVENT_MASK_BUTTON_PRESS;

w = xcb_generate_id (c);
xcb_create_window (c, XCB_COPY_FROM_PARENT, w, s->root,
10, 10, image->width, image->height, 1,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
s->root_visual,
mask, values);

/* set title on window */
xcb_set_wm_name(c, w, STRING, strlen(title), title);

/* set size hits on window */
hints = xcb_alloc_size_hints();
xcb_size_hints_set_max_size(hints, image->width,image->height);
xcb_size_hints_set_min_size(hints, image->width,image->height);
xcb_set_wm_size_hints(c, w, WM_NORMAL_HINTS, hints);

/* create backing pixmap */
pmap = xcb_generate_id(c);
xcb_create_pixmap(c, 24, pmap, w, image->width, image->height);

/* create pixmap plot gc */
mask = XCB_GC_FOREGROUND XCB_GC_BACKGROUND;
values[0] = s->black_pixel;
values[1] = 0xffffff;

gc = xcb_generate_id (c);
xcb_create_gc (c, gc, pmap, mask, values);

/* put the image into the pixmap */
xcb_image_put(c, pmap, gc, image, 0, 0, 0);

/* show the window */
xcb_map_window (c, w);
xcb_flush (c);

/* event loop */
while (!done && (e = xcb_wait_for_event (c)))
switch (e->response_type)
case XCB_EXPOSE:
ee=(xcb_expose_event_t *)e;
/* printf ("expose %d,%d - %d,%d\n",
ee->x,ee->y,ee->width,ee->height); */
xcb_copy_area(c, pmap, w, gc,
ee->x,
ee->y,
ee->x,
ee->y,
ee->width,
ee->height);
xcb_flush (c);
image32+=16;
break;

case XCB_KEY_PRESS:
/* exit on keypress */
done = 1;
break;

case XCB_BUTTON_PRESS:
fillimage(image->data, image->width, image->height);
memset(image->data, 0, image32 - image->data);
xcb_image_put(c, pmap, gc, image, 0, 0, 0);
xcb_copy_area(c, pmap, w, gc, 0,0,0,0,image->width,image->height);
xcb_flush (c);
break;

free (e);


/* free pixmap */
xcb_free_pixmap(c, pmap);

/* close connection to server */
xcb_disconnect (c);

return 0;




Russell Coker: Links April 2010

Sam Harris gave an interesting TED talk about whether there are scientific answers to moral questions [1]. One of his insightful points was that when dealing with facts certain opinions should be excluded it would be good if journalists who report on issues of science could understand this. Another insight was that religious people most strongly agree with him regarding the issue of whether there are factual answers to moral questions but they think that God just handed the answers to their ancesters rather than making it an issue that requires consideration. He cites the issue of gay marriage as being a distraction from moral issues such as genocide and poverty. He asks how have we convinced ourself that every culture has a point of view worth considering? . He asks how the ignorance of the Taliban on the topic of physics is any less obvious than on the topic of human well-being. Dan Gilbert gave an insightful TED talk titled Why Are We Happy? [2]. One interesting fact he cites is that people who become paraplegic are no less happy in the long term than people who win the lottery. He points out that a shopping mall full of Zen monks is not going to be particularly profitable and uses this fact to explain the promotion of natural happiness over synthetic happiness in our society. Dan Barber gave an amusing and informative TED talk How I Fell in Love with a Fish [3]. He speaks about ecological fish farming and how the fish are more tasty as well as the farm being good for the environment. The farm in question is in the south-west of Spain, hopefully there will be more similar farms in other parts of the world soon. Gary Lauder gave an interesting brief TED talk about road signs [4]. His main point was to advocate a road sign saying take turns , but there are already signs in the US at freeway on-ramps saying that 1 or 2 cars may enter every time the light turns green which is a similar concept. The innovative thing he did was to estimate the amount of time and petrol wasted by stop signs, add that over a year based on the average income and then estimate that an annuity covering that ongoing expense would cost more than $2,000,000. This makes two stop signs at an intersection have an expense of $1,000,000 each. He suggests that rather than installing stop signs it would be cheaper to buy the adjacent land, chop down all trees, and then sell it again. Alan Siegel gave an insightful TED talk about simplifying legal documents [5]. He gives an example of an IRS document which was analysed with a Heat Map to show which parts confused the readers the IRS adopted a new document that his group designed which made it easier for taxpayers. He advocates legislation to make legal documents easier to understand for customers of financial services. Tim Berners Lee gave an interesting TED talk about Open Data, he illustrated it with some fantastic videos showing how mashups have been used with government data [6] and how the Open Street Map project developed over time. Martin F. Krafft gave an interesting Debconf talk about Tool Adoption Behavior in the Debian project [7]. One thing that I found particularly interesting was his description of the Delphi Method that he used to assemble a panel of experts and gather a consensus of opinion. The post-processing on this talk was very good, in some sections Martin s presentation notes are shown on screen with the video of him in the corner. As an aside, I think we really do need camera-phones. The Big Money has an interesting article comparing the Mafia Bust Out with the practices of US banks [8]. Mark Roth gave an exciting TED talk about using Hydrogen Sulphide to trigger suspended animation [9]. They are now doing human trials for suspending people who have serious injuries to reduce tissue damage during the process of surgery. Pawan Sinha gave an interesting TED talk about how brains learn to see [10]. He started by talking about curing blindness in people who have been blind since birth. But he then ended by showing some research into the correlation between visual processing and Autism, he showed that an Autistic child had significantly different visual patterns when playing Pong to an NT child. Adora Svitak gave an insightful TED talk about what adults can learn from kids [11]. She made some particularly interesting points about the education system requiring that adults respect children more and expect them to do better than their parents which is essential for all progress in society. The NY Times has an interesting article on animal homosexuality [12]. In terms of research it focusses on lesbian relationships between albatrosses. But a large part of the article is devoted to the politics of scientific research into animal sexuality. BrowserShots.org shows you what your web site looks like in different web browsers [13]. Cory Doctorow wrote an insightful article titles Can You Survive a Benevolent Dictatorship about the Apple DRM [14]. He describes the way the Apple Digital Restrictions Management (DRM) doesn t stop copyright violation but does reduce competition in the computer industry. He is not going to sell his work on the Apple store (for the iPad or iPhone etc) and suggests that customers should choose a more open platform. It s unfortunate that he didn t suggest a better platform.

23 April 2010

Joerg Jaspert: Bash power

Something that regularly happens when I get to see other peoples shell scripts is me thinking Why do they not use the powers of bash? . Sometimes it s fine to not use bash specific features, like when you are limited by the Operating System you have to run on (don t you try some commercial Unix systems. Or this WIndows crap. Brrr). Sometimes you want it for some perceived performance win, sometimes a full bash doesn t fit the target system (think embedded devices). Thats all fine, don t come up with those, I know them. What I mean is - people are using things that bind you to bash and your hashbang also makes your script use bash. But people still jump out to a different command just for some variable modification which are easily doable in bash too. A few examples follow, always imagine them in a script starting with the header of
#!/bin/bash
set -e
set -u

Example Get rid of newlines (actually, any replacement you can think of):
var1="something with
space and
linefeeds"
var1=$ var1//
/_ 
echo $var1
This is a simple but powerful demonstration of the Pattern substitution bash can do for you. Read its manpage, it can do much more than what I list here, but the above simply replaces all occurences of a linefeed with an _. Make the double // a single one and it is just the first that is replaced.
Example Removing a prefix (or suffix) from a string:
VAR1=$ VAR1##sync:archive: 
This removes the text sync:archive: from the beginning of the VAR1 variable. Replace the ## with %% and its gone from the end. The topic to look for in the manpage of bash is Remove matching prefix pattern (or suffix, of course).
There are many more possibilities, you might want to look through the Advanced Bash-Scripting Guide, it contains some helpful information. Or read the bash manpage. Or (shameless self-ad) look at the latest ftpsync script, the one and only official (mirroradm) supported mirror synchronization for the ftp.*.debian.org mirrors.

Joachim Breitner: Making dictionary passting explicit in Haskell

Haskell provides type classes to support polymorphism. A type class defines a few methods, which can then be implemented for a concrete type in the type class instance. This is a powerful system, but it also has it drawbacks. Most notably, each type can have at most one implementation of the type class. But sometimes you need to use a different implementation. If, for example, you used the Binary class to store data on disk. Now you changed your data type and the binary instance, and you can not read the old data any more. One solution is to re-name your type using newtype and implement another type instance for that. Often, this is enough. But still, instances are not first-class-citizens. You can not pass them around or modify them, as you can pass around and modify data and functions. Under the hood of the compiler, things look different. The ghc puts the methods of the instance in a dictionary and passes that implicitly to any functions having a (Class a) constraint. (Other implementations exist though) If one could make that behavior explicit, one could easily modify the instance before passing it to the function. But this is unfortunately not possible. But it is possible to pass an explicit dictionary along the data. I use the Monoid class as an example, and define a representation of the dictionary to-be-passed, as well as the dictionary of the default instance:
data MonoidDict a = MonoidDict
    ed_mempty :: a
  , ed_mappend :: a -> a -> a
   
monoidDict :: Monoid a => MonoidDict a
monoidDict = MonoidDict mempty mappend
(For conciseness, I ignore the mconcat method.) My first idea was to pass this instance along with data: (MonoidDict a, a). But this would not work because there are methods, such as mempty, who need the dictionary without getting passed a value to use. Therefore, I need to put the dictionary both in the covariant and the contravariant position:
newtype WithMonoidDict a = WithMonoidDict (MonoidDict a -> (MonoidDict a, a))
We need functions to clamp a dictionary to a value, and to extract it again:
wrapWithCustomMonoidDict :: MonoidDict a -> a -> WithMonoidDict a
wrapWithCustomMonoidDict dict val = WithMonoidDict $ const (dict, val)
extractFromCustomMonoidDict :: MonoidDict a -> WithMonoidDict a -> a
extractFromCustomMonoidDict dict (WithMonoidDict f) = snd (f dict)
Note that both expect the dictionary, so that it can be fed into WithMonoidDict from both sides . For convenience, we can define variants that use the standard instance:
wrapWithMonoidDict :: Monoid a => a -> WithMonoidDict a
wrapWithMonoidDict = wrapWithCustomMonoidDict monoidDict
extractFromMonoidDict :: Monoid a => WithMonoidDict a -> a
extractFromMonoidDict = extractFromCustomMonoidDict monoidDict
We want to be able to pass the wrapped values as any other value with a Monoid instance, so we need to declare that:
instance Monoid (WithMonoidDict a) where
  mempty = WithMonoidDict (\d -> (d, ed_mempty d))
  mappend (WithMonoidDict f1) (WithMonoidDict f2) = WithMonoidDict $ \d ->
  let (d1,v1) = f1 d
  (d2,v2) = f2 d
  in  (d1, ed_mappend d1 v1 v2)
Note that mappend has the choice between three dictionaries This is not a good sign, but let s hope that they are all the same. Does it work? Let s see:
listInstance :: MonoidDict [a]
listInstance = monoidDict
reverseInstance :: MonoidDict [a]
reverseInstance = monoidDict   ed_mappend = \l1 l2 -> l2 ++ l1  
examples = do
  let l1 = [1,2,3]
  let l2 = [4,5,6]
  putStrLn $ "Example lists: " ++ show l1 ++ " " ++ show l2
  putStrLn $ "l1 ++ l2: " ++ show (l1 ++ l2) 
  putStrLn $ "l1  mappend  l2: " ++ show (l1  mappend  l2) 
  putStrLn $ "Wrapped with default instance:"
  putStrLn $ "l1  mappend  l2: " ++ show (
  extractFromMonoidDict $ wrapWithMonoidDict l1  mappend  wrapWithMonoidDict l2)
  putStrLn $ "Same with reversed monoid instance:"
  putStrLn $ "l1  mappend  l2: " ++ show (
  extractFromCustomMonoidDict reverseInstance $
  wrapWithCustomMonoidDict reverseInstance l1  mappend 
  wrapWithCustomMonoidDict reverseInstance l2)
Running examples gives this output:
Example lists: [1,2,3] [4,5,6]
l1 ++ l2: [1,2,3,4,5,6]
l1  mappend  l2: [1,2,3,4,5,6]
Wrapped with default instance:
l1  mappend  l2: [1,2,3,4,5,6]
Same with reversed monoid instance:
l1  mappend  l2: [4,5,6,1,2,3]
Indeed it works. Unfortunately, this approach is not sufficient for all cases. It is perfectly valid to have functions with signature (Monoid a => Int -> Int). Obviously, this function would have no access to the explicit dictionary, because no value of type a is passed to or from it.<monoid a="a"> I wonder if it would be possible to extend the syntax somehow to be able to properly pass an alternative dictionary to such functions. But given that not all compilers use dictionary passing, my hopes are low.

Joachim Breitner: Making dictionary passing explicit in Haskell

Haskell provides type classes to support polymorphism. A type class defines a few methods, which can then be implemented for a concrete type in the type class instance. This is a powerful system, but it also has it drawbacks. Most notably, each type can have at most one implementation of the type class. But sometimes you need to use a different implementation. If, for example, you used the Binary class to store data on disk. Now you changed your data type and the binary instance, and you can not read the old data any more. One solution is to re-name your type using newtype and implement another type instance for that. Often, this is enough. But still, instances are not first-class-citizens. You can not pass them around or modify them, as you can pass around and modify data and functions. Under the hood of the compiler, things look different. The ghc puts the methods of the instance in a dictionary and passes that implicitly to any functions having a (Class a) constraint. (Other implementations exist though) If one could make that behavior explicit, one could easily modify the instance before passing it to the function. But this is unfortunately not possible. But it is possible to pass an explicit dictionary along the data. I use the Monoid class as an example, and define a representation of the dictionary to-be-passed, as well as the dictionary of the default instance:
data MonoidDict a = MonoidDict
    ed_mempty :: a
  , ed_mappend :: a -> a -> a
   
monoidDict :: Monoid a => MonoidDict a
monoidDict = MonoidDict mempty mappend
(For conciseness, I ignore the mconcat method.) My first idea was to pass this instance along with data: (MonoidDict a, a). But this would not work because there are methods, such as mempty, who need the dictionary without getting passed a value to use. Therefore, I need to put the dictionary both in the covariant and the contravariant position:
newtype WithMonoidDict a = WithMonoidDict (MonoidDict a -> (MonoidDict a, a))
We need functions to clamp a dictionary to a value, and to extract it again:
wrapWithCustomMonoidDict :: MonoidDict a -> a -> WithMonoidDict a
wrapWithCustomMonoidDict dict val = WithMonoidDict $ const (dict, val)
extractFromCustomMonoidDict :: MonoidDict a -> WithMonoidDict a -> a
extractFromCustomMonoidDict dict (WithMonoidDict f) = snd (f dict)
Note that both expect the dictionary, so that it can be fed into WithMonoidDict from both sides . For convenience, we can define variants that use the standard instance:
wrapWithMonoidDict :: Monoid a => a -> WithMonoidDict a
wrapWithMonoidDict = wrapWithCustomMonoidDict monoidDict
extractFromMonoidDict :: Monoid a => WithMonoidDict a -> a
extractFromMonoidDict = extractFromCustomMonoidDict monoidDict
We want to be able to pass the wrapped values as any other value with a Monoid instance, so we need to declare that:
instance Monoid (WithMonoidDict a) where
  mempty = WithMonoidDict (\d -> (d, ed_mempty d))
  mappend (WithMonoidDict f1) (WithMonoidDict f2) = WithMonoidDict $ \d ->
  let (d1,v1) = f1 d
  (d2,v2) = f2 d
  in  (d1, ed_mappend d1 v1 v2)
Note that mappend has the choice between three dictionaries This is not a good sign, but let s hope that they are all the same. Does it work? Let s see:
listInstance :: MonoidDict [a]
listInstance = monoidDict
reverseInstance :: MonoidDict [a]
reverseInstance = monoidDict   ed_mappend = \l1 l2 -> l2 ++ l1  
examples = do
  let l1 = [1,2,3]
  let l2 = [4,5,6]
  putStrLn $ "Example lists: " ++ show l1 ++ " " ++ show l2
  putStrLn $ "l1 ++ l2: " ++ show (l1 ++ l2) 
  putStrLn $ "l1  mappend  l2: " ++ show (l1  mappend  l2) 
  putStrLn $ "Wrapped with default instance:"
  putStrLn $ "l1  mappend  l2: " ++ show (
  extractFromMonoidDict $ wrapWithMonoidDict l1  mappend  wrapWithMonoidDict l2)
  putStrLn $ "Same with reversed monoid instance:"
  putStrLn $ "l1  mappend  l2: " ++ show (
  extractFromCustomMonoidDict reverseInstance $
  wrapWithCustomMonoidDict reverseInstance l1  mappend 
  wrapWithCustomMonoidDict reverseInstance l2)
Running examples gives this output:
Example lists: [1,2,3] [4,5,6]
l1 ++ l2: [1,2,3,4,5,6]
l1  mappend  l2: [1,2,3,4,5,6]
Wrapped with default instance:
l1  mappend  l2: [1,2,3,4,5,6]
Same with reversed monoid instance:
l1  mappend  l2: [4,5,6,1,2,3]
Indeed it works. Unfortunately, this approach is not sufficient for all cases. It is perfectly valid to have a function with signature (Monoid a => Maybe a -> Maybe a), whose behavior depends on the instance of a, even when being passed Nothing and returning Nothing. Such a function woul<monoid a="a">d have a problem here, because the dictionary would not be passed to the function.
</monoid> I wonder if it would be possible to extend the Haskell language somehow to be able to properly pass an alternative dictionary to such functions. But given that not all compilers use dictionary passing, my hopes are low.

20 April 2010

Biella Coleman: On Internet Punditry and Engendering Change

One day a very well known Internet theorist writes a rant on women. The rant generates controversy, controversy lands theorist on WYNC on the media , despite the fact the he does not really work on the politics of gender. If this is so, why then give him more air time and focus on the NPR show? There are three lessons that precipitate from this social fact that are worth highlighting: 1.The fact that NPR chose him to pontificate and not a woman nullifies Shirky s thesis that behavior is one of the most important factors in keeping women behind, unless of course NPR asked a bunch of women but they were too meek to be on the air (not likely). If they wanted to keep the star power that is Shirky, the very least they could have done is had a woman respond. The solutions to get more women in the limelight are so easy to implement but they do require some thoughtfulness and foresight. 2.So what I am saying, it is about networks and Shirky, isn t he a theorist of networks and behavior? It seems to be to more controversial, he really did not address how important networks are for the politics of visibility, instead he focused on individual behavior. If famous highly networked folks, most of them men, don t highlight women in their blog posts, their twitter feeds, and don t invite them to conferences, it is going to make very little difffernce whether a woman is meek or confident. So if there are more guys that are visible, which is certainly the case, it is as much their job to help engender change, not so much by pontificating but acting. 3. I realized that though I first thought his rant was a reflection of his personality (at least his public persona, I am sure he is a nice guy), in fact the rant is valuable to an anthropologist interested in digital media because it is an auto-ethnographic snapshot of web 2.0 punditry culture. It often comes across as smarmy and snarky, which is due in part, to how difficult it is to get your message heard in the sea of many voices. Just like there is an aesthetic of audaciousness in a lot of Internet memeology, for example, the pundits too must often act in extreme ways to get attention which might inf fact be one of the reasons why they are reluctant to share the stage once they have worked hard to get there.

Biella Coleman: On Internet Punditry and Engendering Change

One day a very well known Internet theorist writes a rant on women. The rant generates controversy, controversy lands theorist on WYNC on the media , despite the fact the he does not really work on the politics of gender. If this is so, why then give him more air time and focus on the NPR show? There are three lessons that precipitate from this social fact that are worth highlighting: 1.The fact that NPR chose him to pontificate and not a woman nullifies Shirky s thesis that behavior is one of the most important factors in keeping women behind, unless of course NPR asked a bunch of women but they were too meek to be on the air (not likely). If they wanted to keep the star power that is Shirky, the very least they could have done is had a woman respond. The solutions to get more women in the limelight are so easy to implement but they do require some thoughtfulness and foresight. 2.So what I am saying, it is about networks and Shirky, isn t he a theorist of networks and behavior? It seems to be to more controversial, he really did not address how important networks are for the politics of visibility, instead he focused on individual behavior. If famous highly networked folks, most of them men, don t highlight women in their blog posts, their twitter feeds, and don t invite them to conferences, it is going to make very little difffernce whether a woman is meek or confident. So if there are more guys that are visible, which is certainly the case, it is as much their job to help engender change, not so much by pontificating but acting. 3. I realized that though I first thought his rant was a reflection of his personality (at least his public persona, I am sure he is a nice guy), in fact the rant is valuable to an anthropologist interested in digital media because it is an auto-ethnographic snapshot of web 2.0 punditry culture. It often comes across as smarmy and snarky, which is due in part, to how difficult it is to get your message heard in the sea of many voices. Just like there is an aesthetic of audaciousness in a lot of Internet memeology, for example, the pundits too must often act in extreme ways to get attention which might inf fact be one of the reasons why they are reluctant to share the stage once they have worked hard to get there.

John Goerzen: Moral obligations of Free Software authors?

I ve got a bit of a problem. I enjoy writing software. I often write software to solve some sort of problem that I ve had. Usually virtually any code I write winds up in my git repositories, on the theory that it might be useful to someone else. Some of the code that I think might really be useful to people gets even better treatment. OfflineIMAP, for instance, has a very comprehensive manpage, heavily commented example config file, wiki, mailing list, public bug tracker, etc. Most of these I did the majority of the work to create, but OfflineIMAP does occasionally receive code and documentation contributions from others. Now here s my dilemma. For my purposes, OfflineIMAP is, well, finished. It does everything I ever wanted it to do, and does it better than I ever expected it would. There are some people that would like it to do other things; for instance, optimize performance for IMAP folders with 100,000 messages in them, do UTF-8 folder name translation, and retry a sync if a connection is lost rather than crash (OfflineIMAP was designed to crash gracefully and be automated, so this has never bothered me.) None of these are features that I care about, and I don t have much time to devote to OfflineIMAP these days. It is not an interesting problem to me anymore as, well, I ve solved it already. Yet I ll be honest and say I feel guilty about the bug reports that are stacking up in the OfflineIMAP bug tracking system. OfflineIMAP is used by people that have an expectation for improvement. My efforts to hand over maintainership of OfflineIMAP have failed (the people have gone AWOL shortly after agreeing to maintain it). This problem is even more acute for hpodder, my command-line podcatcher. hpodder works great and is simple. But I no longer listen to podcasts. At all. (I blame my Kindle for that.) Therefore I no longer even use hpodder. Again, I feel guilty for not working on it; for instance, when language changes broke its UTF-8 support, I haven t gone in to fix it. Neither has anybody else, for that matter. This leads me to a dilemma. If I do nothing with my code but toss it on git.complete.org, few people will benefit from it. Most people need documentation, packages for their distribution, etc. git repos don t tend to show up highly in search engines. So, although technically I ve shared things with the world by putting them there, practically speaking I haven t done people many favors. On the other hand, if I go the whole responsible maintainer route, writing documentation, wiki, mailing list, Debian packages, etc., then I have the problem of, well, actual users who want actual support. I feel bad if I m not in a position to give it to them. Many people seem to have the expectation that software is never finished and will continue to be improved. (Ah, if only my name were Knuth I might stand a chance to evade that one. But only a chance, given all the TeX spinoffs.) This expectation, in turn, reduces my enthusiasm for publishing my code online as Free Software. Because now I can t just toss it up there and say help yourselves . Now I get angry emails about all the bug reports piling up. On the other hand, I also get occasional small contributions via my PayPal tip jar , which are awesome and motivating. Despite my grumbling, I do continue to maintain OfflineIMAP, primarily as a patch reviewer these days. I take an aggressive stance on quality, and when I get patches that add features without documentation, I usually write documentation for them before committing them. If I have evidence that a patch hurts quality, I yank it (as I had to do with IDLE support, which was a great feature, but the patch caused all sorts of stability problems due to its requirement of imaplib2.py). For that reason, I suspect, forks haven t taken off. So what s a person that writes niche software to do? OfflineIMAP isn t at the level of popularity of something like Gnome, or even debhelper, and never will be; its userbase consists of people that think that IMAP support in $MUA isn t good enough. hpodder is the somewhat small domain of console-loving podcast listeners. What are your suggestions? Should I abolish the bug trackers and just go for simple? Is there something more I could be doing to make the community feel more empowered? Is simple posting on git.complete.org not as bad as I thought?

19 April 2010

Petter Reinholdtsen: Great book: "Content: Selected Essays on Technology, Creativity, Copyright, and the Future of the Future"

The last few weeks i have had the pleasure of reading a thought-provoking collection of essays by Cory Doctorow, on topics touching copyright, virtual worlds, the future of man when the conscience mind can be duplicated into a computer and many more. The book titled "Content: Selected Essays on Technology, Creativity, Copyright, and the Future of the Future" is available with few restrictions on the web, for example from his own site. I read the epub-version from feedbooks using fbreader and my N810. I strongly recommend this book.

Russell Coker: Creating a Micro Conference

The TEDxVolcano The TED conference franchise has been extended to TEDxVolcano [1], this is a small conference that features people who are stranded by the Eyjafjallaj kull volcano in Iceland. As usual TED is an inspiration to us all, so there is obvious potential for other conferences to be organised in similar situations there s no reason why a free software conference can t be organised in Europe right now! What You Need to run a Conference If a conference will have limited attendance (EG due to a volcano preventing anyone from flying to the area) then filming everything is very important. I ve seen adverts for digital cameras that support Full HD resolution (1920*1080) for as little as $AU400. $AU600 will get you a digital camcorder that does Full HD which will offer some benefits for recording long movies (such as the ability to store the video on an external hard drive). If I was stuck in a foreign hotel with not much to do then I would be prepared to buy a digital camera or camcorder for the purpose of running such a conference (my current digital camera is 5.1MP and only has 3* optical zoom, it s a nice camera but I could do with something better. A tripod can cost up to $100, but I recently bought myself a 15cm tall tripod for $10 that would do at a pinch. Once you have high quality video you can easily upload it to something like Blip.TV. Of course you get a better result if you do some post-production work to merge images of the slides for the lecture into the video, but that is a lot of work and probably requires a camera that outputs uncompressed video for best results. The next issue is getting a venue. Different hotels cater for different parts of the market, some cater to tourists, some to business travel, some to conferences. If you want a venue at short notice you may be able to get a good deal if you find a hotel that is adversely affected, for example I m sure that there are some quite empty conference hotels in Europe right now but the tourist hotels are probably reasonably busy (why not do some tourism if you are stuck). I expect that hotels really don t want to have empty conference rooms and are prepared to offer good deals for bookings at short notice. Of course you would want to try to ensure that hotel rooms aren t too expensive in that hotel as some delegates will want to stay in the hotel which hosts the conference. The minimal staffing for a micro conference is probably two people, one for taking payment, directing people, etc, and the other to film the lectures and moderate panel discussions. Rumor has it that attending without paying is a problem at conferences, for conferences that are planned in advance corporations will try and send multiple employees on the one ticket and have them share a name-tag one issue with this is that there is a fixed quantity of food supplied and if extra people appear then everyone who paid gets less, another is that people who pay really hate to see freeloaders. The best reference I ve found for people not paying at conferences is Jon Oxer s description of how Leslie Cachia of Letac Drafting Services brazenly stole a book from him [2]. Name-tags are needed for any meeting with more than about 15 people. I m not sure how to get proper name-tags (ones that pin on to clothing and have printed names maybe the bigger hotels can add this to the conference package). But a roll of sticky labels from an office supply store is pretty cheap. Costs in Wellington Along with a few other people I considered running a small security conference immediately before or after LCA 2010, that ended up not happening but I will consider doing it in future. When considering that the general plan was to get a hotel to provide a meeting room for 10-30 people (we had no real idea of the demand). When investigating the possibilities for running a conference in Wellington I discovered that the hotel fees for a conference room can either be based on paying a fixed fee for the room plus additional expenses for each item or you can pay a fixed rate per person. It seemed that there was the potential to save a small amount of money by paying the fixed fees and avoiding some payments for things like tea/coffee service. But the amount that could be saved would be small and it would incur extra effort in managing it saving $5 per person is a good thing if you have 600 delegates, but if you have 30 then it s probably a waste of time. So it seemed best to go for one of the packages, you tell the hotel what time you want the lunch and snack breaks and how you want the tables arranged and they just do everything. The cost for this seemed to be in the range of $nz35 to $nz55 per delegate per day. There is some flexibility in room arrangement, so a room that seats 12 people in the board-room layout (tables in a rectangle facing the center) would fit 25 in the classroom layout (tables all facing the front) or 50 in the theater layout (chairs facing the front with no tables). So the hotel could accommodate changes in the size at relatively short notice (whatever their notice period for buying the food). The cost for a catered conference dinner seemed to be about $nz45 per diner. In many cases it would be possible to get a meal that is either cheaper, better, or both by going somewhere else, but that wastes time and effort. So that gave an overall conference cost of about $nz135 for a two day conference with a dinner at the end of the first day. Given that the cheapest budget rate from Wotif.com for a 3 star hotel in Wellington is currently $nz85 per night it seems that $nz135 for a two day conference including dinner is pretty cheap as the minimum accommodation cost would be $nz170. Also note that the hotels which I considered for hosting the conference had rates for their hotel rooms that were significantly greater than $nz85 per night. The hotels all offer other services such as catered cocktail parties , these would be good things for any company that wants to sponsor the conference. Different cities can have vastly different prices for hotels. But I expect that the way conference rooms are booked and managed is similar world-wide and the ratio of conference costs to hotel booking fees to also be similar. Most of the hotels that cater to conferences seem to be owned by multi-national corporations. It would probably make sense to charge delegates an extra $10 or $15 above the cost of running the conference to cover unexpected expenses. Of course it s difficult to balance wanting to charge a low rate to attract more people with wanting to avoid the risk of a financial loss. Conclusion The hard part is getting speakers. If you can get speakers and panel participants who can fill the time slots and have interesting things to say then all the other parts of organising a micro conference should be relatively easy. When the cost is less than $150 per delegate then a syndicate of a few people can easily agree to split the loss if the number of delegates turns out to be smaller than expected, a potential loss of $2000 shared among a few people shouldn t be a huge problem. Also if the conference is booked at short notice (EG because of a volcano) then the hotel shouldn t require any deposit for anything other than the food which is specially ordered (IE not the tea, coffee, etc) that limits the potential loss to something well under $100 per delegate who doesn t attend. Anyone who has enough dedication to a topic to consider running a conference should be prepared to risk a small financial loss. But based on my past observations of the generosity of conference delegates I m sure that if at the conference closing the organiser said unfortunately this conference cost more than the money you paid me, could you please put something in this hat on the way out then the response would be quite positive. Note that I am strictly considering non-profit conferences. If you want to make money by running a conference then most things are different.

18 April 2010

Eugene V. Lyubimkin: dealing with unwanted recommends using cupt

Some people use '--without-recommends' switch and the problem is gone. I think that's overkill.

This post will tell how (would I recommend) to deal with unwanted recommends. The following text tells about cupt package manager, and though ideas are applicable to any package managers, the techniques may differ.


Stage 1. Facing problems

Suppose we want to install the package kde-minimal:

-8<-
$ sudo cupt install kde-minimal
[sudo] password for jackyf:
Building the package cache... [done]
Initializing package resolver and worker... [done]
Scheduling requested actions... [done]
Resolving possible unmet dependencies...
The following 16 packages will be INSTALLED:

dolphin kappfinder kde-minimal kdebase-apps kdebase-bin kdebase-data kdepasswd
kfind kinfocenter konqueror konqueror-nsplugins kwrite libkonq5
libkonq5-templates libkonqsidebarplugin4 plasma-widget-folderview

The following 1 packages will be UPGRADED:

konsole

Need to get 6024KiB/6024KiB of archives. After unpacking 14.9MiB will be used.
Do you want to continue? [y/N/q]
->8-

Umm, kinfocenter? No, we don't want it to be installed.

Stage 2. Searching for a reason

Now we will use the 'reason tracking' feature of libcupt's resolver. Let's add '-s' switch (simulating) and '-D' switch (tracking reasons):

-8<-
$ cupt -s install kde-minimal -D
Building the package cache... [done]
Initializing package resolver and worker... [done]
Scheduling requested actions... [done]
Resolving possible unmet dependencies...
The following 16 packages will be INSTALLED:

dolphin
reason: kdebase-apps 4:4.3.4-1 depends on 'dolphin (>= 4:4.3.4-1)'

kappfinder
reason: kdebase-apps 4:4.3.4-1 depends on 'kappfinder (>= 4:4.3.4-1)'

kde-minimal
reason: user request

kdebase-apps
reason: kde-minimal 5:55 depends on 'kdebase-apps (>= 4:4.3.1)'

kdebase-bin
reason: kdebase-apps 4:4.3.4-1 depends on 'kdebase-bin (>= 4:4.3.4-1)'

kdebase-data
reason: kappfinder 4:4.3.4-1 depends on 'kdebase-data (= 4:4.3.4-1)'

kdepasswd
reason: kdebase-apps 4:4.3.4-1 depends on 'kdepasswd (>= 4:4.3.4-1)'

kfind
reason: kdebase-apps 4:4.3.4-1 depends on 'kfind (>= 4:4.3.4-1)'

kinfocenter
reason: kdebase-apps 4:4.3.4-1 recommends 'kinfocenter (>= 4:4.3.4-1)'

konqueror
reason: kdebase-apps 4:4.3.4-1 depends on 'konqueror (>= 4:4.3.4-1)'

konqueror-nsplugins
reason: kdebase-apps 4:4.3.4-1 recommends 'konqueror-nsplugins (>= 4:4.3.4-1)'

kwrite
reason: kdebase-apps 4:4.3.4-1 depends on 'kwrite (>= 4:4.3.4-1)'

libkonq5
reason: kdebase-apps 4:4.3.4-1 depends on 'libkonq5 (>= 4:4.3.4-1)'

libkonq5-templates
reason: libkonq5 4:4.3.4-1 depends on 'libkonq5-templates kdesktop'

libkonqsidebarplugin4
reason: konqueror 4:4.3.4-1 depends on 'libkonqsidebarplugin4 (>= 4:4.3.4)'

plasma-widget-folderview
reason: kdebase-apps 4:4.3.4-1 depends on 'plasma-widget-folderview (>= 4:4.3.4-1)'


The following 1 packages will be UPGRADED:

konsole
reason: synchronized with package 'kdebase-apps'


Need to get 6024KiB/6024KiB of archives. After unpacking 14.9MiB will be used.
Do you want to continue? [y/N/q]
->8-

Now, the output is much bigger. Every package has reason(s) to change its state appended. Let's look at the chain: kinfocenter is installed, because... kdebase-apps is to install. Ok, look further, kdebase-apps is to install because... of kde-minimal. The final chain is 'kde-minimal -> kdebase-apps -> kinfocenter'.

Stage 2.5. Analyzing reason

After determining a full chain one may try to think - is this dependency chain looks OK? Maybe, some Depends/Recommends should be turned up to a less strict dependencies? If that so, it's a good idea to fire a command 'reportbug <package>' to report an unwanted dependency.

In this example, the dependency chain looks OK (at least, to me :)).

Stage 3. Installing a package without unwanted dependency(ies)

The resolution of the problem depends on the answer to the question "Why I don't want this package to be installed?"

Case 1. Only this time/package

If the answer is, say, "Because dependency 'kdebase-apps -> kinfocenter' doesn't make sense on this system", then you do:

-8<-
$ sudo cupt install kde-minimal kinfocenter-
[sudo] password for jackyf:
Building the package cache... [done]
Initializing package resolver and worker... [done]
Scheduling requested actions... [done]
Resolving possible unmet dependencies...
The following 15 packages will be INSTALLED:

dolphin kappfinder kde-minimal kdebase-apps kdebase-bin kdebase-data kdepasswd kfind konqueror konqueror-nsplugins kwrite libkonq5 libkonq5-templates libkonqsidebarplugin4 plasma-widget-folderview

The following 1 packages will be UPGRADED:

konsole

Need to get 5463KiB/5463KiB of archives. After unpacking 13.2MiB will be used.
Do you want to continue? [y/N/q]
->8-

And that's all, kinfocenter won't be installed.

Consequences:

1. This answer implies that you are not against installing kinfocenter if some other package needs it. So, while installing other packages which recommend kinfocenter cupt will suggest you to install kinfocenter again.

2. If you will want to upgrade the package, and the new version contains the same relation, cupt will not suggest to install kinfocenter.

Case 2. Forever

If the answer is "Because I don't want to see kinfocenter in my system ever", then the good choice is APT pinning system.

Place the next three lines into your APT preferences file (usually, /etc/apt/preferences or any file in /etc/apt/preferences.d directory):

-8<-
Package: kinfocenter
Pin: version *
Pin-Priority: -10000
->8-

-10000 is a very low priority, usual priorities are (0 - 1000), so cupt will not ever suggest you to install kinfocenter because of soft (Recommends or Suggests) dependencies. Moreover, if in some actions cupt will need to choose between, say 'kde-virtual kde-virtual-alternate', where kde-virtual depends on kinfocenter and kde-virtual-alternate does not, then cupt will choose kde-virtual-alternate. The exceptions possible in (very unlikely to happen) cases, when non-installing kinfocenter will result in very bad solution for selected actions. The less priority kinfocenter has, the less chances it has to be installed when not requested explicitly (as in 'cupt install kinfocenter').

Steve Kemp: Different cultures call us by different names

This past week has had a couple of minor software releases:
chronicle
I made a new release which improves support for foreign language; so dates can be internationalised, etc. The online demos now include one in with French month names.
slaughter
The perl-based sysadmin tool had a minor update earlier today, after it was pointed out that I didn't correctly cope with file content checks. I'm still pretty pleased with the way this works out, even if it is intentionally simple.
milli
This is a simple bug-record-thingy which I was playing with recently, and I've now started using to record bugs in other projects. I'll pretend its a fancy distributed-bug-tracker, but actually it isn't. It's nothing more than a bunch of text-files associated with a project, which have sufficiently random names that collisions are unlikely and which thus becomes semi-distributed-friendly.
Today I'll be learning to love Javascript a little more. I want to use the gallerific image gallery - but it doesn't make thumbnails automatically - which galleria does. I need to either come up with my own which looks like galleriffic, or port the thumbnail bits over. (I'm currently using a slightly modified version of gallerifific for my people-shots.) ObFilm: Hancock

15 April 2010

MJ Ray: Debian Project Leader Election Campaign Round-up

I ve been AWOL for most of the debian project leader election campaigns this year, but I still want to vote, so I ve been dredging the emails on the last day. Maybe someone still has to vote and reads this, or maybe it ll help someone to interpret the result. What I ve done this year is to make a quick tally of platform points and campaign answers that I liked and disliked for each candidate, then total them up to get an order. If anyone gets a negative (more dislikes than likes), then I ll rank them below NOTA. Platforms: Margarita Manterola, Stefano Zacchiroli, Wouter Verhelst, Charles Plessy. Some of the questions: Make of that what you will. It surprised me which way the scores came out, but there was one answer with such a massive problem (in my opinion) that I ranked its giver equal with the next candidate down anyway. If you re a debian developer (DD), have you voted yet?

13 April 2010

Guido G?nther: Simple git data provider for Zeitgeist

gnome-activity-journal recently entered Debian and it could become a great tool to keep track of hacking activities. The underlying zeitgeist can log these and other events and make the information available via DBus. I couldn't find a data provider that feeds the information about Git commits to it so I wrote a simple post commit hook. This way one can easily see when one worked on a source repository: gnome-activity-journal Now is there a nice way to store additional information like current branch or commit message along with that?

12 April 2010

Ingo Juergensmann: Syncing N97 with DAViCal

A few days ago I blogged about my problems syncing my N97 with iCal, Sunbird and other calendar apps. Today I tried DAViCal instead of Apples calendarserver (caldavd). To my surprise it worked fairly well, although not flawlessly. To make it short: I can now sync between my N97 smartphone via Bluetooth and iCal on OS X and Sunbird (tested on OS X as well): creating appointments on the N97, syncing via iSync and having the appointment exported to DAViCal via iCal works pretty well. Deleting dates works well in iCal as well. It has some problems as mentioned before on N97, though. But when you delete the date in iCal, it will vanish on the N97 as well.



It was somewhat tricky to get it that far. The problem is, that iSync can only sync to a local calendar in iCal. But with DAViCal you can publish/export that local calendar to the server where it is display a another calendar principal. That why syncing with the N97 works pretty well, although you might end up with double entry in iCal. I unchecked the N97 prinicipal/calendar from the server in iCal, as you can see in the screenshot above.

I haven't been able to test calendar sycing on Debian yet, but I believe that there will be some app that will work. And there are still problems. For example I have an appointment in July and August that are displayed in iCal and Sunbird, but not on the N97. Maybe there are some attributes to those dates that prevent them from being imported into the N97. Dunno.
But so far this is the best syncing solution so far. I'll test how well this works out for me...

Next.

Previous.