Search Results: "lamby"

4 February 2008

Chris Lamb: MyTab deployed

I finally got around to finishing MyTab on Sunday, the group finance web app I’d been promising my housemates for a while. I’m not exactly sure how to describe it, but it’s kinda the equivalent to that sheet of paper on your fridge that you use to share bills around the house. I wrote it mainly for my current house to use, but if other people find it useful, then that’s great. It’s got RSS feeds and some shiny AJAX, which proves that I’m totally down with the kids. (However, the Javascript is optional and it also supports email notifications, so I’m also down with the adults.) It’s my first experience writing a Django app, which was mostly an enjoyable experience. In somewhat of an experiment, it’s released under that crazy Affero GPL license. Patches welcome, as usual.

1 February 2008

Chris Lamb: Happy Mailman day, Sun!

To: Chris Lamb <chris@chris-lamb.co.uk>
Cc: web-discuss@openjdk.java.net
From: Tim Bell <tim.Bell@Sun.COM>
Date: Fri, 01 Feb 2008 08:42:14 -0800
Subject: Re: "Mailman day”
Hi Chris:
> It is somewhat of a tradition in the free software world to wish each
> other a “Happy Mailman Day” at the beginning of each month.
>
> However, the OpenJDK mailing lists seem to send the reminders about the
> middle of the month. Could this be changed?  
That was when I got around to turning on the reminders.  I’m glad to hear
someone noticed.  All of the internal feedback on this so far has been
negative.
I will change the cron job to the first of the month.
>  (In addition, the mailman@openjdk.java.net email address listed at the
>  top of http ://mail.openjdk.java.net/mailman/listinfo bounces.)
Good to know.  I will check that out.
Cheers - Tim Bell
Yay!

23 January 2008

Chris Lamb: Can you get cp to give a progress bar like wget?

< zed0> can you get cp to give a progress bar like wget?
Damn right you can.
#!/bin/sh
cp_p()
 
   set -e
   strace -q -ewrite cp -- "$ 1 " "$ 2 " 2>&1 \
        awk ' 
	    count += $NF
            if (count % 10 == 0)  
               percent = count / total_size * 100
               printf "%3d%% [", percent
               for (i=0;i<=percent;i++)
                  printf "="
               printf ">"
               for (i=percent;i<100;i++)
                  printf " "
               printf "]\r"
             
          
         END   print ""  ' total_size=$(stat -c '%s' "$ 1 ") count=0
 
In action:

% cp_p /mnt/raid/pub/iso/debian/debian-2.2r4potato-i386-netinst.iso /dev/null
 76% [===========================================>                    ]

22 January 2008

Chris Lamb: XORLY? Losing your GPG private key safely.

It’s quite convenient to have your GPG private key on your desktop, laptop and USB stick.. but if one of these is stolen or lost, you are pretty much obliged to issue a revocation. Now, RAID-5 has this wonderful property whereby it is impossible to recover data from an array of size n if you have (at most) n-2 elements. So, one idea would be to create a small loopback device -based array that you can spread around your nice stealable items - you then use your key by combining >= n-1 of them. ..Or Eve must steal n-1 items before she can reconstruct your secret key. You can recover the “missing data” from single lost device, obviously. There are almost certainly cooler algorithms for this, but none that are in the Linux kernel. Some scriptage that seems to work for me:
#!/bin/sh
set -eu
NUMITEMS=3
SIZE=30
create()  
	for NUM in $(seq $NUMITEMS);
	do
		dd if=/dev/zero of=$NUM.img bs=1M count=$(echo "$SIZE/($NUMITEMS-1)"   bc)
		losetup /dev/loop$NUM $NUM.img
	done
	sudo mdadm --create -l5 -n$NUMITEMS /dev/md0 $(seq -f "/dev/loop%g" $NUMITEMS)
	sudo mkfs.ext3 /dev/md0
 
stop()  
	sudo mdadm --stop /dev/md0
	for NUM in $(seq 1 $NUMITEMS);
	do
		sudo losetup -d /dev/loop$NUM   true
	done
 
start()  
	# Collect array elements from argv
	NUM=0
	for ELEM in $ELEMENTS;
	do
		NUM=$(( $NUM + 1 ))
		sudo losetup /dev/loop$NUM "$ELEM"
	done
	sudo mdadm --assemble --run /dev/md0 $(seq -f "/dev/loop%g" $NUM)
 
recreate()  
	# Assume already running
	dd if=/dev/zero of=$NUMITEMS.img bs=1M count=$(echo "$SIZE/($NUMITEMS-1)"   bc)
	losetup /dev/loop$NUMITEMS $NUMITEMS.img
	sudo mdadm --add /dev/md0 $NEW
	sudo mdadm --misc --wait /dev/md0
 

(This proof-of-concept script is deliberately broken: you’ll have to write the argument handling yourself and convince yourself you don’t have anything important at /dev/loop* or /dev/md0 or /. It might also make sense to only use the array in read-only mode, or you will have syncing issues.)
Ingenious learners may wish to construct other scenarios with other RAID levels; 5-device RAID-6 would only require 3 elements present to function (or to be stolen by Eve, naturally). Not that I’m actually doing this: it’s almost certainly as stupid as it sounds, I just haven’t thought of a convicing reason yet.

13 January 2008

Chris Lamb: GNOME applet for monitoring Debian bugs


Sometimes I don’t particulary want to follow a bug intimately and just want to be notified of the interesting changes; when it’s closed, when someone attaches a fix, etc. Take, for example, #454935. I didn’t subscribe to the bug at the time I noticed it, as it would have taken a couple of minutes to email 454935-subscribe (and send the confirmation back, wait on the fscking greylisting, delete the ACKs, etc.) and I could have always been overrun with annoying “severity wars”, merges with various duplicates, etc. In the event, this didn’t happen, but the perceived cost of subscribing to the bug was much greater than the benefit. Anyway, as I’m fairly certain I’m not alone in encountering bugs like this, my solution was to put together a GNOME panel applet for monitoring specific Debian bugs. It’s pretty fully-featured already: Perhaps something like this can lure some Debian users into following development a little closer and put them on the path to becoming a regular contributor, who knows.. Source (GPLv3) is available in Git:
% git-clone git://git.chris-lamb.co.uk/debian-bts-applet  # or
% git-clone http://git.chris-lamb.co.uk/repo/debian-bts-applet.git
It comes with a debian/ directory, which is highly recommended over configuring Bonobo manually. What would be really useful right now is testing. If you want to contribute, please run your eyes over the TODO and HACKING files as well as the (OMGWTFBBQ) unit tests. If no major issues are found in the next few days, I’ll file an ITP and make a call for translations.

9 January 2008

Chris Lamb: Watching Debian change live

#debian-devel-changes on OFTC now spams newly opened bugs, accepted uploads and closed bugs for your idling pleasure. It’s fairly interesting, at the very least.

5 January 2008

Chris Lamb: Debian packages sorted by build-time and build-space

Sorted by build-time
  1. openoffice.org - 7h02
  2. gcc-4.2 - 5h58
  3. gcc-snapshot - 4h17
  4. gcc-4.1 - 3h30
  5. ghc-cvs - 3h16
  6. linux-2.6 - 2h34
  7. gpc-4.1 - 2h25
  8. gclcvs - 2h21
  9. glibc - 2h15
  10. python2.5 - 2h09
  11. axiom - 2h07
  12. gnat-4.1 - 2h06
  13. gcj-4.1 - 1h52
  14. gromacs - 1h51
  15. mysql-dfsg-5.0 - 1h46
  16. acl2 - 1h44
  17. gcj-4.2 - 1h34
  18. ghc6 - 1h33
  19. python-kde3 - 1h32
  20. aegis - 1h25
Sorted by build-space
  1. openoffice.org - 7217MB
  2. nel - 2773MB
  3. gcc-snapshot - 2499MB
  4. koffice - 2247MB
  5. wxwidgets2.6 - 2151MB
  6. linux-2.6 - 2150MB
  7. webkit - 2059MB
  8. glibc - 2028MB
  9. xulrunner - 2023MB
  10. iceape - 2007MB
  11. boost - 1983MB
  12. mesa - 1943MB
  13. gcc-4.2 - 1943MB
  14. qt4-x11 - 1915MB
  15. python-kde3 - 1847MB
  16. gcc-4.1 - 1828MB
  17. gcj-4.1 - 1783MB
  18. eclipse - 1763MB
  19. iceweasel - 1727MB
  20. gcj-4.2 - 1722MB
No real surprises here. The data was collected from the Buildd logs using the latest “maybe-successful” i386 or amd64 build. Factoring into that the varied nature of the buildd machine specifications make this is data somewhat unreliable… It would be nice if someone could obtain (and post) results from a more, umm, controlled environment.

2 January 2008

Chris Lamb: RAID-5 rocks my world, baby.

It seems hard drives don’t particularly like strange powercuts and being subjected to a two-hour ride in an old Land Rover. Now, if only I could work out who I bought this drive from.. Happy new year, everyone.

3 October 2007

Chris Lamb: Yet another community Xen Server

For the last month, I’ve been running a non-profit Xen server for a few friends. It’s been working really well but I’ve got three two one no slot left. I think it’s quite good value: £7.88 per month (£17.73 setup) gives you: If you’re interested, please drop in on #lamby-xen on OFTC. UPDATE: All gone. Thanks for the huge interest. :)

6 August 2007

MJ Ray: Movements and the recent silence

I've been offline, but I think I've caught up now. Email if you think I missed you. Here's some of what I did before I went offline:
robmyers Seller's Remorse
Social Contract ten years on July 5 -- celebration?
Advertising Free Software Projects etbe
A Cambridge Co-operator: Great News
Michael
Cooperative? My Arse Web design and development techniques by Steve Tucker
Anti-DRM campaign, Apple Store, London.
Place Your Blog on a 'Busy Intersection'
Should Links from Your Blog Open in a New Window? Reader Opinions
Back
Co-opNet :: View topic - What Crisis
LWN: Totally "free" Ubuntu? That's the plan for Gobuntu (Linux.com)
The Problem with RSS
Property of a Lady Answers to Love Is Strange Trivia
Fairtrade Beer niq's soapbox
Co-opNet :: View topic - The Cooperative Tour de France
ITV response to Coverage Question... - Page 3 - ITV Message Boards
Why doesn't Online Main Stream Media link?
Property of a Lady Tuesday Trivia: Dance
Humor for Bond 22? Ultimate James Bond Fan Blog
lamby :: blog :: Graduation
itv and Other Tours Coverage: Vuelta, ToB
Holidays-London-and-rain
Reflowd - Recentlog
Reflowd - Source code
Aaargh! niq's soapbox

19 June 2007

Pete Nuttall: freduce

Since I'm not at Debconf, I've been filling in time in the early mornings by randomly browsing Facebook. Chris Lamb had a post on a function called fnreduce, which clearly wandered past on planet when I was away. Since I was bored, I wrote a simple haskell version:
fnreduce :: [(a->a)]->a->a
fnreduce [] value = value
fnreduce (a:as) value = freduce as $ a value
Line by line, its clear how it works. The first line is the type sig, which says that the function fnreduce takes a list of functions, and a value of type a, and a gives back a value of type a. The functions all need to be of the type a->a, which means they take a a and give back a a. a is a type varible, which means it can be replaced with any type you feel like, for example: Int or String. The second line merely defines a base case, which says that if the list of functions is empty, it just returns the value given. The last line does all the work, and says that fnreduce on a non-empty list is computed by taking the first element of the list, computing the new value using it, then calling fnreduce on the rest of the list and the new value. This is how most list processing works in haskell. I'm left with two quick questions: the first is how to define it in terms of a fold, which it clearly is. The second is how to escape the a->a resriction, which lamby's can do. Since I'm writing haskell, I'ld like to do this in a type safe way, to have my cake and eat it too. This cant be done with haskell's type system, but I may run it past Edwin for his two cents if I remember...

16 May 2007

Chris Lamb: A confession

Yes, it’s true:

19 April 2007

Daniel Baumann: Debian Live and Google Summer of Code 2007

Debian is this year again part of Google's Summer of Code. Last week, the final decisions about the proposed projects were made and Google granted 9 slots in total for Debian. I am very glad to say that Chris 'lamby' Lambs proposal for Debian Live is amongst those. Here is the abstract from his proposal:
	Live-helper is a utility to build CD, DVD, netboot and USB-stick live
	images of Debian, a GNU/Linux operating system. It boasts support for
	multiple architectures, auto-building images, amongst many other
	features.
	Live-helper is extremely flexible, allowing interested parties to create
	their own system completely specific to their needs, including support
	for custom package lists, kernel parameters, encryption, additional
	commands to configure the live system etc.
	My proposal is to construct a graphical user interface that can be used
	in conjunction with live-helper to build Debian Live systems, allowing
	editing of existing configurations and including a 'wizard'-style
	walkthrough for the first-time user.
	Providing less experienced users with the opportunity to easily create
	live distributions will generate more exposure for live-helper,
	providing more valuable feedback for its developers and ultimately
	helping Debian's image as an extremely flexible and free operating
	system.
	The GUI will be written in Python using the pygtk GTK+ bindings.
The next step on the timeline begins at May 28th, where the students start coding on their projects. I am happily looking forward to it.

Next.

Previous.