Search Results: "andy"

5 May 2006

Wouter Verhelst: Bluetooth spam

I have a laptop that supports bluetooth. By using gnome-bluetooth (which unfortunately isn't packaged yet—and no, I don't have the time to start doing more packages), I can accept data transfers over Bluetooth to my laptop, which sometimes is handy. Some people seem to think it's funny to start sending me unsolicited files while I'm on the train, hacking away on my laptop. I swear, they're spamming me. Of course, it's not something that can't be solved by running killall gnome-obex-server, but it's annoying. I'm thinking of writing my own obex server (or modifying g-o-s) so that the box that appears when it asks whether I want to accept some file has the option to "spam back", i.e., send the same file to the sending device over and over again. But then, that wouldn't be ethical, would it?

4 May 2006

Martin F. Krafft: Back to Bangkok

I spent my last evening in Yangon at "Sandy's Myanmar Cuisine", a wonderful restaurant (albeit a little pricey, I paid $10 for appetiser, main dish, and two beers) overlooking the Kandawgyi lake, attached to the Yangon Kandawgyi Palace hotel; dinner was duck eggs filled with minced prawns, followed by boiled snake-head fish, wrapped in moringa leaves. Quite delicious, although I would have really liked to try their pig ear salad, but they rightfully alerted me that their pig ears weren't fresh. Afterwards, I treated myself to perhaps the second-best back massage I've ever received (the first one was delivered by a massage therapist from Berkeley, whom I had met on the boat down the Mekong to Luang Prabang last year. Before the airport the next morning, I made a stop at the Yangon MICT, specifically the Myanmar Info-Tech company, to meet William, the Myanmar Linux Guru #1. Unfortunately, he was busy at the 5th Myanmar ICT week, so I sat in one of the talks instead and was very pleased to learn that there is an active (but small) group of people working hard on localisation of Pango to the Burmese and Pali languages (the latter being the ancient Buddhist language, and the acceptance of the Burmese character set into Unicode 4.0. I exchanged email addresses with a few of the folks involved, who were well familiar with Debian and Ubuntu, and rather interested in teaming up. I'll forward their addresses to the localisation people as soon as I get back. With still some time left before check-in, I enjoyed my last Myanmar-style breakfast -- Mohinga -- which is a spicey fish soup with noodles, and definitely the best way to start the day; I'll miss it. At the airport, I was getting mildly annoyed once again at their security procedures, which in part required everyone to surrender their gas lighters. Of course, I had four of those on me and in my hand luggage, but when I refused to give them all of them, pointing to the smoker's lounge on the far side of the security check, they held their heads low and gave in. I bet they do this primarily to sell the lighters for some cash on the side, given that nowhere else in Myanmar, or flying to Myanmar, I was asked to do the same. My chaotic self managed to also leave the info brochure from the Info-Tech company, as well as the slides from the talks at the immigration counter, which promptly got me into a questioning by the military as to what kind of documents these were (they cannot speak English in general). With the help of a local, I told them all about localisation and they seemed impressed, but when I finally got on the plane, I guess I felt somewhat of a relief to be outside this tightly-controlled country again. I landed in Bangkok and took a taxi to the hotel, only to discover that thanks to a power outage and the crappy Internet connection back in Mandalay, I had managed to book the wrong one. Instead of central Sukhumvit, I am now staying at Soi 57, which is 4 km further outside of the city. That wouldn't be a problem, for the sky train station is right in front of the hotel, but the staff have not had a lesson in friendliness and generally barked back rather than answering my requests. Plus, since my flight tomorrow is only at 23:30 and I requested to take a shower at 20:00 before taking off (having otherwise checked out and cleared my room), they simply shoved a sign into my face which stated that check-out after 16:00 hours would cost a full day's room rate, and that they did not have any showers available otherwise. Screw that. I'll make sure to let asiarooms.com know in the form of a review. Having settled, and with a bunch of Thai Baht left to spend, I headed for the center, bought myself another Murakami book ("Hardboiled Wonderland and the End of the World"; I seriously love this author), and then proceeded to spend money as fast as I could -- and I am not good at that. I got another massage, bought some bamboo plates and one of those gravity-defying wine bottle holders, a bunch of DVDs, had dinner, and then didn't feel like anything more, so I went back home. As usual, coming back to Bangkok is quite a disappointment (while arriving at Bangkok at the beginning of a trip is a thrill). The city is busy, dirty, and noisy, it's all comparatively expensive (even if you bargain hard), and people are so much more into making money that it's not really possible to get in touch with locals. Then again, I cannot figure out whether my disappointment stems from the shopping mode (into which I was put by several requests to bring back stuff), this being the end of my vacation, or just being back in a metropole after so many rural days. Almost no plans for tomorrow. I might have to make my way to the dreadful Khaosan Road to pick up some student IDs for friends, I would like to (finally) see the snake farm, and I have a lunch appointment with the retail manager of Jim Thompson (the famous silk exporter), who happens to be a friend of Adam, the guy I met in Mandalay, and who introduced me to her -- no worries, I am not getting into the silk business, nor will I spend money there, but the lady is supposed to be quite a character and fun to talk to. Why not? If I wake up, it'll be Tai Chi in Lumpini Park at around 5:30, and if there's time in the afternoon, I'll make my way up north to the biggest market of Bangkok (don't have the name handy). In general, not such an exciting day, waiting to return to Europe. Sigh.

1 May 2006

Andrew Pollock: [debian] On non-free RFC documents

So a release-critical bug was filed against dhcp3, of which I am the only active maintainer at present. I dutifully stripped the RFCs and IETF draft documents from dhcp3-common, and made an upload, however the bug was reopened. Seems I should have read this. So it looks like I need to strip them out of the source tarball as well. Goody. I'm no fan of debian-legal, and I don't personally subscribe to the non-freeness of RFCs, using my personal DFSG-o-meter, but #199810 makes for an interesting read. It's motivated me beyond raising my middle finger to debian-legal to actually bothering to repack the tarball sans the RFCs, but it's going to be a bit of PITA to do that for every new release. I mailed the dhcp-workers mailing list to ask the upstream maintainer what he thought about removing the RFCs from the source tarball. So far he hasn't replied yet, but I have had one interesting reply:
In general, I applaud the DFSG. But in this case, I think Debian is being unreasonable. While the RFC licenses do not permit creation of derivative works, they may be copied verbatim. It's marginally useful to users of the code to have the RFCs handy, and it's probably quite helpful for people trying to find and fix bugs. I'm in favor of being careful about licenses. I've asked people on my project at work not to use the Sun JDK (but did not ask them not to write in Java) because Sun's implementation is non-Free, and therefore non-portable. But objecting to RFCs really seems to be going overboard. If the RFC were used to build the program, I could see the point of needing to have the software freedom to modify it. But it's merely bundled. So I would suggest that Debian reconsider their position, and apply DFSG to software, and adopt Debian Free Documentation Guidelines for docs, and Debian Free Standards Guidelines for standards. DFStG should allow the ISOC copyright license - the purpose of allowing standards is to have them easily available as a reference.

28 April 2006

Randall Donald: Will you be my Neighbour?

So the company where I work at (Push72) is looking for a few (up to 5) good men (or women) to add to our development team. Currently we are heavily involved in online banking applications and need more people who know Java, have done some web application development and are good team players. Our office is in beautiful Parksville, British Columbia on Vancouver Island and relocation is required. This isn't an official job posting by any means (I don't hire, I just work here) but if you are interested, want to apply or want to know more information let me know at randy@push72.com

22 April 2006

Joachim Breitner: Silencing my Slug

Some time ago, I bought a LinkSys NSLU2, that’s a very cute little box with power, usb and network plugs, and nothing more. Inside sits an ARM processor and 16MB RAM. The great thing is: You can install linux on it, even a complete Debian sarge installation.The box is not very performant, even after I de-underclocked it by scraping away a resistor from 133MHz to 266Mhz, but it is quite cheap and very handy. I use it for nightly backups. Unfortunately, the attached external Maxtor OneTouch harddrive is quite loud, even when it is idle. Here are the steps I took to make the setup zero-noise as long as the slug is doing nothing:Some further plans for my slug involve a USB attached LCD display and a temperature sensor, so I can be informed about various stuff, incuding the outside temperature, even with my regular computer off. Suggestions of what hardware I could use is highly appreciated.

20 April 2006

David Welton: Hecl news - conditional compilation, tools

For the curious, who read Conditional Compilation in Java, and were waiting on the edge of their seats to know what happened, we decided to use Antenna, with the work being done mostly by Wolfgang. It's not particularly elegant - the source code ends up being, in some places, what the Italians call a "pugno nell'occhio" - a "fist in the eye". But all things considered, it's not that bad, and it's better than writing the same file in slightly different ways in different subdirectories, especially in those cases where the code changes only slightly from one version to another. As a bonus, Antenna gives you a lot of handy tasks for doing common j2me things. Indeed, Wolfgang did a very nice job of revamping the Hecl build system, and after a bit of additional tweaking, it works very well. It builds different .jars and .jads for different targets, so that it's easy to develop for new platforms without stepping on everyone else's toes. My current plans are to spend some more time on build tools and infrastructure - I think more people will start to experiment with Hecl once they realize just how easy it is to build applications. You don't even need a java compiler if you use HeclBuilder, which is a simple GUI that lets you specify the input script, the jar file to create, and then generates a new Hecl application read to be loaded onto a cell phone. It does this by keeping a copy of Hecl.jar as a resource, which it then modifies (replacing the script.hcl resource that the Hecl.jar itself contains) and then writes out as a new .jar/.jad. The long and short of it being that you have a very quick edit/"build"/test cycle when using an emulator. I have some ideas about improving on this even more, perhaps utilizing microemulator, which, although not as complete as Sun's WTK emulator, is open source and thus redistributable with Hecl.

12 April 2006

David Welton: Ruby vs Tcl, round 2

Ding ding. (Round 1 - for those who missed it) Kidding aside, remember that I like and respect both of them. Libraries In the first article, I mentioned that Ruby has a lot of momentum, which is a pleasant change from Tcl's relative 'uncoolness' amongst the Web 2.0/O'Reilly/"next big thing" crowd. That said, there are still places where that momentum hasn't taken it. I set about writing some code that I'd wanted to play with that involves sending some email. Something that's very easy in Tcl: http://tcllib.sourceforge.net/doc/smtp.html (towards the end of thepage). Python seems to have a pretty complete email system too, for that matter: http://docs.python.org/lib/module-email.html. So it appears that, based on a sample of one attempted task (how's that for statistics?), that Ruby is still lacking a few things in its standard distribution. Note that this functionality is available elsewhere (TMail, to cite one), but email is ubiquitous enough that it ought to be in the standard library. Command line swiss-army knife While Ruby's OO system gives it a head start when you need to create a larger system with distinct parts, it can still be used as a quick'n'dirty scripting language for quick one-off jobs. From the man page:
% cat /tmp/junk
matz
% ruby -p -i.bak -e  $_.upcase!  /tmp/junk
% cat /tmp/junk
MATZ
Very handy. Tcl's command-based syntax just isn't quite as quick for those sorts of operations, so Ruby wins hands down here. I've suggested that the Tcl folks distribute a second program that takes a lot of the Perl-style command line arguments for this sort of work, but the idea doesn't seem to be of much interest. C API's On another tack completely, one of the things that originally drew me to Tcl was its very, very nice C API. It's documentation is clear, and thorough, and the API itself lets you get involved in pretty much any aspect of the language that you want. This makes sense, because when Tcl was originally created by Dr. Ousterhout in the late '80ies, the idea was to create a scripting language as a C library that would be loaded into other programs. The language has always been faithful to its heritage, and to this day I find it lots of fun to merge Tcl with C code. I have to admit that I don't know the Ruby API all that well, but what I have looked up looks pretty nice. To a certain degree, it's comparing apples and oranges, because Ruby requires you to deal with the very object oriented nature of the language, whereas Tcl is a lot more direct. The Programming Ruby book's coverage of the subject also leads me to believe that Tcl really gives you access to more stuff (interpreters, channels, events, and many other parts of the system). Ruby seems to take an approach that might best be described as letting you write Ruby in C - meaning that you create Ruby objects, use their methods, get their values, and so on, but you're still really dealing with Ruby. This has a certain elegance, but sometimes it's necessary to muck about with things at a lower level. I don't know how it works out in practice, but Ruby has a bit more infrastructure in place for actually building extensions once you've created them. Tcl has "tea", which is a set of m4 macros, but anyone can tell you that the auto tools are not much fun to work with (going to the dentist is more fun) - anything that keeps me away from them is welcome. Garbage collection One of the more interesting aspects of the different approaches to C interoperability is the fact that Tcl uses a simple, robust, straightforward reference counting system to keep track of, and throw away resources that are no longer used. Ruby has a mark and sweep garbage collector, which is probably more sophisticated, but also more complicated, and requires a bit more support from the programmer initially. The benefit is that once things are set up, they require less keeping track of, because you hand off memory management to the computer. From the end user's point of view, Ruby wins here, but if you happen to be writing a C extension, I could see it being more difficult to write and debug to this API, although Tcl has its own warts, one of the worst of which is the fact that Tcl values must be convertible back and forth to strings, so that for things like a file handle that can't really survive the round trip, because it's just a pointer, you use a hash table and some sort of string to hold onto the object:
 "file1" -> int fd1
 "file2" -> int fd2
which makes it impossible to GC these values. I suspect that both approaches have their merits - Ruby's is more elegant, but Tcl's is simple and rugged. Licensing Bouncing back to something completely non-technical, Ruby's licensing is either the GPL, or their own license. If I understand things correctly, you can get around the GPL's "viral nature" by simply renaming things, if you have a need to include Ruby in a proprietary product:
  1. You may distribute the software in object code or executable form, provided that you do at least ONE of the following: a) distribute the executables and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b) accompany the distribution with the machine-readable source of the software. c) give non-standard executables non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author.
So it seems that you're ok if you just call it something else. However, the license goes on to talk about several other files in the core distribution:
  1. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under this terms. They are gc.c(partly), utils.c(partly), regex.[ch], fnmatch.[ch], glob.c, st.[ch] and some files under the ./missing directory. See each file for the copying condition.
Looking through the LEGAL file in the distribution shows that there are files distributed under other terms. Of course, they're all free software, but some are LGPL, some BSD, and a few others for good measure. Tcl's licensing, on the contrary, requires very little understanding. The language was developed at the University of California, Berkeley, and the license remains BSD. This goes for many of the libraries and extensions as well. If you need to embed a language in your proprietary system, Tcl and its libraries present no problems whatsoever. Of course, I prefer to work with open source code and communities, but that's not possible 100% of the time, so it's always nice to know things are free and clear, should that need arise. Internationalization This is something the Ruby folks know they need to fix, and are working on, so it's not worth dwelling on it much, but it is a proud point for the Tcl community. Tcl has had very nice i18n setup for many years, at this point - since the 8.0 release. It's built into the language, so that everything works with it. You have commands to set encodings of IO channels, and even munge strings. Tcl wins here - no contest. As I continue exploring Ruby, I think I'll find more stuff to compare with Tcl, so we won't ring the final bell just yet.

8 April 2006

Martin F. Krafft: Restless travellers

We've been busy travelling, never spending more than a night in the same place. Leaving Bangkok on the "3rd class" train for Ayuthaya was an experience of its own kind. The platform was full with people waiting for the train to arrive, and when it did, we witnessed something totally unexpected for the Thai: they almost quarelled to get into the train first to catch a seat. Fortunately we got lucky in the otherwise crowded wagons. We stopped frequenly, and a glance out of the window would give you a peek into the lowest end of Thai civilisation: barracks built along the tracks with large numbers of people vegetating along. Inside the train it was hot and sticky, and we were surely happy to disembark in Ayuthaya about an hour later than planned. Ayuthaya was the Siamese royal capital between the 14th and the 18th century (the name derives from Sanskrit and means "undefeatable") and a bunch of temples and ruins, most with strong Khmer influence, survived the various Burmese attacks until today, making the city a nice attraction for those who like "stone piles" (as I've heard them described). We had made arrangements from Bangkok with the Baan Lotus Guesthouse, run by a lovely lady who spoke good English. Apart from the broken light in our room, the setting, the friendliness of our host, and the cleanliness of the rooms were definitely worth the price. After visiting Wat Phra Mahathat, the temple home to a Bhudda's head embedded in twisted roots, we had a guide escort us to a remote Elephant camp to witness the preparations for the upcoming New Year celebration (Songkran) in a week from now -- we are definitely looking forward to that. Later that night, we met some locals at a bar for chatting and went to bed late, thanks to our host handing over the keys and making an exception to the 11pm curfew. We got up to meet the guide from the night before, who took us around three temples before dropping us off at the boat stop for a short cruise around the island (Ayuthaya is encircled by a river). Our train to Khorat (Nakhon Ratchasima) was scheduled for 12:23, and so we had to forgo most of the temples due to time constraints; Ayuthaya is close enough to Bangkok to come back here again during a future trip. Reaching the station with ample time, we found the (express) train to be full, but did not feel like waiting for the slower train an hour later, so we talked the station ward into getting us on anyway. Interestingly, I think he would have tried his best even if I had not slipped him 100 Baht (2 EUR) under the table. We got on, and even had two seats in an air-conditioned wagon, so the trip was quite relaxing -- to the point that we almost missed our stop. Shortly before reaching Khorat, we rode through a thunderstorm, and there was a light drizzle as we stepped out of the station. The distance from Bangkok showed, the Tuk Tuk drivers (Tuk Tuks are the infamous three-wheeled taxis you find all over Southeast Asia) didn't hassle us, it was in fact not at all easy to find one, and when we did, he did not know where the Tokyo Hotel, our chosen home for the night, was located. With a map in hand, we thus simply started walking, but had to run for shelter at an ice factory when the rain picked up and sent cats and dogs onto the streets that really aren't made to take that much liquid. Eventually, a Tuk Tuk picked us up and got us to the hotel safely, and an hour later, the rain stopped. We did not miss a beat to get outside and ended up at "The Mall", a magnificent American-style "shopping paradise" (as Aline would call it) which clearly showed that shopping is one of the top passtimes for Thais. We ended the evening at Khorat Texas, a very nice bar in the centre of the town, with decent food and live music. As I was rolling a cigarette, a local from the next table curiously came over, and shortly thereafter, the two of us joined the three of them at their table for some cultural exchange in broken English. We picked up quite a few handy Thai expressions but also came to the conclusion that the Thai don't really know how to say things themselves and would often disagree with each other over the endings of words. But as the beer kept flowing, we seemingly got better at Thai intonation, although the language is definitely very hard for Europeans. I could not help but notice though that it seems to be better suited for cell phone conversations in noisy places while one of the three men we met kept chatting away to his wife for an hour while the band was playing in the background. This morning, we weren't motivated to get up before 11, checked out, made travel arrangements for our next destination -- Phimai -- dropped off some laundry, and then headed for the national museum, which we only found through the technique of circling and spiralling inwards. Not much to see otherwise here. The Lonely Planet guide says this city is unexciting, but it grows on you if you spend longer periods of time. Sure, like most cities, I say. As it stands, we have reason enough to abandon the place and spend tonight in Phimai, close to the famous and beautifully restored Khmer temples of the area, so that we can hopefully spend as much time as possible in the temple area before the heat gets unbearable. Nevertheless, speaking of heat, yesterday's rain shower cooled the air by 5 or 10 degrees, and it's very bearable right now. I have to point this out because in general, the month of April is not a month during which to travel Northern Thailand due to the temperatures approaching 40 degrees during the day. I know for sure that next time, I will be looking into clothing made out of fabric better suited to handle large amounts of sweat than cotton. We hope to leave Phimai on a bus to Udon Thani. I expect that shall be the next time I get to write. Thanks for reading along.

7 April 2006

Matt Brown: Porting code to Windows

I’ve set myself the task of porting libtrace to Windows, so that Perry and I can use it in an upcoming project that we’ve been scheming for a long time. It’s going to be a reasonably large job I think! For a start its going to involve relearning all the MSVC oddities that I knew back when I last wrote code for Windows (over 4 years ago) and then there is all the stupid compatibility issues between various header files and type definitions to work out. I haven’t been able to find a good document that lists all the common problems that you run into porting a GNU library to Windows which surprised me somewhat. There are plenty of documents about how to port code from Windows to Linux however. If anyone knows of some handy resources I would love to hear about them. Cygwin/Mingw32 etc are not suitable for this project.

6 April 2006

David Welton: Language Design - weak types and easy marshalling

Weak/Dynamic typing One of the things I really like about Tcl is how very, very dynamic it is. It's possible to replace just about everything 'on the fly', including control commands like if and while (in Tcl, they're just commands, not special syntax). Like Lisp, Tcl gets a lot of its flexibility from its simplicity, and one of the ways that things are kept simple is via the concept of "Everything Is a String". Some people erroneously recall the early days of Tcl and take this to mean that Tcl represents everything as a string internally, making it very slow for numerical operations. That hasn't been true for something like 8 years - Tcl values are translated into a more appropriate internal representation 'on demand'. However, the concept still gives you lots of flexibility:
set a b
You don't have to quote things - they default to strings - the variable 'a' now contains the value 'b'.
set lst  a b c d e 
No fiddling around with lots of syntax - the above is defined as a string (we could have used "" to group the words), but it gets turned into a list
llength $lst
5
Things are automatically converted into the type you want to work with. Of course, this also makes it really easy to work with code as strings and vice versa:
proc until  cond code   
    while  1   
        uplevel $code
        if   [uplevel [list expr $cond]]     return  
     
 
set i 0
until  $i == 10   
    puts "i is $i"
    incr i
 
and so on and so forth. Ruby (and Python) handles things a bit differently than Tcl does. Even though it's still very dynamic, it is more strongly typed:
"5" + 5 # error
Whereas the same code runs just fine in Tcl - "5" is transformed into a number, because if the programmer is trying to add to it, they must want it to be a number. On the other hand, strong typing can help catch errors, may help make things clearer, and in corner cases, probably helps catch nasty surprises. One of the things that Tcl's system facilitates, at least with simple types (lists, strings, numbers, dicts) is 'marshalling' or 'serializing'. Want to send a hash table down a socket?
 puts $sk $mydict
 # And on the other side:
 gets $localsk mydict
 dict get $mydict key
When you start treating it as a dictionary, it "just turns into one" - or throws an error. Good programmers will check for errors, but that goes for whatever language you use. This often comes in handy for code-creation, as well - it's very easy to build up a string programmatically and then evaluate it, much as you might do with a list in Lisp. It also makes coding short scripts... well, shorter, because you don't have to fiddle around telling the language what you mean, in most cases. Treat it like how you want to use it, and it will work out what you want to do. Hecl Hecl comes into the picture, because I've borrowed a lot of design ideas from Tcl, but the language is still used by only a few people, so we're free to hack on it and change things that we don't like about Tcl. Lately, we've been having an interesting debate on the merits of Tcl style weak typing, vs stronger Ruby-style typing, as well as the string representation you get when you attempt to print a type: http://sourceforge.net/mailarchive/message.php?msg_id=15254941 http://sourceforge.net/mailarchive/message.php?msg_id=15254942 There are certainly some things that could be improved in Tcl's way of dealing with things - one area where it doesn't do so well is in dealing with NULL values - you can't really deal with that in a string, because a blank string is different from no value at all. Wolfgang would like to go towards more Ruby-style values. I'm willing to consider most anything at this stage, because it's interesting, and I like going over the possibilities, in order to make Hecl as useful as possible. "Everything is a string" has its limits in Tcl, in any case, because what ends up happening is that 'complex' types (files, say), are tied, via a hash table, to the C struct that actually implements them, meaning that the string representation is really only a pointer to something else, and isn't "meaningful", as it is with lists or dicts. I think, though, that in this case I'll mostly want to keep types weak/dynamic, as Hecl aims to be a complement, not a replacement for Java, so in many cases, I'd rather see it make nearly the opposite design decision, where it's reasonable. We'll see, though, who knows what 'type' of interesting compromise we might end up with. Of course, I'm always happy to see new people join the discussion.

2 April 2006

Barry Hawkins: If your Debian menu in GNOME ever disappears

I recently had my Debian menu in GNOME disappear for reasons I could not explain. Since this is where the launcher for many of the applications one installs are typically housed, it was quite the inconvenience. I posted to the debian-user mailing list, and asked around on IRC in #debian and #debian-devel, but the most I ever received was a suggestion to run 'update-menus' from a command line. Having done that within the first 30 minutes of the issue’s appearance to no avail, I resigned myself to making do without the menu for the time being. Uninstalling and reinstalling the menu package was of no help. Reinstalling the gnome package yielded no joy, either. I could examine the contents of /var/lib/gnome and see that the menu structure was being built, it just wasn’t making into the menu. Through some poking around and talking with some folks who emailed me off-list to admit that they, too, had experienced this and were at a loss, the mystery has been solved. Apparently during some upgrade to packages, the menu-xdg package had been removed. Reinstalling it restored the menu to its formerly visible and altogether handy state. I posted a follow-up reply to debian-user in hopes of it helping posterity. This issue must seem like such a stupid or neophyte question that some people refrain from replying to a mailing list post about it. For those who knew the answer (I assume someone did), the question must have somehow seemed unworthy of reply. However, looking at the menu package, I don’t even see a Suggests entry for menu-xdg. It would be a shame if there are other people facing this issue with no resolution, so I am openly admitting that I had this problem in the hopes that it helps someone else out. Perhaps I should file some sort of wishlist bug, but my knowledge of the menu system is still narrow; maybe I will. I find myself periodically expanding the Debian menu on my desktop just to look at it and enjoy that warm, cozy feeling I get from having it back. 8^)

1 April 2006

Jeff Bailey: The urge to eat candy

I remember when Twinkies finally went vegetarian. I hadn't had any in something like 8 years. Bought a box, ate them, and didn't feel compelled to ever again.<br /><br />Now someone has come up with healthy <a href="http://www.drfuhrman.com/shop/pixievite.aspx">Pixie Sticks</a>. I might have to try a box of them, just to see if my adult mouth has outgrown my old junior high sugar tolerances. =) I got this from a blog called <a href="http://veganlunchbox.blogspot.com/">Vegan Lunchbox</a>. It's a lady who makes healthy vegan lunches for her kid and then documents it. I haven't actually tried any of her recipes yet, but I've book marked several.<br /><br />Unrelated to this: Montr al weather is really weird. It was +22 C yesterday, but it's warmed up so quickly that there was still a pile of snow in the back lane yesterday evening.<br /><br />(Please consider this post to have been made either on the 31st or the 2nd, as you see fit)

30 March 2006

Jordi Mallach: Evolution and the new GLib in Debian testing

Last night, glib 2.8 and pango 1.12 entered testing, as a first step on the GNOME 2.14 quest. The bad news is that the fixed evolution & friends were not ready to go in as well, so now many etch users will be wondering why their evolution doesn't start up, or doesn't show any mail. Until we manage to get a fixed evolution in testing, and it looks like it won't be trivial to get this done in the immediate future, Erich's recipe comes handy again:
My personal hero of the day is Gustavo Franco, for this email to debian-devel. He writes how to get your Gnome/Pango/Glib applications that don't work since yesterday's upgrade like evolution (#358071) working again:
$ G_SLICE=always-malloc evolution
And you should be able to read your email again.
Just FYI, and in case you missed it. :)

26 March 2006

Bernhard R. Link: compiler arguments

Please do not hide the arguments given to the compiler from me.

It's hard to realize something is going wrong if you do not see what is happening. If the argument list is too long, do something against that instead of hiding it.

Make sure you follow policy when packaging software

Debian packages should be compiled with -Wall -g, but more and more do not. Please check you do, but check at the correct place. Do not look into the debian/rules file, but in the build log. If the Makefile sets a default with a single equal sign ("="), running 'CFLAGS="-Wall -g -O2" make' will not suffice. Try 'make CFLAGS="-Wall -g -O2"' instead. (Actually, there is no good reason to put them before the command. Always try to put things as arguments first, both with make or with ./configure)

It really makes everyone's live easier if those options are set.

Keep the argument list tidy.

Many argument lists are longer than necessary. If there is some -I/ in the argument list on a Debian system, there is something fishy. (It's not the universial collection of different stuff all going whereever it wants, after all). Common cases are:

- buggy scripts to add -I/usr/include

Better fix those scripts. Also make sure they do not cause other problems, like linking your program against libraries your program does not use directly. (Possibly causing funny segfaults when those libs link against other versions of those libraries)

- -I/usr/X11R6/include

For upstream packages this might perhaps be useful to support older operating systems and people unable to give it to CFLAGS themselves. But for FHS systems, this is not needed at all, as it mandates this handy /usr/include/X11 -> /usr/X11R6/include/X11 symlink. And newer X directly puts the headers in the correct place.

- packages working around upstreams breaking compatibility

Life would be too easy if upstream would not break APIs. But if they make a new incompatible version, and even change the library name for that, would it have been that difficult to also change what programs written/ported for that new incompatible API have to place in their #include line?

- plainly broken upstreams

putting stuff in $ PREFIX /include/subdir/ and #include'ing other files from that subdirectory without the subdir deserves application of some large LART.

- oversight

often it is just not necessary, and everything gets much more readable and easier if left away.

Other things makeing things unreadable are large armounts of -Ds generated by ./configure. AM_CONFIG_HEADER can help here a lot with non-path stuff. Stuff containing paths is suprisingly often not used at all.

25 March 2006

Andreas Metzler: Discussion about /dev/random review?

I have googled in vain but perhaps I am just not handy enough. Has there been any major discussion about this review of Linux' /dev/random (announced on one of the authors blog) on the respective mailinglists (e.g. linux-kernel)? I would just like to read up on the discussion if it exists.

Eric Dorland: More Secrets of Debian Revealed: -dbg packages

Living with [info]mricon I get exposed to the way the other half lives. One thing I've noticed is that the RPM tools automatically build extra -debuginfo packages that contain the debugging symbols for the binaries in the package, which gdb can use. I thought too myself "That's cool, why doesn't Debian do that?" Of course, after some research it's actually very easy to accomplish the same thing in a DEB. First step is just to add a dbg package to your debian/control file like so:
Package: giblib1-dbg
Architecture: any
Section: libdevel
Priority: extra
Depends: giblib1 (= $ Source-Version )
Description: debugging symbols for giblib1
 giblib is a library of handy stuff. Contains an imlib2 wrapper to avoid the
 context stuff, doubly-linked lists and font styles.
 .
 This package contains the debugging symbols for giblib1.
Then change your call to dh_strip in your debian/rules files so it looks like this:
dh_strip --dbg-package=giblib1-dbg
If you use cdbs then just add the line:
DEB_DH_STRIP_ARGS := --dbg-package=giblib1-dbg
These cause dh_strip to place the debugging symbols under /usr/lib/debug in the named package. Make sure you have debhelper compatibility level set to 5, as the semantics for the --dbg-package switch in 4 and earlier were different and weird. So add a -dbg package to your library or binary today!

18 March 2006

Daniel Burrows: So close, yet so far away...

So, thanks to Marc's helpful advice yesterday, I took another look at my power supply, and lo and behold, there was a second four-pin power cord that I hadn't seen!

Allow me to explain. In my previous post, I mentioned that I had been doing something "wrong" with the power cable. You see, the case we picked out (an Antec Sonata) has a 24-pin power cable of which 4 pins can detach for older systems. At first, I misread the manual and thought this was for newer systems, so I detached it and plugged it into the handy 4-pin plug next to the CPU. Doh. Having corrected that (without the extra 4 pins in the main plug, not even the fans turned on), I was under the further mistaken impression that the 4-pin plug on the motherboard was the backwards-compatibility plug. I did actually check for an extra 4-pin PSU connector, but I must have overlooked the one that existed.

In my defense, here's what the manual states about the power connector:


This motherboard provides two power connectors to connect ATX12V power supplier.

NOTE: This 24-pin power connector "ATXPWR1" is compliant to the former 20-pin type. Pay attention to the orientation when attaching the power cord. (Pin-11, 12, 23, and 24 should be left un-connected).

Note: It is recommended to connect to a power with 350W, 20A +5VDC capacity at least for heavily loaded system, and a 2A +5VSB capacity for supporting wake-up features.


Not exactly crystal-clear on what needs to be connected under what circumstances. The case manual is at least correct if you follow along carefully, and they even found someone who can speak the language. Unfortunately, this section is phrased in a way that's highly prone to misunderstandings, particularly if you have an incorrect idea lodged in your head to start with:

Connect the 24-pin Main Power Connector and the 4-pin +12V connector to your motherboard as needed. If your motherboard uses a 20-pin connector, detach the 4-pin attachment on the 24-pin power connector.


You have to read that quite closely to realize that there are two 4-pin connectors involved!


Anyway, so I can actually get the machine to post and boot. Unfortunately, it's highly unstable once it does boot. It runs for up to several minutes, but then exhibits various sorts of erratic behavior: freezing, spontaneous reboots, random error messages, that sort of thing. I've made sure all the cords are plugged in tightly and reseated a couple components (particularly the memory); about the only thing I haven't checked is the CPU+heatsink mess, which would be a real pain to disassemble and re-assemble.

Still, it's nice to make some progress. Maybe tomorrow I'll discover some other cable I forgot to plug in that will make everything work (hey, I can dream).

15 March 2006

Jonathan McDowell: Mmmmm. Munin.

I've been using MRTG for many years now to draw pretty graphs. It's a bit inflexible though and I'd written a kludgy script or two to graph things that wanted more than 2 lines, or that I wanted to dynamically configure. I'd been on the looking for something simple that would do this all for me and replace my MRTG + scripts setup. All of what I'd seen seemed a bit complicated to get up and running, and what I had was BALGE, so I hadn't really looked that hard. At the start of the week, however, I got pointed at someone else's stats page, generated by Munin. The graphs were presented in a nice clear format rather than a million levels down a tree, and all the graphs for a host were on one page for at at-a-glance view. Of course there's a Debian package, so I thought I'd try it out. Very quickly I was up and running with my local machine being monitored. A little extra work and I had SNMP monitoring of my switch, allowing me to ditch MRTG. Slightly more work and I had my UPS being graphed too. Finally I installed snmpd on my wgt634u running OpenWRT and had that sorted too. Excellent. A lot less work than I expected and a much nicer setup than before. I'm sure there are other good options out there, but I found this one worked for me. Oh, and while I was at it I discovered mbrowse, an SNMP MIB browser. I think I'd rather have something that showed me the values read from the device in tree form, but I still found it quite handy.

Eric Dorland: watch files: The Rebuttal

Lars Wirzenius writes that he doesn't like watch files. While it's hard to to argue against laziness (best you can do is probably: "Your mother told you not to be lazy!"), I'll try to address the other concerns. While coolness is almost always a reason in itself to do something, I think there are legitimate reasons to do it. While it may not be the case for you, I certainly think they will come in handy to help me notice new versions of some of the smaller, low-key packages I maintain (the ones without mailing lists, etc). It will be useful for statistical purposes. If enough maintainers put watch files into their packages well be able to easily see how close Debian is to the latest upstream releases. I can't argue that a more collaborative wiki-esque wouldn't be great. But we have this system and it works. I don't think the burden of having to change it if the location changes is much of a problem. It shouldn't really be an often occurrence and the copyright file would probably need to be updated at the same anyway. The ideal would be a system that combines the watch file mechaism with some sort of collaborative site.

14 March 2006

Eric Dorland: watch files: The Rebuttal

Lars Wirzenius writes that he doesn't like watch files. While it's hard to to argue against laziness (best you can do is probably: "Your mother told you not to be lazy!"), I'll try to address the other concerns. While coolness is almost always a reason in itself to do something, I think there are legitimate reasons to do it. While it may not be the case for you, I certainly think they will come in handy to help me notice new versions of some of the smaller, low-key packages I maintain (the ones without mailing lists, etc). It will be useful for statistical purposes. If enough maintainers put watch files into their packages well be able to easily see how close Debian is to the latest upstream releases. I can't argue that a more collaborative wiki-esque wouldn't be great. But we have this system and it works. I don't think the burden of having to change it if the location changes is much of a problem. It shouldn't really be an often occurrence and the copyright file would probably need to be updated at the same anyway. The ideal would be a system that combines the watch file mechaism with some sort of collaborative site.

Next.

Previous.