Archive for the 'code' Category
Thank you, Denton Gentry, for your Ode to Enum.
In particular I was looking for the gcc extension or flag to reduce the number of bytes used by an enum with only a small number of values __attribute__((packed)) did the trick!
Yesterday Hung, Jayen & I started work on UNSW’s code base for the 2010 Robocup competition, and ended up with something quite neat that we didn’t have before. The Nao runs a piece of software from Aldebaran called ‘NaoQi’, which provides an abstraction layer over the Robot’s hardware, and also some sort of inter-process communication [...]
C++ is cool, I didn’t know you could do this until yesterday. Unfortunately it’s a bit painful to bind anything other than the 1st or 2nd arguments (by painful I mean not-built-in).
#include <iostream>
#include <functional>
#include <vector>
using namespace std;
int main() {
vector<int> v;
vector<int>::iterator it;
v.push_back(3);
v.push_back(4);
for (it = v.begin(); it != v.end(); ++it) {
cout << *it << endl;
}
transform(v.begin(), v.end(), v.begin(), [...]
Jayen and I put this article together this morning for ‘Beta’. CSESoc’s weekly student newsletter.
Jeff Arnold, creator of Ksplice, presented a talk this year at linux.conf.au, the annual Australasian Linux conference, about his product, the first practical technology for updating the Linux kernel without rebooting.
Jeff Arnold wrote most of Ksplice as part of his [...]
so true!
Well semester one is finally over, the last few weeks have been rather busy. If you’re in 1911 please vote in the pretty picture competition on the forums, my ‘waterfall’ pic isn’t up there yet, but should be soon. For anyone interested the Python code I used to generate my grammar files from jpg’s [...]
Stefano and I have been doign a few questions from past year’s UNSW progcomps. I just did the first question from 1997, simple quiz generator, have a play:
~davidc/bin/quiz_generator
The idea is you enter a paragraph or two, and all digit strings are replaced by underscores and the answers appear at the bottom. There can [...]
At the moment it doesn’t recognise diagnoals – but it will soon .
SSH/Putty into CSE and play two-player connect four! ~davidc/bin/connect_four
Update: Diagonals now work! Have fun
I think I’ve finally finished the cs1911 assignment after much painful/enjoyable debugging. If anyone is bored enough to test it with some obscure cases just run ~dgcl807/cs1911/assignments/assign1, it should be world-executable now, and let me know if you find any problems!
Tomorrow Night
J-Club (at the Rege) 7.30pm onwards
Next Thursday
Poker Night 6-11pm K17 Seminar Room
SydneyPython meetup at GooglePlex (yes that’s right, Google’s Sydney HQ (nice view)) 6-8pm
Saturday Week Week
Linux installfest (CSE Labs)
For more cool stuff keep up to date with CSESoc (note, for some reason if you view any two DokuWiki sites at the [...]