Search Results: "ean"

16 September 2009

Jeroen van Wolffelaar: 40 minutes

Yesterday I had one of the more stressful and eventful 40 minutes of my life... events basicly initiated by the fact that I arrived at Schiphol airport 40 minutes before my plane was scheduled to take off. The first thing I noticed was that the queue for security extended beyond the check-in desks next to it, so just that bit would probably take more than fourty minutes. Oops. What are all those people doing flying out on friday noons? Second thing I couldn't help to notice is that the check-in desk was actually already closed, double-oops. Well, the lady that was sitting there anyone concluded after a phonecall that my bag was fine as hand luggage and so that I could still make it. She also queue-jumped me straight to the security X-ray machine and ordered me to run from there on. Well, not so fast, running through security isn't appreciated. Actually, since I planned to check-in this bag, I kind of violated this whole anti-liquor^Wliquid silliness with no less than 7 items. The guy that unpacked my luggage let me keep my lenses fluid, and forgot to notice 3 of the items, so damage was limited, and I proceeded with my explosives, I mean, toothpaste and such, to the gate. In my hurry to run to the gate, I put my boarding pass in my pocket... and upon arrival at the gate, I noticed my boarding pass was gone, so I went ask some lady at the desk there about it... and overheard the guy next to her, who was on the phone, mention my last name. "Someone found your passport". Turns out they also had my boarding pass, but I appreciated knowing where my passport was anyway, since obviously I didn't have it on me anymore either. So within a minute I was running off again to a different gate to pick up those two sort-of-important items. You'd say that after having once seen my plane taxi away from an empty gate upon returning there from picking up my boarding pass from lost&found for the second time that very morning would've taught me a lesson... But apparantly not. Back at the gate I was getting past the boarding pass checkpoint, and the person over there saw my pass, and said "Hey, so you're that guy that a bit ago lost this and that at the security checkpoint?" Since that happened at the other end of the airport, gossip must be going pretty fast at Schiphol... At least I've never showed up at the airport at the wrong date (unlike two of my friends I'm meeting over here managed to do each independently)... Yet.

Pete Nuttall: How Random is xkcd?

I was reading xkcd by clicking on the random link when I noticed that the same cartoons were coming up again and again. I was wondering if this was Confirmation bias on my part or a duff random number generator on the server's part. Randall Munroe is a science geek, and I figured what he would do is test this idea... One python script and 12,000 (approx) requests later, I had a file full of numbers and started trying to remember some statisics. I threw together a quick bit of python to work out the mean and standard deviation (its here). The mean value is 97.4155602788 and the standard deviation is 171.040683155. If they are uniformly distributed from 1 to 361, the expected mean would be 104.211323761 and the standard deviation would be 181.0. So I was lost in thought for a while. However, the following quick check threw some light on the difference.
>>> data = [int(x) for x in open('numbers.data')]
>>> for x in xrange(0, 361):
...   if x not in data:
...     print x
... 
0
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
So comics numbered about 338 don't appear. And recomputing the mean and standard deviation for 1 to 337 gives a mean of 97.2830920561 and a standard deviation of 169.0, which is about the mean and standard deviation the data gives. I'm now waiting for someone who actually knows stats correcting me in where I went wrong. The conclusion? I suffer from confirmation bias :-(. For those who like pretty pictures, here is one, courtesy of the Google charts API and pygooglechart: chart of freq against comic number code here

Robert Collins: Back from hiatus


Well, the new blog seems to be up and running and gathering modest numbers of comments already. Woo. I ve a bunch of mail about test suite performance to gather and refine into a follow up post, but that can wait a day or two. In bzr we suffer from a long test suite, which we let grow while we had some other very pressing performance concerns. 2.0 fixes these concerns, and we re finding the odd moment to address our development environment a little now. One of the things I want to do is to radically reduce the cost of testing inside bzr; code coverage is a great way to get a broad picture of what is tested. Rather than reinvent the wheel (and I ve written one to throw away, so far) are there tools out there that can:
  • build a per-test coverage map
  • do it quickly
  • don t include setUp/tearDown/cleanUp code paths in the map
  • report on the difference between two such maps (at the suite level)
The third point is possibly contentious, so I should expand on it. While code that is executed by code within the test s run() method is from the outside all part-of-the-test, its not (by definition) the focus of the test. And I find focused tests substantially easier to analyse failures in, because they tend to check preconditions, poke at object state etc. As I want this coverage map to help preserve coverage as we refactor the test suite, I don t want to include accidental coverage in the map.

15 September 2009

Joey Hess: Debian Installer USB partitioning

The Debian Installer has a USB boot image that is supposed to be written raw to the USB stick. Problem is that means the image has a fixed size, 256 MB, and all the other gigabytes on your typical USB stick are unusable after writing this image to it. It's a bit of a cheat for me to blog about this, since I'm slighly responsible for the thing that I'm working around. But still. The real problem is not the fixed size of the image, but that it is written to the USB stick as a "super floppy", without any partition table. If there were a partition table, you could make a second partition in the rest of the space of the USB stick, and use it to store files, etc. So, let's set that up. It's not really hard:
  1. Use your favorite partition tool to partition the USB stick. Make a 256 MB DOS partition, that will be used to hold the installer, and set it bootable. Make a second, or more partitions for your own use.
  2. Unplug and replug the USB stick so the device files show up, and write the installer image to the first partition (/dev/sda1 in this example). zcat boot.img >/dev/sda1
  3. Make the USB stick bootable by installing the mbr package, and running install-mbr /dev/sda
  4. Copy a Debian ISO image to the USB stick somewhere. You can put it on the first partition, as ususal, or if you prefer, can put it on one of the later, larger partitions. That's useful if you want to use a larger ISO than the netinst. The installer should find it anywhere.

Robert Collins: 16 Aug 2009


Hudson seemed quite nice when I was looking at how drizzle use it. I proposed it to the squid project to replace a collection of cron scripts and we re now in the final stages of deployment: Hudson is running, doing test builds. We are now polishing the deployment, tweaking where and how often reports are made, and adding more coverage to the build farm. I thought I d post a few observations about the friction involved in getting it up and running. Understand that I think its a lovely product these blemishes are really quite minor. Installation of the master machine on Ubuntu add an apt repository, apt-get update, apt-get install. Installation of the master machine on CentOS 5.2 (Now 5.3): make a user by hand, download a .war file, create an init.d script by copy-and-adjusting an example off the web. Plenty of room to improve here. Installing slave machines: make a user by hand, add an rc.local entry to run java on slave.jar as that new user. This could be more polished Installing a FreeBSD 6.4 slave: manually download various java sources to my laptop, scp them up to the FreeBSD machine, build *java* overnight, then make a user, add an rc.local entry etc. _Painful_. The next thing we noticed was that the model in Hudson doesn t really expose platforms but we want to test on a broad array of architectures, vendors and releases. i386-Ubuntu-intrepid building doesn t imply that i386-Debian-lenny will build. We started putting in tags on the slaves that will let us say this build is for amd64-CentOS-5.2 , so that if we have multiple machines for a platform, we ll have some redundancy, and so that its easy to get a sense of whats failing. This had some trouble its very manual, and as its manually entered data it can get out of date quite easily. So in the weekend I set out make a plugin, and ran into some yak shaving. Hudson plugins use maven2 to build and deploy. So I added the maven2 plugin to my eclipse (after updating eclipse to get the shiniest bzr-eclipse), and found the first bug issue 1580 maven2 and teamplugins in eclipse 3.5 don t play all that nice. Push. Removing bzr-eclipse temporarily allowed eclipse s maven plugin to work, but for some reason many dependencies were not found, and various discussions found on the net suggest manually adding them to the CLASSPATH for the project but not how to identify which ones they were. Pop. So, I switched to netbeans a 200MB download, as Ubuntu only has 6.5 in the archive. netbeans has the ability to treat a maven2 project as a directly editable project. I have to say that it works beautifully. Push. I made a new plugin, looked around for an appropriate interface, (DynamicLabellers, designed for exactly our intended use). Sadly, in my test environment, it didn t work the master didn t call into the plugin at all, and no node labels were attached. Push. Grab the source for hudson itself, find the trick-for-newcomers here do a full build outside netbeans, in netbeans open main/war as a project, and main/core as well, not just the top level pom.xml. To run, with main/war selected in the project list hit the debug button. However changes made to the main/core sources are not deployed until you build them (F11) the debug environment looks nearly identical to a real environment. Pop. There is a buglet in DynamicLabeller support in Hudson, where inconsistent code between general slave support and the master node Hudson.java causes different behaviour with dynamic labels. Specifically the master node will never get dynamic labels. So I fixed this, cleaned up the code to remove the duplication as much as possible (there are comments in the code base that different synchronisation styles are needed for some reason) and submitted upstream. Pop. I ll make the plugin for squid pretty some evening this week, and we should be able to start asking for volunteers for the squid build farm. Yay!

Robert Collins: 31 Aug 2009


Hi Rich! Re hour+long unit tests I agree that you need a comprehensive test suite, and that it should test all the dark and hidden corners of your code base. But time is not free! A long test suite inhibits:
  • cycle time the fastest you can release a hot fix to a customer
  • developer productivity you can t forget about a patch till its passed the regression test suite
  • community involvement if it takes an hour to run the test suite, an opportunistic developer that wanted to tweak something in your code will have walked away long ago Note that these points are orthogonal to whether developers edit-test cycle runs some or all tests, or whether you use a CI tool, or a test-commit tool, or some other workflow. All that said though, I m extremely interested in *why* any given test suite takes hours: does it need to? What is it doing? Can you decrease the time by 90% and coverage by 2%? I got another response back, which talks about keeping the working set of tests @ about 5 minutes long and splitting the rest off (via declared metadata on each test) into run after commit or during CI . This has merits for reducing the burden on a developer in their test-commit cycle, but as I claim above, I believe there is still an overhead from those other tests that are pending execution at some later time. From a LEAN perspective, the cycle time is very important. Another important thing is handoffs. Each time we hand over something (e.g. a code change that I *think* works because it passed my local tests), there is a cost. Handing over to a machine to do CI is just as expensive as handing to a colleague. Add that contributors sending in patches from the internet may not hang around to find out that their patch *fails* in your CI build, and you can see why I think CI tools are an adjunct to keeping a clean trunk, rather than a key tool. The key tool is to not commit regressions :) Oh, and I certainly accept that test suites should be comprehensive I just don t accept that more time == more coverage, or that there isn t a trade off between comprehensive and timeliness.
  • Robert Collins: 30 Aug 2009


    Made some time to hack the results: config-manager 0.4 released, re-uploaded to debian (it was removed due to some confusion a while back). This most notably drops the hard dependency on pybaz and adds specific-revision support for bzr. subunit snapshot packaging sorted out to work better with subunit from Ubuntu/Debian. This latest snapshot has nested progress and subunit2gtk included. PQM got a bit of a cleanup:
  • The status region shown during merges is ~ twice as tall now.
  • if the precommit_hook outputs subunit it will be picked up automatically and shown in the status region.
  • all deprecation warnings in python2.6 are cleaned up
  • Pending bugfixes were merged from Tim Cole and Daniel Watkins thanks guys!
  • 14 September 2009

    Jo Shields: Flash Wins! Hoo-freaking-ray! Adobe are so awesome!

    For those who aren t clinically dead, you may have heard of the BBC . The BBC are the state-ish-funded TV network in the UK, and the country s biggest broadcaster, alongside three other major terrestrial broadcasters who make their content widely available without payment ITV, Channel 4, and Five. These broadcasters also make some or all of their programming available for streaming over the Internets usually their home-grown programming only, not licensed stuff from America. Now, once upon a time, the online functionality was mostly offered via a proprietary P2P-and-DRM-based system called Kontiki. Kontiki was unpopular for various reasons for example, it was Windows-only, and banned by several Internet providers due to the use of P2P (e.g. I know such technology is still banned on the University of Oxford network). As a result, this lead to the introduction and eventual replacement of browser-based streaming solutions, starting with the changes made to BBC s iPlayer. iPlayer is nowadays a combination of an Adobe Flash service for web surfers, an unencrypted MP4 streaming service for users of mobile devices such as iPhones, and as of a couple of weeks ago, has streaming support built directly into the PlayStation 3 s user interface too. Oh, and on the PC, it supports DRM-based downloading courtesy of the Adobe Air platform, on Windows, Mac, and Air-capable (x86) Linux. Channel 4 s service 4od, and Five s Demand Five, are also based on Adobe Flash, and streaming-only. They re basic and functional. The final interesting one here is ITV s ITV Player. ITV Player was, until about a week ago, the only non-Flash service, instead making use of Microsoft Silverlight. They have now changed to be Flash-based, like their peers, meaning the entire market mandates use of the Adobe Flash plugin or, at a push, command-line utilities or browser plugins which grab the raw video files from the broadcasters servers, in violation of their licenses. Why is this interesting? Well, when ITV Player used Silverlight, we could watch TV using Free Software: Novell Moonlight 2.0 Beta 1.1 and above worked fine with it, on i386 and AMD64 (and other architectures with a recompile). Now that it s using Flash rather than Silverlight, where do we stand for watching streaming TV legitimately with Free Software? Let s take a peek! Firstly, some preamble. I m running Ubuntu Jaunty, and I hand-compiled a SVN (I think SVN? Maybe Bzr) snapshot of Gnash revision 11485 to ensure I had an up-to-date view of proceedings. It definitely seems to be working, as I m introduced to the world of Flash advertising via Gnash, and Youtube.com also works, more or less. And I m not discussing Adobe s Flash plugin here, for various reasons: So, Gnash it is. Firstly, it s a PITA to compile, as upstream seem to have misunderstood how AutoFoo works i.e. it detects that you don t have headers installed for certain features, and tells you so, yet still enables those features at configure-time (and obviously fails when building). Hey guys, if I don t have qapplication.h, take the hint and disable KDE support for me like every other bloody app does. With that out of the way, let s get to it! BBC iPlayer Well, what does the landing look like?
    BBC iPlayer Landing

    BBC iPlayer Landing

    Looks fine to me! Let s try playing a show!
    BBC iPlayer Playback

    BBC iPlayer Playback

    Oh. Um Never mind, then. Seems iPlayer s JavaScript to detect Flash presence doesn t pick up on Gnash, and it bails out. Score so far: 0/1 Demand Five Another former Kontiki partner, how do these guys fare?
    Demand Five Landing

    Demand Five Landing

    Hey, that looks pretty good to me! Perhaps we re onto a winner this time?
    Demand Five Playback

    Demand Five Playback

    Poot. Gnash is definitely being invoked see the context menu there but it sure isn t doing anything useful. Score: 0/2 Channel 4 4od How do those hip cats at Channel 4 fare?
    Channel 4 4od Landing

    Channel 4 4od Landing

    Hm Gotta confess, not feeling too hopeful about this one
    Channel 4 4od Playback

    Channel 4 4od Playback

    Oh, well, even worse than iPlayer. What you folks might not recognise is the missing Play buttons which are supposed to be to the right of the program descriptions in that list of episodes. Presumably more Javascript/Flash interop failure. 0/3 ITV Player Last, but not least, how does the newest entrant into Microsoft-free streaming fare?
    ITV Player Landing

    ITV Player Landing

    Now, now, in fairness, it s always been this bad, even when they used Silverlight weirdos that they are, ITV have always used Flash for their navigation, even when they used Silverlight for playback. The Flash-based navigation you (don t) see here is barely any better even with the proprietary Flash plugin. What the proprietary plugin does NOT do, however, is consume the 750 or so meg of RAM that Gnash did when sat idle on this screen. I mean, that s not a problem, that s why I have 6 gig in here, but still, not wise on Wifey s netbook.
    ITV Player Playback

    ITV Player Playback

    Oh. Well then. 0/4 it is. So? What annoys me here isn t so much that nothing works. I m used to there being temporary gaps in Free Software functionality, that s pretty normal. But I m greatly vexed that one of these four used to work on a Free platform, and now it doesn t and that places like UbuntuForums are filled with people celebrating that fact. Celebrating that ITV have stopped using the evil nasty Microsoft system which happened to have a functional Free replacement and that they ve now moved to a non-Microsoft system which mandates a proprietary plugin. It s not the first time either Major League Baseball in the USA used to use Silverlight for their HD streaming, and now they use a combination of Flash and a proprietary Windows-only extension to Flash to make it load WMV files this is considered a victory. It really isn t. We should NEVER be forced to use Proprietary software in order to surf the web yet now we ve gone from having access to 25% of the UK s streaming TV services via Free Software to 0% of them, and people are happy about it. So, I want you to think long and hard about this question, one which seems to get the oddball answer far too often: What is more important promoting Free Software, or demoting Microsoft Corp?

    Joachim Breitner: Freaking out with LaTeX

    If you want to play a trick on a colleague who is writing a LaTeX document: Open the file, copy the entire contents of the file and paste it at the very end. LaTeX will happily process the file and render the first part. But your colleague will likely try to edit the end of the file and soon feel haunted because his changes to the file have no effect no matter how often he deletes the resulting PDF file or any intermediate file, how often he renames the original file or moves it somewhere else...(Just happened to me, but not due to a mean colleague, but due to some accidential vim commands.)

    Russ Allbery: Lintian 2.2.15

    I've been feeling like I've been neglecting Lintian, but actually, looking at the changelog, I've been doing about a release a month for the last several months. So it's more that a release a month isn't keeping up, quite, with the influx of bugs these days. To think I'd gotten it down to about 80 open bugs earlier this year.... Anyway, this release is almost entirely BTS cleanup, with no large changes or structural work. I think I knocked around 30-35 bugs off the list, which should get us down to somewhere in the 120 range. There's still some work to do to get under 100 again. There are lots and lots of little changes, mostly cleaning up false positives. The main new test additions are a bunch of new init script checks from Raphael Geissert and the extension of various script checks to example scripts, thanks to Damyan Ivanov. This should take care of nearly all the normal bugs and the easy minor bugs, but there are still a ton of wishlist bugs asking for new checks or expansions of existing checks. If anyone out there feels like poking at some fairly straightforward Perl code, I always try to make time to discuss possible approaches to implementing wishlist requests.

    Biella Coleman: The secret of the enjoyment of pleasure is to know when to stop

    I came across this quote while wrapping up Style: Toward Clarity and Grace, one of my favorite books on the craft of writing. The quote is remarkable not only for its content, which is spot on, but its.. clarity and grace:
    The secret of the enjoyment of pleasure is to know when to stop We do this every time we listen to music. We do not seize hold of a particular chord or phrase and shout at the orchestra to go on playing it for the rest of the evening; on the contrary. However much we may like that particular moment of music, we know that its perpetuation would interrupt and kill the movement of the melody. We understand that the beauty of a symphony is less in these musical moment than in the whole movement from beginning to end. If the symphony tried to go on for too long, if at a certain point the composer exhausts his creative abilities and tries to carry on just for the sake of filling in the required space of time, then we begin to fidget in our chairs, feeling that he has denied the natural rhythm, has broken the smooth curve from birth to death, and that though a pretense of a life is being made, it is in fact a living death. Alan Watts, The Meaning of Happiness.

    13 September 2009

    Brett Parker: Random Storage Idea...

    So, I was reading some random mumblings on the interwebs, and the pigeon with USB stick being a quicker method of data transfer in SA than their intertubes... then there was a thread on a mailing list discussing this, and someone mentioned using stacks of microSD cards... so then my brain decided to launch itself orthogonally, as it often does. What we end up with is wondering just how much storage you could fit in to the space a 3.5" drive would normally take - not taking in to account any method of attaching it at this point. So, a 3.5" drive is approx 102mmx147mmx26mm, a microSD card is 11mmx15mmx1mm, so, assuming that we're just lying them side by side, and not optimising the way they're stored at all, you can fit (with space round the sides) 9*9*26 = 2106 microSD cards in the area of a 3.5" drive. Assuming that each of those is 16G that's just shy of 33.7TB of storage! So, that set me thinking a bit further... I reckon that in that space you could do a 6*6 grid of cards with room for connectors, and just about get it to 10 high...so, that's 360 microSD cards, and probably enough room for some control gear (haven't worked out quite what we'd use for that), I then went in to wondering if we could then create a small embedded system to talk to those 360 microSD cards, if we did that then you could potentially do RAID0 across the "platters" with RAID6 on each platter. Now, to my poor head that meant that there should be 340*16G of available storage, which is 5.44TB... of course, that involves somehow interfacing the 360 microSD cards... I'm thinking that it might be possible with some form of embedded system... Unfortunately, it appears that to actually build this with consumer components... and without including the interface gear which I haven't even begun to work out yet... we're talking around about 26 per microSD card, so, erm, 9360... but I still think it'd be a really neat project... now, if someone can arrange for me to win the lottery, have lots of spare time, and some more brain power... :) Oh dear... my brain appears to have ticked further through, and I've realised that with spacing between each microSD card, you could, in theory, easily fit 400 of them upended in the space available. Erm. Of course, this still doesn't answer the "how the hell do you then get them all to talk in any sane manner" question... but I'm sure that will work out in my head sometime...

    12 September 2009

    Frans Pop: debmirror II - Overview of new features

    I've just uploaded version 2.2 of debmirror, which introduces yet another new feature: mirroring the i18n/Translation files that contain translations of package descriptions. Many thanks to Joerg Jaspert for his quick response to my request to include those files in the Release file. Joerg also implemented the change needed to use the diffs for Contents files but that requires a fairly big code restructuring in debmirror. The package has jumped from version 1.0 to 2.2 in just three weeks (closing 28 bug reports in the process), but I think the changes justify that. Here's an overview.
    If you're currently using the Lenny version of debmirror and would like to use the new features: the package from unstable can be installed on Lenny without any problems. The changes have been well tested, but I would advice to do use --dry-run after the upgrade to check there are no unexpected problems. One area where you may experience problems is when using debmirror for other archives than the official Debian mirrors. If you do encounter issues then please file a bug report.
    Note that debmirror is not intended to be used for official mirrors. There are different scripts available for that from the Debian mirror team.

    11 September 2009

    Zak B. Elep: New Server

    Site was down for almost a week, due to my provider being DDoSed. Email was broken more so as SMTP was the target, but it was rather odd that the data center decided to block outgoing SMTP connections from a block of IPs, where my VPS is unfortunately a member of. I've since switched to a new provider. This makes my third OpenVZ VPS, though I was meaning to move on to Xen. At 6 US dollars a month though, it seems quite a bargain, so I'll have to see where this goes. The move also afforded me to change some stuff under the hood. Apache is gone, replaced by nginx (although this required having blosxom running under a thttpd backend, until I can whip up a FastCGI equivalent.) BIND gave way to maradns, cutting down significant memory usage. And dropbear replaces the OpenSSH server. Exim 4 and dovecot remain though, as they seem to quite big (or small) enough for my purposes. I'll document more about the changes in later posts. In the meantime, I need to catch up on emails and packaging...

    Ian Wienand: Django toolchain on Debian

    Although Django is well packaged for Debian, I've recently come to the conculsion that the packages are really not what I want. The problem is that my server runs Debian stable, while my development laptop runs unstable, and Django revisions definitely fall into the "unstable" category. There really is no way to use a system Django 1.1 on one side, and a system Django 1.0 on the other. After a bit of work, I think I've got something together that works, and I post it here in the hope it is useful for someone else. This info has been gleaned from similar references such as this and this. This is aimed at running a server using Debian stable (5.0) for production and an unstable environment for development. You actually need both to get this running. This is based on a project called "project" that lives in /var/www
    1. First step is to install python-virtualenv on both.
    2. Create a virtualenv on both, using the --no-site-packages to make it a stand-alone environment. This is like a chroot for python.
      $ virtualenv --no-site-packages project
      New python executable in project/bin/python
      Installing setuptools............done.
      
    3. The unstable environment has a file you'll need to copy into the stable environment - bin/activate_this.py. The stable version of python-virtualenv isn't recent enough to include this file, but you need it to essentially switch the system python into the chrooted environment. This will come in handy later when setting up the webserver.
    4. There are probably better ways to keep the two environments in sync, but I simply take a manual approach of doing everything twice, once in each. So from now on, do the following in both environments.
    5. Activate the environment
      /var/www$ cd project
      /var/www/project$ . bin/activate
      (project) /var/www/project$
      
    6. Use easy_install to install pip
      (project) /var/www/project$ easy_install pip
      Searching for pip
      Reading http://pypi.python.org/simple/pip/
      Reading http://pip.openplans.org
      Best match: pip 0.4
      Downloading http://pypi.python.org/packages/source/p/pip/pip-0.4.tar.gz#md5=b45714d04f8fd38fe8e3d4c7600b91a2
      Processing pip-0.4.tar.gz
      Running pip-0.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Wu9O-U/pip-0.4/egg-dist-tmp-xjSdxq
      warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
      no previously-included directories found matching 'docs/_build/_sources'
      zip_safe flag not set; analyzing archive contents...
      pip: module references __file__
      Adding pip 0.4 to easy-install.pth file
      Installing pip script to /var/www/project/bin
      Installed /var/www/project/lib/python2.5/site-packages/pip-0.4-py2.5.egg
      Processing dependencies for pip
      Finished processing dependencies for pip
      
    7. Install setuptools, also using easy_install (for some reason, pip can't install it). There is a trick here, you need to specify at least version 0.6c9 or there will be issues with the SVN version on Debian stable when you try to get Django in the next step.
      (project) /var/www/project$ easy_install setuptools==0.6c9
      Searching for setuptools==0.6c9
      Reading http://pypi.python.org/simple/setuptools/
      Best match: setuptools 0.6c9
      Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg#md5=fe67c3e5a17b12c0e7c541b7ea43a8e6
      Processing setuptools-0.6c9-py2.5.egg
      Moving setuptools-0.6c9-py2.5.egg to /var/www/project/lib/python2.5/site-packages
      Removing setuptools 0.6c8 from easy-install.pth file
      Adding setuptools 0.6c9 to easy-install.pth file
      Installing easy_install script to /var/www/project/bin
      Installing easy_install-2.5 script to /var/www/project/bin
      Installed /var/www/project/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg
      Processing dependencies for setuptools==0.6c9
      Finished processing dependencies for setuptools==0.6c9
      
    8. Create a requirements.txt with the path to the Django SVN for pip to install, then and then install it.
      (project) /var/www/project$ cat requirements.txt
      -e svn+http://code.djangoproject.com/svn/django/tags/releases/1.0.3/#egg=Django
      (project) /var/www/project$ pip install -r requirements.txt
      Obtaining Django from svn+http://code.djangoproject.com/svn/django/tags/releases/1.0.3/#egg=Django (from -r requirements.txt (line 1))
        Checking out http://code.djangoproject.com/svn/django/tags/releases/1.0.3/ to ./src/django
      (project) /var/www/project$ pip install -r requirements.txt
      Obtaining Django from svn+http://code.djangoproject.com/svn/django/tags/releases/1.0.3/#egg=Django (from -r requirements.txt (line 1))
        Checking out http://code.djangoproject.com/svn/django/tags/releases/1.0.3/ to ./src/django
      ... so on ...
      
    9. Almost there! You can keep installing more Python requirements with pip if you need, but we've got enough here to start.
    10. Create a file in /var/www/project called project-python.py. This will be the Python interpreter the webserver uses, and basically exec's itself into the virtalenv. The file should contain the following:
      activate_this = "/var/www/project/bin/activate_this.py"
      execfile(activate_this, dict(__file__=activate_this))
      from django.core.handlers.modpython import handler
      
    11. Now it's time to start the Django project. I like to create a new directory called project, which will be the parent directory kept in the SCM with all the code, media, templates, database (if using SQLite) etc. In this way to keep the two environments up-to-date I simply svn ci on one side, and svn co on the other.
      (project) /var/www/project$ mkdir project
      (project) /var/www/project/project$ mkdir db django media www
      (project) /var/www/project/project$ cd django/
      (project) /var/www/project/project/django$ django-admin startproject myproject
      
    12. Last step now is to wire-up Apache to serve it all up. The magic is making sure you specify the correct PythonHandler that you made before to use the virtualenv, and include the right paths so you can find it and all the required Django settings.
      DocumentRoot /var/www/project
      <Location "/">
          SetHandler python-program
          PythonHandler project-python
          PythonPath "['/var/www/project/','/var/www/project/project/django/'] + sys.path"
          SetEnv DJANGO_SETTINGS_MODULE myproject.settings
          PythonDebug On
      </Location>
      Alias /media /var/www/project/project/media
      <Location "/media">
          SetHandler none
      </Location>
      <Directory "/var/www/project/project/media">
          AllowOverride none
          Order allow,deny
          Allow from all
          Options FollowSymLinks Indexes
      </Directory>
      
    With all this, you should be up and running in a basic but stable environment. It's easy enough to update packages for security fixes, etc via pip after activating your virtualenv.

    Christian Perrier: Dedicated book offerred

    During Debconf9, most Debian developers and contributors who were present there were kind enough to answer my call for dedications, meant to turn a gift I planned to offer to my former boss who just retired, into a special gift. You may then remember me going over all of you with Rapha l Hertzog and Roland Mas book in French (definitely the best French book about Debian) and asking you to sign it and write down some words. I finally managed to give Fran ois the book this week and, on his behalf, I'd like to thank all people who contributed to this. This was much appreciated and having that great book with that special addition made him very happy (even if he managed to install his other gift, namely a Dell laptop, with Debian squeeze, without the help of any book). Ladies and gentlemen, you rock. But you know that.

    Michael Prokop: Debian: considerations regarding redesign of live-initramfs

    Live-initramfs is a fork of Ubuntu s casper for use within Debian. Nowadays several Debian based live systems are using live-initramfs to build an initramfs suited to boot live systems. Besides debian-live and all its users that s at least Grml (and its derivates) and FAI. I m maintaining live-initramfs for Grml so I know the limitations of live-initramfs. Yes, it has some design flaws but upstream finally decided to take the time to redesign it. That s why I m posting this: I would like to see even more Debian based systems adopting live-initramfs (hello Sidux!). This would improve compatibility with regards to similar bootoptions and features as well as better cooperation among the teams. Of course this will be possible only if live-initramfs is capable of handling all the necessary customization and configuration tasks that different live systems require nowadays. So this are my current considerations regarding the redesign of live-initramfs: If you re interested in adopting live-initramfs in your distribution/system feel free to contact me (mika [at] debian.org). If you do have any further wishes for the redesign please let me know so I can forward them to upstream.

    10 September 2009

    Ben Hutchings: DebConf 9 videos

    Several people have been asking after the videos. My answer to them is "we release when it's ready". Seriously, though, I'm sorry about the delay in publishing videos. There was some miscommunication between me and the sysadmin team at DebConf which meant I couldn't take files away with me then. Peter Palfrader reassembled the video RAID later, copied the necessary files onto a single hard disk, and posted that to me. This disk apparently got lost on the way, but eventually arrived here last week after a 3-week journey. Over the weekend I dealt with most of the videos that required editing, and today I was able to resume the transcoding process. Tomorrow I intend to start uploading again.

    9 September 2009

    Isaac Jones: Partition and Solve

    The idea of breaking programs into functions was taught to some of us with the metaphor of "divide and conquer." That is, make several smaller problems and solve those instead. This approach is now so deeply ingrained that I can just think "partition and solve" which is of course a much more positive and accurate description. One might think of the "partition your program into functions" principal as "the divide and conquer" principal. But of course, they are both instance of the more general "partition and solve". I dare say that "partition your program into functions" is even a more pure and accurate instance of the principal. Evolution may also be an instance of the principal. Different species evolved to solve different problems, or to solve the same problem (survival) in different ways. Of course, when you partition a program into functions, you also define those functions' relationships to each-other. Just because you're partitioning doesn't mean that the problems are not related. When people see several competing projects in the "free software community" trying to solve the same problem, some might say, "Good. We have divided them, now we will conquer them!" In their marketing material (or more likely press-release ranting) they will say that a house divided against itself will not stand [1]. Such people are probably purposefully ignoring the "partition and solve" principal. They ignore the fact that different projects have chosen different paths to solve different problems. They ignore the relationships between the projects, and that we feed each-other much more often than we actually compete. But no good programmer will ignore the relationships between her functions. Even within the Debian project we have lots of different goals. A truly gifted project leader will hopefully not see Debian as a house divided, but rather a very ripe partitioning looking for someone to define the problem that we solve together. A leader should help to define, create, or encourage the relationships that make that solution happen. peace,
    isaac
    [1] Oh no, I've contradicted the Bible and praised evolution in the same essay! Well, not really. The fallacy is not with the Bible's assertion about the house divided against itself, it's in the interpretation of "the free software community" as a single house. And also, I believe God created evolution :)

    Isaac Jones: Proprietary Bits in Language

    I've been on a Sci-Fi kick. I just finished reading The Dispossessed by Ursula K. Le Guin. I've read a few of her books before, but I really liked this one a lot. It reminded me a of some of Daniel Quinn's ideas. I picked it up sorta randomly because I'd read a couple of her books before. I had it sitting on my desk at work, and a few people said, "Oh, you're reading that? That's one of the best books I've ever read". Of course, I got it used for $3.50 at Powell's. I wonder how they get away with reprinting such books for $15. One interesting aspect of the book is that one of the languages used doesn't really express possessives. So instead of saying, "my book" it was always rendered as "the book". I didn't really notice this until near the end. When I did notice it, was when Le Guin wrote, "the mother" instead of "his mother". This didn't seem quite right to me, because it doesn't represent the relationship between "him" and "mother", but it's not really Le Guin's fault... there's no convenient way to represent this in English without using the possessive form. Perhaps "the mother of the man," but that still seems a bit possessive. I believe this is also true of Russian and Spanish at least. One way to look at it is that humans are so focused on possession that we don't have a convenient way to express relationships. But we are certainly not saying, "The mother that I own." Another way to look at it is that the so-called possessive case expresses more than just possession. In fact, it sometimes means possession and sometimes not. If my mother fell off her horse and I had to rush back to Ohio to visit her, and someone asked me why I was going, I might say, "Because she's my mother!" Not possessive. But clearly, it is sometimes possessive, particularly in romantic relationships. Jealousy is possible in all forms of relationships, but is probably most clear in romantic ones. "Why did you go to the prom with him when you're MY girlfriend?" This reminded me of the "object" formulation in object-oriented programming languages. (Didn't know that I was going to say THAT, did you? Ha!) In a language like Java, you say something like "the car's first wheel's last screw", "car.wheel[0].screw[3]". In Haskell, you also have aggregate types, where one type is composed of others but to access them, instead of saying, "the car's wheel" we say, "there's a relationship between cars and wheels. It doesn't matter what the relationship is, but the function from cars to wheels is called "wheels". So we have "last $ screws $ first $ wheels car". That is, "the last screw of the first wheel of the car"... actually that's clearer than "the car's first wheel's last screw" isn't it? There we go. I've once again proven that Haskell is morally and technically superior to C++. Randomness Here is an article linked from Slashdot about how people are giving up on the internet because of spam and spyware. The article doesn't mention GNU/Linux or Firefox. I just took one of those quizes that you've all been doing, and I was pretty disappointed.

    Next.

    Previous.