The Time…

I’m pretty OCD and thus run an NTP server on this server. (It should respond to any hostname on this box.) Despite the server being in Texas, I keep the timezone set to EST.

So here’s a page displaying the time. Granted, having a clock that’s accurate down to a fraction of a second (synced to the atomic clock) is no longer that impressive. But tell me you’ve never wished for an easy way to find the correct time… Now you know.

Simple English

I had someone on a forum I frequent ask me a question. It’s in broken English and he explained that he’s not a native speaker. In my reply, I tried to be sensitive to that by speaking somewhat simply. Not in a demeaning way, but in my attempts to learn Spanish, I learned very quickly that short sentences expressing one simple idea are much simpler than elaborate sentences conveying a complex range of thoughts, such as this one.

And that reminded me of the Simple English Wikipedia project, which I think should get more attention. They treat it like another language: there’s English, Spanish, Simple English, etc. A really awesome idea in my opinion. (Although the sexual intercourse page–warning, has an illustration of the process–is still pretty sketchy… Maybe because it’s not a topic that lends itself to being explained in simple, direct terms?)

I think “Simple English” is something everyone should practice, though. As some of the pages on the simple.wikipedia.org site show, writing in a simple manner does not necessarily require coming across like a dimwit.

Filesystems

On my continuing obsession with squeezing every bit of performance out of this system… They say that Linux filesystems don’t get fragmented. I never understood this. It’s apparently smarter about where files are placed. But still, frag-proof? If it was that easy, other filesystems would have figured it out long ago too. I figured that the explanation was just over my head. In reality, the “explanation” is that it’s a myth.

oxygen bin # fragck.pl /home 2.19458018658374% non contiguous files, 1.03385162150155 average fragments. oxygen bin # fragck.pl /var/log 56.3218390804598% non contiguous files, 28.9425287356322 average fragments. oxygen bin # fragck.pl /var/www/ 1.45061443222766% non contiguous files, 1.05527580153377 average fragments. oxygen bin # fragck.pl /etc 2.18023255813953% non contiguous files, 1.05450581395349 average fragments. oxygen bin # fragck.pl /var/lib/mysql/ 16.5424739195231% non contiguous files, 2.93740685543964 average fragments.

The results kind of make sense: /var/log is full of files where you’re constantly appending a line or two to various files, so it only stands to reason that, if the filesystem isn’t very careful, fragmentation would build up. The other one is /var/lib/mysql, where MySQL stores its data. It’s the same deal as /var/log, really, in that it’s continually adding files.

/var/log/messages, the system log file, is in 75 pieces. Its backup, messages.1.gz,was in 68.

Realistically the performance hit is negligible. It’s not like a core system file is in hundreds of pieces. (Like, say, the paging file!) /bin has very low fragmentation. Log files can be fragmented an not impact anything. (Except my OCD.) Although I am concerned about MySQL’s data stores building up fragmentation. In theory I can bring the database down and shuffle the files around, but it’s probably best left alone right now.

Fortunately, there’s hope… By moving a file to another partition, you cause it to move physical locations. Something like mv messages /tmp/ramdisk && mv /tmp/ramdisk/messages . will cause the file to be rewritten. (Granted, this particular command was an awful idea: syslog-ng keeps /var/log/messages open, and doesn’t like it when the file randomly disappears. The fact that it was only gone for a split-second doesn’t change the fact that the files location has changed.) Although don’t get too excited about this: for some reason, fragmentation sometimes ends up worse! access_log was in 60 pieces. Now it’s in 76.

I’ve also heard it said that some fragmentation isn’t necessarily a bad thing: a few files close together on the disk with light fragmentation is better than frag-free files on opposite ends of the disk. But that doesn’t satisfy my OCD. I guess the moral of the story is to not muck around too much with things. Or, “if it ain’t broke, don’t fix it!”

M/S Explorer Crashes Again

M/S Explorer has crashed.

For added irony, they were in penguin territory at the time.

(One wonders the view out the Windows now that the ship is on its side–they’re most likely blue screens! No Word on whether that is the case, of course, but I will say that the ship’s Outlook isn’t so good. Fortunately, because the rescuers Excel at what they do, passengers were able to Exchange their rooms for ones on a stable ship. Because there were no fatalities, this was not FrontPage news, except on Digg.)

The Bible

I found a script that does that sort of Markov chains mentioned. I use it in PHP.

I needed a large body of text, though. Just using someone’s blog posts, for example, just results in a lot of repetitiveness. It’s no good. For bonus points, I wanted a large body of text that sounded kind of strange no matter how it was read.

So I found the Bible. It’s doubly good because the wording is pretty archaic, so you’re use to having to carefully analyze it to divine some meaning. While a guy on a forum saying he recently spent an evening with a grain of salt comes across as nonsense, in the context of the Bible you might try to read into it. This is perfect for this script!

Here’s the page. A lot of it’s sheer nonsense, but some of it’s incredibly good. In lieu of actual verse numbers, the script picks up on the numbers and very consistently plugs in two numbers in front of text.

Some recent highlights:

22 7 And David said unto Saul, I saw gods ascending out of the land to bury with the passengers those that remain upon the face of the earth, and upon every high mountain…

The zombies are coming? To kill the living?

5 11 Woe unto them! for their day is come, the time that David was escaped from Keilah; and he forbare to go forth. 23 14 And he went through the corn fields on the sabbath days. 4 32 And they were offended in him. But Jesus stooped down, and with his mouth, and began at the same scripture, and

This is one of those ones that almost tells a ‘coherent’ story about David escaping from Keilah, running through cornfields even on the Sabbath, which offended people. But Jesus stooped down to begin scripture. I’m fairly certain that no such verse appears in the Bible, though.

22 3 And David prepared iron in abundance for God had made them rejoice with great joy

That’s not much of a party….

Of course, sometimes it seems to get in a sort of loop… Anyone who’s read the Bible will recall that it, at various times, launches into really lengthy lists of people’s names and the relations between them. So I cringe whenever it begins doing that, because sometimes it just doesn’t stop. Here’s a good illustration of that:

are honest, whatsoever things are lovely, whatsoever things are honest, whatsoever things are just, whatsoever things are pure, whatsoever things are true, whatsoever things are honest, whatsoever things are honest, whatsoever things are honest, whatsoever things are true, whatsoever things are lovely, whatsoever things are honest, whatsoever things are just, whatsoever things are pure, whatsoever things are true, whatsoever things are lovely, whatsoever things are lovely, whatsoever things are just, whatsoever things are pure, whatsoever
29 2 And he placed forces in all the coasts thereof, from two years old was Jehoash when he began to reign, and he reigned eleven years in Jerusalem.

My biblical history isn’t so hot, but I’m fairly certain that rulers had to be at least three to begin their reign.

15 6 In the morning sow thy seed, and in the water

o_O

40 4 And the glory of their strength in the tabernacles of Ham
16 59 For thus saith the Lord GOD; Behold, I will stand upon my watch, and set me in dark places, as they that must give account, that they may lay hold on bow and spear; they are cruel, and have no child, and her husband were dead, she bowed herself and travailed; for her pains came upon her.

Say what?

33 25 Wherefore say unto them, My little finger shall be thicker than my father’s loins.

Is that an actual verse? It sounds like it may have been the equivalent of a your-mom insult from the biblical era?

Anyway, go see for yourself. Just don’t expect every verse to be good.

There Goes My Hero

Watch him as he goes! It was the usual “wasting time on Wikipedia” path — I started reading about nuclear fission, and then read about Los Alamos, and then read about the supercomputers, one of which ran Plan 9, so I read about Plan 9, and then its GUI, and then the guy who wrote the GUI. And there was an allusion to someone else, Mark V. Shaney. So I read about him.

In a nutshell, it was a script a few of the Plan 9 guys wrote that would process a lengthy body of text and do some statistical analysis, and use that to spit out writing. It was AI, in a sort, but “schizophrenic” is the best way I’ve seen it described. You read it and it’s one of those things where, for a minute, it makes sense, but then it radically shifts topics or draws some sort of completely irrelevant conclusion. Kind of like a lot of people on the Internet, actually.

They had some fun with textbooks. Here‘s an example, in which the code was fed a basic arithmetic textbook:

Why do we count things in groups of five. When people learned how to count many things, they matched them against their fingers. First they counted out enough things to match the fingers of both hands. Then they put these things aside in one quart. A giant-size bottle that will hold four quarts is a three-digit number….

It starts of making good sense, but suddenly they go from counting on your fingers to putting “these things” in a quart, and is pretty incomprehensible from there.

Here’s another really funny one. You read it, and can kind of comprehend it. But the first reply summarizes it well: it suddenly shifts from constipation to understanding the 19th century, with no logical shift. I think that commenter may have been aware of what was going on. The second guy accurately nails what’s going on.

Finnegan’s Wake? This one cracks me up a lot. But you read this, and doesn’t it exactly sum up what’s wrong with Internet forums? The people just seem totally bonkers, and like they’re ranting but not really sure what they’re ranting about. He manages to talk about being good in bed and using the latest version of BSD in the same sentence. The reply is hilarious, because it’s exactly what you’d think if you didn’t know what was going on: that the “guy” posting was on some serious drugs.

This one, though, is my all-time favorite. It starts off as some religious rant, but clearly not a coherent one. But the fifth paragraph is the best paragraph ever written:

When I meet someone on a professional basis, I want them to shave their arms. While at a conference a few weeks back, I spent an interesting evening with a grain of salt. I wouldn’t take them seriously!

I’m fairly certain there are AI ‘bots’ out there that do this same thing, maybe in more coherent forms. I want to acquire one. Badly. I’ve always been interested in the ‘bounds’ of nonsense—when something kind of makes sense, you work with it. We “understand” people shaving their arms in professional settings, and we can visualize someone spending an evening with a grain of salt, and I surely wouldn’t take them seriously afterwards. But we’re making ‘sense’ out of sheer nonsense generated by a computer. How far will it go before we think, “This is complete nonsense.”

Stolen Ideas, II

Hammacher Schlemmer has a second idea that’s eerily similar to something I’ve had in mind.

Granted, mine would be an order of magnitude (or two) more expensive, have a cell modem for enormous range, solar panels to aid it in flying for a long time, and an ultra-high res camera with a long zoom lens… 640×480 is pretty much a gimmick, especially when you can only store 26 of them. And a 7-minute battery life is gimmicky too. I want a high-quality lens and 8 good megapixels. And a 4GB flash drive or something.

Oh, and GPS. And WiFi. I want to be able to, on the computer, map out a path for it to fly over, and automatically ‘return home.) Granted, you’re far, far from the $200 price at that point. But it’s also seriously cool at that price.

Police Trivia

Through the school paper, I’ve been talking with some of the supervisors in Campus Police. The guy I interviewed last night is the perfect person to interview: you ask him a question and he’ll talk for a while, so it’s not a round of 20 Questions. Some of what he said isn’t really relevant to the article I’m working on, but it’s really neat anyway.

For example, would you ever have thought that:

  • Repeated studies have shown that an officer whose shoes aren’t shined is significantly more prone to being attacked? Not, presumably, because criminals secretly have major OCD, but because, on a subconscious level, it communicates that the officer is not at the top of their game. Or at least that’s what researchers have theorized.
  • If you’re an officer with a holstered gun, and someone comes at you with a knife, if they’re closer than 21 feet, they’re going to stab you before you can fire. This one surprises me a lot. Five feet and I could see them lunging at you. But 21 feet seems like an incredible distance. I remarked about how surprisingly high that was, and he told me that they periodically demonstrate it at the range: someone stands (well off to the side so they don’t get shot) 21 feet away, and, when a signal is giving, the officer pulls his gun and fires at a target, and the guy 21 feet away starts running. Every single time, he’s past the shooter before they get off their first shot.