Planet::Articles
This weekend, another few cubic metres of my house disappeared... with the delivery of a lot of boxes from the Melbourne 08 team full of neat LCA stuff. Networking gear, label printers, clipboards, power boards, printers, AV gear - too much stuff to inventory but all incredibly useful and appreciated nonetheless; and many things that started the cogs turning... Have we thought of absolutely *everything*???
LCA Fact #1: You can never have too many batteries.
Anyway, the main purpose of Steve and Stuart's visit this weekend was to meet with John and our many stakeholders to discuss the oh so legendary LCA network, and everything is looking really positive right now. Can't let too much out until all discussions are done with, but let's just say, all things going well there should be no shortage of Interwebz for our highly connected delegates.

LCA Fact #2: There is no such thing as too much internet...
Anyway, the day was spent talking large amounts of networking, watching the weather through the windows of Wrest Point changing from sunny to sleeting, while a sailboard sunk into the Derwent under the weight of the wind; and then traditional curry at our now regular curry place while Steve discussed fake blood and Stuart and myself indulged in nerdy pop culture references. ("0118-999-88199....")
LCA Fact #3: The Nightlife boxes apparently run a Linux front end - and album covers are specifically designed to make OCD people go crazy.
And now a few days for my stomach to recover from too much food and ROFLing.
Thanks guys.Well, I've decided to do the Book Meme from PLOA and Planet Debian etc... Just recapping for those of you who haven't seen it yet (not many of you):
- Grab the nearest book.
- Open it to page 56.
- Find the fifth sentence.
- Post the text of the sentence in your journal along with these instructions.
- Don't dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST
And mine is:
It is possible to prove that if such a nontrivial square root of 1 exists, then n is not prime.
-- Structure and Interpretation of Computer Programs, Second Edition.
Whilst doing some coding today for my semester research project I found a need to check for incoming data on a socket without taking any data out of the stream. Here's the code I came up with:
cp.sock.setblocking(False)
try:
cp.sock.recv(0)
stuffwaiting = True
except socket.error:
stuffwaiting = False
cp.sock.setblocking(True)
This code works finely on Linux -- you can only receive data if there is data to be received (even if you want to receive no data). Unfortunately, the code doesn't port to Mac OS -- you may receive as many bytes as there are in the socket's buffer -- if there are no bytes in the buffer, you can receive 0 bytes. Therefore, the following fix is necessary:
cp.sock.setblocking(False)
try:
cp.sock.recv(1, socket.MSG_PEEK)
stuffwaiting = True
except socket.error:
stuffwaiting = False
cp.sock.setblocking(True)
So, my question for Lazyweb is: is there a better way to do this?
A question for my interstate readers: Has anyone seen the following lane structure outside of Tasmania?

(If anyone wants to guess what the correct procedure is in such a situation, you're also welcome to do that)
LCA 2009. I'm registered. Are you?
The 2008 ACM South Pacific Programming Contest Results have been confirmed: my team's come 3rd overall (as expected). We find out whether or not we've achieved a wild card position in the World Finals in December.
For the benefit of those who were intersted, Mehffort is a portmanteau of meh and effort, and is a very popular word in the semester 2, 2008 Maclab dialect of English. It is used to convey one's lack of motivation towards a particular task. In context:
- Me: Paris, help me come up with a witty slogan for the TUCS T-Shirt.
- Paris: Mehffort.
As proud denizens of the Maclab, my ACM ICPC team for this year decided to adopt the word as part of our team name.
The ACM ICPC South Pacific Region was on yesterday, and was great fun (as usual). My team this year, the Mehffort Musketeers consisted of Alex Berry (who'll be competing in the Google Code Jam regionals soon as well), Michael Ford and myself.
For the benefit of people who did the ICPC this year: I solved problem A, C and I; Michael solved B and D, and Alex solved E, F and H. Here's some general commentary on the problems that I solved:
- Problem A was very simple, and the shell of my solution was complete within three minutes of the contest starting. Unfortunately, the entire problem was not defined until halfway through the test data, which led me to finishing it a bit later.
- Problem C, which seems to have been the problematic problem this year (as far as judging's concerned) was relatively straightforward, though I had two rather annoying bugs that took me about an hour to week out... it happens, I suppose. Solved on the first submission, which I'm happy about.
- Problem I was a longest path problem, that was relatively straightforward depending on what sort of algorithm you chose to solve it. I've heard reports of people using the Bellman-Ford Algorithm and failing -- as far as I can tell, such an algorithm would work on problems except where there existed a cycle not involving the endpoints of the path taken in the problem. I used Floyd's Algorithm and had it solved first time. Simple.
As alluded to earlier, we solved 8 problems, and we're currently the only team to do so with the testing data used on the day (this means that we're in a provisional first place), however, there are many teams who are likely to get problem C rejudged, and following that we'll likely be third. More news to come.
I found this very useful news service today, at HasTheLHCDestroyedTheEarth.com.
May you find it informative.
So the new version of Debian is to be known as Squeeze, eh?
Does anyone else think of a certain 1970's British New Wave group?




