... upgrade complete

Posted by Mark Thu, 21 Aug 2008 01:20:00 GMT

well, that was surprisingly painless. now running on Ubuntu 8.04, and nothing seems to be significantly broken. Rock on. Now, for some git repos…

no comments

employment bitching

Posted by Mark Thu, 14 Aug 2008 10:20:00 GMT

Why is it that in a world where Google can offer 2 gigabytes of email storage space for free to anyone who wants it that Optus offers its paying customers and loyal employees 20 megabytes? Beyond comprehension.

1 comment

Swapping shift and control on Mac OS X Leopard

Posted by Mark Tue, 05 Aug 2008 14:31:00 GMT

I've just bought myself a spanking new ergonomic keyboard, but to my horror, the control key is way down the bottom of the screen.

"This is normal!" you say. Yes, but I use emacs, and it's far too far to reach every second keystroke. I like it where the caps lock usually is, and given that the caps lock is of no earthly use to anyone, it's usually easily swapped in using Keyboard Preferences on the Mac. Too easy!

 Unfortunately, as you can see, the typematrix has sensibly done away with the caps lock, replacing it with a shift key the size of tasmania.

 my new keyboard

Don't get me wrong, gentle reader: I love that key. I salivate over it, entertaining lewd thoughts entirely inappropriate to this family (and frankly dusty) blog. However, I want it for my own filthy purposes: to wit, as a big old Control key. Shift can be demoted to the old control key, which is close-as-dammit to its normal position, and all will be well with the universe.

 But oh no! normal keyboard preferences will neither let you remap shift to something else, or remap anything else to shift! How can we fix this? Googling gave me DoubleCommand, which will let you change a few mappings in a distinctly non-orthogonal, non-extensible sort of way, and Ukulele, while an admirable piece of software for changing the mapping of regular keys, has absolutely no truck with modifier key. It looks like we are sunk! But hold! a ray of light on the horizon: an article on mapping other keys to shift using Interface Builder. This solves half of the problem, allowing me to map the piddly little control key to shift. It doesn't give me all of it, unfortunately. The approach can be extended, though: just copy one of the dropdown selectors and change the tag to '1', just like we did for the list of tags. One last little bit: we have to control-click on the new dropdown, select 'modifierMappingDidChange', and drag it to the "File's Owner" object. 

and there it is.

 

 it's so beautiful I could cry. But instead, I'm going to bed, knowing that just an hour's hacking has saved me milliseconds. Awesome.

Tags  | no comments

simultaneously proud and chagrined

Posted by Mark Thu, 26 Jun 2008 01:13:00 GMT

I just defined an emacs macro for the first time.

  1. it's really, really easy
  2. it's really, really useful
  3. i'm sort of embarrassed i hadn't done it before.
Still, onwards and upwards, right?

2 comments

things i learned today

Posted by Mark Thu, 19 Jun 2008 06:06:00 GMT

for LWP::UserAgent, giving field-value pairs to 'post' sends them in the request. Giving them to 'get' sets them in the header, which is less than useful. *sigh*

 

anyway, hi. I've moved again since i last posted - back to Gordon this time. Am now working for Optus on a web hacking contract, which is keeping me off the streets and adequately stressed. Oh, and google dev day yesterday. Mad fun, even if Android's not quite as open (or GWT quite as un-java-y) as i'd like…

no comments

nerdboy

Posted by Mark Mon, 31 Dec 2007 12:21:00 GMT

ok, so that was embarrassing. 11:24 on NYE, and I'm still at home because I got interested in something off projecteuler.net. wonder if anyone's still around…

no comments

finally...

Posted by Mark Fri, 14 Dec 2007 05:53:00 GMT

feels like half the posts here are lazarus with a triple bypass… anyway, it’s up and running on the pretty new VPS. feels good to have root on a constantly available machine.

anyway, lately i’ve been working on some event planning stuff, as well as some routing algorithms. more once i’m sure this thing actually works - you might even get some capital letters.

no comments

i got ex-wives i like better than you

Posted by Mark Fri, 05 Oct 2007 13:39:47 GMT

oh, how very embarrassing. one “chmod o+x dispatch.cgi” later and I’m back. Hello.

as far as news goes, I’ve moved again, and am now living with an old uni mate in Redfern.

Photo 6.

This is my room. It is a cube approximately three metres on a cube, and has a bucket in the corner to catch the leaks when it rains - the large structure above the berk grinning like an idiot is my loft bed, which is about three quarters of a metre from the roof, and behind is the impromptu bookshelf I just made from wardrobe planks and milk crates. I got undergrad ghetto chic down.

Anyway, I’m still working on Pink Pages stuff, as well as a few odd ideas. The Facebook app idea got scooped by some talented young bastard - check out Connection Cloud if you have a mind to.

1 comment

fun file facts!

Posted by Mark Mon, 09 Jul 2007 06:09:36 GMT

so, I’m doing this odd little visualisation project. Part of it is to do with Facebook, which means that if it gets popular at all, my poor little server is going to get pounded harder than a goat at a furry convention. Therefore, I have some interesting constraints on resource usage.

Friends

I’m using the graph drawing library GraphViz, which is in C. I’m writing my app in Haskell using HAppS, and the Haskell interface to C is all fine and dandy: the difficulty comes because GraphViz wants to output its graph to a file, rather than making it available as a string in memory. This makes things difficult: I really don’t want even the possibility of hitting the disk.

To make this more concrete, I wrote a little C testing script to see how fast this is on my laptop. I took three approaches:
100 times, either:

  1. Copy the strings back and forth in memory - this should simulate what would be happening if GraphViz generated the graph in memory rather than insisted on copying it to a file.
  2. Create a ramdisk, and write the strings out to it
  3. Write the strings to disk, then read them in again: the hope here is that the built-in IO caching will save me

The results for each approach respectively:

10:47 ~/projects/current % time ./a.out -m
./a.out -m  1.68s user 0.09s system 71% cpu 2.480 total
10:47 ~/projects/current % time ./a.out -r            
./a.out -r  0.43s user 2.56s system 48% cpu 6.233 total
10:47 ~/projects/current % time ./a.out -f
./a.out -f  0.49s user 4.09s system 28% cpu 16.107 total

So it looks like the inbuilt caching method is not so great. The ramdisk is faster, but still not as good as using the strings in memory - presumably system call overhead is hurting me. A third option I haven’t yet investigated would be for the Haskell process to open a named pipe and have C write to it, but I think that would require at least two processes: at the moment, I just have the one HAppS process and would like to keep it that way if possible. (My current host has a limit of 20 processes, which is a bit anemic.) In any case, it’d be at least as bad as the ramdisk approach, although possibly a bit more doable on a shared host.

In other news, I saw the Maladies play last night at the Hoey. They did an absolutely blistering set: I’ve never seen them quite that sharp. Roll on the album…

3 comments

This thing is still here?

Posted by Mark Sun, 27 May 2007 20:00:00 GMT

So, hi. I haven’t blogged in forever and a day and am slightly embarrassed about it, but as Pete puts it, my shrug is entirely up to the task. shrug

Since I last wrote, I’ve been to Thailand with Hallie, drunk beer with ladyboys, floated down a river on an inner tube in Laos, beer clasped firmly in hand, and endured the Vietnamese overnight bus line. (Special props to the Vietnamese motos for their ascending trio of “Moto? Girl? Weed?”)

I have some photos somewhere, and will probably be putting them up. Somewhere. I’ve been agonising about writing a post about the whole experience, but it’s either too big or too small: it had a massive effect on me, but what on earth can I write that isn’t indistinguishable from a million other banal travelogs? Feh.

With Sisyphus’ stone neatly abandoned at the bottom of the hill, we can move on to other matters. I’ve just got a beautiful room in a house in Erskineville. No longer must I crouch in stygian darkness under the bed in order to type: my desk has a full metre and a half of headroom, and even some natural light. My flatmates seem extraordinarily pleasant - the other Mark living here even helped me put up my ridiculous loft bed.

As far as work goes, I’m working on my standard webapp contract stuff and looking to do some hacking on the new Facebook API. Let me know if you have a brilliant idea that you feel like sharing…

2 comments | no trackbacks

Older posts: 1 2 3 ... 9