RavenBlog
Black:  ravenblack.net | me | games | books | email | wishlist | rss
Blogs:  Angryblog | As Above | MonkyBlog | Nightshade | Journals
Blimey:  SomethingAwful | Advice
Archives: Last 4 Days | June2001 | July2001 | August2001 | September2001 | October2001 | November2001 | December2001 | January2002 | February2002 | March2002 | April2002 | May2002 | June2002 | July2002 | August2002 | September2002 | October2002 | November2002 | December2002 | January2003 | February2003 | March2003 | April2003 | May2003 | June2003 | July2003 | August2003 | September2003 | October2003 | November2003 | December2003 | January2004 | February2004 | March2004 | April2004 | May2004 | June2004 | July2004 | August2004 | September2004 | October2004 | November2004 | December2004 | January2005 | February2005 | March2005 | April2005 | May2005 | June2005 | July2005 | August2005 | September2005 | October2005 | November2005 | January2006 | February2006 | March2006 | April2006 | May2006 | June2006 | July2006 | August2006 | September2006 | October2006 | November2006 | December2006 | January2007 | February2007 | March2007 | April2007 | May2007 | June2007 | July2007 | August2007 | September2007 | October2007 | November2007 | December2007 | January2008 | February2008 | March2008 | April2008 | May2008 | June2008 | July2008 | August2008 | September2008 | October2008 | November2008 | December2008 | January2009 | March2009 | April2009 | May2009 | July2009 | August2009 | September2009 | February2010 | March2010 | June2010 | July2010 | August2010 | September2010 | October2010 | November2010 | December2010 | February2011 | March2011 | April2011 | May2011 | June2011 | July2011 | August2011 | September2011 | October2011 | December2011 | March2012 | April2012 | May2012 | September2012 | December2012 | March2013 | April2013 | May2013 | June2013


Archive March 2004
Monday 29 March 2004
How Australia differs from America, #384:

A middling rain causes nice big streams to run along the sides of the roads, because the drainage holes are quite widely spaced. However, if you go for a walk in such rain, along fairly major roads during a time of significant traffic, you will be splashed a total of zero times, rather than the five to ten times you would expect in Maryland. You will also see approximately zero accidents caused by people being unable to drive in wet weather, rather than the one to three you'd expect in Maryland. As an added bonus, the rain is made of water rather than engine oil. [13:50] [9 comments]


Saturday 27 March 2004
Ten weird things about me:
  1. I have no joints in my big toes.
  2. I like percolated coffee to be made using the sludge from a previous percolation (in addition to some fresh).
  3. I am extremely irked if my browser window (or any other window in regular usage) gets moved from where it is supposed to be. By its very nature.
  4. I'm also quite irked if something in the real world gets moved from where I put it, and won't be able to find it even if it's huge and red and glowing in my eyes. Despite the fact that places where I put things are hidden under other things or precariously balanced atop them.
  5. I burp harmonies to my own burps, both notes at once.
  6. When travelling in vehicles, I tap my feet to the rhythm of passing objects such as lamp-posts and other vehicles. Because otherwise they shoot imaginary lasers.
  7. I wear a heavy leather coat in all weather; to keep the heat in in cold weather, and to keep it out in hot. And to keep my possessions from falling to the ground, as they would if the pockets weren't there.
  8. I have difficulty waking up at times other than an hour later than the previous day's waking up, and likewise going to sleep.
  9. I drink almost two litres of squeezy orange juice a day.
  10. I read about two books a week if I have books, but very rarely go out of my way to make books available to myself.
Now you post ten weird things about you. Go on. Do it now. You know you want to. Except if you're Kevan. Or a Kevan sympathiser.

Unrelated, and tacked on quietly here because I was supposed to be done with programming-related posts for a bit; "gcc -L/usr/local/lib -levent -o event-test event-test.o", the documentation-correct way to link the object, complains about undefined symbols, while "gcc -o event-test event-test.o -L/usr/local/lib -levent", which should be functionally equivalent or, if anything, worse, links perfectly. Stupid compilers. [18:38] [57 comments]


Thursday 25 March 2004
Again, ignore this post if you're not a programmer.

The answer to yesterday's programmer conundrum. First step to discovery - changing library from openssl to libtomcrypt. Results at at that point - the same thing still happens, but to a much lesser degree. Other results at that point - libtomcrypt is much less annoying to use, but not as well documented.

Second step to discovery - inspiration and experimentation. The inspiration - the thought that perhaps the linker doesn't do function dependencies at the library level, but rather only object-file dependencies. The experiment - splitting the source file from which the unnecessary library code is called, so that no functions which are called remain in the same file as the functions which call the library, when cryptography isn't intended to be in use.

The result - the linker does indeed only do dependencies at the object file level.

The lesson - when writing library code, write only one function per object file (except in situations where a set of functions are so heavily interlinked that one is never used without the other).

We now return you to your irregularly scheduled non-programming RavenBlog contents. [18:11] [0 comments]


Wednesday 24 March 2004
Ignore this post if you're not a programmer.

In the openssl library, there is a function in rsa_lib.c that looks like this:
int RSA_size(const RSA *r)
 {
 return(BN_num_bytes(r->n));
 }
In my code, there is a function call that looks like this:
int size=RSA_size(rsa);
When the program is compiled and run, the resulting executable is 220K. Now, if I replace that single line of my code with this:
int size=(BN_num_bytes(rsa->n));
Then when the program is compiled and run, the resulting executable is 84K.

I consider it unlikely that an extra function call going onto the stack and off again is 136K of compiled code. What's happening here? Neither call has been replaced by a macro, but for some reason the RSA_size function causes some twenty-odd extra RSA functions to end up in the executable (this gleaned from the .map file). Also of note, both of these functions cause some extra code to end up in the executable even if the function from which they are called is discarded from the executable due to not being called itself (and the "/opt:ref" linker option). This differs from BF_cfb64_encrypt (a function in the same library), which is discarded if the function that calls it is discarded, as it should be.

Any programmery people got an explanation for this odd behaviour? Visual C++ 5 being the compiler, and openssl 0.9.7d using no assembly language being the statically compiled library. [12:11] [3 comments]


Sunday 21 March 2004
Pondering mechanisms against cheating for peer-to-peer network games that keep score on a lobby server. I'm pretty satisfied with the anti-cheating stuff I've come up with for the actual peer-to-peer part, but I'm also concerned with the end-of-game situation, where the players' computers report the result to the server.

Obviously the ideal situation is that one computer reports "I won" and the other computer reports "I lost" but what should be done in the situations where this isn't the case?

My thought is that on occasions where the reportage differs (ie. both computers claim to win, because one of the players is falsifying their return message), this is flagged in the records of both players.

On occasions where one computer reports victory and the other doesn't report at all (which is what will happen if the opponent disconnects), the non-reporting player is asked what happened (from a list) the next time they log in - if they claim it was a disconnect forced by the opponent, it's flagged as a disputed result (though the victor does keep the point). If they don't log in again for some period of time, the result is flagged as a loss.

If you are challenged to a game by any opponent with whom you have a disputed result, or from an IP address with whom you have a disputed result, you are warned and given the opportunity to reject the game.

Similarly, if you are challenged to a game by someone who has a suspicious ratio of disputed results, you are warned and given the opportunity to reject the game.

What flaws are there in this system, other than the possible "gang of opponents report disputed results against one person" thing? (Which, at least, also harms the reputation of each of them, so isn't something that could happen a lot.)

On a related note, I think having a 'report card' after every game would be a good thing for the "community spirit" of the game. If you're asked at the end of the game to rate your opponent on a scale of "good sport" to "obnoxious fucktard", and if people can set a mark for a level of obnoxiousness they're willing to tolerate (the combined rating for any player being made completely public, and ratings being normalised against intolerance-tolerance bias), I think that would very much encourage people to be more polite. Which can only be a good thing, u noob fux0r. [16:32] [18 comments]


Thursday 18 March 2004
Perhaps one of you will know, and if not, perhaps you'll at least have amusing guesses at the answers to these questions:

The US armed forces, and those of many other countries, don't allow homosexuals on active duty. But what counts as homosexual for this purpose?
  • Are you homosexual if you only fancy men, but have never had sex at all?
  • Are you homosexual if you have had sex with men, but now identify as straight and only fancy women?
  • Are you homosexual if you have a boyfriend and a girlfriend?
  • Are you homosexual if you have a boyfriend but the relationship is platonic?
  • Are you homosexual if you have only oral sex with men (either way around)?
  • Are you homosexual if you only frotteurnise with your own gender?
And on a similar basis, what, legally, counts as underage sex? The definition would have to be something quite esoteric or vague to encompass underage lesbians, wouldn't it? Is it, and does it? Google fails to provide me news stories of any underage homosexuality cases involving lesbians (though it does see fit to inform that oral sex between underage males garners penalties more than ten times the maximum penalty for heterosexual underage sex, in Kansas). [12:31] [15 comments]


Wednesday 17 March 2004
It's time for a brand new magically delicious RavenBlack meme! It's obvious what you're supposed to do, yes?

Ten reasons why you wouldn't want to live with me:
  1. You know that circus tune, the one Homer Simpson's brain thinks of as 'the ballet'? Well if you lived with me you would, since I habitually whistle it whenever I'm thinking, or pacing, or cooking, or bored. Sometimes I whistle special flat variants which sound a bit more like a version that would be in a horror movie. And sometimes I 'doo-de-doo' the tune instead of whistling it.
  2. Speaking of 'doo', every time you say the word 'do' followed by a noun-phrase, eg. "I'm going to do the dishes", I will snigger and say "ha ha, you want to 'do' the dishes." Every time. Every single time.
  3. When there's a simple decision to be made such as what to eat, my decision-making process consists of standing in the middle of a room and flapping my arms until someone else makes the decision for me.
  4. Should you go to the bathroom while playing games online, I will inform the other players of the game that the reason for the delay is that you are "weeing. Out of your wee-hole."
  5. There must be constant rubbish on TV, such as Garth Merenghi's Darkplace, Monkey, Blake's 7 or pretty much any cartoon with superheroes. If there isn't such a thing on TV, then it must instead be playing from a recording of some sort.
  6. "Do you want something from the shops?" "Yes." "What?" "I don't know."
  7. All food, in my world, is either 'pie', 'lump' or 'goo'. "What shall we have for tea tonight?" "Pie!"
  8. Bread crumbs will take over the world.
  9. I have a copy of both Jekyll and Hyde: The Musical starring David Hasselhoff and Gymkata.
  10. In the event of, well, pretty much any event really, I will decide it's time to dig a tunnel through your torso. With my head. TO THE MOON!
[12:46] [18 comments]


Tuesday 16 March 2004
It's once again time for Fun With Immigration. For today's task, try getting a police certificate about yourself, from America, while you yourself are not in America. If you feel like playing at home, stop reading now, and try to figure out how you would do this using whatever resources (other than the following paragraph) you have available.

All still here? Good. I didn't think anyone would want to play along at home. You'd have to be a complete lunatic to want to go through this hassle. If you had played along at home, however, I'll warrant that the first thing you'd have found would be stuff saying you have to apply at a local state police office, get them to take fingerprints, and such, and that otherwise you can't get such a document. Which is, of course, tremendously useful if you're not in America, since there is no local state police office.

If you're persistent, then you'll go digging through the resources the country that requires your police certificate offers, in this case Australia, in the hope of finding a more feasible way. In my case, I asked one of the semi-independent immigration advisor people, one Emily Sutherland, who told me that the immigration department has a sheet with the procedural details on it. About ten minutes of digging more carefully around the Australian Immigration website, along a trail which I now can't duplicate, I managed to find a pdf booklet, with a few paragraphs on page 16 describing how one acquires this document from America. Unlike Google, this includes the advice I paraphrase as "go federal".

Since the text there was unclear on many points, I followed that up by finding the website associated with the FBI's there-named Criminal Justice Information Services, which has a lovely page with a menu of acronyms, and mouseovers on each acronym-link explaining helpfully "This is a graphic link to LEO/IAFIS/NICS/etc." Luckily, the one link I wanted, Fingerprint Identification, was written in full rather than being merely "FI".

Thus we come to the actual step-by-step instructions, and a conflict - the Australian explanation said I'd need to arrange something for international mailing of the results, while the FBI's own explanation provides no mechanism or commentary for such arranging. No details, no contact information other than a form to report a crime, no cigar.

My conclusion in that regard - utilise the collusion of an American cohort. If I mail the fingerprints to them, they mail them and payment to the bureaucracy, the bureaucracy mails the results to the cohort, and the cohort mails them back to me, there will be no need to do anything awkward with the bureau. It sounds like a faff, but surely less of a faff than trying to arrange international communication with the bureaucracy directly.

Further awkwardness in the step-by-step instructions comes in with the demand that the fingerprints be on a standard fingerprint form FD-258. They thoughtfully provide one with a PDF file, presumably on the basis that you can then print out your own fingerprint card, put your fingerprints on it, send it to them with payment, and get it rejected because it's not a proper official fingerprint card. Luckily, it's pale blue on white so you actually can't print it out at all without a posh colour printer, so I'm saved the fun of that. Also, not only is it pale blue on white, but it's 8 inches by 8 inches to make absolutely sure that you can't print it out, since that doesn't even fit on A4 paper let alone letter. The form is obviously not globally standardised since it has a space for social security number, which essentially means the only place to get one is from American police - so it's time for another call for help from the cohort.

So, the final process goes like this:
  1. Get American cohort to go to a police office and get some copies of form FD-258.
  2. Get American cohort to mail these to you.
  3. Get Australian police to do your fingerprinting onto these forms, to make sure they'll be of satisfactory quality.
  4. Send these fingerprints, along with a letter for the FBI explaining what it is you want, to American cohort.
  5. American cohort sends documents to FBI offices.
  6. Three to four weeks later, they say, required document is sent to cohort.
  7. Cohort sends required document back to you, the requiree.
Easy peasy, eh? Luckily, I get to skip the UK process for acquiring similar documents (though I did do it before and it actually was easy-peasy) since I have a copy left over from last time. Don't you wish you were moving to another country too? You could be a pepper. [10:27] [27 comments]


Monday 15 March 2004
On a similar note, though a deliberate misunderstanding for my own amusement this time, a TV news summary headline, "Police are questioning a 35-year-old man after three children were found safe..."

"You! You look 35 years old - I bet you teach the green-cross code, don't you?"
"What? No."
"Didn't I see you in a Smokey-the-bear suit?"
"No, I've never made any children safe at all."
"None?"
"No. Certainly not those three who were found safe recently."
"A-ha!" [12:08] [1 comment]
Excellent failure to comprehend on some sort of news thing; an interview with the woman who is the voice of Bart Simpson, after which the newsreader comments "isn't she great?"

Clearly he was thinking of her not as the woman who voices Bart Simpson, but instead as if she were a Bart Simpson impressionist. "Isn't she great - she sounds just like him!"

Of course, the truth of the matter is that Bart does the voice of Nancy Cartwright whenever she's on TV.

And Homer's brain does the voice of me. [11:14] [4 comments]


Sunday 14 March 2004
Our TV guide claims it's "Planet of the Apes Night". This because one of the channels has Tim Burton's Planet of the Apes by Tim Burton in the style of Tim Burton wishing he hadn't put his name to such a movie because it ruins the good name of Tim Burton except that actually it's not that good a name in the first place. Followed by the proper, superior 1968 version of Planet of the Apes.

First things first, who decided on "Planet of the Apes Night"? That's rubbish. It should obviously be "Night of the Planet of the Apes". Schticky names for schticky things, please.

And then second things, er, second, that's two out of a possible eight Planet of the Apes movies, none of the Planet of the Apes TV series, and no Planet of the Apes video game. Call that a Night? It's only about five hours including commercials, even if Tim Burton's one does drag on and seem like ten.

So it shouldn't be "Night of the Planet of the Apes" after all, but rather "a Few Hours of Inferior Planet of the Apes". Yes, that's right, I think several of the sequels are better than the original, and all of them and the original are better than Tim Burton's Look At Me I'm Tim Burton And I Spent Lots Of Money Remaking An Old Movie Only Shittier Tim Burton Tim Burton TIM BURTON! [09:44] [2 comments]


Monday 8 March 2004
Tsch, what an annoying time for a blackout; not only was it the time at which I'd usually be working up to a programming frame of mind, but it was also through the entire length of a TV movie, The Lake, which the TV guide describes thusly (minus the annotation):
YASMINE BLEETH stars in this twisted story of intrigue (boring!), action and science fiction (hoorah!) as a nurse who returns to her hometown (boring!) only to find it a suburb of The Twilight Zone (hoorah!).
With such a roller-coaster ride in the single-sentence TV guide description, how could the movie possibly be bad? We'll never know, thanks to the foibles of the power company. Unless someone tells us. Or we read the IMDB reviews. Or it's on again at some point. [07:06] [19 comments]


Sunday 7 March 2004
In other news, Blake's 7 series one is finally out on DVD. And about bloody time - it's only a bit more than two years after its original release date. I have, of course, ordered it. [12:18] [0 comments]
Today's lesson - a watched kettle never boils, if you haven't pressed the switch to turn it on.

Today's movie: The Avenging Fist. Like a Hong Kong version of Street Fighter, with a more insane incoherent plot like a futuristic version of The Storm Riders or like 2002. In fact, it's mostly like Street Fighter because the main baddie looks exactly like Mr Bison, and his sidekick wears a metal mask. And people throw fireballs out of their fists. And are named Ken and Ryu. Okay, they're not really named Ken or Ryu, instead they have tremendously silly names, at least according to the subtitles.

There really isn't much to say about the movie - it's a reasonably competent example of the "nonsense futuristic action" genre. It could do with more likeable characters, or more of a focus on the two characters (named Dark and Iron Surfer) who are reasonably likeable instead of the cliché "you killed my father" "no, he is your father" "well you still killed my mother" character (named Nova or sometimes Meganova). And it would be better if someone magically brings you a pizza while you watch it. [10:44] [6 comments]


Wednesday 3 March 2004
I want a more phonetic alphabet. I like being able to write "sil vous plait" as "sill vows plate" and thus clearly encompass the deliberate mispronunciation; I dislike there being no way to write "Jung" that will be read such that it's pronounced how it's spelt rather than like "Yüng". The only spelling that should be pronounced with a hard J is the correct spelling. Stupid name. Stupid alphabet. [01:38] [12 comments]