Wednesday, November 14, 2007

Moving blogs again

It seems that my email-posting looks shit in everything that's not an RSS
reader, so I'm looking for a new solution. If you would all be kind enough to
add my wordpress account (http://alsuren.wordpress.com) to your feeds, that
would be ever so good.

I will decide which blog to stick with when I've tried out both for a while,
and had some feedback from people saying which is better for
reading/commenting on.

Saturday, November 03, 2007

[Proposal] Debian/Ubuntu "web of trust" packages.

[background] on Linux, sensible people *never* install programs that haven't
been digitally signed. This is how linux users avoid most malware bollocks:
Each time you sign a package, you give your word (generally trackable back to
the name on your passport) that it isn't malicious. Signing a malware
package, as a trusted developer, would get your name pasted all over
slashdot, and you would be flamed about it for years. (and possibly even sent
to prison, like a virus writer would) [/background]

Most of us on debian have (at some point) tried to install something, and it's
not been signed with a trusted key (one used by a trusted person). We then
have to go and get the key from a keyserver, in order to avoid error messages
each time we install a package signed by this person. This is ugly for a few
reasons:

a) How do you know that the key is trusted. You just got it off an arbitrary
webserver. None of your friends told you that it could be trusted.

b) Can anyone *ever* remember the command for importing keys, and telling apt
that they're trusted?

This is also a problem that alexreg and I identified as a requirement for our
windows apt-msi project, if it ever got off the ground. I think I have a
potentially elegant solution to this problem. Read on.

1) Create a package called trust-<name>-<fingerprint>-1.0.deb, which
automatically imports your key.

2) Make all of your packages depend on >=trust-<name>-<fingerprint>-1.0

That way, anyone who installs your package will only get warned once (if they
get warned a second time, then they can start to worry, in the same way that
ssh server keys work). This scheme *should* work without any special support
from apt.

Also, if you know a trusted developer, and they have you on their web of
trust, you can ask them to sign trust-<name>-<fingerprint>, and put it in
their repository. This way, users (or smart package managers) can install the
trust- package first, and proceed without having *any* "unsigned package"
warnings.

One thing that could be a little tricky is trust revocation. It might be
possible to create a package called trust-<name>-2.0 which revokes trust in
the key, but an attacker could create a package called trust-<name>-3.0 that
foils this scheme. On the other hand, getting onto someone's web of trust
generally means that they have seen your passport, so creating a situation
that required a key to be revoked would necessarily involve identity theft.

What do you all think? Could it work?

Friday, November 02, 2007

w00t

*while playing anaconda*

"It would be quite interesting to play this on an infinite plane."

Wednesday, October 31, 2007

Of love, life, and linux.

So I hear w00t about Gill [1] and not being ambiguous and not running away.

It seems that I have been struck by the "more girlfriend implies less
blogging" syndrome. I was thinking I could avoid it, but evidently not. There
has even been loads of stuff that I have thought "I should write about that".
I would also like to spew my feelings on here, but I suspect that some people
might have objections to that.

I really need an economist/machine learning specialist to help me build a
model of love based on utility/expected reward. So far, I have
Utility(him) = Utility_0(him) + love(her) * Utility(her)
Utility(her) = Utility_0(her) + love(him) * Utility(him)

So if love(him) = love(her) = love (a constant) then how large does it need to
be for Utility(him) to double? Also, should there also be a "time spent
together" factor in there, and what form should it take?


I've been stupidly busy recently. Probably my own fault for being so
lazy/distracted on the weekend/before. I'm gonna get screwed tomorrow for not
handing in work, and the next day (though I was able to do surprisingly much
of the risk paper in the half hour I thought I had)


In Linux news, we now have a JCR computer, for use with hermes. If you want an
account for more than that, please put something tasty in my (or Rob's)
pigeonhole. Also, if you know a good method for providing authorization
from /etc/shadow to kerberos or radius, please let us know. It would be good
to let all srcf users have un-restricted access onto the system. We'll see
what happens.


For Kopete users: a nice little hack: in the alias plugin, assign
"idle" to "exec dcop kopete KopeteIface setAutoAway"
Now you can type /idle to immediately go "away" until you next move the mouse.
Useful for adding finality to conversations without fucking up your status
for when you actually return.

[1] wget

http://alsuren.blogspot.com/2007/05/dancingthe-fateful-post.html

-o - |
sed -e s/Jill/Gill/

Friday, October 26, 2007

Organization

It seems I win at failing at organization.

*may have frantically started doing supervision work 10110* minutes before my
risk supervsion.*

*and no, that's not binary.

Tuesday, October 23, 2007

In other news:

Squee: I have my bike back! Fankoo mummum and daddums!

The Cambridge Lindy Exchange was really good, and I am thoroughly shattered.
Also, Cycling back from the speakeasy with just a sweaty t-shirt on is
probably not wise. I will go to the shops at some point and get lots of fruit
to ward off the customary "I've just been dancing with half of about 80
people from around the world" pestilence.

Sucks to be Stu, who managed to get diseased before they even *arrived*.

Reliable contact methods.

It would appear that email is the best way to contact me. My phone was having
a strop from about sunday morning until now, so attempts to organise meetings
etc. may have failed. *blush*

To contrast, I have checked my email about 10 times in that period, and my
computer has checked many more times, just to make sure that nothing was
missed, and so that it could quickly give me an error message if the system
failed for any reason.

Thursday, October 11, 2007

Performance Dancing

When I was in London, Sally asked me whether I would join a performance
troupe, so when I came back to cambs, I told the guys about it, and asked
them (very vaguely) whether it was a good idea. They said yeah...

Then on [last] wed, I went to the intermediates, and was completely dead. I
wasn't leading properly, and I was thinking way too much. Katherine also
reminded me that I was still yanking rather than body leading swing-outs.
Also, I should probably make the effort to get the breaks/half-breaks in the
shimsham. All in all, I really don't feel ready for performance dancing.

On the other hand, There are so many things that I keep getting told that I'm
doing badly, and I see really obviously when I see pictures of myself
dancing. Maybe joining a dance troupe would would provide the explicit
invitation for people to try to help me sort out those things. I think I
would also benefit from seeing a video of myself, and correcting my own
mistakes.

I think I will try to get at least one private lesson before the end of term.
I should ask Matt and Lotte about what's possible though.

I will tag the relevant people in the facebook copy of this when the lindy
exchange is over, and they're a little less busy. I would like to see
people's comments on this. What should I do?

Wednesday, October 10, 2007

To all you yucky competition dancers.

I say that "Jack and Jill"s are the only competitions that have the right to
call themselves partner dance competitions. All others should be called
paired solo/performance dance competitions.

http://en.wikipedia.org/wiki/Jack_and_Jill_(dance)

Example:
http://www.lindylibrary.com/main/ultimate-lindy-hop-showdown-2006/ulhs2006-jack-jill-finals-competitio.html

Wednesday, October 03, 2007

Synchronisation

I have spent *hours* messing about with my phone, trying to make it import my
calendar. It seems that the solution is actually really simple. The reason it
took so long to find is that it doesn't involve using any of the linux
calendar synchronization utilities.

1) Create an account on http://www.scheduleworld.com/
2) install the funambol client for windows mobile on your device
3) sync mobile device
4) export an ical from linux
5) import ical into scheduleworld
6) sync mobile device

The *really stupid* thing is that all of the above is done using open source
software, and yet there is no solution on linux which will let me sync with
scheduleworld. Let's hope this improves for KDE4.

Wednesday, September 19, 2007

Impromptu Holiday.

Seems I'm in Norfolk with Dad.

Anyone want me to visit them on my way back to London?

Saturday, September 15, 2007

[status update] Menu System

= The Good =
+ entries are sorted by title (A=black, Z=white, and layed out in a
predictable position.)
+ It works as an application launcher, or as a web-based links page
+ You can try it yourself:
Web: http://www.srcf.ucam.org/~dl325/python/links/links.py?username=YOUR_NAME
Desktop:
$ sudo aptitude install git-core pyqt4-dev-tools libqt4-dev qt4-designer python-xdg xdg-utils python-sqlite kdebase-bin
$ git clone http://www.srcf.ucam.org/~dl325/python/links/.git/
$ python qsmenu.py

= The Bad =
- Currently, it just picks the first menu entry it finds for each program, and
doesn't prefer working/svg icons over broken/pixelated ones
- It needs a name! Post ideas here:

https://www.blogger.com/comment.g?blogID=6107001&postID=663834070309131498

= The Future =
+ I reckon my menu system could be adapted to work with file menus as well
(create a DataEngine that understands KDE's XMLGUI crap). That would be
hardcore (and *better* than MS Office's ribbon, with less manual work).
+ Add an info panel at the bottom, for more verbose info on entries.
+ Make a data engine with a[n incremental] search function that modifies the
scores.
+ Add sub-folders to the menu, which cause the entries within to stand out.
+ Experiment with regions that contain other regions
+ Experiment with highlighting to show newly available/last used entries.
+ Make the data engine thread-safe, and event-driven.
+ Port to Plasma for KDE4

= The Inner workings =
There are 3 components:
* Data Engine
* Layout Engine
* Rendering Engine

The Data Engine is responsible for collecting and ordering data, and assigning
scores. It is also responsible for compiling the data into a 1-D list of
entries.
The Layout Engine takes the 1-D list of entries, and maps each entry into a
region (of one or more squares on a 2-D space). It passes this data to the
rendering engine by calling draw_square() repeatedly. It also calculates the
center of the region, using a bit of GCSE maths.
The Rendering Engine deals with the user interface crap. It draws the squares,
and deals with clicks by sending them to the data engine.

The layout algorithm is a case of "cut parent square into 4 children, and
repeat until there is only 1 entry in each child square, then paint."
The sub-dividing and checking for entries is done in 1-D rather than 2-D, so
it's pretty fast.
The slow bit is the rendering, which is done using C libraries anyway :D.

= "But how do you make it look so pretty?" =
I fudge it. I leave a gap with no information in it. That way, "there is only
1 entry in the child square" happens after only a few sub-divisions. This is
something that I stumbled upon by accident, when I fed it some bad input
data.


To give you an idea of how nasty it *could* look, this is a picture drawn with
the gaps as normal:
< http://www.srcf.ucam.org/~dl325/python/links/map_DTsoSj.png >
and this is the picture with
< http://www.srcf.ucam.org/~dl325/python/links/map_EJjvka.png >
brown=fudge (I decided on fudge_factor rather than blur, as that's what it is)
lines are drawn in the brown by sub-dividing, to create the simplest possible
regions (ie ones with the largest/fewest squares).

[HELP!] Menu System (Name ideas?)

I'm sure you've all seen my posts about the menu/links system I'm developing.
< http://www.srcf.ucam.org/~dl325/python/links/links.py?username=YOUR_NAME >
It's all going well (update post to come shortly) but I *NEED A NAME*.

Whoever comes up with the best name will win brownie[ point]s, and a mention
in the docs.

Click "Add a Comment" now for your chance to win!

Sunday, September 09, 2007

Back to life

Turns out it was just the power supply, and I *think* it's just the input
module. I have bought a new one from PC world, but it's shit (doesn't live up
to the claims made in the manual), so I'm going to try fixing my Asus one
when I get back to cambridge. *cradles his dead asus power supply tenderly*

I told some girl I would add her on facebook on Thursday night. I should
probably do that, shouldn't I?

Friday, September 07, 2007

More Problems

I *may* have exploded my computer.

It went bang.

Thursday, September 06, 2007

Fan Problems

It's been pissing me off for way too long, so I'm getting a new fan for my graphics card (and maybe my CPU) before I next turn on my computer. Dunno how long that will take.

As a happy coincidence, I may also be able to get my daily routine sorted out, and stop coding at 2 in the morning.

Wednesday, September 05, 2007

Cool Interactiveness (OMGZ)

I have created a menu system, inspired by:
- xkcd's hilbert curve
-- http://xkcd.com/195/
- Dasher
--http://www.inference.phy.cam.ac.uk/dasher/

--http://en.wikipedia.org/wiki/Dasher
- KDE's QuickLaunch toolbar ("Most Popular Application" mode)
-- help:/kicker/launcher-applet.html (not documented)

It can be found at:
http://www.srcf.ucam.org/~dl325/python/links/links.py?username=YOUR_NAME

Each time you click on a link, it will become bigger, but everything will stay
in *roughly* the same place. Check it out for yourself. You can add and
remove links using the link in the top right corner (though the interface
need a bit of polishing). Please do, because I would love to see what it
looks like once a few people have been using it for a while.

Replace YOUR_NAME with something memorable, and you will automatically get a
new account, with all of the links imported from everyone else.

I will post more updates as I develop more. If someone wants to turn it into a
plasma applet, or a start menu, get in touch. Also, if someone knows how to
use CGI or SQL properly, *HELP ME!*, because my code is a complete mess.

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?