Archive for the ‘Linux’ Category

As if anyone reads this anyway??

Wednesday, January 28th, 2009

So I’m moving this blog over to endofunctor.net (or whatever I’m calling it), most likely. When it’s done, that is, which could be a long time since I’m writing it all myself instead of plonking a stock WordPress installation on it (duplicated effort is fun towne, after all).

I was going to write it all in Haskell. But that would have to all be over CGI and no HAppS (not that I’ve tried either, but…). So web.py it is instead, which so far seems pretty nice I suppose.

Of course don’t be too surprised if this is the last you hear of all this.


In other news, I put Arch linux on my laptop to replace Kubuntu, and I like it a whole lot. It gives the (maybe false) impression that I actually have some idea of what’s going on, which is nice. Plus things come up in the package manager on the same day as they’re released elsewhere, often. (KDE 4.2 is good too.)

(this was written on an iPod while my computer’s doing other things, so sorry for amy typos.)

I hope it’s not, like, a trademark of Nintendo or something

Friday, June 20th, 2008

Current project: Picross in Ruby, using Korundum and such. Which is so much better than using C++ directly. <3

However, note to me and anyone else using it: Qt::MainWindow#central_widget= doesn’t work. You have to use #setCentralWidget or #set_central_widget, or whatever, otherwise it’ll overlap with the other parts of the window like the menu bar and so on. Knowing this in advance would’ve saved about an hour of futile debugging. :( (Obviously this goes for KDE::MainWindow and KDE::XmlGuiWindow as well.)

On the other hand, the fact that it automatically translates ruby_style_identifiers to qtStyleIdentifiers is pretty cool, even though I suppose in the grand scheme of things it’s about as important as bracketing styles…

Update: some screenshots to show what I mean.

set_central_widget central_widget=
Right Wrong
Good Arg

xorg.conf

Saturday, May 17th, 2008

No-content post ahoy!

No-one wants to see my xorg.conf, I know, but it took me forever to track down the right things for my touchpad. Damn thing doesn’t support multitouch though :(

(Also, man synaptics is useful.)

(more…)

Of KConfigDialogs and SIGABRTs

Friday, January 18th, 2008

Since KDE4 is actually a real thing now, instead of just something that’ll happen in the future sometime, I don’t really have an excuse not to start writing things for it. So I am.

Holy crap.

I assumed it would be like Qt on steroids (that is, having features for everything you could possibly want), but seriously. KConfigDialog saves settings automatically. You just throw up a dialog, and all else is done.

It may be somewhat apparent that a login box is as far as I’ve got so far.

Anyway, what I’m trying to write is a client for http://pics.livejournal.com, because the current de facto Linux offering is a Perl upload-everything-in-a-directory script. No, really. I haven’t used it, so it may be surprisingly feature-complete, but we must have a GUI client or all the OS X fanbois will laugh at us.

Incidentally, the reason I have a single config box to show for a few hours’ work, other than coming in knowing next-to-nothing about KDE’s architecture, is because KConfigDialog kept asserting false (and SIGABRTing) and refusing to tell me why. #undefing QT_NO_DEBUG and, um, something similar from KDE didn’t make it tell me, so after traipsing through the API and source, I finally figured out it was because I called the submit URL ‘Server’ in the .ui file, and ‘Interface’ in the KConfig files. :suicide:

Project Euler, bash version

Sunday, October 28th, 2007

OK, so when I’m bored I sometimes attack a few of the problems on Project Euler; so far I’ve done about 40-odd because I’m slow and inept. I just finished problem 41, which is to find the highest pandigital1 number that is prime. I did my program in Haskell, of course, but in the thread someone had this:

primes 1234567 7654321 | grep 1 | grep 2 | grep 3 \
  | grep 4 | grep 5 | grep 6 | grep 7 | tail -n 1

I don’t think I need to tell you that this is the best answer ever. And it’s far faster than mine…


  1. The Wikipedia definition seems to allow multiple occurrences of the same digit; obviously PE didn’t (otherwise there would be infinitely many and thus no ‘largest’). Also, you were allowed numbers less than 123456789 as long as an n-digit number had all the digits 1–n, for example 4231. Which is good since the answer had seven digits.