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.