Wednesday, August 29, 2007

late nights

Oh god: It would appear that I have stayed up until 2:00 reading

http://en.wikipedia.org/wiki/C++0x
as far as

http://en.wikipedia.org/wiki/C++0x#C.2B.2B_standard_library_extension
(std::tr1, which I already know about)

While I know this is quite tragic, a few things have come from it:

function add = <>(x,y) -> int {x+y}

It seems that C++09 is getting pretty much *all* of the cool/useful features
of python (with the possible exceptions of list comprehensions and nested
scopes, which might be possible to implement with some hackery). It remains
statically typed, but you no longer have to be explicit, and you can do duck
typing using 'concept's.

Maybe I will take the time to write a few things using tr1, to get back in
practice. *slightly tempted to try writing a boo/python/rpython compiler that
will output to C++09*

Friday, August 24, 2007

CupsAndString released. Now what to do?

Okay, so I have released the first version of cupsandstring
<https://launchpad.net/cupsandstring/>. I have a few things I could do now:

a) Create a Skype connection manager
b) Clean up the telepathy-python bindings
c) Try porting to windows
d) Start work on that package manager idea of alexreg's (a set of MSI packages
with deb-like dependencies, but which can install themselves on windows,
where there isn't necessarily a package manager already installed.)

The idea that excites me most is the skype one. I would love to see what kinds
of hacks people come out with if I manage to get voice and video working on
that. Doesn't seem too hard either: http://skype4py.sourceforge.net/

Friday, August 17, 2007

Virtual Desktops

For those of you on Windows: [context] Linux and Mac OSX give you "virtual
desktops", which are like multiple virtual screens that you can switch
between. Each one has its own task bar, so it gives you more flexibility to
manage your windows.[/context]

I have found that having 4 virtual desktops isn't enough for me. I now have 5.
I still have about 3 things in each task bar

I think it's kind-of since I started using Boa-Constructor. Boa takes a whole
desktop of its own, because it needs a debugger window, editor, and shell
window, and some toolbar window at the top that I've never used, but which
can't be closed without closing the whole thing.

I have also started doing a lot of development using a different user for
developing each project, and another for testing, and I find that it helps to
keep each account on its own desktop.[context]Linux (and Mac, I think) allow
multiple users *using* the same machine *at the same time*. This is illegal
on Windows.[/context]

This trend towards increasing numbers of virtual desktops is interesting,
because when I started using linux (SuSE) it only had 2 by default, (this was
enough because I only had 128MB of RAM, so having too many programs open
slowed down my computer). I wonder when I will get to 6, or even 12. When I
start using Virtual Machines, and want a new VD for each VM?

Friday, August 10, 2007

New keyboard

I went out yesterday and got a microsoft ergonomic keyboard. It's interesting
having a split down the middle of the keyboard, because I often use b with my
right hand, and y with my left. I'm not such a fan of the ridiculously long
enter key, because it takes a bit of effort to press until you get used to
it.

There are a few keys that don't generate events ("zoom", which is a rocker
button along the center of the keyboard, the "customizable" buttons 1-5
and "My Favorites" along the top, and the "spell" button that shares the f10
button (which I plan never to use, as it requires the function keys to be
disabled))

I am really quite fond of how they've put '=', '(', and ')' in the space just
above the numpad. Shame I hardly ever use the numpad... and shame the bracket
symbols don't produce X events :P

I've also noticed something quite good about the linux/kde way of doing
things: you can use ctrl to modify the actions of even non-standard keyboard
keys, so in amarok: next track=ctrl+volumeup, previous=ctrl+volumedown.

One thing I'm not too fond of is how you can only have two shortcuts assigned
to each action, and there are programs *coughAmarokcough* that have actions
that can be mapped to global shortcuts, but not normal shortcuts.

Tuesday, August 07, 2007

Progress Report (summary of the things that interest me)

This

Please comment if there's something in here that looks interesting, or you
want more info on. This is a list of the projects that I am
currently/previously working on, organized by progress. Entries take the
form:

Project name(description):
tasks completed
tasks still to do

cupsandstring.pymsn(text-based msn in <128 lines of python):
works (can send/receive chats, and view a list of online users)
shorten to <128 lines, convert to GNU readline to allow tab completion

cupsandstring.telepathy(text-based multi-protocol in 256 lines):
can list contacts sometimes.
remove references to pymsn. Add incoming/outgoing chats

telepathy-butterfly (connection manager to support cupsandstring):
written a few patches
still keeps doing odd stuff to me, making cupsandstring hard

Windows Vista under QEMU(for development of kde/telepathy under windows):
see previous post (STOP:)
wait for new version of QEMU to officially support it

Windows XP under Qemu:
works, but is unreadable
get a *legal* version which isn't in spanish or portugese

telepathy-tick(DBus: com.Skype.API based telepathy connectionmanager):
not started. the com.Skype.API protocol is well documented though.
start with text chat and presence, then look at concurrent accounts

Left and Right handed mice (so that each hand is using the mouse naturally):
own two appropriate mice
work out how to identify mice *reliably* using evdev in xorg.conf

TheBus(a simplified dbus interface):
discontinued (after I realised how much of a nasty hack it was)
try adding features to existing dbus bindings. see about a pure python lib

Multi-PointerX (multiple people on the same computer at the same time :D ):
got it working a while ago. A lot has happened upstream since then
not tried recently. Doesn't work with nvidia driver. git is a bitch.

KDE4 (once again, just trying it out for now):
works quite well. Even kopete has started compiling and looks swish :D
check up on it periodically. Eventually start hacking telepathy into apps.

Windows package manager (like apt for .msi files rather than .debs)
Not started: Relies on me getting windows working in a vm.

Feedback/questions welcome. We love questions.

Friday, August 03, 2007

Craftsmanship in Consumerism

I have just finished reading The Culture of the New Capitalism (Richard
Sennett) and there is a section dealing with craftsmanship, and pride in
quality. There is also a chapter on consumers, and the way we are taught to
crave new things, and then not value them anymore once we have them. When
evaluating what to buy, we need to make decisions even though we often have
very limited knowledge of the production of the item. So what rules should we
use when deciding which items to buy?

One way to approach the problem is "How would I design this item?". My friends
will be able to pre-empt my answer: "unix", but when is this valid?

"Simplicity of implementation is more desirable than simplicity of interface."
This goes directly against the modern consumer's way of thinking: "If I can
buy something that is easier to use, why should I reject it because it is
more complicated to make? Let me give a few examples:
"Serrated knives vs straight bladed knives"
Serrated knives are often slightly more effective at cutting when they are
first bought, but have you ever tried sharpening one? I would go for a
straight knife, and buy a knife sharpener. It is possible to get a
microscopically serrated knife with just a single stroke of a knife
sharpener.
"Manual doors vs Automatic doors"
When I was in america, they had some busses with pneumatic doors, and some
that the driver had to operate by hand using a simple lever. The busses all
looked about the same age, and the doors on many of them were failing. The
difference was that the failing pneumatic doors were deathly slow, because
the driver pushed a button and waited. The manual doors were often just as
slow to close, in the wrong hands, because they often closed with the wrong
door on the outside, but the more experienced drivers could get them to open
and close in maybe a tenth the time of the pneumatic ones.

So when is it beneficial to pick the unix design in these cases?
"When people will be working with it for a long time". The reason being that a
complicated interface can be learnt over time, while a complicated
implementation will often get warn out, and be very difficult to fix.
Annoyingly, a commercially successful product must aim for the opposite
ideal.

In the case of products like the bus door, the products last longer because
the operator has more subtle control over them, and can optimise them to make
them work better for longer. I could sharpen a knife so that it could saw
through meat, or I could sharpen it to give me a nice fine shave. I enjoy
that kind of thing. I think that learning subtle control of simple tools like
that could be automatically done by machines in the near future. Obviously,
it will be the electronic tools that get tuned first, and I can't wait for
zigbee devices to come out and for standards to emerge to enable remote
controlled machine learning systems.


Footnote:
Those who know me will know that I have a long history of being dreadful at
buying clothing: it takes me ages, and I often buy items that I quickly tire
of. This is mainly because I don't have much practice: I buy new clothes very
rarely.

I'm sure I could have phrased this better...

A very pointed comment

I was reading some crap on the net about python3000, and I got a link to:

http://www.joelonsoftware.com/articles/fog0000000069.html

It reminded me very strongly of Alex and his obsession with re-inventing the
wheel. He seems to be the founder of way too many projects that re-implement
things. He would do well to read the above page very carefully.

Note: another post is coming shortly, but I thought I would put this as a post
on its own, as the two audiences differ greatly

Thursday, August 02, 2007

Amarok Moodbar

Is it fitting that the moodbar for
file:///share/music/not/Mariah%20Carey/Butterfly.mp3 is mostly pink?

*skips*

FIN

Right: well that's over with.

Time for bed.

Wednesday, August 01, 2007

Harry Potter Frustrations

Am I the only one who wishes he could do this:

cat hp7.txt | sed -e %s/round/around/g \
| sed -e %s/[.][^.]*(that had nothing to do with)[^.]//g \
> hp7_slightly_less_annoying.txt

I'm halfway through, and I'm off to bed now. I will doubtless finish it
tomorrow.

Sunday, July 29, 2007

Physical labour

I thought I was supposed to be on holiday!!

Dad: Do you want to day's work on Tuesday? Terry [project manager] is on
holiday and I can't get the guys

Me: I'd really rather not, but if you can't get anyone else...

-- Tuesday --
Dad: So I've quoted for 6 man-days. That means 3 of us for 2 days
Me: ...

-- Wednesday --
Dad: Don't worry. We're on schedule
Me: No we're not. We're never going to finish by tonight.
Dad: I know. I'm not coming back tomorrow, but you guys are.

-- Thursday --
Me: Dad. Have you got a new annor T-shirt? I've been wearing this sweaty one
two days already.
...
- Later -
Dad: We've got a job in london tomorrow. It's only half a day, but Tom can't
do it on his own.
Me: Fuck off. I'm going dancing tonight. I'm not going to be up for working
tomorrow... And anyway: If it's only half a day, there's no point in all 3 of
us wasting time travelling.
Dad: Then I'll pay you for a whole day's work... Well make up your mind. I've
got to call the client now to tell him what time we'll be there.
Me: Well if you can get me a T-shirt, I will go (secretly knowing that there's
not a chance in hell that he will have an annor t-shirt washed.)
Dad(on phone to client): We'll be there between 9 and 10
Me: *rushes out to the bus stop, and buys a sandwich for dinner on the way to
dancing*
- 20:15-11:30 -
Dancing was... It's a different experience to cambridge: A lot more
performance than social, and no Matt and Lotte :'( (we love our Matt and
Lotte *hugs*). Also, the teaching is more of a one-way process, mostly
general derision of the entire class. No questions there (even though we
loooooove questions) because the class is so much bigger.

[babble] Also, there was a lot of really shit lead-follow: Early on, I noticed
a lot of guys stopping their partners and forcing them to do a move in a
certain way. Then later (when all those "advanced" guys left) I had a dance
with with some (possibly drunk) girl who kept forcing moves upon me. I knew
it was going to be a bad dance from the way she clamped my arm under hers. I
ducked out pretty quickly, and she said something like "I've taken way too
many lessons to just do the basic stuff: It's too boring".
If anyone says that to me again, I think my response will be "If following is
boring, DON'T DO IT! and save the rest of us the pain of dancing with you,
you back-leading bitch!"
Note that I quite enjoy trying to follow (though I will complain quite loudly
about not being able to do it). The problem is that when I'm leading, I will
always start off simple to get a feel for how the girl moves (and if she
struggles with the basic steps, I'm happy to just dance basic for a song or
two). If she does something un-expected(like back-leading) then I can't get
an idea of what she can follow, and it all goes to shit. Of course, if I've
led something already with someone, and the second or third time results in
something un-expected, I enjoy the variation.[/babble]
-- Friday --
- 00:30 am -
Me(silently, after missing the last W16 bus without realising, and letting all
other even remotely useful busses pass him, then desperately getting on the
next bus going along the road): This is why I don't use the busses.
*walks from <a
href="http://www.openstreetmap.org/index.html?mlat=51.5815&mlon=0.002&zoom=16">Whipps
cross round about</a> to <a
href="http://www.openstreetmap.org/?mlat=51.6079612627822&zoom=14&mlon=0.01">home,
which is... erm... about here (*makes a note to update that*)</a> * (google
maps seems to say 2.6 miles, but I doubt I took the shortest route)
- 01:30 -
*dies*
- ~07:30 -
*gets woken up by neighbour mowing lawn, and parents aren't here*
Me (silently): Oh wow: My dad must have left without me.
*prods mouse to get computer to display the time*
*curses and curls up in bed*
- 08:30 -
Dad: You getting up?
- ~09:15 -
Me (staggering into shower): You got that T-shirt then? Didn't think so. [note
for future reference: should have used that excuse as soon as it presented
itself]
- 09:45 -
Me(through a breakfast of chocolate cake): Dad, can you phone Tomasz and tell
him we're going to be late?
Dad: Whose fault is it that we're late? You ring him.
Me: You know, I'm doing this as a favour for you. The more you piss me off,
the less likely I am to *ever* do this again
- 10:00 -
Tom(on the phone to me): Where are you?
- 13:00 -
*has the first non-[sandwich/cake] meal out of the last 5*
- 18:00 -
*leaves the site, after doing a really shit job of a frustrating install
between two equipment cabinates (why can't the English just use Hubbel
I-Frames like the rest of the civilised world)?

-- Saturday --
*punts among the tourists, and gets sunburn and cam-water in his cable-tie cit
from yesterday*

Tuesday, July 24, 2007

Monday, July 23, 2007

Linux/Windows Vista drivel

Okay, so if anyone wants to submit useful bug reports, I found the "ubuntu"
way of doing things:
https://wiki.ubuntu.com/DebuggingProgramCrash
This was originally because amarok was getting stuck in busy loops, and I
wanted to find out why.

I also installed qemu (and kqemu, which is now Free, contrary to all the
out-of-date articles I found on the net) so that I can run
vista/gutsy/freebsd without rebooting. It's actually surprisingly simple
(especially when you have 3GB of RAM), but freebsd's "tar" is a bit slow
under qemu. I expect this is something to do with disk access. There is also
a problem with the liveCD of Kubuntu gutsy, so it stops working before it
reaches the desktop. I will get the alternative CD shortly and try again.

I'm still looking for a *legal* version of windows vista that I can use for
free. I don't see why I should have to pay for an operating system that I'm
not even running on real hardware, and which will only be used for testing
Free software.

Ideally, I would like a 30 day trial that I can keep re-installing, and a
little powershell script that I can use to get the system how I need it each
time. For now, I guess I'll have to make do with my copy of Vista Ultimate
that "fell off the back of that truck" :P.

I also want to install MPX now ( http://www.youtube.com/watch?v=0MUOn_nJmRA ),
because I have 2 mice (one left handed, and one right handed(currently both
set up as left handed)) and two screens (one of which is a bit temperamental,
but didn't cost me anything(give me a multimeter and a power supply and I'll
soon fix that)). I will also have a HUGE room next year, so having two
[keyboard/mouse/screen]s could be useful at parties if someone wants amarok
and someone else wants to check emails (or if we have a film running on one
screen, etc.)

Much love.

Sunday, July 22, 2007

The Craft

What more could you want from a film?

I wonder if Mel has seen it.

Thursday, July 19, 2007

Computer Geekery

So I *may* have upgraded my computer to 3GB of RAM.

This is so that I can run Vista.

...in VMware.

Sunday, July 01, 2007

Cambs Memes

Friday night:
I walked into the bar to the sounds of MC Hammer. How to make a geek feel at home in one easy step?

Saturday morning:
Got a hug from Aaron. Awwwww! :D

Mess-ups regarding dinner meant that we had dinner in an interesting,

No network until after lunch on sunday (right in the middle of the keynote speech)... Caused lots of interesting problems, and geeks with withdrawal symptoms. Also caused a cheer to go up.

I will do a proper review later, but for now, I'm just happy to be on the net.

Thursday, June 28, 2007

CupsAndString

No relation to either CUPS or std::string

It would seem that I have written an MSN client in about 150 lines of code.

I say about, because I'm currently counting blank lines and comments and $HOME/cupsandstringrc as 'code'.

Check out voip/cupsandstring on my srcf home for the most current version. I'm making the effort to keep the source revision controlled, and publicly available.

Monday, June 25, 2007

Exams

So it would appear that I got a 2:1.

Not too bad. I'm happy with that result.

( http://www.eng.cam.ac.uk/exams/results/2007/pt1b.html for those members of the engineering dept that can remember their PINs )

It seems that Peterhouse got the same number of each class of degree as last year, but with different people getting different things.

Now time to get on with my holiday plans.

*signs into Alex's computer to test MSN*

Tuesday, June 12, 2007

pymsn

So it seems I've started hacking on pymsn.

It's quite cool, because I'm kinda working in parallel with alexreg's VB.NET client library. Both attempting to implement the newest version of the protocols, but in different languages.

He said he had problems getting the server to remember his username. I have discovered that I am too, but my test client had client.profile.display_name = "Alsuren" , so it tricked me into thinking it was working. I might take a look at the kopete code, if I'm feeling suicidal. See how it does it. (who's betting that it just store it locally? :P )

Saturday, June 09, 2007

xkcd

Things I hate about windows mobile:

* mouse-over text doesn't show... because you have no mouse. I now have an
urge to re-read xkcd in konq.


In other news, I only have 2 ethernet cables, so I can't have both working
wifi and a working computer at the same time. (yes: I have a really
disgusting cascade of linksys devices in the corner of my room)

Luckily, I have borrowed Phil's wifi card for testing, so I can neatly
sidestep the problem, and get phone and computer working at the same time :D