Search Results: "nate"

22 July 2008

Michal Čihař: Phone synchronisation, finally

One of long standing things on my todo list was to make synchronisation work from my cell phone (Sony-Ericsson K750i) to some PIM application on Linux side (as a GNOME user Evolution is the natural choice). I tried it several times but it never actually worked. Today I gave it yet another try and I finally succeeded on first attempt :-). As a first step I just wanted to make a backup of all things. Gammu can do it quite well and it's the tool I trust for this purpose:
gammu backup /tmp/phonebook.vcf
gammu backup /tmp/calendar.vcs
Now it's time to play with OpenSync. We will use setup guide and SyncML guide as a starting point. As I had in past problems with both sides - both phone and Evolution failed with some random errors, I wanted to go step by step. So I started with setting up phone to files synchronisation:
msynctool --addgroup file2phone
msynctool --addmember file2phone file-sync
msynctool --addmember file2phone syncml-obex-client
Now we need to configure file storage, just tell it where it should store the data:
msynctool --configure file2phone 1
And change path in your editor to something like:
<?xml version="1.0"?>
<config>
  <!-- directory path for file-sync -->
  <path>/home/foo/phone-backup/</path>
  <!-- should care of subdirectories (TRUE or FALSE) -->
  <recursive>FALSE</recursive>
</config>
Now the more tricky part comes, we need to set up phone end:
msynctool --configure file2phone 2
Fortunately we can use example from the SyncML guide and just fill in Bluetooth address (you can get it using hcitool scan) and channel (sdptool browse 00:b0:0b:fa:ce:00):
<?xml version="1.0"?>
<config>
  <bluetooth_address>00:b0:0b:fa:ce:00</bluetooth_address>
  <bluetooth_channel>7</bluetooth_channel>
  <identifier>Sony Ericss</identifier>
  <version>1</version>
  <wbxml>1</wbxml>
  <username></username>
  <password></password>
  <type>2</type>
  <usestringtable>0</usestringtable>
  <onlyreplace>0</onlyreplace>
  <onlyLocaltime>0</onlyLocaltime>
  <recvLimit>0</recvLimit>
  <maxObjSize>0</maxObjSize>
  <contact_db>Contacts</contact_db>
  <calendar_db>Agenda</calendar_db>
  <note_db>Notes</note_db>
</config>
And now we should be able to synchronise whole phonebook from phone to selected directory:
msynctool --sync file2phone
Okay, this works, let's try more complicated thing - include Evolution in the chain. The steps are the same, config file for phone is the same, Evolution plugin has sane defaults you usually don't have to touch:
msynctool --addgroup phone2evo
msynctool --addmember phone2evo evo2-sync
msynctool --addmember phone2evo syncml-obex-client
msynctool --configure phone2evo 1
msynctool --configure phone2evo 2
But now comes the tricky thing - Sony-Ericsson phones usually have something broken around notes (or it is broken in OpenSync, I don't care, simply synchronisation fails without this step) and we have to avoid synchronisation of them. This can be done by changing filter file in group we've created above (usually in file ~/.opensync-0.22/group2/filter.conf):
<?xml version="1.0"?>
<filter>
  <note/>
</filter>
And finally we can start the synchronisation and it should work:
msynctool --sync phone2evo
You can also GUI multisync0.90 to do the configuration and start synchronisation, but it is not much different, you also still have to edit XML files.

21 July 2008

Nico Golde: pwnie award nominations published


Finally the pwnie award nominations are out, a bit late though.

Of course we also got our nomination for the infamous openssl issue in the Most Epic FAIL category as well as one nomination for Luciano for the discovery of this in the Mass0wnage section :/

I nominated Wonderware (I wrote about that before) in the Lamest vendor response category, looks like it has been accepted.

wordpress also got its place in the Mass0wnage category:
An unbelievable number of WordPress vulnerabilities (CVE-2008-*)

Discovered by: everybody who cared to look

It seems like hardly a week goes by without a new vulnerability in WordPress or one of its many plugins. Many of them are actively being exploited to own popular WordPress blogs and use them to serve spam or client-side exploits to unsuspecting visitors. The popularity of WordPress combined with the abysmal security practices of WordPress plugin developers places the entire Internet at risk and is worty of a nomination.

138 reported vulnerabilities since 2004 referring to MITRE, shocking!

Matthew Garrett: The fallacy of the completely inclusive community

Emma Jane Hogbin gave a presentation on the gender gap in free software at Lugradio Live this weekend. One of the central messages was that a great deal of how to avoid putting women off computing can be distilled down to "Don't be a dick". This ties in well with Mako's restatement of the Ubuntu code of conduct as "Be excellent to each other" (a wonderful phrasing which demonstrates that Bill and Ted's Excellent Adventure is the most philosophically worthwhile film that Keanu Reeves has ever appeared in, and certainly not The fucking Matrix) and led to my 5 minute rant on why I hate the Linux community slightly later in the day, but does leave a certain problem. What standards are used to define whether given behaviour is dickish or not? The comments here show that there's disagreement even within a single sub-community of the larger free software world. Ben suggests that the reaction to perceived inappropriate behaviour is perhaps even more discouraging than the original behaviour, suggesting that bitching about things that offend you is dickish behaviour in and of itself. How do we decide whether someone is being a dick or helping the community? Is lack of tolerance a form of exclusionary behaviour?

This topic is actually one of the issues discussed in the Geek Social Fallacies, but here's a nice easy example. Would tolerating planet posts encouraging the eradication of the Jewish population be inclusive or exclusive? I suspect that most people would agree that it wouldn't be acceptable behaviour, which leads us to the next question. Why? There's two obvious arguments here. The first is that at a community level we have some form of rough moral consensus that advocating genocide is Just Wrong, and so criticising Nazis is obviously the right thing to do. The second argument is more pragmatic than philosophical - alienating millions of people in order to avoid alienating hate groups could be considered to reduce our potential contributor base in an unfortunate way.

I'm a fan of the second argument. The example I gave is emotive and relatively recent history has resulted in people tending to be pretty uniform in considering genocide to be a bad thing, but many other cases aren't clear cut. What I consider to be objectification of women is seen by others as appreciation of natural beauty. What I think of as sexist jokes are perceived by others as acceptable humour. When I advocate intolerance of certain behaviour, people are going to see me not having enough tolerance. So we end up in a situation where people make the "We should all just get along and be tolerant of each other" argument, which sounds fine but is fundamentally flawed in one significant way.

Advocating tolerance excludes the intolerant.

The reason people fail to see this is that it doesn't sound like a flaw. If you ask people whether we need to support intolerance, the immediate answer is probably no. But by advocating exclusion of intolerance, you're excluding all those who have good reasons to be intolerant. You're excluding the women who don't want to feel that the community sees them as a pair of breasts attached to some legs. You're excluding the ethnic groups who would prefer to avoid racist slurs or ethnic stereotyping. Telling anti-fascism protestors that they're being intolerant isn't likely to endear you to them. Advocating tolerance is telling the intolerant that they're wrong and should just deal with whatever it is that makes them unhappy.

So, ironically, tolerating certain types of intolerance is probably required in order to avoid alienating many potential contributors. That means some way of deciding what kinds of behaviour are acceptable and which are unacceptable. In the absence of either pre-existing community consensus or some philosophical breakthrough that allows unambiguous determination of the "rightness" of a given action, I'm going to suggest that we look at it from a pragmatic viewpoint. How many potential contributors do we discourage by criticising a certain type of behaviour? How many do we discourage by tolerating it?

The fallacy of the completely inclusive community is the idea that it includes everyone. The reality is that a certain level of social exclusion is required in order to include a wider range of people. So don't criticise people purely for criticising someone else's behaviour - make an argument for why that behaviour benefits the community. And when you see behaviour that you think discourages others, call people on it. Even if nobody's behaviour changes as a result, you're sending a signal that not everyone in the community agrees. Sometimes all people want is to know that there'll be some people on their side.

But, above all, try not to be a dick.

20 July 2008

Russell Coker: Review of the EeePC 701

I have just bought a EeePC 701 [1], I chose the old model because it’s significantly smaller than the 90x series and a bit lighter too and it had Linux pre-loaded. Also it was going cheap, while I am not paying for it I give the same attention to saving my clients’ money as to saving my own. I ruled out everything that was heavier or larger than an EeePC 901 and everything that cost more than $700. That left only the Linux version of the EeePC 901 (which I couldn’t find on sale) and the EeePC 701 as my options. I also excluded the EeePC 900 because it is bigger and heavier than the 701 but has the same CPU (and therefore can’t run Xen). In terms of it’s prime purpose (a SSH client) 96*22 characters is the size of a konsole screen with the default (medium) font size when the window is maximised, that is 5% more characters than the standard terminal size of 80*25 but the smaller number of lines is a problem. When using the small font I can get 129*29 which I find quite comfortable to read (it would be impossible for me to read withut glasses - which means having almost average vision for someone in their 30’s). Then I can get 129*31 if I dismiss the tool bar at the bottom of the screen and could probably get another couple of rows if I removed the tabs that Konsole uses to switch between sessions. That would only be viable if using screen extensively as a single session without the ability to switch between programs is not particularly useful (I don’t think that ALT-TAB is adequate for switching between terminal sessions). When running Debian I can get 130*32 with the same font due to smaller window controls, but I’ll write more about converting to Debian in another post. Note that while the OS that ships with the Linux based EeePC machines is based on Debian, it is heavily customised and has some notable differences from a typical Debian install. It has some proprietary software, and uses unionfs for the root and /home filesystems. The first issue is that Console (the KDE terminal program) can only be accessed from the file manager (via the tools menu or ^t), the machine clearly doesn’t have defaults for someone like me. In principle it’s a multi-user system that can be fully customised, but in practice it’s configured as a single-user machine. Once you have a Console window open you can run “su -” and the root password is the password for the “user” account. I wonder whether I could get more than 42 rows or more than 140 columns of text that is readable. If so then I could have two console windows fully displayed on screen. The screen is bright and clear, this is essential as the number of pixels per character is going to be low for any reasonable amount of text to be displayed on screen. The password that you set when you first use the machine also works for “su -” (in fact that is the only real use as I expect that almost everyone will choose the automatic login option). The display comprises a significant portion of the weight, if the screen is fully open (about 150 degrees) then it will tip over. Even when the screen is not as far open it will tip due to bumps if resting on your lap on a tram. It’s a pity that the screen is connected at the very back of the base, if the attachment point was a bit closer then it would balance better and also be easy to hold with one hand. The depth of the machine combined with the angle at the back makes it impossible for me to get a good one-handed grip from the base, so typing while standing on a moving tram or bus will be extremely difficult (unlike my iPaQ which I can use at full speed on any form of public transport). Inidentally it would be good if there was an attachment point for a wrist-strap, every camera and most mobile phones have them so it would be good to have the same safety feature in a laptop to facilitate use on public transport. Another reason for not using it as a PDA is the fact that it takes about 7 seconds to resume after hibernating (when the lid is closed). The PSU is almost as small as that of a mobile phone! This is a major benefit as in the past I have often stored a Thinkpad PSU at a client site for 9-5 jobs as it is heavy enough that I didn’t want to carry it on public transport. The EeePC PSU is light enough that it won’t be unpleasant to carry, and small enough to fit easily into a jacket pocket. The OS installation is very well done for the basics. It’s easy to launch applications and there is a good selection of educational programs (including the periodic table, planetarium, typing, letters, and hangman, drawing, and a link to www.skoool.com). It’s a pity that they organised the folders according to the area rather than the age, but generally the OS is very well done. Most of the reviews focus on the speed of the CPU, the RAM expansion options, etc, but miss the fact that it is a really nice machine for using as-is. It is a much better machine for teaching children than any of the machines I’ve seen which are sold specifically for children (see my previous post about an awful computer for kids [2]). I believe that you could give an EeePC to any 3yo and have them doing something useful in a matter of minutes! The ability to freely install new software should not be overlooked when considering a computer for children to use. Someone who buys one now could use it for a few years as an ssh client and then reinstall the original OS and give it to a child as an educational toy. It has a program to create OGG video files from it’s built-in camera and mic, at this moment it’s the only device I own that can create OGG files (this is a good thing). OGG compression takes a really long time, the Atom CPU in the 901 and 1000x series would be good for this. It’s a pity that the microphone is directly below the mouse buttons, it clearly records the mouse click used to finish recording. The version of mplayer which is installed to play OGG files can also play FLV files downloaded from youtube with youtube-dl (althrough the file association is not set). When I tried to play a MP4 file from ted.com it only gave audio (the video works on a full Debian/Etch installation). There is a full set of office software, OpenOffice.org, Thunderbird email client, and all the other stuff you might expect. I find that the biggest problem for using it is the size of the keyboard, I don’t think I’ll ever be able to touch-type properly on it. Not only are the keys small but the positions of non-alphabetical keys are slightly different from most keyboards. Another problem is that the space-bar needs to be pressed near the centre, I usually like to press near the end but that doesn’t work. Those issues are all trade-offs of the small size. My T series Thinkpad is reasonably portable and has a great keyboard so I have the serious typing while travelling angle covered. One real mistake in the keyboard design is the lack of a LED to indicate whether caps-lock is enabled (there are four status LEDs, adding number five couldn’t be that expensive), this is a real problem when using the vi editor (which uses letters as editor commands and is case-sensitive). It will also occasionally cause problems when entering passwords. There is a caps-lock indicator on screen, but that is in the toolbar at the bottom of the scren (which I like to dismiss to gain an extra two lines of text). It would be good if I could display the status of the caps and num lock keys in the right side of the title-bar of the active window (the only bit of unused space on the screen). The cooling fan makes an annoying buzz. It’s significantly louder than Thinkpads which dissipate a lot more heat. The other problems are all software, which is OK as I plan to reinstall it. Firstly it is using Debian and shipped with the broken openssl library. There is a GUI for installing upgrades, but it recommends rebooting after installing each one! Naturally I didn’t choose to reboot, I installed the security update #1. Then I clicked on the button to install a BIOS update. It told me that it had to reboot to apply the update and gave only one button (OK), I tried closing the window but it rebooted anyway (fortunately the vi swap file allowed me to recover this post - which I am entirely writing on the EeePC). Aftere booting up again I discovered that the libssl bug still wasn’t fixed and that there was a second udate to apply! Why can’t they have a “apply all updates” button and also have it not automatically reboot? This must be the only Debian-based distribution that forces Windows-style reboots. But that said, while they made some mistakes in their software it generally provides a good user experience

Christian Perrier: D-I (and related stuff) l10n completion

Last news I gave for D-I and related stuff l10n completion was on June 15th. We're now one month later, so let's see what happened since then. D-I "level 1" (ie the core D-I) had several templates changes which bringed the translation ratio from 100% to 99% and below several times, for all languages. Several teams have still been able to cope with that. Other levels had no changes and I therefore spent some time nagging them to complete the missing bits here and there. The current status is: Changes are still planned for level 1: D-I developers are really active these days, particularly with the great "come back" of J r my Bobbio and the constant QA work by Frans Pop. I also tried to merge in some work done in Ubuntu's Rosetta and then interest those people who translate there to collaborate to D-I "upstream". This lead me to merge updates for Icelandic, Kazakh, Afrikaans, Malay, Welsh and Serbian. Contacts were made with the relevant translators: My conclusion about all this is mitigated: I'm somewhat sorry to see some work happening in Rosetta, still without any connection with "upstream" work, with people apparently working without even some internal coordination and quite anonymously. I wonder if these people know that their work has few chances to end up anywhere, except in Ubuntu (for D-I translation, I even doubt it ends up somewhere: this is just unused work....until I grab it for D-I "suptream").

17 July 2008

Russell Coker: Pollution and Servers

There is a lot of interest in making organisations “green” nowadays. One issue is how to make the IT industry green. People are talking about buying “offsets” for CO2 production, but the concern is that some of the offset schemes are fraudulent. Of course the best thing to do is to minimise the use of dirty power as much as possible. Of course the first thing to do is to pay for “green power” (if available) and if possible install solar PV systems on building roofs. While the roof space of a modern server room would only supply a small amount of the electricity needed (maybe less than needed to power the cooling) every little bit helps. The roof space of an office building can supply a significant portion of the electricity needs, two years ago Google started work on instralling Solar PV panels on the roof of the “Googleplex” [1] with the aim of supplying 30% of the building’s power needs. For desktop machines a significant amount of power can be saved if they are turned off overnight. For typical office work the desktop machines should be idle most of the time, so if the machine is turned off outside business hours then it will use something close to 45/168 of the power that it might otherwise use. Of course this requires that the OS support hibernation (which isn’t supported well enough in Linux for me to want to use it) or that applications can be easily stopped and restarted so that the system can be booted every morning. One particular corner case is that instant-messaging systems need to be server based with an architecture that supports storing messages on the server (as Jabber does [2]) rather than requiring that users stay connected (as IRC does). Of course there are a variety of programs to proxy the IRC protocol and using screen on a server to maintain a persistent IRC presence is popular among technical users (for a while I used that at a client site so that I could hibernate the PowerMac I had on my desktop when I left the office). It seems that most recent machines have BIOS support for booting at a pre-set time. This would allow the sys-admin to configure the desktop machines to boot at 8:00AM on every day that the office is open. That way most employees will arrive at work to find that their computer is already booted up and waiting for them. We have to keep in mind the fact that when comparing the minimum pay (about $13 per hour in Australia) with the typical electricity costs ($0.14 per KWh - which means that a desktop computer might use $0.14 of electricity per day) there is no chance of saving money if employee time is wasted. While companies are prepared to lose some money in the process of going green, they want to minimise that loss as much as possible. The LessWatts.org project dedicated to saving energy on Linux systems reports that Gigabit Ethernet uses about 2W more power than 100baseT on the same adapter [3]. It seems most likely that similar savings can be achieved from other operating systems and also from other network hardware. So I expect that using 100baseT speed would not only save about 2W at the desktop end, but it would also save about 2W at the switch in the server-room and maybe 1W in cooling as well. If you have a 1RU switch with 24 Gig-E ports then that could save 48W if the entire switch ran at 100baseT speed, compared to a modern 1RU server which might take a minimum of 200W that isn’t very significant. The choice of server is going to be quite critical to power use, it seems that all vendors are producing machines that consume less power (if only so that they can get more servers installed without adding more air-conditioning), so some effort in assessing power use before purchase could produce some good savings. When it comes time to decommission old servers it is a good idea to measure the power use and decommission the most power hungry ones first whenever convenient. I am not running any P4 systems 24*7 but have a bunch of P3 systems running as servers, this saves me about 40W per machine. It’s usually the case that the idle power is a significant portion of the maximum power use. In the small amount of testing I’ve done I’ve never been able to find a case where idle power was less than 50% of the maximum power - of course if I spun-down a large number of disks when idling this might not be the case. So if you can use one virtual server that’s mostly busy instead of a number of mostly idle servers then you can save significant amounts of power. Before I started using Xen I had quite a number of test and development machines and often left some running idle for weeks (if I was interrupted in the middle of a debugging session it might take some time to get back to it). Now if one of my Xen DomU’s doesn’t get used for a few weeks it uses little electricity that wouldn’t otherwise be used. It is also possible to suspend Xen DomU’s to disk when they are not being used, but I haven’t tried going that far. Xen has a reputation for preventing the use of power saving features in hardware. For a workstation this may be a problem, but for a server that is actually getting used most of the time it should not be an issue. KVM development is apparently making good progress, and KVM does not suffer from any such problems. Of course the down-side to KVM is that it requires an AMD64 (or Intel clone) system with hardware virtualisation, and such systems often aren’t the most energy efficient. A P3 system running Xen will use significantly less power than a Pentium-D running KVM - server consolidation on a P3 server really saves power! I am unsure of the energy benefits of thin-client computing. I suspect that thin clients can save some energy as the clients take ~30W instead of ~100W so even if a server for a dozen users takes 400W there will still be a net benefit. One of my clients does a lot of thin-client work so I’ll have to measure the electricity use of their systems. Disks take a significant amount of power. For a desktop system they can be hibernated at times (an office machine can be configured such that the disks can spin-down during a lunch break). This can save 7W per disk (the exact amount depends on the type of disk and the efficiency of the PSU - (see the Compaq SFF P3 results and the HP/Compaq Celeron 2.4GHz on my computer power use page [4]). Network booting of diskless workstations could save 7W for the disk (and also reduce the noise which makes the users happy) but would drive the need for Gigabit Ethernet which then wastes 4W per machine (2W at each end of the Ethernet cable). Recently I’ve been reading about the NetApp devices [5]. By all accounts the advanced features of the NetApp devices (which includes their algorithms for the use of NVRAM as write-back cache and the filesystem journaling which allows most writes to be full stripes of the RAID) allow them to deliver performance that is significantly greater than a basic RAID array with a typical filesystem. It seems to me that there is the possibility of using a small number of disks in a NetApp device to replace a larger number of disks that are directly connected to hosts. Therefore use of NetApp devices could save electricity. Tele-commuting has the potential to save significant amounts of energy in employee travel. A good instant-messaging system such as Jabber could assist tele-commuters (it seems that a Jabber server is required for saving energy in a modern corporate environment). Have I missed any ways that sys-admins can be involved in saving energy use in a corporation? Update: Albert pointed out that SSD (Solid State Disks) can save some power. They also reduce the noise of the machine both by removing one moving part and by reducing heat (and therefore operation of the cooling fan). They are smaller than hard disks, but are large enough for an OS to boot from (some companies deliberately only use a small portion of the hard drives in desktop machines to save space on backup tapes). It’s strange that I forgot to mention this as I’m about to buy a laptop with SSD.

16 July 2008

David Nusinow: Goings On

I've been rather disconnected lately, trying to finish my PhD, find a job, etc. I got permission from my committee to start writing my thesis a few weeks ago, so I've been trying to get that in gear, as well as finishing up data for publication. This should all be done by November, if all goes well, so I can get back to spending more time on the things that I love.

I've tried to stay somewhat current with what's going on, and there's been a noticeable change over the past couple weeks in the tone of discussion around the community. I've personally been fascinated by the appearance of two things: the Linux Hater's Blog and the debate about Gtk 3.0. What's striking about both of these things is that they focus very much on the more consumer-oriented side of Linux. It's all about pleasing the independent vendors and grandma, and not about doing cool things. This is a huge shift from a few years ago. When I (and I assume many of us) got started with Free Software it wasn't really about these things, but more about getting your own work done and less about pleasing other people. Pleasing others was good of course, but it wasn't really expected. Just getting the system up and running was cool at the time, but using it exclusively for all your work? Only if you were in the right line of work!

We've come to a point where we expect a hell of a lot more though. We've got very vocal community members who want to spread Linux far and wide, and they want to do it today. And arguably, Linux is ready for it. We have good software that works rather well, can be easily installed and set up, and will run most of what people need. Yay us. On the other hand, after spending the better part of the decade using Linux on the desktop I'm finding that I agree with almost everything that the Linux Hater's Blog says. It's hard to argue with the truth, and the truth is that things are still difficult for people. I've spent the last few years trying to make X in Debian easier for people to deal with, and I've barely made a dent in just this one problem. And there's plenty more to pick and choose from. Sure, you can talk about how Windows and OSX have problems too, but we can't just be as good as them. We have to be better if we want to spread Linux and Free Software far and wide.

But do we really want to do that? Well, to be honest, I don't think it matters. No matter whether or not you care about grandma using Linux, we all want to have systems that work well and are easy to manage. Currently we have a lot of things in modern distros that could be a hell of a lot better. And many of them are directly related to fundamental assumptions we've made that don't really hold up as well as they should. They lead to lots of extra work leading to a sub-par product. We can do better and we should do better. If we have the absolute best system, world domination would be a natural side effect.

That's why I think that things like this need to stop and that we need more things like this. Sure, one is a hell of a lot harder, but no one cares if you solve an easy problem. It's the hard ones that matter, and provide the real payoff in the end. We need a better system to stop the hemorrhage of developers to OSX. When Miguel talks about how the people pushing for gtk 3.0 are all using OSX, I get very worried. If we want to be in control of our own destiny then we need to face our problems head on, and solve them.

14 July 2008

Jaldhar Vyas: Q. Why Does a Seagull Fly Over the Sea?

A. Because if it flew over the bay it would be a bagel. I Spent a few days in Atlantic City with the family. Although we stayed at one of the casinos very little gambling was done due to the accompaniment of small children and my innate Gujarati aversion to throwing money away for no reason. So instead we made a semi-permanent camp on the beach and built a large and I must say pretty awesome sandcastle. Shailu insisted it should have a fire exit. I have taught her well.

Benjamin Mako Hill: Autonomo.us and the Franklin Street Statement

Recently, I've been doing a lot of thinking -- and a bit of talking -- about what software freedom means in the context of network services. I gave a talk on this subject at the most recent FSF members meeting and at Sun's Community One. In a few days, I'll be giving another at Wikimania in Alexandria, Egypt. A few months ago, I worked with the FSF to organize a meeting of free software hackers and scholars to talk about the issues. Today, that group is announcing the first two concrete results of that project. The first is a blog and a wiki called autonomo.us. The project aims to provide a space to continue, expand, and open up the work that was done at the FSF in March. Our aim is to explore the implications and responses to network services in relation to software. We're going to do that by continuing to take notes in the wiki and by publishing articles, essays, and documents that help inform the discussion about software freedom and network policies. We will be working independently from, but closely with, the Free Software Foundation, and with others in the free and open source software communities. Our goal is not to set policy, but to explore the space and inform the discussion about autonomy and user freedom in cloud computing and software as a service. The second announcement is the first concrete product of autonomo.us's work: a statement we're calling the Franklin Street Statement on Freedom and Network Services. It lays out our initial consensus on positive steps that developers, service providers, and users can take. If you want to follow our work, please subscribe to the autonomo.us blog and check out some of our work so far. If you've got thoughts and things to contribute, you can mail or get to work in our wiki. You can read our about page for more information about us and our goals. In a coordinated move, the Open Knowledge Foundation (which I help advise) is launching the 1.0 version of their Open Software Service Definition. There is a whole lot we need to learn, think through, and do before we have reasonable answers to the problems to freedom posed by network services. Today marks the beginning of several wonderful steps toward some of these answers.

13 July 2008

Russell Coker: Logic and Pants

I just read an interesting post about proposed new laws in the US prohibiting exposing underpants [1]. This is not a new thing and is part of a debate that has been taking place in many countries since the trend of “hip hop” saggy pants. The first thing that occurs to me is to wonder what the difference really is between underpants and bathers. It seems to me that bathers are simply underpants that don’t turn transparent when they get wet (and which are made of materials that don’t degrade easily when exposed to sea water, UV light, and chlorinated water from swimming pools. So it seems that unless there is some clear legal difference between bathers and underpants such laws will not be effective. Could an underwear company produce products that are essentially the same as it’s regular products but which say “swimming attire” on the label to allow it’s customers to escape silly laws? In fact why not label all underwear as “swimming attire” just in case? Would the prudes who object to a glimpse of underwear want police to go checking the labels of underwear to determine if they are permitted to be seen? The fascist trend in first-world countries is already quite bad, I don’t think we want to add underpants inspection to the list of police powers. Also it should be noted that a small portion of the police officers are corrupt, the idea of corrupt cops inspecting underpants is really not appealing… It would be possible to define any clothes worn under other clothes as “underwear”, but this has problems too. For example when I was younger I used to often wear jeans over my bathers when on the way to/from a beach (often there were no adequate facilities for changing clothes near a beach). If I was to wear jeans over my bathers while walking to a beach could I get booked for showing a small section of my bathers over the top of my jeans - and then legally entirely display my bathers while swimming? Of course there are legal nude beaches in many localities, but blurring the distinction between a regular beach and a nude beach by permitting activity that would be “indecent exposure” on all beaches seems likely to have results that would not make the prudes happy. The next logical implication of laws against exposing underpants is that they encourage wearing smaller underpants. My experience is that it is impossible to wear boxer-shorts without them being exposed above the top of my jeans. Should I be essentially prohibited from wearing boxer shorts because of the risk that if my shirt is not tucked in then someone might catch a glimpse of my underwear? Now if “underwear” was defined to be “anything work beneath the outer layer of clothes” then what about the situation of having multiple layers of clothes? For example when an athlete who wears a track-suit over shorts, are those shorts “underwear”? If so do they cease being “underwear” once the track-suit is removed? Is there a race condition [2] where an athlete can wear shorts on the track, a track-suit on the bench, but they have to remove the track-suit as fast as possible because they are committing indecent exposure while removing the track-suit? If underwear is defined as being the innermost layer of clothing, then what of the practice of “free-balling” (the practice of a man wearing a track-suit with no underpants) and the Scottish tradition of “nothing is worn under the kilt”? Can a track-suit or kilt be defined as underwear? If so how would it be enforced, would police look up the kilts of all men to ensure that the kilt is not the underwear? As for “plumber’s crack” the only solution seems to be to compel plumbers to wear overalls. Of course then plumbers would increase their rates to cover the expense and inconvenience involved in a forced change of attire. I think that most people would prefer to hire a cheap plumber who shows some “crack” than an expensive plumber.

Wouter Verhelst: New toy

While all of Belgium is buzzing over the fact that now the iPhone is being sold here, in compliance with the law against coupled sales (i.e., not simlocked), I couldn't care less. Instead, I bought me something far more useful than a cell phone that wants to be a PDA. (occasionally, the poem is one of the better-known poems by expressionist poet Paul van Ostaijen, my favourite in the Dutch language) This is a Hanlin V3 e-book reader. I found that I was reading way too much text on the 'net, some non-fiction, but recently also fiction, to comfortably do so. I could print, but that's not very good for the environment. I could read some of it on my YP-T10, but not all of it. Hence, the ebookreader. This thing has an e-paper screen, meaning that it does not require power usage to retain an image on the screen, and that the quality of the display is much, much better than anything an LCD screen could hope to offer. Even from an angle: After having it for about two days, I must say I'm quite happy with it. Reading text on this device is way, way more comfortable than trying to read anything on my laptop, or something similar. Having said that, there are a few quirks with it, which I hope future firmware-updates will fix: These are mere annoyances, however. It's an ebook reader, not a webbrowser; I can live with that. And while the zoom function in the PDF files is not perfect, it mostly does the job. And the positioning of the buttons is probably something that will be different for each and every person. I've found that just plain files are most easily read; the device does a decent job of auto-detecting headers and applying some basic markup; and if it gets confused, fidgeting with the text file until it gets it right is not too hard. In addition, the device comes with much more settings to apply to markup on text files than it does for either of PDF or HTML; e.g., one can change the zoom level in more settings, the line spacing, and a few more things. Additionally, the device also comes with an MP3 player, but I don't really plan on using it. First, I don't like MP3 files; second, the device has not much battery—only 950mAh, which is enough for weeks because of the low power-usage of the screen—and using it for MP3 decoding is a waste of battery; and finally, I have a perfectly good portable media player, so I see no point in trying to use this device for that particular purpose. But, well, I guess some people will like it. All in all, I do like the device. The attention to detail in the packaging is... heh. It even comes with a screwdriver to load the battery...

12 July 2008

Kapil Paranjape: Balaram on Institutional Archives

Subbiah Arunachalam forwarded a link to an interview of Professor P. Balaram regarding Open Archives. (Balaram is currently the director of the Indian Institute of Science, Bangalore so he is in a position to influence national policy in such matters). I broadly agreed with his views and I posted a comment which I am reproducing here. Primarily, there are differences between different disciplines. The quotes below are from the interview.
If I publish a paper in Nature, for example, it can be made freely available in my institute's repository after six months. Some journals let archived papers be made available immediately.
... and again later ...
But many publishers have no problem with the open archives approach, even if some still require a delay.
In our discussions with Elsevier we were assured that the policy of that publisher is to allow authors to use institutional repositories at any time (but see the caveats below).
One issue that is yet to be resolved, however, is copyright. I argue that we should be permitted to put in the repository the full text article as it appears in a journal.
There is a difference between "full text" and "as it appears in the journal". If the journal has put in any effort at all into re-formatting your text/images in order to get it to conform with their journal standard, then the copyright for that re-formatting work (usually a combination of manual labour and software) belongs to the journal. For example, Elsevier insists that you do not put the PDF (or other) image file of the exact form of the journal publication in your institute repository. I personally find this quite acceptable since papers in the Mathematical Sciences are perfectly readable in the form in which the authors submit them to the journal. However, re-creating a distributable PDF or other online form of one's paper may be far more difficult in other disciplines --- I have no idea.
For this, countries such as India should have a law specifying that the copyright for articles published with publicly-funded research always vests with the authors and their institutions.
One need not wait for copyright law to change. The directors of each of the research institutes can insist that every paper sent for publication should be made available in the form of a research report with the institute library. By extension, the electronic form of this report would be in the institutional repository. One way to ensure compliance is to only allow reports that are available in the institute library to be used for evaluation (for promotions and the like). The scientists would then refrain from giving up all copyright to their publishers. In my (limited) experience, publishers will not object to authors retaining the right to make copies as long as such copies are not independently sold. Unfortunately, scientists as "the silent compliant mob" does not fit with my experience. In all matters which relate to science administration (and publications are at the centre of that), scientists are by-and-large "status quo"-ists. It will need a strong push from those at the top of the ladder to change the status quo. Professor P. Balaram is certainly one of those at "the top of the ladder" so I would like to see more action to match his words! Update: Fixed the URL thanks to Abhishek Dasgupta. Also clarified the last sentence.

Petr Rockai: fast forward

Lucy left for England yesterday (OK, now it’s two days ago — last Friday). That means that I have unusual amount of free time at my hands, and yet even more things that could be done with it. But I suppose it’s time to update this little blog. It’s probably pointless to enumerate what happened, or what changed. Everything is fine and smooth over here — the wrinkles get worked out over time (with Lucy, without Lucy). Hobbies still take time and I still haven’t given up. My latest determination is to get myself a bassoon for next Christmas. (Now, that will be a year since we got Lucy a Marigaux 901, used, in great condition for a great price, lo and behold, on Austrian ebay. World is so weird sometimes…) And in the land of [LVM], I have finally started the process to merge code to improve LVM’s behaviour in presence of failed storage hardware (physical volumes gone missing). In the land of Adept, well… first things first. FOSSCamp I have visited Prague for the latest Ubuntu- (well, Canonical-) organised event, the FOSSCamp. I have met Johnatan (KUbuntu), Seli (KWin), Lidya (Amarok), Robert (Konsole), Jos (Strigi) and Inge (KOffice). See also Johnatan’s Blog (including a real blurry picture). So back to Adept — I had some hacking time over there in Prague, and I have almost brought Installer and Updater back to life for Adept 3. I unfortunately didn’t have as much time for it since then — but my current free time situation does open up some possibilities. First and foremost, I should really make a text interface to the underlying libraries for myself, maybe with fancy colourful UI, hopefully one that is comfortably close enough to apt-get and still offers advantages. Hmmmm… Intermezzo 1 Now zoom out and zoom in somewhere else, enough of coding matters. Our research group at the University had a (tool) paper accepted for ATVA 2008, meaning that I am not unlikely to visit Seoul, South Korea in October. Another piece of distant world to visit. FOSDEM Now, that reminds me… Since the last time, I have also been in Belgium — to visit FOSDEM — meeting Alasdair (of LVM) and Bart and Pino of Krita and Okular, respectively… although unfortunately, I didn’t spend nearly enough time with Pino… At least we have spend a day walking around Ghent with Bart (and Lucy, who visited Belgium with me, also having friends of her own there). Moreover, I have spent a lot of mostly productive time with Alasdair, discussing LVM2. And Belgium is nice and pretty, although I didn’t really get around to taste any beer. Maybe next time. And Antwerps were nice, too. Photos? Someday. LinuxTag And after that, I have visited Berlin again, for LinuxTag as usual — plus the accompanying LVM discussions, with Milan, Kabi and Mikul (Blek) of the Czech part of the team, and Heinz, John and of course Alasdair for the rest of the world… Also as usual, we walked around, had dinners, discussed non-work stuff, etc… a good event all in all. At LinuxTag, I have briefly seen Lidya again, as well as Ossi (whom I nearly didn’t recognise…) and Aaron who (for a change) didn’t recognise me (but to be fair, I didn’t quite stop by to chat and he’s been busy…) and Sebas, cordial as ever (and always a pleasure to meet)… reminds me of Paris two years ago, too. Intermezzo 2 Less than a month ago, I have finished my first semester of master’s study — two or three more to go (I have completed bachelor’s the semester before). Yes, I am a bachelor of computer science, or something like that, anyway, now. Or so I hope. I did not attend the whatever ceremony and I don’t really have the diploma (or maybe I do, but gods know where it is…). A short note on Debian with best intentions I am now sponsoring Trent Buck’s ?darcs packages, contributing a little on the go (making me wish that alpha buildd would make a little more progress…). With Enrico, we have uploaded new versions of wibble and libept, both of which I think make both of us fairly happy. (Although we again managed to hit a way strange compiler issue (only manifested on arm… what have I done that the gods punish me so?), as documented in Debian bug 487406…) I have packaged dzen2 and taken over haskell-mode (I am losing track of my own packages again — I really need to set up reliable watch files so I don’t miss out too many releases… apparently neither has new upstream versions, so I can sleep peacefully for a little longer). Intermezzo 3 I am not going to DebConf nor Akademy this year. That makes me a little sad, but it’s all my own fault (and laziness). Next time folks, next time. I haven’t seen K vin in aeons and he probably removed me from his memory by now… No matter, I’ll try a little harder next year, promise (oh, how many have I made to date?). Finale Nothing grandiose, just best wishes to everyone, I have to land in bed now it seems, as I am ever so sleepy. (Just So Stories, anyone?) There I go.

11 July 2008

Martin-&#201;ric Racine: Ah, the wonders of e-commerce!

After excruciatingly long months of waiting for all pieces of the puzzle to fall into place, I am pleased to announce that the dayjob finally rolled out its very first online shop! The process of putting this together has been quite an experience: I had to learn about the wonders of payment authorization gateways, different taxation jurisdictions, etc. For instance, we have to deal with 4 taxation jurisdictions:
  1. Estonian corporates and individuals: always add 18% VAT.
  2. Other EU individuals: always add 18% VAT.
  3. Other EU corporates: can be exempted from VAT, if their EU tax registration number is valid. Otherwise, add 18% VAT.
  4. Corporates and individuals from outside EU: always exempted from VAT.
As much as we looked around, we could not find any e-commerce site engine that can handle all the intricacies of dealing with EU corporate customers who may or may not have a valid EU taxation exemption number so, for now, our online shop only handles cases 1, 2 and 4 properly. What can you find on our online shop? Anyhow, I'm really happy to finally see this online shop deployed. So many people had wanted to purchase a ThinCan using a credit card or from countries for which shipping costs were difficult to determine and we unfortunately could not easily accommodate them. This is now resolved. Enjoy!

9 July 2008

David Welton: Google, Android, and the case of the missing communication

Like many people, I participated in the Google Android contest this spring, and like most of them, I didn't win, but I did enjoy working with the platform, and am very excited about the idea of an open source mobile platform that's relatively powerful. From the outset, due to the lack of actual source code for a lot of the system, there have been "doubters" about what Google is really up to. I'm not one of them, and am largely ok with their reasons for holding back: I buy their reasoning that the long term benefits of a strong, properly QA'ed launch probably outweigh the possibility of failure that might come from the press and the public at large that doesn't care much about software freedom seeing phones come out with half-baked, early implementations. I think most of us working with Android were ok with that strategy, and the ones who weren't self-selected out of the platform, most likely. However, lately Google has made something of a mess of their communications regarding Android. The problem stems from the fact that they gave an updated version of the SDK only to the winners of the competition, which for a lot of people felt like a bit of a slap in the face: they helped popularize the platform by participating in the contest and writing applications for it, and in return got excluded from the upgrade path. Personally, it's not really any skin off my nose, as I'm sanguine about the Hecl port proceeding apace when the new SDK is public, but I can see that if you were, say, a company porting your app to the platform and now are left behind the competition winners, you might be a bit irritated. The biggest mistake they've made though, is a big lack of communication regarding this business. As I said, I don't really have that much skin in the game, and if they explained in a convincing way why they needed to do things that way, they would go a long ways to allaying the frustrations felt by many. I'm not much of a believer in conspiracy theories and plots, especially where companies are concerned. Inept bumbling is a far more likely explanation in most cases, including this one. What is odd, though, is that Google has a lot of people who "get it". I met Dan Morrill at the Munich Android event, and he definitely gets it. He writes about his frustrations as a developer advocate and all the crazy things people say. Well, one way to reduce the number of batty internet theories (eliminating them is clearly impossible due to the alien mind control rays) is to consistently communicate quality information about what's really going on, something that has been lacking with regards to the SDK question. Here's another Google employee who understands this need to communicate, and apparently does so despite being worried about being "slapped for talking publicy about all this": http://groups.google.com/group/android-developers/msg/244edfad99870c63
But the root of the problem is certainly not licensing but that there hasn't been a new public SDK release since M5, while at the same time a small group of people received updated versions privately. I really don't know precisely why this happened; but I'm sure it has more to do with logistics and reducing the burden of support while we shift priorities (to shipping real devices) rather than politics or any will of our part to "hurt the community" (come one guys, we are not that stupid... !) While others in the team may disagree, I think it was very very unfortunate; some of us are trying to prepare a new SDK release, but it's a lot harder than I can comment on here, so don't hold your breath because it might not happen that soon.
This explains things in part, but still leaves us in the dark, and leaves me with the feeling that someone in power, somewhere at Google, despite his or her clued in colleagues, really doesn't get it with regards to open source. I'm still unconcerned about the Android source code: I think we'll see it, but to be a true open source project, Android will need an open community as well, not one where decisions are taken exclusively at Google, and not even communicated to the development community at large. All in all, this mistake is more molehill than mountain, but however you look at it, in terms of open source, it is a step backwards.

8 July 2008

Martin-&#201;ric Racine: xf86-video-cyrix and xf86-video-nsc: it's dead, Jim

It had to happen sooner or later: The X.org drivers for the old GX1 variants of the Geode chips formerly made by Cyrix and NSC no longer build against the current X.org release. Given the imminent release of X.org 7.4 (server core 1.5), this essentially means that users of older Geodes will have a nasty surprise, the day they upgrade to Ubuntu/Intrepid, which ships with core 1.5. Soon after, the release immediately following Debian/Lenny will be affected too. There is a planned milestone to eventually reintegrate support for older GX1 products into the clean and up-to-date xf86-video-geode framework, but this will unfortunately come too late for those upgrading to Ubuntu/Intrepid, unless... ...unless someone volunteers to copy gx_* files inside xf86-video-geode and graft GX1 support into the resulting gx1_* files. If you have access to Cyrix/NSC GX1 + CS5530 or AMD SC hardware and a reasonable knowledge of the X.org codebase, your contribution would be most welcome.

6 July 2008

Russell Coker: Awful Computers for Kids

I have just observed demonstration units of the V-Smile system [1]. They have “educational games” aimed at ages 3-5, 4-7, and some similar ranges. The first thing I noticed was that children who were able to correctly play the games were a lot older than the designated ages. For example 10yo children were playing the Scooby-Doo addition game (supposedly teaching children to add single-digit numbers) and apparently finding the non-addition part of the game challenging (I tried it myself and found catching flying hamburgers while dodging birds to be challenging enough that it was difficult to find numbers). For children who were in the suggested age-range (and a suitable age for learning the basic lessons contained in the games) the only ones who actually managed to achieve the goals were the ones who were heavily directed by their father. So my observation is that the games will either be used by children who are too old for the basic lessons or be entirely directed by parents (I didn’t observe any mother giving the amount of assistance necessary for a 5yo to complete the games but assume that it happens sometimes). I doubt that there are many children who have the coordination needed for a platform game who have not yet learned to recognise printed letters (as supposedly taught in the Winnie the Pooh game). The Thomas the Tank Engine spelling game had a UI that was strange to say the least (using a joystick not to indicate which direction to go but instead to move a cursor between possible tracks) and I doubt that it does any good at teaching letter recognition. There was also a game that involved using a stylus for tracing the outline of a letter, as I had great difficulty in doing this (due to the poor interface and the low resolution of the touch-pad) it seems very unlikely that a young child who is just learning to write letters would gain anything from it. Strangely there was a game that involved using the touch-pad to indicate matching colors. Recognising matching colors is even easier than recognising letters and I don’t think that a child who can’t recognise the colors would be able to manage the touch-pad. The V-Smile system seems to primarily consist of a console designed for connection to a TV but also has hand-held units that take the same cartridges. The same company produces “laptops” which sell for $50 and have a very low resolution screen and only the most basic functionality (and presumably other useless games). Sometimes the old-fashioned methods are best. It seems that crayons are among the best tools for teaching letter recognition and writing. But if there is a desire to use a computer for teaching, then a regular PC or laptop should do. Letter recognition can be taught by reading the text menus needed to launch games. The variety of computer poker games can be used for recognising matching colors and numbers as can the Mahjong series of games. Counting can be taught through the patience games, and the GIMP can be used for teaching computer graphics and general control of the mouse and the GUI. NB I’m not advocating that all education be done on a computer, merely noting the fact that it can be done better with free software on an open platform than on the proprietary systems which are supposedly designed for education. Finally with a PC children can take it apart! I believe that an important part of learning comes from disassembling and re-building toys. While it’s obvious that a PC is not going to compare with a Lego set, I think it’s good for children (and adults) to know that a computer is not a magic box, it’s a machine that they can understand (to a limited extent) and which is comprised of a number of parts that they could also understand if they wanted to learn the details. This idea is advocated by Gever Tulley advocates such disassembly of household items in his TED talk “5 dangerous things you should let your kids do” [2]. Gever runs The Tinkering School [3] which teaches young children how to make and break things. Finally I just checked some auction sites and noticed that I can get reasonably new second-hand laptops for less than $300. A laptop for $250 running Linux should not be much more expensive than a proprietary laptop that starts at $50 once you include the price of all the extra games. For an older laptop (P3) the price is as low as $100 on an auction with an hour to go. Then of course for really cheap laptops you would buy from a company that is getting new machines for their staff. It’s not uncommon for companies to sell old laptops to employees for $50 each. At a recent LUG meeting I gave away a Thinkpad with a 233MHz Pentium-MMX CPU, 96M of RAM, and a 800*600 color display - by most objective criteria such a machine would be much more capable than one of those kids computers (either V-Smile or a competitor). Of course the OLPC [4] is the ideal solution to such problems. It’s a pity that they are not generally available. I have previously written about the planned design for future OLPC machines [5] which makes it a desirable machine for my own personal use.

Kartik Mistry: Misc Life Updates


* Personal: - I am almost settled after one month at Ahmedabad and now early looking for new rented house (ie home), 1 or 2BHK. - Kavin got minor electric shock while playing with switch and socket. Fortunately, my wife was holding him and doctor told that there is nothing to worry. He is difficult to handle and long examination of my fatherhood will start soon when they will be here at Ahmedabad. - Work is going great. I have very good team now! * Debian: - Sandro Tosi will be co-maintainer or probably take over sitecopy package from me and will put it under collab-maint repository. Since, I mentioned that I am bit busy with settling down here and it will not be great if such useful package requires time to fix bugs with patches available already. - D-I translation of Level 1 and 2 for Gujarati language are again 100%. Hunting Level 3 now. - I am not still able to install Debian properly on my macbook! Only useful source for this is, http://wiki.debian.org/MacBook Any other pointers/docs will be :)

4 July 2008

Daniel Burrows: CWidget tutoral 1: 'Hello, world!'

Late last year, I spent some time disentangling aptitude's internal UI library and packaging it as a separate library, which I named cwidget. This article is the first in what will hopefully become a series describing the basic concepts and APIs of cwidget. It applies to the versions of cwidget currently available in Debian sid and lenny, 0.5.11-1 and 0.5.12-1. Autogenerated documentation of cwidget can be found here (but beware that as of this writing it is somewhat incomplete).
In this tutorial, I will walk through a simple program (hello.cc) that initializes cwidget, displays a simple message box, and then terminates the program when the user confirms the message. I assume a basic familiarity with C++. Screenshot of the 'Hello, World' program The first thing to do is to include the portions of cwidget that our program will use. Most importantly, we need the top level cwidget routines. These are the global routines that initialize cwidget, shut it down, and control its main loop (among other things).
#include <cwidget/toplevel.h>
cwidget comes with a collection of stock dialog boxes for things like displaying messages to the user. To access the routines that build these dialogs, we write:
#include <cwidget/dialogs.h>
All the symbols provided by the cwidget library are in the cwidget namespace. Using the full library name means that there's a reasonable chance that its names will not conflict with the names provided by other libraries; however, it's a real pain to type cwidget over and over. Since this is the only namespaced library we are using in this program, it's handy to define cw as an alias for cwidget:
namespace cw = cwidget;
Now we're ready to write the main routine. The first interaction of client code with the cwidget library is to initialize it. This will initialize the ncurses library and put the terminal into a mode suitable for a full-screen curses program.
cw::toplevel::init();
Next, we create a dialog box that will be displayed to the user. There are two things to note about this code:
  1. cwidget is Unicode-aware and the ok() routine expects the message string to be a wide-character string. In this case, that means that we need to pass in a wide-character string (indicated by typing L in front of the string).
  2. The second argument tells cwidget what to do when the ok button is pressed. The expression
      sigc::ptr_fun(cw::toplevel::exitmain);
    
    creates a slot using libsigc++. Briefly, a slot is a reference to a function or to a method of a class instance. When invoked, this particular slot will call cwidget::toplevel::exitmain(), which causes the main cwidget loop to exit. The slot is wrapped in cwidget::util::arg, a utility function that handles passing slots as optional arguments.
cw::widgets::widget_ref dialog =
    cw::dialogs::ok(L"Hello, world!",
                    cw::util::arg(sigc::ptr_fun(cw::toplevel::exitmain)));
Now that we have a widget, the next step is to arrange for it to appear on the terminal. In cwidget, control of the terminal is assigned to a single top-level widget: whatever it displays is what gets displayed on the terminal, and all user input is passed directly to it. In a real program this widget will typically manage a collection of sub-widgets and assign each one a screen region, but for now let's just display the dialog box we created:
cw::toplevel::settoplevel(dialog);
With everything initialized, we're ready to start the main loop. mainloop() will keep the display up-to-date and dispatch incoming events (for instance, keystrokes and mouse presses) until exitmain() is invoked.
cw::toplevel::mainloop();
When the user presses Enter or clicks on the Ok button in the dialog, exitmain() will be invoked by the binding that we set up earlier. Once this happens, we need to shut down cwidget in order to restore the terminal to its original state. If you skip this step, the terminal will be garbled and will not work properly when your program exits.
cw::toplevel::shutdown();
And that's it! To compile the program, change to the directory containing hello.cc and run:
$ g++ -o hello hello.cc $(pkg-config --cflags --libs cwidget)
Of course, you'll need to have the g++ and libcwidget-dev packages installed for this to work!

3 July 2008

Russell Coker: Shared Context and Blogging

One interesting aspect of the TED conference [1] is the fact that they only run one stream. There is one lecture hall with one presentation and everyone sees the same thing. This is considerably different to what seems to be the standard practice for Linux conferences (as implemented by LCA, OLS, and Linux Kongress) where there are three or more lecture halls with talks in progress at any time. At a Linux conference you might meet someone for lunch and start a conversation by asking “did you attend the lecture on X“, as there are more than two lecture halls the answer is most likely to be “no“, which then means that you have to describe the talk in question before talking about what you might really want to discuss (such as how a point made in the lecture in question might impact the work of the people you are talking two). In the not uncommon situation where there is an interesting implication of combining the work described in two lectures it might be necessary to summarise both lectures before describing the implication of combining the work. Now there are very good reasons for running multiple lecture rooms at Linux conferences. The range of topics is quite large and probably very few delegates will be interested in the majority of the talks. Usually the conference organisers attempt to schedule things to minimise the incidence of people missing talks that interest them, one common way of doing so is to have conference “streams”. Of course when you have for example a “networking” stream, a “security” stream, and a “virtualisation” stream then you will have problems when people are interested in the intersection of some of those areas (virtual servers do change things when you are working on network security). There seem some obvious comparisons between Planet installations (as aggregates of RSS feeds) and conferences (as aggregates of lectures). On Planet Debian [2] there has traditionally been a strong shared context with many blog posts referring to the same topics - where one person’s post has inspired others to write about similar topics. After some discussion (on blogs and by email) it was determined that there would be no policy for Planet Debian and that anyone who doesn’t want to read some of the content should filter the feed. Of course this means that the number of people who read (or at least skim) the entire feed will drop and therefore we lose the shared context. Planet Linux Australia [3] currently has a discussion about the issue of what types of content to aggregate. Michael Davies has just blogged a survey about what types of content to include [4]. I think it’s unfortunate that he decided to name the post after one blogger who’s feed is aggregated on that Planet as that will encourage votes on the specific posts written by that person rather than the general issue. But I think it’s much better to tailor a Planet to the interests of the people who read it than to include everything and encourage readers to read a sub-set. When similar issues were in discussion about Planet Debian I wrote about my ideas on the topic [5]. In summary I think that the Gentoo idea of having two Planet installations (one for the content which is most relevant and one for everything that is written by members) is a really good one. It’s also a good thing to have a semi-formal document about the type of content that is expected - this would be useful both for using a limited feed for people who go significantly off-topic and as a guideline for people who want to write posts that will be appreciated by the majority of the readers. Planet Ubuntu has a guideline, but it was not very formal last time I checked. Finally in regard to short posts, they generally don’t interest me much. If I want to get a list of hot URLs then I could go to any social media site to find some. I write a list post at most once a month, and I generally don’t include a URL in the list unless I have a comment to make about it. I always try to describe each page that I link to in enough detail that if the reader can’t view it then they at least have some idea of what it is about (no “this is cool” or “this sucks” links).

Next.

Previous.