Older blog entries for ksandstr (starting at number 24)

11 Sep 2001 (updated 19 Sep 2001 at 21:07 UTC) »

Somebody set up U.S. the bomb

So. Last I heard, the bodycount is up to about 10k dead (estimated and rising). In a city of seven million, I'm not worried for my half-sister's daughter who happens to be in NYC at this very moment (she also phoned her mother some time ago, so we know she's alive though stuck on manhattan for the time being...).

Let's instead take a look at what has happened: A major landmark (of U.S. economic might, among other things) was destroyed by what is arguably but a display of power. The party responsible probably wants to show the world that the U.S. is not as invulnerable as they may appear. After all, the terrorists probably could have used a biological, chemical or nuclear weapon in the attack if they'd wanted bad enough (or had been fucking crazy enough) -- from what I've heard, there are more than 100 warheads unaccounted for in Russia so at least some of them may be in the hands of the so-called "rogue states". The same must hold for at least some of the biological and chemical weapons developed in Russia during the cold war.

All in all, what happened today was far from the worst case. I'm just hoping that dubya and his perceived military might have noticed this as well. From what I can tell (from the media), that isn't going to happen -- it'd be "admitting defeat to the terrorists", "putting our collective hands up", "letting foreign nationals dictate U.S. policy" or some equivalent nationalist rhetoric.

What surprises me though, among other things, that the attack came relatively early -- I'd have estimated that certain parties in the middle east and around there would not have done this sort of thing for at least a couple of years more.

(personally, I'm waiting for the death threats to roll in after this diary entry is posted. to reduce the count, I've [wisely?] not titled this with the old <nelson>Ha ha!</nelson> "almost smells like schadenfreude" joke.)

Hacking

Browsed through the PVM manual and rewrote my small experimental still image vector quantization encoder so that it'll quantize input vectors against a codebook in parallel. It seems to scale pretty well, at least for the asymmetric 5-processor setup I have here (two of which share a bus). The master architecture doesn't keep all the CPUs occupied 100% of the time (minus communication overhead) though -- I'm a bit uncertain whether fixing this is something worth pouring time into as the under-utilization only happens between quantization iterations.

Update: fixed the "terrorists win!" link.

A word of advice:
If you have to wear glasses most of the time you're at the computer, do not, under any circumstance, give them up completely for a couple of days.

I did that, assuming that my older pair would be sufficient for the couple of days it takes for the current pair to get repaired. It turns out that the old, "backup" glasses have a left-side lens that's at -4.25, the same as the more recent pair's left lens, but the right one is 1.25 units off (-2.00, while I really need -3.25). The net result is that I either get a splitting headache after wearing the backup pair for more than 30 minutes at a time or don't wear the damn things at all (which makes me pretty much unable to get on a bus [unless there's other people who'll signal the right bus to stop] or walk anywhere that's not familiar).

Hacking:
I've been paging through the CORBA object trading service spec (most recent I could find on the omg.org website). The appendixes don't go to sufficient detail about the query constraint language to implement which makes me wonder about OMG's policies regarding proprietary extensions -- I mean, if I were to implement the language, I'd probably make a compatible but more general variant of the OMG trading constraint language (assuming that's what is described by the document I've been smo^Wreading). Maybe I'm just not looking hard enough and there's a proper specification of the TCL hiding somewhere...

In retrospect, I shouldn't have created a project for Reiska. Like before, the project sprouted metric assloads of over-engineered "but it'll be useful at some point" crap, thus becoming too large for my poor brain to handle. Perhaps one day I'll learn not to do that, somehow...

Damn. Perhaps a better "new project" policy would have been "wait until the first freshmeat.net announcement", or something.

jschauma: You're not delete'ing a char *, right? ISTR a previous coworker who got bitten by mistakenly using delete on an integer array (allocated with new int[count]) when he should've used delete[]. Maybe Solaris has one of those relatively rare C++ libraries that actually care about the distinction?

17 Jul 2001 (updated 17 Jul 2001 at 21:33 UTC) »

Hacking

Got back to work on Reiska after about a week with OCaml. Getting back to C after working on a nontrivial (for me, anyway) project in a new-ish language feels like getting a cast off your leg, finally being able to walk unaided again. Whew. I'll definitely get back to OCaml one day or another; I got the Freenet 0.3 style crypto layer stuff working pretty well, with only a couple of C wrappers for Twofish and Rijndael encryption (I did have to write a partial wrapper for the mpz_* functions in GNU MP for the Diffie-Hellman key agreement stuff though - maybe I'll be able to rewrite it for numerix or Big_int someday.). I've a nagging feeling that GNU MP doesn't particularly enjoy having the mpz_ts garbage collected, compacted and otherwise shoved around - this could be the reason why the simple test server (connection acceptor would be a better term) seems to segfault after a couple hundred test connections. I haven't a clue how to fix this, so I'll go into procastrination mode, perhaps hack Reiska a bit more...

Gadgetry

Got myself an optical, cordless mouse (one of those Logitech mice). The weight is quite a bit more than what I'd have expected from an optical mouse, though the two AA batteries aren't light either. It's also a little too sensitive for my tastes, but that may just be a configuration problem in XF86 (gpm works fine). The price was a bit on the expensive side, but if this mouse lasts me say 2 years it'll have been worth it (normally I go through two mice per year).

Life (still don't have one)

Finally went and bought myself a pair of sunglass thingies that clip to the sides of my glasses. Didn't have a good reason to wear them though, it started raining which then turned into a full thunderstorm, complete with lightning and 2-second power outages. Since I don't have an UPS (I'm in finland fer crying out loud, we don't get any non-lightning related power outages!), it was fsck(8) time for all three PCs. Lost a 36-day uptime on the firewall, too. Damn.
10 Jul 2001 (updated 11 Jul 2001 at 00:39 UTC) »

Damn.
Looks like I've got distracted, again. I haven't hacked Reiska for almost a week now, having got caught up in the wonders OCaml. I did get a start writing a FNP client library in OCaml, though, so maybe the time wasn't all wasted. As a side effect I've started yearning for OCaml-ish closures in C... it feels like many of the problems that OCaml makes rather simple when compared to C would be solved quickly and efficiently using closures, tail recursion and all that functional-programming-y stuff. I can imagine how implementing closures (in the language, that is) without garbage collection would require some world-class trickery though...

Further on the plus side, I've grown used to OCaml's strong & static typing -- it's actually kind of neat, having the compiler barf on certain idiotic errors. It's no C for some low-level tasks, but it'll do for stuff I'd previously have used things like Python and Java for.

ebizo: 19.89 and counting.

It turns out that ``more caffeine'' is not a solution to the sleepiness problem. Not in the long run, anyway.

Objective CAML sure is strange. I know I shouldn't be distracting myself with new stuff while involved in a project that could actually become something else than just a cob-webbed module in my local CVS repository, but I can't help it :-)

As a plus, I now understand why so many people cringe in horror at OCAML's type system -- it's pretty much everything I've been looking to get away from in its almost Pascal-ish typing. For example, the separate +-*/ operators for integers and floating-point numbers. Helloooooo? What's the freaking point here? I shouldn't have to rewrite the same function if I want to do the same basic steps for floating-point numbers. Or complex numbers. Or any numeric type that has the required operators.

From my first impression with OCAML, I would say that it is as close to a bondage-and-discipline language as functional programming is going to get. This isn't necessarily a bad thing (I'm sure that Pascal is one of the more used languages, counting the 667 dialects), but I'd be glad if the language picked up some polymorphism at some point... The static typing probably allows for some bitchin' optimizations by the compiler, though.

Like someone (can't remember who) somewhere once said, LISP (probably also other dynamically typed languages) is good for building organic, ever-changing systems while statically typed languages are good for building pyramids, where you'd better have a precise floorplan before you even start building unless you want to tear down half of what you have built merely because you chose the wrong kind of mortar. Not that tearing down and reimplementing (aka refactoring, like the OO-correct like to call it) isn't a good thing some of the time -- I'm just not sure if the language design should enforce it.

Noticed that I've started commenting my code a bit much -- I mean, comments are good, but block comments longer than 15 lines in the middle of a function are likely to be a sign of something. Not that they aren't concise and descriptive of the surrounding code, but I can't help thinking that there might be a better place to shove that kind of borderline inline documentation. Maybe I should start putting documents about "this and that" in the CVS module, or something.

Released version 0.0.2 of Reiska. It won't compile because of some changes I made to Steven Hazel's FNP library that I haven't released yet, but it contains a fair amount of other improvements that might be interesting, if you're interested in this kind of thing.

Ja nyt unta palloon.

15 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!