2009-09-29

Labels Considered Futile

The issue with human-prescribed metadata is that it is almost never complete. It is almost never consistent. It is barely reliable.

Now that it doesn't take minutes to republish label pages (yay for being hosted on Google's servers), I have gone back and labelled any posts without labels since last November. There are still a bunch of posts requiring labels. That's alright. I don't think I even expose a tag cloud of them anywhere.

Sadly, as I said, they'll invariably inconsistent and incomplete. At least I get to reread posts doing this :)

Oh, and there are a number of dead images that point to an uploaded folder that no longer exists, and dead embedded YouTube videos. Silly Internet.

Gender Guesser Repository

(Gender Guesser is a Question and Answer application, that prompts you with text, an image, or sound, and solicits a response that it might evaluate. Useful for practising your knowledge in advance of an exam, like one on German noun genders...)

Ugh, of course, right now there's the issue of multimedia packages. Sets of questions and answers comprised of images, sound, or video. (Well, Gender Guesser doesn't support video yet, but it will!) It would probably be alright to just upload archives of them, but then there's no installation support. Perhaps a packaging standard! I think this requires a committee. See why I restrict upload access? Ugh.

The Web: A Romance

The following are mostly boring techy details.

Blogger, SFTP, and DNS records

What an exciting 24 hours it has been!

I wrote a post the other day and Blogger failed to push it to kosmokaryote's server. That's alright. I'll try again later. I did try again later, and it still failed. Adventure time!

I have been aware that they were encouraging users to no longer use the SFTP service. While it's nice to have them as an interface to manage files that are remotely stored on my own server, I can kind of see the benefit. It takes up my bandwidth for them to update and copy files to my space. In particular, publishing can take a long time when I use labels, because they also update each label's static HTML page that they then transfer over. If I let them host it on their server, it could all be done dynamically. Yay. I could also have access to cool layout options (if I wanted, but I like my template). Sadly, I want it to be within my domain (kosmokaryote.org), not on theirs (blogspot.com). They at some point allows a method where you could use your own domain, directing it to their server, having the best of both worlds.

I made the change to my DNS records yesterday to point blog.kosmokaryote.org to their server, and today it's finally propagated through the various DNS servers such that going to blog.kosmokaryote.org for me now works as expected. If you're reading this later than I posted it, and were getting 404 pages, then your local DNS server didn't have the updated entry pointing blog.kosmokaryote.org to them and you're confused. Good luck!

Of course, there are various pointers on the web to pages hosted under www.kosmokaryote.org/blog/ (instead of the new blog.kosmokaryote.org). Google feeds (I have two subscribers, incidentally; go Google for including that in their feed-fetcher's user agent string) and old images and files and etc. I don't want all those to go stale. (I might forever lose my two subscribers!) So, to that end, I have made love to the .htaccess files of Apache, and now redirect any attempts to go below kosmokaryote.org/blog/ to blog.kosmokaryote.org (yay me).

The only issue right now is the extra space at the top. Perhaps that's blogger's navbar breaking somehow? Maybe it doesn't like my javascript header?

Gender Guesser, Perl, CGI, PHP

Consuming more of my time than an .htaccess file and a DNS record change (and various relative-to-absolute paths in javascript and CSS files) has been an effort to write a simple CGI script. You see, my girlfriend got development time as part of her birthday gift, and one of the things she wanted was a web repo to store Gender Guesser Q&A sets in. Being a little familiar with Perl and CGI scripting, and having CGI advertised with my host provider, I went to work.

Naturally, none of my test scripts nor the provided example scripts worked. Instead, I constantly received the dreaded Premature end of script headers. If you google around for solutions, you'll find a lot of ways in which the script could mess up, and a couple ways in which the server messes up my script. This was one of the latter, with the specific case being incorrect permissions and privileges for/with the dreaded suexec module.

I'll say right now that Chris Parrinello of webschwerver.com web hosting is awesome/special/amazing/cool and spent what seemed like a good deal of his own time attending to my issue. Various restarts and tests and attempts later, tada, CGI scripting works!

Sadly, for all that effort, I did end up writing my uploader and repository in PHP as he suggested at one point. PHP, consequently, is my new favourite web development language. I like both it and JavaScript. I never really liked Perl to begin with, you see. I just got used to it. I had settled for what I knew. It sure is versatile at least. You can always say that for Perl... ugly as hell though. Makes my hair fall out. Wouldn't invite it to a party. Well, sure I would, but it's more out of pity. Sure is ugly... right, PHP: Pretty Handsome & Parsable.

Anyway, playing with PHP has been fun. No, you cannot use the uploader. Not until you request permission, at least. Why would you? I haven't really even made the Gender Guesser code very public yet. Oh, I will. I'm just lazy, you see. Don't hassle me! I want to finish a few things first. Like the Set Creator GUI! Did you know, I wrote a handy application to help you create the sets you use in Gender Guesser? It's written in Vala. (On the note of languages, I might also be getting over my C#/Mono bigotry, not that I'm much of a bigot on that front to begin with, but I never want to use Mono...) The only issue is that it saves it in the CSV format and I want XML. I also want it to be able to open existing sets and let you edit and resave them. All coming along now, you see.

You can, however, view the repository of sets: here

Now, to learn more LaTeX so I can finally create a decent CV.

2009-09-28

Work, Blogger, work!

Blogger has suddenly started to fail to publish. I reckon it's actually my fault. Let's see if I can get it to work again!

2009-09-21

Frustration of Choice

I find myself frustrated by having too many inadequate choices at my disposal. I want to write a little GUI application with GTK+. I've already been writing a lot in C, and I'd like to write something in a higher level language. I was looking at Vala again, but I'd really like it to be out of the alpha stage and start acting more like a mature language in the documentation (I hope I don't have to look at .vapi files in my filesystem anymore) and editor support (intellisense support would make many headaches go away). I don't think these conveniences are fundamental or necessary, but they are convenient, and sometimes I just want to write something quickly.

I've already written a few things with Python recently and I don't really like Python. Something to do with a Global Interpreter Lock whenever I try to do things in parallel...

Java? Java GNOME doesn't seem to support GtkBuilder c(oh, SO close!). Java would actually be preferred. I'm sad that Java didn't take off as more of a desktop language. Something to do with a cumbersom JVM and closed source once upon a time...

Mono? Ugh, I am not fond of C# due to something irrational. Too bad community won't build behind Vala like community does behind Mono. I think GtkBuilder only exists on Gtk# trunk, though, and I don't want to deal with that hassle.

I suppose I really just want to use Vala, but I'm concerned that it will never get much support behind it (a logical argument to withhold my own, I am sure), that the community around it isn't taking it seriously as a good next language for GNOME, or at least that GNOME isn't. That they're too inconsistent in how they implement things. (A recent example saw code that used "new Gtk.Button.with_label()" and another had something like "GLib.something.new()".) They also fail to bless or at least judge any of the developer tools available for aiding Vala development. Their list of IDE support offers no commentary what so ever. So, I wasted a few hours trying them all! None of them did what I wanted, so back to emacs :)

Ah well, here we go.

2009-09-10

Illustrious Nocturnal Habitats for Diseased Minds

Pickman's Model

I am somewhat desensitised to the world. Much that should horrify does not initially, unless I actively make myself sensitive to the matter at hand. Ghastly and grisly events are reported so regularly on the news that they seem unexceptional. They occur so infrequently in my own life, that reports of them elsewhere seem remote, disconnected from my reality, and inconsequential.

In some ways, I think that this is good. I remain sensible and rational when hearing or thinking about many disturbing things. This is also bad. Often, you might want to be emotional about such events, so you can better sympathise and understand the consequences to the pitiful subjects of the horror.

Thankfully, I feel I am not so far gone as to be immune and totally insensible to the tragedies of others, especially the real life ones that are all the more tragic for being real, and not just a perverse fiction let loose from a demented imagination. I understand that many people, however, are more immune to I and feel minimal remorse for relatively reprehensible acts against life. Some people I read blame moral decay resulting from the rise of materialism and secularism, but I don't.

Hopefully not too much to the disappointment of my friend Frank, the morose writings of H.P. Lovecraft fascinate me. By far preferable for me to any modern horror found in film, his writings leave much to the imagination, and to what terrifying depths ones imagination can stoop, when given a little guidance. Of course, it's not so simple at my level of removal from the world around me (the desensitisation I spoke of above) to be moved by nightmares manifested in words. I first have to volunteer my courage to crumble and allow my dread to feed truly frightening ideas into my awareness of the world. These are not just pretty words, but documentation of the very things that lurk under window sills and creep along your sleeping skin, feeding off your health and sanity.

He writes very well. After reading any work of his, I wish to drop my latest set of ambitions in favour of writing after him, chasing him into the darkness into which he has himself since vanished. But let me dream not for too long, lest I waste a life perfectly well suited to the labour of logical programming. Many have tried to repeat what H. P. Lovecraft achieved and the relative quality of their imitations cause me almost more pain and cringing than the grisliest horror.

But what purpose does this all serve? Is it simply to frighten grown men and women like a naïve children? No. Subjecting myself to the psychotherapy of darker writings help rescue me from the desensitisation or insincere sensitivity. Awareness of what shapes enemies to my existence and sanity could take provide a new basis against which I can really appreciate the sunlight and smiles of my present situation.

Pickman's Model

Linux Driver for EeeTop TouchPack touchscreen

Updated

So, I have a Eee Top 1602. I want to run Fedora Linux on it and have it setup simply for my father. No keyboard, no mouse, just the touchscreen and a full-screen application that will let him do a small handful of tasks.

Sadly, at present, the Linux kernel does not correctly read the input for the X and Y vectors from the touchscreen. That is, it has no sense of position or direction when I touch the screen! It can tell that I've pressed it though, as it simulates the click that it should. Just not where I want it to be.

Someone wrote a small preliminary driver to fix the axes and it's available at least at the Redhat Bugzilla: bug 491629. I originally wanted to compile this driver without compiling the entire kernel. I ended up downloading the source RPM for my kernel and tried to build up the correct gcc command to compile just this one driver independently from the logical behemoth that is the Linux kernel.

This plan has wasted much more of my time than I'd like to admit (some parameters and files are dynamically generated by the kernel build process and contain values that I don't care to guess at for my machine), so I finally went the simple route of dropping the driver source file into the Linux kernel source tree, editing the relevant Makefile and Kconfig files, and compiling the kernel with the driver set as a module (rather than built-in). That's currently underway, but it seems to be progressing well.

For the record, the touchscreen is reported as this by 'lsusb':

Bus 005 Device 002: ID 1bfd:1688 TouchPack Resistive Touch Screen

This might be missing steps, so if it doesn't work for you, let me know

  • Download the source code for my latest installed kernel:
    yumdownloader --source kernel.i686
    This gave me the file 'kernel-2.6.31-0.185.rc7.git6.fc12.src.rpm'. Yah, I'm running rawhide installed from the F12 Alpha, as I had hoped it would have better support than F11 for this computer.
  • Extracted the contents of the RPM file using cpio:
    rpm2cpio kernel-*.rpm | cpio -i
    This dumped all the files inside into the current directory.
  • I took a guess as to where it should go and put the driver source file (hid-touchpack.c) got from the Red Hat bug linked above (491629) into linux-2.6.30/drivers/hid/
  • I edited a few files and made the following changes to make the kernel build with the driver
    • To linux-2.6.30/drivers/hid/Makefile, I added
      obj-$(CONFIG_HID_TOUCHPACK) += hid-touchpack.o
      Under the similar entry for the sunplus driver.
    • To linux-2.6.30/drivers/hid/Kconfig, so that the kernel configuration process could be aware of and include the TouchPack driver, I added
      config HID_TOUCHPACK
       tristate "TouchPack"
       depends on USB_HID
       default !EMBEDDED
       ---help---
       Support for TouchPack Resistive Touchscreen
  • Then, in linux-2.6.30/, I ran "make menuconfig". I then went to Device Drivers, HID Devices (near the bottom), Special HID drivers, and there was "TouchPack". I set this to compile as a module, so that I can insert it into my currently running kernelUnfortunately, I couldn't use this as a module, as the device was claimed by another generic HID driver. Boo. So, instead, I compile with it built into the kernel, and it claims the touchscreen - hurrah! Sadly, I have to run the kernel I just compiled and not a regular Fedora one, but that's alright.
  • I then exited and saved the menuconfig and after configuration, ran "make" to compile it.

I just want to compile it as a module. I could have optionally written a more useful patch for the Kconfig and Makefile bits, and edited the source RPM's spec file, and built a new RPM including the driver, but I don't really like the driver so much, (wouldn't a proper solution involve linux-2.6.30/drivers/input/touchscreen/?) and I don't even know how well it'll work yet.and it works great!

I think this will be nice for my father. Uninterested in either a keyboard or a mouse or most of computers, we agree that he could still benefit from German radio, photos we upload to the web, and eventually, voice and video chat with his children. I'll update further on how well this works. Cheers.

Blog Archive

About Me

My Photo
Richard Schwarting
I am a simple star hidden in the night sky.
View my complete profile