Bugs can be fun, as long as I didn’t write them

In order to make optimal use of tonight, I did a portsnap and fed a list of ports to be updated, into my updater.sh script; then went to work on playing with pthreads. A short while later, when things got to ImageMagick, I got the shock of my week—pkg_delete crashed during a make deinstall!

In looking through the code, I’ve found the reason why, there’s a package name passing through the code as a null by the time it finishes passing through pkg_do in src/usr.sbin/pkg_install/delete/permform.c. From the looks of things, it goes bonkers once Plist is setup via read_plist(). Hmm, well well, the Package (_pack) structure being passed to it has rather interesting contents at the time.

I just don’t have much more time to fiddle with this damn thing! I’ve got to be up for another groaning day of work tomorrow.

OK, found it, there’s some funkyness here. When it hands off to add_plist (basically every damn thing in the bloody +CONTENTS), it has NULL’d the dohicky that gets copied in later. read_plist() sucks a file line by line, looks like if the trailing character is a space, read_plist() sets it to the null character ().

That creates a bit of a problem, because the +CONTENTS file for ImageMagick has a line ‘@pkgdep ‘, which results in pissing off the whole damn thing… lol.

So… how to handle this problemo? I see two things: 0.) pkg_delete should NEVER FUCKING CRASH!!!! No matter what is in a +CONTENTS file, at least, that is my opinion!!! And 1.) if ‘@pkgdep ‘ is not valid in a +CONTENTS file, whatever causes ImageMagick/ports to be shoved there needs to be found and fixed. Digging into +CONTENTS file creation is a beast for another hour. Why the pkg_delete program chooses to pass a NULL through I have no bloody idea, maybe shifting through CVS logs might hold the answer to that mystery. The pkg_install suite has some rather ugly and quickly hacked together parts, that really makes me wish they had used shell or (like OpenBSD) imported Perl into the base for the job, rather then doing it in C. Don’t get me wrong, I like C, but please don’t write functions with over 1,000 Lines Of Code ;). Either way, when it comes to fixing the pkg_install issues… that’s something I’m not going to touch unless a developer suggests what they would like to see in a patch, because whomever is maintaining it, should have a better overview of things then I do at the moment; I’m in no shape to do any more thinking tonight. Perhaps I’ll just file a bug report on it and see what comes of it.

Right now I just need to get some freaking sleep before work. Ugh, stairs here we come…….

Interesting tidbit: Twitter Talking Separately to Microsoft and Google About Big Data-Mining Deals

Shared from Google Reader

Twitter Talking Separately to Microsoft and Google About Big Data-Mining Deals—BoomTown

If this is how they plan to make a crappy search engine (Microsoft’s) better, by trusting in Twit’wits, oh boy and I glad that Mage introduced me to Google all those years ago lol.

I’ve used several search engines over the years, in the end I have no respect for Microsoft’s offering (Hotmail has improved, search has not) and some respect for the one over at Ask.com; which I was introduced to when some program (thankfully) changed my default search provider in IE. Since I’ve never used Yahoo! For searching, I generally skip commenting on them. Microsoft how ever, I used there search engine for many many years, dating all the way back to WebTV—at least Google tries to find what I’m looking for ;).

Notes over lunch

Work yesterday was fairly uneventful, so it left me time to concentrate on programming, doubt Friday will be so lucky… lol.

I worked out the basic architecture for pipin’s daemon, and have had the details on my mind for most of time since ~1400Q yesterday. Current on the hit list, is a pair of prototypes: one built around libpurple, that is to deal with the issue of a bare bones get connected task, the other is an experiment in moving the “Gatekeeper” component into its own thread. Once both prototypes are done, I’ll look at merging them and re-evaluate how they play together versus mucking around with GLib’s main loop. Conceptually, pipin-imd consists of three units: purple, dispatcher, and gatekeeper. The purple unit deals interfacing libpurple into our own kit; the dispatcher in mapping between purple/pipin-im events and notifying all registered clients; and a gatekeeper to manage incoming data from pipin-im clients. I also have an idea of how the communications protocol between daemon and server might work, not to mention the fact that I want a simple net command shell that would allow communicating with the daemon via a shell or batch script lol.

The plan is for the daemon to be written in C and licensed under the GPL, since purple forces use of GLib, there is no reason to use C++ for sake of the Standard Template Library. Whatever the legality of using Python ctypes based or SWIG generated code to interface with libpurple is, I doubt it would be in the spirit of the damn blasted GPL, even if the license was less restrictive >_>. The client unit, I plan to write in Python using whichever widget toolkit proves most appropriate (Qt, GTK, Wx). The daemon is a pretty simple program, the client side stuff gets all the fun, and a license more in line with my ideals of freedom, then the uglicious GPL.

Originally I had planned to work on the threaded gatekeeper prototype during the time before dinner and afterwards, but never got around to it. It wasn’t a good nights sleep, but at least I went to bed early for a change…. lol

Present open-loops

  • General SAS related work
  • Making my game prototype load key=command mappings out of an rc file
  • Finish Cara’s skins
  • Get to work on pipin-ims backend daemon
  • *Several* personal but business related web-projects
  • Continue compiling my letter about PC-BSD shortcommings
  • Setup/test CppUnit, Boost, and POCO
  • Customize Irssi and evaluate its possiblities for replacing Weechat
  • Figure out how much crap didn’t make it onto my todo list before it fell off
  • Work on the SAS Tactical Command Interface
  • Work on several other small SAS-related projects

and all I can think about right now is a quick snack…. lol

Sweet, Google Reader can send things to LiveJournal

Like many people, I often have things that I want to follow, but can’t be arsed to check up on periodically; the solution of course is RSS or “Really Simple Syndication” feeds. The age old problem is the bother to actually _look_ at the RSS feeds in question lol. A while ago, I switched to Google Reader during a period of reorganisation; a topic that I should probably revisit in a few weeks.

While much of my life is an open book, most of the services I use are not very integrated even when they are capable of it; this is mostly by my intention! Most people on planet earth and beyond, can reach me via instant messenging—the prefered way, since I’ll hang ya if the phone rings >_>. My LiveJournal is my ‘personal’ place, and perhaps consequently one of the most public. There are other mainstream services that I’ve come to employ, which kind of creates a bit of an onion approach to my data lol. LiveJournal serves me, I don’t actually care whether anyone reads it or not, after all it replaced mounds of log files and such, and that is what its principal purpose was and still is ^_^.

One of my friends makes use of Google Reader, so I’ve started exploring Readers ability to share and comment feeds with others; which lead me to this little puppy: “Send To” LiveJournal and Iterasi for Google Reader. Combined with a few other tidbits, this might get more frequent use: most things of interest to me in regard to RSS feeds, end up noted int his journal anyway, well if time permits lol.

The entry I’ve setup in Google Reader, thanks to the help of that link, results in exactly the kind of thing that I want: a suitable subject (that makes searching my lj easy) and a message starter that I can live with.

gnolia tagging ideas

I’ve been thinking about how to organize tags on gnolia.com, mostly I want something more hierarchical in nature then just top-level tagging. It doesn’t really need to be built into gnolia, just something convenient.

There are two schema that I am thinking about, utilizing a file path style: e.g. programming/c++/qt or the namespace syntax my wiki software uses at home: e.g. programming:c++:qt. Then again, there’s always programming.c++.qt and all sorts of other combinations. Really, I think I like the Java/Python style dotted namespacing or simple folder paths. The issues of dealing with separators that may be utilized within a tag name is always a factor to consider though#—but shouldn’t be a problemo for me. Why do I feel like reading a book on database normalisation? One nice perk, i could always design a little bookmark mangaging gizmo as an external application or an AJAX page. Gnolia seems to have moved developer documentation into the wiki, so it shouldn’t be to hard. I could cook up something client side fairly trivially, but doing it as a web app might be more ‘fun’ in the short term, mmm!!! Short of writing my own program, there’s really no way for the UI to bundle tags within tags, that I’m aware of. (e.g. tag “Google” points to tags “Google/Services”, “Google/Software”, bookmarks for account “Preferences”, blah blah). A simple tags cloud sorted A-Z however, makes it fairly easy to see that kind of relationship though.

I may also play both decks at once, and try managing my data with delicious at the same time; with a review to be made after a month or two. And of course, I can always whip up my own booksmark gizmo and place the server on Vectra for safe keeping.

Manually refreshing Windows desktop wall paper

Every now and then, the windows box ends up with “No” wall paper; typically due to issues with certain poorly created Unreal Engine 2 / DirectX games >_>. Earlier today, someone asked me a rather stupid question that brought me to thinking, is rundll32 even documented?

In poking my nose around, i found out that (as expected) Windows XP stores the name of the wall paper as a path to the BMP file in the registry; more specifically a REG_SZ in the form of: HKCU/Control Panel/Desktop/Wallpaper. In theory I could write a program to manipulate that value: then hook it up to my wall paper changer in place of utilities like hsetroot, mauhuahaua! The problemo is that Winsucks only seems to read that value on log in/out. The solution?#—Google. Third party programs can change the wall paper in real time, so obviously there has to be a way of doing it (hey, Windows does…), and As far as I know, most such routines would be tucked away in the shell32 and user32 libraries some where; enter rundll32.

rundll32 user32.dll,UpdatePerUserSystemParameters

problem solved 😉

A return to [ma.]gnolia.com

Today I introduced a friend to the tagging concept behind services like del.icio.us and ma.gnolia, and used the wikipedia articles[1][2] to give her a quick tour of things. In thinking about it for a whilef, I’ve realised that I ought to look into this again myself.

For a while I was thinking about building up my bookmarks again, more formally then my cobweb riddled brain pain that is. Today I figured that would mean using del.icio.us, if I was ever to go with a replacement for my old ma.gnolia account. When ma.gnolia went down, it basically took all of my bookmarks with it (unrecoverably). After that, I basically stopped using bookmarks lol; in fact the only one I’m actively using is a quick link to my usual radio stream, which I load every time I login. Everything else is something I know the URL of, or can Google for the exact address (I love a good search engine more then an old phone book lol). The only thing that I actually miss, is some of the programming articles I had tagged, but bookmarks are a fairly painless thing to loose; well, for a geek like me anyway there’s much worse.

In looking at ma.gnolia’s website, it seems that the wikipedia article is outdated. After a renaming to gnolia, it would appear that the service is alive again. While I expected to end up on delicious (sad to see the domain hack go :’), the revived gnolia is a bit of good news IMHO. I don’t know if I’ll ever establish as large a bookmark collection as I used to have on ma.gnolia but this time as an extra safe guard, I intend to make regular exports every couple months. Perhaps I’ll even check in the file into a git repo, dunno.

The really big question, is how to organize my tags…. hehe. Ok, sure my desk, room, $HOME, and everything else looks like a bomb hit it! But it’s tightly organised, so I can actually find crap when I go looking for it ^_^.

The glory of Raven Shield / Unreal Engine 2….

OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3003 MHz with 2045MB RAM
Video: NVIDIA GeForce 8400 GS (8250)

Assertion failed: Actor->ColLocation == Actor->ColLocation [File:.UnOctree.cpp] [Line: 1703]

History: FCollisionOctree::RemoveActor <- ULevel::MoveActor <- NormalSubUzi37 <- UObject::ProcessEvent <- (R6TMilitant04 Alpines.R6TMilitant31, Function R6Engine.R6Pawn.SpawnRagDoll) <- AR6Pawn::UpdateMovementAnimation <- AActor::Tick <- TickAllActors <- ULevel::Tick <- (NetMode=3) <- TickLevel <- UGameEngine::Tick <- UpdateWorld <- MainLoop

Both Raven Shield and SWAT 4 display crash messages like these, so perhaps it is an Unreal Engine 2 thing rather then specific to RvS/S4, but if it is, I would assume there is a way to turn it off. My feelings: This is good stuff to see if you are one of the games developers or testers—but should _never_ be seen by retail customers! Not only is it Martian to regular people, since we can’t go edit and recompile code ourselves, all it does is display information that we didn’t need to know. If I was going to do something like that for crash handling in a *release* product, I would probably make it said “Programmer fuck up, please sue the company for idiocy” 🙂 This seems to remind me, of one time I was on the website of a large north-american company, when for doing nothing at all but routine, their website gave me the most interesting error messages…. telling me enough data to find out several server side paths, there otherwise hidden implementation language, and enough data to clue in on what “stuffs” were being used to make the whole show go. I nearly died laughing lol. Maybe I’m a freak, but I don’t think user should be allowed to see developer information in a closed product like that.

post script: this was my 1500th journal entry