Too Busy For Words - The PaulWay Weblog
26 05 2006

Fri, 26 May 2006

Why I Hate Printing Under Fedora part 01
Printing under Fedora Core has been a mixed bag. The most recent installment of non-stop 360° fun was when I discovered all my printers had stopped working on my newish install of FC5. A bit of probing discovered that all the backend drivers that are supposed to be in /usr/lib64/cups/backend/ that actually do something - usb, socket (for JetDirect printers), half a dozen others - have just magically disappeared.

I do a bit of experimenting. yum whatprovides /var/lib64/cups/backend/usb says that the cups package from the base repository provides them, but it's not installed. I download it, remove the old package with rpm -ev --nodeps cups and then rpm -ivh --nodeps --oldpackage cups-1.1.23-30.2.x86_64.rpm to install the base package. Goodie, all the backend drivers are back, but ugh, cupsd now fails with client error 127, whatever the hell that means. yum upgrade upgrades cups, which then gleefully (I swear I heard the words "A working cups installation! Let's adger it thoroughly with pitchforks!" coming from the motherboard...) removed all the backend drivers again.

And no-one on #fedora seems able to help me. I'm up to begging for help on the blogosphere / lazyweb.

(Maybe it's an x86_64 thing - my test i386 machine seems to have both the old package and the backend drivers. But that still doesn't help me ...)

posted at: 17:38 | path: /tech/fedora | permanent link to this entry

There's Nothing Like Learning Experiences...
And I'm beginning to fear that my sequence counter with the tree structure shows no learning experience happening. I chatted with the knowledgeable Rainer Klein last night and he and I were exploring different ways of storing the data. He pointed out the options I hadn't considered, like suffix trees and hash tables - options I'd discarded because when I'd originally explored this problem, using Perl, hash tables and trees were running out of memory much faster than the current C incarnation.

Of course, Perl's hash functions are designed for any string; knowing that I'm only going to be dealing with A, C, G, and T (or, when using amino acids, A-Z minus B, J, O, U, X, and Z) does make things simpler. For nucleotides (the former case) I can pack four bases into one byte for an instant hash. Or, using the same four bytes, have an array of 256 pointers to further structures. Using this 'four-ply' structure saves me both creation, talloc overheads, and traversal time. And if I think about it a bit there's probably a clever way to do some 32-bit multiply, shift or masking operation that takes four chars known to be of ACGT and turns it into the correct lookup (I discovered, conveniently, that those (base>>1)&3 yields A = 00, C = 01, G = 11, and T = 10, and works for lower case too) in one swell foop.

My 21-long subsequence count had 2.8 million unique sequences. I realised after talking to Rainer that if I stored them as a massive array of string pointers I'd gave 22 bytes per string plus 8 for the pointer (on 64-bit architecture) for 40 bytes per string, or 114MB. Much less than 1.5GB, eh? Of course, the search lookup time on 2.8 million array elements would be prohibitive, but it made me realise that my one-branch-per-character structure was inefficient. Rainer also made me realise that most of my strings after length 14 (at least for this data) were unique. So after that length, why not just store the remaining string? Or use a more generic suffix tree system, where adding ACCT to a tree with an ACGT suffix produces one AC node with two branches, CT and GT. This would again save on lookup time, talloc overhead and traversal time.

And, heaven forefend, I could even do some research and lookup papers on suffix trees.

Resolution: I need to consider many new ways of doing thing rather than just trying the first thing that pops into my head.

posted at: 14:25 | path: /tech/c | permanent link to this entry

What Are You Feeling, Jason?
Jason, you blog that you can't describe how you're feeling, in part about the proposed laws in the USA banning, it seems, Fred Phelps and and his anti-gay, anti-'America' protestors from stirring up trouble. So I'm not sure exactly what your take on it is, nor anyone else's. But if I were a USAdian, I'd be all for banning anyone who goes to funerals and denigrates the deceased, all in the name of Christianity.

I suppose I just see it as just another symptom of the religious malaise that's infected the USA. Doing things 'in God's name' is now politically and socially acceptable - it seems to be the only reason needed. And behind the scenes, the right-wing conservative christians manoeuvre, distancing themselves from Phelps while at the same time still wanting to justify their own actions in terms of the same God. Phelps, in the non-sequitur of the truly deranged, says that he's glad that people hate him because otherwise he wouldn't be teaching the truth - and again because God wills it.

It reminds me of the conversation I had with a Seventh Day Adventist who came to our door a year ago. I said I couldn't believe anything written in the Bible because every group used the same source to justify their own ends. I sent them away with a reading list of Stephen Jay Gould's book "Rocks Of Ages", a book which tries to say that if Religion and Science could only agree to 'explain' different things - the latter everything that we see around us and the former what happens before we're born and after we die - then everything would be OK. (They never came back, and yet it wasn't anywhere near the size of the Bible...) I fear that the USA has a big pendulum going - the 1980s and 1990s were big times for science explaining the universe, so now we have Intelligent Design.

I'd be happy for the pendulum to swing if so many people weren't hurt and killed each time it crosses the floor...

posted at: 13:10 | path: /society | permanent link to this entry


All posts licensed under the CC-BY-NC license. Author Paul Wayper.