Search Results: "ron"

3 November 2009

Biella Coleman: Touching Music via the Voice-O-Graph

In no way can I be describe myself as music aficionado for I rarely seek music. But music being that it makes its way into your ears through so many venues and vehicles, certainly finds me. A few years ago I stumbled upon Owen Chapman s music at live performance (using ice among other objects) at a conference on copyright s counterparts. I immediately loved it not only because it is a genre of electronic music I tend to like but because of the depth of its texture. While all music enfolds this feature, when I listen to his music, it is as if I am not listening to music but also touching it (and vice-versa). He just released an album whose song and sounds keep with his signature style of deep texture. It also makes an ethical call and claim: since remixing/sampling is citational, akin to academic quotation, it thus deserves a kind of explicit recognition and commentary. To honor this he is providing his music free of charge once one dips in with their own commentary and contribution. Full details and music here

Biella Coleman: Touching Music via the Voice-O-Graph

In no way can I be describe myself as music aficionado for I rarely seek music. But music being that it makes its way into your ears through so many venues and vehicles, certainly finds me. A few years ago I stumbled upon Owen Chapman s music at live performance (using ice among other objects) at a conference on copyright s counterparts. I immediately loved it not only because it is a genre of electronic music I tend to like but because of the depth of its texture. While all music enfolds this feature, when I listen to his music, it is as if I am not listening to music but also touching it (and vice-versa). He just released an album whose song and sounds keep with his signature style of deep texture. It also makes an ethical call and claim: since remixing/sampling is citational, akin to academic quotation, it thus deserves a kind of explicit recognition and commentary. To honor this he is providing his music free of charge once one dips in with their own commentary and contribution. Full details and music here

Stefano Zacchiroli: RC bugs of the week - week 8

RCBW - week #8 This week I'm behind schedule. Part of the reason is that, after all the traveling (first the GSoC mentors summit, where I met several other Debian folks, then a work meeting in Lisbon), I got sick again for a while: plain flu, no H1N1 yet :-) Now that I'm finally feeling better ... here is a (delayed) weekly RCBW update; as usual, dates are mostly indicative. This week, you might have noticed an upward spike of about 200 bugs in the RC bug graph: that's Manoj reporting a lot of neglected violations of policy "MUST" requirements. No matter what's your take on how those bugs have been reported, all of them (up to false positives) are indeed bugs of RC severity. So roll up your sleeves and join RCBW, we will be freezing soon.

2 November 2009

Axel Beckert: 192.168.noone.org

About a year ago, Eric Poscher invented the IP address blog and installed his one at http://192.168.epe.at/. Every hour his netbook notes down the IP address of the interface which currenntly the default route goes through and if it has an internet connection, it uploads the list of IP adresses it had. Additionally, he filters the list to IP addresses in 192.168.0.0/16. June this year he published the source code behind his IP blog under GPL and Creative Commons. I modified his script slighty to just write down the new IP address if it s different to the previous one, but without any filter. This makes the list much more colorful (and my online times less traceable :-) as you can see at http://192.168.noone.org/. But the biggest disadvantage of Eric s code design is not the fact that it s a (quite nice to read :-) shell script but that it doesn t save the list of IPs separately and is not able to regenerate everything if you want to change the design, but always just adds a line to the HTML page. So I rewrote the whole thing in Perl last Saturday while sitting the dog of my parents. If you change the templates and call the script again, it regenerates the whole list with the new templates. The code is also under GPL, the HTML parts are under Creative Commons, too. And hey, this is one of the very few (if not only) applications which are much more fun with IPv4 than with IPv6. ;-)

Axel Beckert: Still happy with the ASUS EeePC 701

Recently Eric asked on the LUG Vorarlberg mailing list about netbook experience. I wrote a lengthy reply summarizing my experiences with the ASUS EeePC 701. And I thought this is something I probably should share with more people than only one LUG: I ordered an ASUS EeePC 701 (4G) with US keyboard layout at digitec in Spring 2008, got it approximately one month later and posted a first resum after one month in my blog. I m still very happy with the EeePC 701, despite two commonly mentioned drawbacks (the small screen resolution and the small SSD which I both don t see as real problems) and some other minor issues. What mattersNice to haveWhat doesn t matterWhat s not so niceSimilar models Technically, most of this also counts for the EeePC 900SD (not 901) which only differs in screen, resolution and disk size as well as CPU, but not on the the case. So same size, same robustness, same battery, same mainboard, bigger screen, resolution, disk and faster CPU. (The 901 has a different CPU, a different battery, and a different, glossy and partially chromed case.) See Wikipedia for the technical specifications of all EeePC models. ASUS only big FAILure Stopping to sell most EeePCs with Linux and cowardly teaming up with Microsoft after having shown big courage to come out with a Linux only netbook. Well, you probably already know, but it s better without Windows So basically you no more get these really neat netbooks from ASUS anymore and you get nearly no netbooks with Linux from ASUS in the stores anymore. It s a shame. Would I buy it again? Sure. Well, maybe I would also buy the 900SD or 702 (8G) instead of the 701, but basically they re very similar. See Wikipedia for the differences between these EeePC models. And of course I still prefer the versions without Windows. But despite the low price, the EeePC 701 is surprisingly robust and still works as on the first day (ok, except battery, the mouse button bar and the n key ;-), so I recently bought a second power supply (only white ones were available *grrrr*) and ordered a bigger third party battery plus an adapter to load the battery directly from the (second) power supply without EeePC inbetween. What desktop do I use on the EeePC? None. I use ratpoison as window manager, uxterm, urxvt, and yeahconsole as terminal emulators (running zsh with grml based .zshrc even as root s login shell :-), wicd-curses as network manager and xmobar (previously dzen2) with i3status as text-only panel. Installed editors are GNU Emacs 23, GNU Zile and nvi. (No vim. :-) And of course a netbook wouldn t be a netbook if it wouldn t have a lot of network applications installed. For me the most important ones are: ssh, scp, autossh, sshfs, miredo, conkeror, git, hg, and rsync.

1 November 2009

Axel Beckert: /var/cache/apt/ on tmpfs

My ASUS EeePC 701 (4G) nemo running Debian Sid has a 4 GB SSD as main disk, which is on the one hand quite full (mostly with software I use, but also local working copies of software I work on) and on the other hand an SSD, so I always try to reduce the amount of write to disk without losing convenience. Similar issues have systems which run off a CF or SD card or maybe even an USB stick. Since I ordered a 2 GB RAM bar together with the EeePC, I not bound to the 512 MB which it had originally. But on the other hand I seldom needed more than 1 GB of RAM. Usually I needed between 400 MB and 1 GB of RAM. So it s quite obvious to use tmpfs on as many places as possible. Making /tmp, /var/run and /var/lock tmpfs were the most obvious directories to mount as tmpfs. Especially /var/run on tmpfs brought up a few bugs a while ago (mostly init.d scripts relying on /var/run/$PACKAGENAME/ s existence), but it s no hassles to use nowadays. Even in Debian Stable such bugs got fixed. Next target to explore for was /var/cache. According to the FHS, /var/cache is intended for cached data from applications. [ ] The application must be able to regenerate or restore the data. So it should be safe to put anything under /var/cache on tmpfs. One directory in there which gets written quite often and with a lot of data on Debian Unstable is /var/cache/apt and its subdirectories, especially /var/cache/apt/archives. If you update your Sid installation daily, all new or updated .debs will be downloaded to /var/cache/apt first. So I put /var/cache/apt on tmpfs by putting the following line into /etc/fstab:
tmpfs /var/cache/apt tmpfs defaults,noexec,nosuid,nodev,mode=0755 0 0
But despite FHS stating that anything under /var/cache must be reproducible by the application, apt is puking and refusing to work:
!447 Z31 ?0 L1 root@nemo:pts/0 (-zsh) 16:13:10 [~] # apt-get update
E: Archive directory /var/cache/apt/archives/partial is missing.
!448 Z32 ?100 L1 root@nemo:pts/0 (-zsh) 16:13:17 [~] # 
If you create /var/cache/apt/archives/partial, it will also argue about /var/cache/apt/partial. Of course the workaround is simple: Just put mkdir -p /var/cache/apt/partial /var/cache/apt/archives/partial in /etc/rc.local. But nevertheless, this is a bug in apt which already has been reported by madduck earlier this year (#523920). Unfortunately the APT maintainers have not yet even commented on this FHS violation and therefore also a Debian Policy (Section 9.1.1) violation. One more thought about /var/cache/apt vs only /var/cache/apt/archives: apt-file also caches its data under /var/cache/apt. So if you want to use apt-file after a reboot and have /var/cache/apt mounted as tmpfs, you have to run apt-file update first and it will download all Contents files (can be dozens of megabytes) and not only the differences to previously downloaded Contents files. So if you use apt-file a lot, you probably go better with making only /var/cache/apt/archives tmpfs and not whole /var/cache/apt.

Jeff Bailey: Crap error messages

updated

When writing software, *please* don't give error messages that are only meaningful to developers of the software. Microsoft used to be awful for this: "System fault at DEAD:BEEF, please contact your system administrator". Which would've been cool, except that I *was* the system administrator.

My most recent encounter with this was this morning with bzr (On my work laptop, so it's Windows):

C:\Users\jeffbailey\workspaces\webhack\Webhack>bzr push lp:~jbailey/webhack/trunk
Connected (version 2.0, client Twisted)
SSH C:\Users\jeffbailey/.ssh/id_rsa password:
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: RemoteRepository(bzr+ssh://bazaar.launchpad.net/~jbailey/webhack/trunk/.bzr/)
is not compatible with
CHKInventoryRepository('file:///C:/Users/jeffbailey/workspaces/webhack/Webhack/.bzr/repository/')
different rich-root support


Umm. What? Okay. I work for a search engine. So I fired up Yahoo!^WGoogle to figure out what the message could possibly mean. The top result is Bug 172360 in Launchpad:
"branching from rich-root to non-rich-root gives confusing errors"

Sounds perfect, until you see that the bug is marked as invalid.

Something got missed here. If your user says "I don't understand" - they are NEVER wrong. It doesn't matter if you think they should've understood. It doesn't matter that you think you explained it well enough. The user doesn't understand, so you lose. Actually, it's worse. *they* lose.

There are lots of other bugs leading up to how I got to where I was seeing this in the first place. But none of those are as important as the fact that the developers thought a user saying "I don't get it" wasn't worth the 30 seconds of adding the text "The best way to fix this is to run: bzr upgrade --default " + branch.url;

Update: Jelmer pointed out to me in a comment that it wasn't the devs who marked it as invalid, it was the submitter. He's reopened it. This just further supports the notion that users are insane and need hand-holding. =)

Dirk Eddelbuettel: Adventures with Comcast: Part ohnoesnotanotherone in an ongoing series

Regular readers of this blog (yes, both of you!) may remember the computer/broadband/ directory that this post appears in as the collection of my Comcastic (yeah right) experiences with my ISP. But I think this week may top everything. I'll just try to jot down some notes before I forget all the gory details:

John Goerzen: First impressions of the iPod Touch

So far, our household has resisted any piece of the iPhone onslaught. Yes, I carry an iPod Classic, but that s different. Terah s old Palm m100 is becoming a problem. The platform is dead, and the desktop sync drivers for it are decaying rapidly in every operating system. Not only that, but we would really like to be able to share calendars between us. Terah doesn t need a phone or a mobile data plan. After thinking about it a bit and getting some advice, we decided to get her the $200 8GB iPod Touch. And it arrived Friday. I ve used portable devices plenty before. I had my share of PalmOS devices: III, V, Clie; an HP 200LX DOS-based err netbook; a Zaurus; and an N810. The first thing that struck me about the iPod Touch was beauty no surprise there. The interface exuded an air of stability, like it wasn t going to just crash when something went wrong. It felt solid and well-planned. Physically, it s thin. Really thin. That s perhaps the most impressive thing about it of all. Sometimes the GUI masked underlying performance issues. For instance, it may take awhile to draw a web page. On the N810, you get to watch as different bits of the screen appear. On the iPod Touch, you sit there staring at a white screen with a spinning wheel for awhile, and then suddenly poof, the webpage is there. I d have to say the Apple approach feels better. Terah and I decided to sync with Google Calendar, and that setup was easy and well-done on the iPod Touch easier than on the Blackberry with Google s own app, in fact. The only question was that Contacts was a bit counter-intuitive; select the Google account and nothing shows up, but everything is there under the generic Contacts bucket. The Calendar worked very well, even properly handling meetings and invitations. The mail app works well, though it takes a long very long time to scroll through a lengthy email to get to the attachment at the bottom. There s no go to bottom of message feature that I could see, and my idea of pinching the screen to make the text tiny to make scrolling faster didn t work. The mail setup, though, is a complete and utter pain. There is no way anybody that doesn t know a lot of details about SSL certs could have made this work. When you add a mail account, it requires you to have an IMAP and SMTP server defined. It would like to use SSL/TLS with these, which is great. But if it can t validate the cert, it pops up a dialog box asking if you want to continue. You can say yes, but it just sits there for a couple of minutes and then fails with a mysterious error. I had to put my cert up on a webserver, point Safari at it, and install the cert to the device before it would talk to it. That solved IMAP. SMTP was another matter too. Strangely, on the initial account setup, there is no way to put in the port number for SMTP server. Yet it won t save your account until it can connect to one. Of course, most ISPs block the smtp port, so this was bound to fail. Finally I pointed it at a server on my local network temporarily, then went in and edited the account to point it to the real server with the second non-25 port it listens on for just such situations. Safari works really well. It s probably the best mobile browser I ve seen yet (I haven t seen Android or Palm Pre yet.) It is far better than the N810 browser, both in terms of speed and in terms of ability to reformat pages to fit the device. The tabbed browsing is a lot faster switching than the N810 s separate windows, and nicer too. The app store essentially lived up to my expectations. It was very easy to use, and obviously a closed proprietary ecosystem. The free apps that existed there mostly were adware. I looked for a Jabber client, and wasn t happy with any option. Some of them required Apple Push Notifications, with a complex network of two servers between the device and the Jabber server. No thanks to that invasion of privacy. And that brings me to the topic of weird limitations. iPod Touch apps, in general, can t run in the background. You exit Safari, and when you get back in, it s reloading that webpage. Now many apps are good at remembering their state, but this feels very PalmOS to me. You can t use the iPod Touch at all until you first sync it with iTunes. That is incredibly weird. The device has Wifi, people. Plus, why should I have to register it with Apple anyhow? And then there s the lack of a file manager, or anything like it. I can t scp a file from my computer to the iPod Touch like I can my N810, nor the other way round. It is generally unclear how much of the 8GB is in use, and by what. Terah needs a password-keeping program. There are several in the app store. I d really like one that uses Bruce Schneier s standard Password Safe format which is supported on just about any platform you care to name. Couldn t find one. Even if I could, I guess it wouldn t do me any good, since you can t copy the file to a PC anyhow. Sigh. Overall, Terah is very excited with the device, and I must admit to being so too. Its faster web browser means it s probably a good replacement for the N810 especially if you want a calendar, which the N810 completely lacks. It makes an excellent PDA, perhaps the first PDA I ve seen that equals the usability of the old PalmOS. On the other hand, it isn t really a power user s device. There are a lot of surprising limitations and missing features that competing devices have had for years.

31 October 2009

Frank S. Thomas: Automatic generation of a C header from Fortran code?

Dear Lazyweb, In my newest project I need to use Fortran routines and variables in C. From the source code point of view this requires only to declare the needed Fortran entities in your C code whilst taking the right types of the variables and the name mangling of the Fortran compiler into account. Here is an example. Consider you have the following Fortran code:
module X
  real, dimension(0:1) :: v
 
  subroutine Foo(A, b, c, &
    & D)
    integer, intent(in) :: a, &
      & B
    real, intent(out) :: C, d
    ! <Foo's body>
  end subroutine
end module X
To use the array v and the subroutine Foo() in C, you need to add (something like) the following declarations to your C source code:
extern float x_mp_v_[2];
 
void x_mp_foo_(int* a, int* b, float* c, float* d);
If only a handful of Fortran routines are needed to be called from C, declaring them by hand may be feasible. This is however error-prone and becomes impracticable for more than a handful of routines. Especially if the routine signatures change frequently. So what I d like to have is a tool that generates a C header file containing all declarations of Fortran entities from a given Fortran source file. Or if such tool does not exist, a tool that extracts variable declarations and routine signatures from a Fortran source file into a format that is easier to parse than Fortran itself would also be helpful. Any suggestions?

Stefano Zacchiroli: mail indexing for mutt

a tale of three tools: mairix, maildir-utils (mu), nmzmail I think/fear I'm getting into this Getting Things Done thingie. For weird reasons I'll explain later on, part of the GTD work flow I'm implementing requires quick lookup from Message-IDs to the corresponding mail, no matter in which mailbox (actually Maildir) I've stored it. Hence, I've looked for a mail indexing tool which is Mutt-compatible, handles Maildirs, and supports Message-ID queries. In Debian (where else should I look? g), I found three: mairix, nmzmail, maildir-utils (whose upstream name is actually "mu"). The first one I tried is mairix. Last upload in Debian was 2 years ago, it doesn't seem to be particularly buggy, and in popcon it has about 300 installations. The integration with mutt is good: searches can create a sort of virtual Maildir, whose files are symlink to the search results; with a couple of macros you can have Mutt easily open the result directory after query. The reason why I ditched mairix, is that it heavily suffer from the NIH syndrome. mairix is a self-contained executable with no external dependencies; that in principle being good, I found nowadays totally unreasonable to not use some third party full text search indexer, given that in the FOSS world we have several good ones. A good aspect of mairix, which is missing in the competitors, is the ability to index messages incrementally as they flow in, e.g. via procmail. Still, the problem of that is that it is difficult to pair that with the habit of moving messages across mailboxes. To that end, periodic re-indexing, or better batch index updates, offers a better work flow. Then I tried nmzmail, which claims at is killer feature the "better integration with Mutt" wrt competitors. Actually, this is false, it has the same level of integration of the other (virtual maildirs with macros) and it doesn't even offer a ready to use set of macros in the doc! (yeah, they're easy to write, but given that you claim you're so well integrated with Mutt ...). The reason why I ditched nmzmail is that I didn't particularly like its choice of (external at least) indexer: Namazu. The index it created was very big (something like 250 Mb for about 400 Mb of Maildirs). Also, I had a bad feeling that the indexing was somehow Japanese-specific (the project having support for that language) and I found no way to disable support for that, which I obviously do not need. Finally, I tried maildir-utils and I was finally happy. It is implemented on top of Sqlite3 (for mail metadata) and Xapian (for full-text indexing). There are some bugs, but Norbert, as the very reactive maintainer, have tackled down most of them now and I've been happy to help with various feedback. Integration with Mutt is granted by the following 2 macros:
    macro index <F8> "<shell-escape>rm -rf ~/.mu/results; mu-find -o l -l ~/.mu/results " "mu-find"
    macro index <F9> "<change-folder-readonly>~/.mu/results\n" "display mu-find results"

The first one query (you) for the search string, the second jumps to the results opening the virtual Maildir (which is useful, especially when you want to go back to the last query you did). I update the index every two hour with the following cron entry:
    31  */2 *  *   *     on_ac_power && mu-index -q

Beside a corner case bug which is close to solution, updating the index is very fast, usually a few seconds; index size is about 150 Mb. To conclude, my initial goal (message path lookup via Message-ID) is easily achieved as follows:
    $ mu-find -f P m:20091030112543.GA4230@usha.takhisis.invalid
    /home/zack/Maildir/INBOX/cur/1256902638_0.25702.usha,U=37563,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S

In addition to that, I've now gained all-maildirs full-text search from within Mutt :-) As a concluding remark, Enrico pointed me to Not much mail, but it seems to be (by authors' own admission) in early stage of development. Also, AFAIU it aims to be a MUA, whereas I'm perfectly fine with Mutt, I just need from time to time to integrate it with other components of my daily work flow.

Romain Beauxis: Liquidsoap 0.9.2 is out !

The savonet team is proud to announce the release of liquidsoap [1] 0.9.2. This release is a snapshot of upcoming features, but it also brings several important bugfixes. As a snapshot, it contains experimental and unpolished features, and also slightly breaks compatibility with previous 0.9.x versions. The interesting features in this release are:
  • Switched to a custom implementation of the shout protocols. This allows in particular AAC+ output support, using either the external aacpluenc [2] binary or the native libaacplus [3] [4].
  • New scheduling algorithm for request-based sources which avoids queueing multiple songs at once.
  • Support for libre.fm [5].
  • Built-in support for extracting replay gain [6] metadata.
  • Supports for fallible outputs.
  • MANY bugfixes !
You can read a detailed changelog there [7]. This release is a milestone on our way to liquidsoap 1.0.0. Major changes are going to be merged into the main development branch now. We keep getting closer! The Debian package for sid/unstable will soon be available too. Additionally, a stable debian backport should be available anytime soon.

[1] http://savonet.sourceforge.net/ [2] http://teknoraver.net/software/mp4tools/ [3] http://tipok.org.ua/ru/taxonomy/term/36 [4] Output using libaacplus is still experimental and bug prone and both outputs suffer from the limitations of the same codebase, in particlar when streaming at low bitrate such as 32Kbps.. [5] http://libre.fm/ [6] http://en.wikipedia.org/wiki/Replay_Gain [7] http://savonet.rastageeks.org/brows...

30 October 2009

Jordi Mallach: Dead PowerBook G4

A few weeks ago I was trying to get GRUB2 for PowerPC back to work on my PowerBook G4 15", and had some problems getting OF doing the right thing. Not being an OF expert at all, I found myself making things a bit worse, ending up with an unbootable laptop and, what a classic, unable to boot my old rescue CD to get yaboot back in its place. So I googled a bit and ended up deciding that, given the boot parametres and some other stuff like the system's clock were doing strange stuff, reset-nvram would help getting things in a better shape that would at least permit CD booting. So there, reset-nvram, followed by reset-all, as found in all the OpenFirmware cheatsheets I found all over the web, and damn it, nothing changed and I was back into the OpenFirmware prompt. I used the power button to reset the laptop once again, and that was the last time I saw something functional on the PowerBook. Now, when I start the computer, all I hear is the Apple startup sound, followed by the sound of the CD drive (which has eaten an Ubuntu 5.10 CD) trying to spin up for a pair of seconds, and then nothing. There's nothing displayed on the LCD, or any other sign of life . My searches in Google indicate this is a logic board failure and you can imagine that is not cheap to get fixed by Apple support. I've tried numerous keyboard combo tricks I didn't even know about, and none seem to work. The computer doesn't seem to be responding to the builtin keyboard, an Apple USB keyboard I borrowed, or an external display. I'm annoyed because I've looked after this laptop really well and it was in a really good condition, so I'm going to see if it can be fixed for a reasonable amount. Apple care in Val ncia is not an option. They say a logic board (if this is really what is causing trouble) costs around 500 , so I'll have to explore other ways. The first one is trying to find out if these symptoms (nothing on the display, key combos don't appear to work, etc.) really point to a fried logic board or could be something else. I've tried removing the RAM and replacing it with my old one, but that didn't work either. So, if anyone reading this has some Apple PowerPC hardware experience and can share some of their knowledge and suggestions, I'd be really, really grateful. Plan B involves hiring a coworker, who I believe is the son of McGyver, to try to get it repaired for me. This would involve buying spare parts in eBay or some other place to try to get the replaced. Again, suggestions, donations and ideas are welcome in this front too. :) Jose Vicente loves fixing stuff, and right before the Summer he already showed what he can do with a screwdriver and some patience. Some weeks before, I had managed to shatter the LCD screen of my Nokia 6500s when I lost my grip while climbing down a mountain in El Cad , and the phone in my pocket hit a big rock. The phone worked, but I all I could see in the screen were some cracks in random colours. People suggested I should get a new phone, but I really don't want to generate even more polluting waste when all that was needed was replacing a cheap component.


My phone during its stay in McGyver's hideout

Joerg Jaspert: Debian FTPMaster meeting, now with the one and only official documentation of the archive

Here we are, still writing code, still doing 16hour days, still keeping the archive cronjobs disabled, still having fun. Yesterday we enabled the rsyncable option for all the gzip contents we are creating in our dists/ directory, which will lead to nice bandwidth savings during the mirror push. Initial tests showed a size increase of about 2 til 4 percent but the transferred amount of data going down to 1/8th for Packages files, 1/4th for Contents files. We also started implementing an ACL system in DAK which basically will allow the sane implementation of the already mentioned buildd autosigning, decrufting the code handling DMs and later on easily allowing the throw away binaries feature, while still allowing for exceptions, like bootstrapping a new architecture. The majority of it is there and already working, just a few edges still have to be smoothened. debian_archive_old.jpg Yesterday evening we started the last major work for this meeting, in terms of coding. We will end up with a completly different way of handling the lifecycle of a package in the archive, before it enters the public viewable pool/ directory. To wrap our heads around the problem we had to write down how the archive works currently, which you can see in the first picture. And then we had to go and define how it should look in the future, for which you can look at the second picture. As all of us here love the simple clarity of this drawing we went and declared it the one and official ftpmaster documentation of our archive queues. :) debian_archive_new.jpg As you might miss enough Milk/IceTea/Coffee/Drugs to understand what the fuck we smoked when drawing it, lets try a short explanation, starting with the old red version: This is how the archive worked for the last years now, and while it works it has a few drawbacks. For example, files do have to be processed multiple times before they end up in their final location, which is just unneccessary. It also opens us to a kind of race condition between the unchecked and accepted queue, leading to automated unaccepts. And it duplicates some code and also checks we have to run, wasting time and resources. Thats not all of it, but a good start. So the idea is to get rid of the extra queue and switch over to install files directly into the pool when processed from the unchecked queue. And that is what the third picture shows in green, the changed handling. As you see we completly lose the complexity around accepted by moving directly into pool. So, as usual, saying it in two sentences doesn t mean the actual implementation is easy, even if it will make future handling easier for us. meeting_minutes.jpg Of course this hasn t been all we worked on today. We are 6 persons here, there is much more done than I can condense into those few blog posts. Especially as I want to do my own share of work (shut up mhy :) ), and not just blog around. So, to still keep you informed I included our official meeting minutes in this blog post. Picture 3 is your friend. :) (Ok ok, just joking, but it contains a good overview of our various discussion about the various projects we work on). We are currently running a script that is importing data about all known changes files the archive ever has seen (since about 2002), together with the most important data from them. While this allows only a small function for us in the archive (have we seen this file already? Reject upload) using it (prior it used to look for file existance in a subdir), it might allow other people to do creative things with it. We also added a new Release file to our mirrors. They are called InRelease and are the same as the Release file, but they are signed inline (cleartext signature). Using those files it can no longer happen that one downloads a Release file, the mirror updates and one downloads a different Release.gpg. This will help reducing problems experienced there, even if it is only the first step towards the final solution. For the final solution we have to do something about the Packages files related to the Release files to, and allow multiple versions of them to exist and then let the Release file tell for which of them they are. We probably will end up with the Packages/Sources files of the last 2 or 3 runs and the Release file mentioning them all, but that won t be done during this meeting. Oh, and as you have all be so patient with us during the last days of reduced archive service: Our current plan is to come back to a mostly normal service during Saturday, so we have the rest of Saturday and the few hours on Sunday which we are here to monitor what it is doing. Thats it for today, but you can sure expect a more detailed report send to d-d-a sometime next week.

Martin F. Krafft: Webcast of my Ph.D. defence

I am sitting in Lero, waiting for the next 30 minutes to pass before I shall defend my Ph.D. thesis in front of a board of three examiners. It will start at 9:30 GMT. I cannot decide whether I am nervous, or whether I had too much coffee. Someone just asked me if I am well-prepared Yes, I worked four years for this. Excited and prepared. If you want to tune in, my initial, public presentation will be webcast (using proprietary media, unfortunately (Flash required)). I hope to have a recording available later. The following interrogation by the examiners is not public (even though I wanted it to be). I forgot my Lederhosen at home, or I would have worn them today.

Matt Brubeck: Compleat: Programmable Completion for Everyone

Compleat is an easy, declarative way to add smart tab-completion for any command-line program. For a quick description, see the README. For more explanation and a brief tutorial, keep reading... Background I'm one of those programmers who loves to carefully tailor my development environment. I do nearly all of my work at the shell or in a text editor, and I've spent a dozen years learning and customizing them to work more quickly and easily. Most experienced shell users know about programmable completion, which provides smart tab-completion for for supported programs like ssh and git. (If you are not familiar it, you really should install and enable bash-completion, or the equivalent package for your chosen shell.) You can also add your own completions for programs that aren't supported but in my experience, most users never bother. When I worked at Amazon, everyone used Zsh (which has a very powerful but especially baroque completion system) and shared the completion scripts they wrote for our myriad internal tools. Now that I'm in a startup with few other command line die-hards, I'm on my own when it comes to extending my shell. So I read the fine manual and started writing my own completions. Over on GitHub you can see the script I made for three commands from the Google Android SDK. It's 200 lines of shell code, fairly straightforward if you happen to be familiar with the Bash completion API. But as I cranked out more and more case statements, I felt there must be a better way... The Idea It's not hard to describe the usage of a typical command-line program. There's even a semi-standard format for it, used in man pages and generated by libraries like GNU AutoOpt. Here's one for android, one of the SDK commands supported by my script:
 android [--silent   --verbose]
   ( list [avd target]
     create avd ( --target <target>   --name <name>   --skin <name>
                   --path <file>   --sdcard <file>   --force ) ...
     move avd (--name <avd>   --rename <new>   --path <file>) ...
     (delete update) avd --name <avd>
     create project ( (--package --name --activity --path) <val>
                       --target <target> ) ...
     update project ((--name --path) <val>   --target <target>) ...
     update adb )
My idea: What if you could teach the shell to complete a program's arguments just by writing a usage description like this one? The Solution With Compleat, you can add completion for any command just by writing a usage description and saving it in a configuration folder. The ten-line description of the android command above generates the same results as my 76-line bash function, and it's so much easier to write and understand! The syntax should be familiar to long-time Unix users. Optional arguments are enclosed in square brackets; alternate choices are separated by vertical pipes. An ellipsis following an item means it may be repeated, and parentheses group several items into one. Words in angle brackets are parameters for the user to fill in. Let's look at some more features of the usage format. For programs with complicated arguments, it can be useful to break them down further. You can place alternate usages on their own lines separated by semicolons, like this:
android <opts> list [avd target];
android <opts> move avd (--name <avd> --rename <new> --path <file>)...;
android <opts> (delete update) avd --name <avd>;
...and so on. Rather than repeat the common options on every line, I used a parameter <opts>. I can define that parameter using the same usage syntax.
opts = [ --silent   --verbose ];
For parameters whose values are not fixed but can be computed by another program, we use a ! symbol followed by a shell command to generate completions, like this:
avd = ! android list avd   grep 'Name:'   cut -f2 -d: ;
target = ! android list target   grep '^id:'  cut -f2 -d' ' ;
And any parameter without a definition will just use the shell's built-in completion rules, which suggest matching filenames by default. The README file has more details of the usage syntax, and instructions for installing the software. Give it a try, and please send in any usage files that you want to share! (Questions, bug reports, or patches are also welcome.) Future Work For the next release of Compleat, I would like to make installation easier by providing better packaging and pre-compiled binaries; support zsh and other non-bash shells; and write better documentation. In the long term, I'm thinking about replacing the usage file interpreter with a compiler. The compiler would translate the usage file into shell code, or perhaps another language like C or Haskell. This would potentially improve performance (although speed isn't an issue right now on my development box), and would also make it easy for usage files to include logic written in the target language. Final Thoughts Recently I realized that parts of my work are so specialized that my parents and non-programmer friends will probably never really get them. For example, Compleat is a program to generate programs to help you... run programs? Sigh. Well, maybe someone out there will appreciate it. Compleat was my weekends/evenings/bus-rides project for the last few weeks (as you can see in the GitHub punch card), and my most fun side-project in quite a while. It's the first "real" program I've written in Haskell, though I've been experimenting with the language for a while. Now that I'm comfortable with it, I find that Haskell's particular combination of features works just right to enable quick exploratory programming, while giving a high level of confidence in the behavior of the resulting program. Compleat 1.0 is only 160 lines of Haskell, excluding comments and imports. Every module was completely rewritten at least once as I tried and compared different approaches. This is much less daunting when the code in question is only a couple dozen lines. I don't think this particular program would have been quite as easy to write at least for me in any of the other platforms I know (including Ruby, Python, Scheme, and C). I had the idea for Compleat more than a year ago, but at the time I did not know how to implement it easily. I quickly realized that what I wanted to write was a specialized parser generator, and a domain-specific language to go with it. Unfortunately I never took a compiler-design class in school, and had forgotten most of what I learned in my programming languages course. So I began studying parsing algorithms and language implementation, with Compleat as my ultimate goal. My good friend Josh and his Gazelle parser generator helped inspire me and point me toward other existing work. Compleat actually contains three parsers. The usage file parser and the input line tokenizer are built on the excellent Parsec library. The usage file is then translated into a parser that's built with my own simple set of parser combinators, which were inspired both by Parsec and by the original Monadic Parser Combinators paper by Graham Hutton and Erik Meijer. The simple evaluator for the usage DSL applies what I learned from Jonathan Tang's Write Yourself a Scheme in 48 Hours. And of course Real World Haskell was an essential resource for both the nuts and bolts and the design philosophy of Haskell. So besides producing a tool that will be useful to me and hopefully others, I also filled in a gap in my CS education, learned some great new languages and tools, and kindled an interest in several new (to me) research areas. It has also renewed my belief in the importance of "academic" knowledge to real engineering problems. (I've already come across at least one problem in my day job that I was able to solve faster by implementing a simple parser than I would have a year ago by fumbling with regexes.) And I'll be even happier if this inspires some friends or strangers to take a closer look at Haskell, Parsec, or any problem they've thought about and didn't know enough to solve. Yet.

29 October 2009

John Goerzen: Apache Update

Thanks everyone for the helpful comments yesterday on Apache vs. lighttpd. I ve taken the first few steps towards improving things. I ve eliminated mod_php5, switched all PHP to FastCGI, and switched from the prefork to the event MPM. The event MPM docs say that it s incompatible with mod_ssl, but it worked, and googling for that turned up mailing list posts from 2006 saying it was fixed. The only real glitch was that egroupware inexplicably depends on libapache2-mod-php5. It works fine without it, but I had to create a fakelibapache2-mod-php5 that provides libapache2-mod-php5 to convince the system not to remove egroupware when I switched to the event MPM. I went from 28 Apache processes to 4 Apache processes plus an average of around 2 php5-cgi processes which, despite the name, actually do grok FastCGI. Three of my Apache processes now have an RSS of about 20M, and the other of about 30M. The php5-cgi processes are at around 40M. My old Apache processes ranged from 18M to over 40M. So there is some memory savings here, though not drastic. My Redmine processes, two of them, each use over 50M. Ruby on Rails still is leaving me with a bad taste. At least it s not a Java app; it seems a lot of those allocate 2GB before they ever start accepting connections. I ll see how this goes for awhile, but for now I doubt that moving to lighttpd (or similar) will yield enough benefit to make it worth the effort. But there may be some benefit in inserting a caching proxy in front of Apache, so I may yet do that.

28 October 2009

Joerg Jaspert: Debian FTPMaster meeting, we are still alive

So Tuesday was another very productive day seeing lots of things done. And actually today also started (and will end) like this. I am now of the opinion that we need such a kind of meeting of our team every 6 months, if only we could manage to get the time off from our real lifes. Sitting together, discussing, working on the same thing, being able to just call over the table and get a different opinion just gains so much that we are missing otherwise As you already read, Monday was our day to change the database layer while Tuesday left us with adding the v3 source formats. Which was declared finished today, somewhere around noon. The first picture in this blogpost shows our still to fix up/todo list from Monday evening. monday_evening_todo.jpg Besides the v3 format we also worked on other things, like the already mentioned lintian autorejects. This patchset is also fully committed and tested working since today, so we could start on other issues. We had lots of general enhancements of our code committed, from improving our logging to fixing some issues with expiring old files from the pool all the way up to reducing code duplicates all over the place. I must confess that we did not start right away working on dak today. shoe.jpg. We had to start by using hightech to fix a broken shoe first. (Some glue and a heavy laptop. NOT MINE). :) Back to reality - we are currently 6 persons all working on various parts of the dak code. We still have the archive mostly disabled (basically one large dinstall run in the evening always) and are happy with this, as this allows us immediate testing without the risk of accidently destroying someones package upload. And we do test a lot, haven t seen that many python backtraces before in one place :) The third picture shows our todo list status from today. We still have a good number of points open, but as we have 6 persons working it does seem manageable to at least get a very good start on each of them. What we currently work on is ACLs in the archive, which will soon allow us to fix another issue the old DM code has but even more important will allow automated signing of packages built by buildds soon. We basically are able to limit such keys to only be able to upload for the one architecture they are allowed to, as well as forbid them to upload any kind of source. (Together with various other considerations around the setup of the buildds (like, for example, only buildds administrated by DSA can have that, but other points too), the handling of the keys, etc, this will lead to much faster uploads of the build binary packages). And will take a tedious work away from buildd admins (who will still have enough to do to deal with the general administration of it, the build failures, such things). Another thing we work on is the handling of arch all packages, in a source that produces arch all as well as arch any binaries. Currently, as soon as a new source is uploaded for one architecture, every architecture will see the new arch all deb. Which can lead to uninstallability of other packages. Not very nice. And another one of us is also working on our contents generation. Something started long ago, but not yet finished. Recently we did take big steps in this, getting our SQL queries for it down from about 10 minutes to something around 10 seconds. That is for one suite, one architecture, the full contents file contents. While this is SQL only and we still need to write it out to disk, it is a nice improvement. And to my right we have someone working on getting the Packges/Sources files data stored within projectb too, so we can also use our own python scripts to write those files. This will finally enable us to completly ditch apt-ftparchive. And finally, to my left site sits someone who is working on a dak policy wrapper, with which we can allow other groups then ftpmaster to control suites. The initial usage will be to restore the (oldstable-)proposed-updates handling with their own queues in front, as that is no longer part of our NEW handling script. In the future it will also allow easy handling of other situations, like suites for volatile or backports.org. Basically everything where the people running the archive software are different to those people actually setting the policy for the suite. board.jpg Another nice detail is the ability to throw away uploaded binaries and only ever take buildd built binaries into the archive. We will not go to source-only uploads, as that will only lead to lots of untested uploads (sorry people, we are all humans, it WILL happen), but we can have them uploaded, do regular checks (including the lintian ones), then take the files from the buildds. (Of course there is a way to get things bootstrapped, the system behind this is flexible to allow for a bootstrap mode for a new architecture). (I have multiple pictures, will probably put some more up when I am back home).

Russell Coker: New Play Machine

Update:
Thanks to Sven Joachim and Andrew Pollock for informing me about /etc/init.d/mountoverflowtmp which exists to mount a tmpfs named overflow if /tmp is full at boot time. It appears that the system was not compromised. But regular reinstalls are always a good thing. On the 24th of August this year I noticed the following on my SE Linux Play Machine [1]:
root@play:/root# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda 1032088 938648 41012 96% /
tmpfs 51296 0 51296 0% /lib/init/rw
udev 10240 24 10216 1% /dev
tmpfs 51296 4 51292 1% /dev/shm
/dev/hdb 516040 17128 472700 4% /root
/dev/hdc 1024 8 1016 1% /tmp
overflow 1024 8 1016 1% /tmp The kernel message log had the following:
[210511.546152] su[769]: segfault at 0 ip b7e324e3 sp bfa4b064
error 4 in libc-2.7.so[b7dbb000+158000]
[210561.527839] su[778]: segfault at 0 ip b7eb14e3 sp bfec84d4 error 4 in
libc-2.7.so[b7e3a000+158000]
[210585.270372] su[784]: segfault at 0 ip b7e044e3 sp bff1b534 error 4 in
libc-2.7.so[b7d8d000+158000]
[210595.855278] su[789]: segfault at 0 ip b7e014e3 sp bfd18324 error 4 in
libc-2.7.so[b7d8a000+158000]
[210639.496847] su[796]: segfault at 0 ip b7e874e3 sp bf99e7b4 error 4 in
libc-2.7.so[b7e10000+158000] Naturally this doesn t look good, the filesystem known as overflow indicates a real problem. It appears that the machine was compromised. So I ve made archival copies of all the data and reinstalled it. As the weather here is becoming warmer I ve used new hardware for my new Play Machine. The old system was a 1.8GHz Celeron with 1280M of RAM and two IDE disks in a RAID-1 array. The new system is a P3-800 with 256M of RAM and a single IDE disk. It s a Compaq Evo which runs from a laptop PSU and is particularly energy efficient and quiet. The down-side is that there is no space for a second disk and only one RAM socket so I m limited to 256M that s just enough to run a Xen server with a single DomU. I put the new play machine online on Friday the 23rd of October after almost two months of down-time.

Joey Hess: couchdb

Couchdb came onto my radar since distributed stuff is interesting to me these days. But most of what was being written about it put me off, since it seemed to be very web-oriented, with javascript and html and stuff stored in the database, served right out of it to web browsers in an AJAXy mess. Also, it's a database. I decided a long, long time ago not to mess with traditional databases. (They're great, they're just not great for me. Said the guy leaving after 5 years in the coal mines.) Then I saw Damien Katz's talk about how he gave up everything to go off and create couchdb. Was very inspirational. Seemed it must be worth another look, with that story behind it. Now I'm reading the draft O'Rielly book, like some things, as expected don't like others[1], and am not sure what to think overall (plus still have half the book to get through yet), but it has spurred some early thoughts: ... vs DVCS Couchdb is very unlike a distributed VCS, and yet it's moved from traditional database country much closer to VCS land. It's document oriented, not normalized; the data stored in it has significant structure, but is also in a sense freeform. It doesn't necessarily preserve all history, but it does support multiple branches, merging, and conflict resolution. Oddly, the thing I dislike most about it is possibly its biggest strength compared to a VCS, and that is that code is stored in the database alongside the data. That means that changes to the data can trigger processing, so it is mapped, reduced, views are updated, etc, on demand. This is done using code that is included in the database, and so is always available, and runs in an environment couchdb provides -- so replicating the database automatically deploys it. Compare with a VCS, where anything that is triggered by changes to the data is tacked onto the side in hooks, has to be manually set up, and so is poorly integrated overall. Basically, what I've been doing with ikiwiki is adding some smarts about handling a particular kind of data, on top of the VCS. But this is done via a few narrow hooks; cloning the VCS repository does not get you a wiki set up and ready to go. There are good reasons why cloning a VCS repository does not clone the hooks associated with it. The idea of doing so seems insane; how could you trust those hooks? How could they work when cloned to another environment? And so that's Never Been Done[2]. But with couchdb's example, this is looking to me like a blind spot, that has probably stunted the range of things VCSs are used for. If you feel, like I do, that it's great we have these amazing distributed VCSs, with so many advanced capabilities, but a shame that they're only used by software developers, then that is an exciting thought.
[1] Javascript? Mixed all in a database with data it runs on? Imperative code that's supposed to be side-effect free? (I assume the Haskell guys have already been all over that.) Code stored without real version control? Still having a hard time with this. :) [2] I hope someone will give a counterexample of a VCS that does so in the comments?

Next.

Previous.