December 27, 2007
Installing Fedora 8 on a Gigabyte GA-G33M-S2H motherboard with 2x 500GB SATA drives, onboard GMA 3100 video into an Antec Fusion (Black) caseThis entry is a little bit different than the others I've made: I'll be updating it as I continue working on the box.
Surprisingly, this was the first system I've ever put together myself. The first computer I ever used was an Apple //e that my father bought. I was probably about eleven years old. It was great. Of course, he did whatever assembly was required on that machine. We had that machine for years: I was still using it into high school. Probably in my freshman year of high school, my dad bought a "Fat Mac", one of the 512k Macs in the original case. At some point he got a 10MB hard drive for it that sat under the machine in a matching beige.
When I went off to college, I worked part-time at the campus computer store (a great job for a CS major, maybe) and saved up until I could by my first machine: a Mac IIci. I had that for four years, and in my last year there I bought a PowerMac 6100av. When I went off to grad school I made the switch to laptops and Windows, with a Toshiba Satellite Pentium II based laptop. I eventually replaced that with an IBM ThinkPad A31p, which I have been running since 2001. When I moved to Japan it was my primary machine, until I got one of the last of the PowerPC PowerBooks: a PowerBook G4 with the superdrive and 1440x960 display. I'm using it this very minute to type this up, and it is my primary work machine at home. (I have actually at work a MacBook Pro Core Duo 2 machine, as well as a Dell box with linux on it, and a ThinkPad 60p that runs windows.) The venerable IBM ThinkPad A31, with three internal hard drives, has been running as my entertainment center for the past two years, hooked up to a 24" 1920x1200 LCD monitor. It is a great machine, but with a 1.8GHz P4 Mobile chip, it is starting to show its age, and can't play a lot of the video files that I download now. Since I'm in Japan, I download a lot of American TV programs to keep me up-to-date on what is going on over in America. The A31 has no chance at playing anything in h.264, and can't do any sort of HD content.
So I finally gave in and bought a new system. I thought I would get a media-center type system, and go with a desktop so that I can upgrade it as time goes on. I was planning on getting a Shuttle box, but the prices for those are pretty high. I spent about the same as I would on a shuttle box, but was able to pick up the beautiful Antec Fusion black case, which is designed to be quiet (it is very, very quiet) and cool. On the downside, it can only take one 5.25" device, and two 3.5" devices, which is a bit limiting. I would love to have four hard drives in there for some sort of nice RAID setup, but I'll settle for two very quiet drives instead.
read more (4137 words)
December 26, 2007
A delicious Christmas Dinner
Christmas Dinner at New York Grill
Scampi Tails with Marinated Vegetables, Caviar Vinaigrette
Jerusalem Artichoke Soup with Candied Hazelnuts
Roasted John Dory, Wild Mushroom Sauté, Black Truffles and Verjuice
Grilled Sendai Sirloin with Salsify, Palm Hearts and Cauliflower
Chocolate Fondant with Bourbon Vanilla Bean Ice Cream
Shinjuku Government Office
December 21, 2007
The Hollywood Writer's StrikeI have to admit that the Hollywood Writer's Strike has had almost zero impact on me, seeing as how I live in Japan and don't have access to American TV. There has been one thing that I miss though: new episodes of The Daily Show with Jon Stewart and The Colbert Report (with Steven Colbert?) I like those two shows a lot, and realized that without them I just do not have a good idea of what is going on in the news lately. I do watch about ten or fifteen minutes of the NHK news in the morning, but that mostly focuses on Japan, and usually the US news that they have on is "US News that impacts Japan". So they will have something on about how Bush thinks that the Korean Kidnapping problem is a big issue, and North Korea should really cut it out. While over in America, nobody even knows that there is a North Korean Kidnapping problem, and they certainly don't know that it refers to people that were kidnapped back in the 70s (or 60s, I don't really remember.) Anyway, according to an AP news report I found on Yahoo! News, the Daily Show and Colbert Report will be resuming production on January 7th. I'm pretty sure they are both opposed to returning to the air without their writers, and they had a great quote about that:
In a joint statement, Stewart and Colbert said: "We would like to return to work with our writers. If we cannot, we would like to express our ambivalence, but without our writers we are unable to express something as nuanced as ambivalence."Man, those two are funny. I'm actually a bit sad that they will be back on the air without the support of their writers, but it will be nice to have a good source of news once again.
December 19, 2007
A pro (sometimes) basketball player that is funny, writes well, and has great taste in music?I've enjoyed Paul Shirley's blog entries written for ESPN, and now he has written a "Best albums of 2007" entry. This isn't really something you would expect from a pro basketball player, but I think he's got some real gems in that list.
Color me impressed. I also highly recommend reading Paul Shirely's stuff if you enjoy basketball. Check it out, you should be able to find it over on ESPN somewhere.
December 12, 2007
The Enemy Concert in Ebisu's Liquid RoomMy girlfriend likes the the UK Band The Enemy, whom she saw at Summer Sonic (I was off seeing other bands at the time.)
She picked up a pair of tickets to their show on Monday the 10th at Ebisu's Liquid Room and we went together.
I have their album "We'll live and die in these towns" and I like it. It is a good album with really catchy choruses and a surprisingly complex sound. They have some piano on some tracks, which I like. It strikes me as a really sad album, with a hint of desperation, but the music is often upbeat and energetic. It is easy to listen to, and a bit catchy. I'm not going to go out on any limbs and declare it super tops, but I liked it.
Their live show was very good though. They were a four piece: the three official band members on bass, guitar, and drums, as well as someone on keyboards. The bassist was pretty cool: he totally jumped in and crowd surfed at one point. People were going wild: lots of crowd surfing, which is pretty rare for these gigs in Japan. The place was really packed, and as with most of the bands that Lisa likes, these pretty boys drew a large cute young woman audience.
We grabbed a standing spot on the side of the liquid room with a great view of the stage since we were on an elevated platform and had a little counter to rest on. I'm glad we weren't in the center middle stage where we usually go, since there was lots of moshing and energetic pushing that night. It was nice to just relax and not have to shove against people for once - I get enough of that on the morning train commute.
Anyway, I wish I had some pictures or other nice media to go with this post, but I don't. All the venues I've been at in Japan are dead set against any sort of photography other than the official venue stuff, which they sell after the show. I should have snapped some shots after the show, particularly of a group of high school girls in their uniforms that seemed shocked at how sweaty they were. Maybe they've never been to a concert and ended up in the packed crowd before, but I've always found that in Japan if I want to dive into the crowd, I pack a second T-shirt to put on after the show ends since the first one will be completely sweaty.
Anyway, if The Enemy is coming through your town I recommend them. They put on a good show. Their album is pretty good too, and I think a few of the songs will stick around in my permanent rotation.
December 9, 2007
Praise for PortalAbout two weeks ago, I decided to buy Valve's Portal.
Now, generally I don't play many games, but I have been reading two blogs that focus on games which have both been giving high praise for Portal. The first, Shamus Young's Twenty Sided has a lot of gaming (both pen-and-paper RPG and computer type) information, and is home to the amazingly funny DM of the Rings.
If that wasn't enough, another blog I read has had good things to say about Portal also. The other blog is Japanmanship, a blog by a game designer from England who lives and works in Tokyo. His blog is a great read for any foreigners in Japan, and also lots of interesting stuff about game design.
So after hearing so much about this game, I decided to give it a try. This is a bit commitment on my part: I have pretty much given up on the entire First Person Shooter genre. I never really played many FPS games. I started with Pathways Into Darkness on my Mac IIci but that didn't work too well. It was scary, and I got lost, and there were mean monsters trying to kill me. I get lost easily enough in real life, and it isn't any better when people are shooting at me. I never got very far in that game.
I then went on an played
Bungie's Marathon on my PowerMac 6100av, but ran into the same problem: people were shooting at me, it was scary, and I got lost.
Ever since then I just haven't played many FPS games. I don't really like 3D games in general. I like the constrained world of 2D games, and the nice pixel graphics. About the only game that I do play any more is Street Fighter II (in the latest incarnation of it that is any good: Super Street Fighter II' Hyper: Anniversary Edition.)
I finally decided to give FPS games another chance though when I bought Portal. Actually, I bought the entire Orange Box since it was only slightly more expensive and includes a few more games that are supposed to be top-notch.
I really can't say enough good things about Portal. I'm quite late to the party I'm sure, since people were playing and writing about this game back when the Orange Box was actually released, but I'll throw in my two cents as well.
First, the pacing is excellent. The game starts off with simple tasks, and clearly shows what you can do. The progression and learning curve is very well paced. I know it is because I am more or less hopeless at these games, and I found that I was able to figure out what I needed to do without resorting to looking things up on the internet.
I also never felt like I was lost: the levels were well designed and I generally knew what I had to do, or where I needed to go. I really loved the puzzle-game dynamic as well. I wasn't being chased by bad guys, and things felt more like an extended Tetris than a stressful first-person shooter. By the time I got around to the last "level" I was using all the tricks the Portal gameplay mechanics allowed for, and really enjoying it.
The other thing that really hooked me is how they managed to tell a great story that was just absolutely hilarious. I love the disembodied GLaDOS computer voice, and the gun turrets are super cool too. I almost felt bad about knocking them out of commission.
By the end of the game, you are treated to an absolutely amazing song. It was composed by Jonathan Coulton who you really should check out: he's got some geeky and funny stuff. I'll write a post about it at some point, once I sort out my top recommendations. Due entirely to the Portal end-song, I ended up spending $70 on the DRM-free Jonathan Coulton "box set" of MP3s. He also distributes his stuff under a Creative Commons license, so you can get a lot of his stuff for free, but I've been listening to a bunch of his stuff and thought it would be nice to support the non-traditional music distribution model.
Anyway, my recommendation is to play Portal. I've actually started playing Half-Life 2 from Orange Box, and am enjoying it as well, but I really wish I had my portal gun. And that people would stop shooting at me. And that I wouldn't get lost so often. I do have to admit though, I am getting lost and confused much less frequently than usual for the genre, which I attribute to the Valve designers putting a lot of thought into the level design.
December 4, 2007
The 2007 Japanese New Word / Buzzword / Hot Phrase PrizeI woke up this morning and was surprised to see on the news that there is a yearly Japanese new word / hot phrase prize awarded. It looks like this prize is sponsored by a publishing company, and has been awarded annually since 1984. You can check their yearly archive to see who won the prizes in the past.
I'm sure there are many bloggers in the Japan ex-pat sphere that are much more on top of these things than I am, but I thought it would be amusing to take a look through this year's list and see what I can figure out. In general, it seems like an odd pastiche of catchphrases, nicknames, and social phenomena.
And the winners are...
どげんかせんといかん(Dogenkasen to ikan) This is a regional dialect from Miyazaki-ken. The person who popularized this saying is 東国原英夫 (Higashikokubaru Hideo), currently the prefectural governor of Miyazaki-ken recently elected in January of 2007. Before that he was one of Japan's many "Talent", basically a TV personality of some kind.
This phrase is indecipherable to me, so I did a bit of searching on the interweb. I know that いかん is basically Kansai-ben for "bad", so I can make some guesses based on that, but what I came up with, from this blog posting, is that it means "We have to do something (about this)." I also know that the ~せん suffix is used in some dialects as a negative, so I can guess now that どぐ might be something like する (to do.) These are all conjectures though.
It seems like the story of this guy is that he was recently elected to the prefectural government of Miyazaki, which hasn't been viewed in the best of lights recently. He's know as the "Miyazaki Salesman" because he shows up on TV shows and other things to extol the virtues of Miyazaki. Popularizing some of the local dialect spoken in Miyazaki has been one of the points on his agenda apparently. Anyway, it is interesting to learn, and I wish I knew more about this particular dialect, but in practice if you live in Tokyo you will only hear standard Japanese, and some Kansai-ben if you watch TV and comedians, along with whatever your friends speak. It seems like most of my friends speak French or Senegalese these days, so Miyazaki-ben is completely out of the running for me.
(Hanikami Prince) This is the nickname for Ishikawa Ryu, a freshman high school student amateur golfer that has been popular lately. The nickname was given to him by his godparent, who was announcing the Munsingwear Open KBS Cup at the time that Ryu won it. I don't understand what the nickname means at all, but a quick look at his wikipedia entry did not clear anything up at all. It says that the nickname was born at the time of his interview after winning the event, but doesn't say where it came from. It says that was previously called "The Sunvisor Prince" because he wore a sunvisor, but that didn't stick, and Hanikami Prince did because of his characteristics.
And a slap to the forehead time: はにかみ屋 is in the edict as "a very shy person". So I'm guessing this is more properly called "The Shy Prince" and now it all makes sense.
I also think this is about as cool as everyone fawning over "The Handkerchief Prince" from last year, who was a baseball player (pitcher) for Waseda who wiped his brow with a handkerchief all the time. People went nuts over him too. I'm not as interested in fashionable nicknames.
(Kieta Nenkin) This is a reference to the recent trouble about missing pension money. This year, over $450,000 in pension money went "missing". (This is nothing compared to how much money has gone missing in Iraq for the US!) 舛添要一 (Masuzoe Youichi) is a politician, and also ex-Talent, who has been involved with the missing pension money. He's the part of the Liberal Democratic Party of Japan, the Minister of Health, Labor, and Welfare, and a well-known political scientist (not that I know of him!) Anyway, he has been speaking out about lack of accountability and other problems with the social insurance agency. The "Disappearing pension money" is one of his catch-phrases.
(Sonnano Kankei nee) This is an annoying catch-phrase that is apparently the height of Japanese humor, but just strikes me as completely idiotic and scraping the bottom of the barrel of humor. (Of course, my friends would call me a hypocrite to be calling any humor stupid, but that's for another day.) Anyway, そんなの関係ねぇ means "that has nothing to do with it!" or something along those lines. It is a catchphrase that this comedian, 小島よしお (Kojima Yoshio) uses. He comes out wearing just a swimsuit (Speedo-style, why?) and repeatedly says this in a good rhythm to cheer himself up. Man, this stuff is not funny. Of course, in his "interview" he answered every question with "that has nothing to do with it!"
I'm going to start using this at work and see if people laugh. They probably will. How depressing. My amazingly funny, complex puns based on subtle translation errors just get blank stares, or worse, elicit outright anger. You know what I tell myself though: そんなの関係ねぇ！
(Don dakeh~) This is another annoying catch-phrase joke that you hear way too often. It basically means something like "how much (or far) [has that gone?] - [it can't be as much as your are saying]". It comes from どれだけ and is often used with a sarcastic intent. So if someone says "I ate two donuts" you can say "How many?" with the implication being "you couldn't have eaten two donuts!" (it must be many more because you are fat) or something like that. Then people will laugh.
Also, the person that was nominated for this is Ikko, a makeup artist and Talent who is a cross-dresser. He said that this isn't really his gag, it is one that is popular in the gay bars down in Shinjuku 2-chome. Japanese people seem to really like cross-dressers and think they are very funny. I guess they're kind of like the British that way.
(donkanryoku) Thick-skinned (well, that's my translation anyway.) More literally it is something like "the power to be stolid". This is by author Watanabe Jyunichi, who wrote a book of the same name. The meaning is basically "don't worry so much about the little things" which is a good message I think. But I'm pretty sure I don't really get all the significance of the word, since I don't really know what that means within the Japanese culture context. What is "little stuff" to me probably has no bearing on what is "little stuff" to the Japanese, and vice-versa for the big stuff.
(Shyokuhin Gisou) This one is kind of interesting. It means "fake food" and is a reference to a company here in Japan called "Meat Hope" which labeled some of its meat products as ground beef when in actuality the products included pork or rabbit or other things like that. There were other similar sorts of food-based incidents, like a company that was selling fresh-made tofu treats (for years and years) but was actually labeling them as made on the day they were thawed out after being frozen, and other things like that.
(ネットカフェ なんみん) This is a social phenomena expression. It refers to people that, for whatever reason, sleep in internet cafés. Some of the people are homeless and use the cheap net cafes (some with 1000 yen overnight packages) to grab a shower and sleep in big recliner chairs. The translation is pretty clear, literally: net cafe refugees.
(おおぐい) I think the reading is right. Anyway, this word I guess refers to the gradual super-sizing of foods in Japan. Just like in America, portions are getting bigger, and food is getting less healthy (depending on where you eat anyway.) The recipient for this prize was ギャル曽根 (Gal Isone, maybe loosely translatable as Stomach Girl). She is Talent, and appears on eating competition shows. She can eat a lot, I've seen some of the shows that she's been on. She must exercise a lot with the amount that she eats.
(もうしょび) The day of fierce heat. It was awarded to the president of the Kumamoto-city shop-owners association (or something like that.) This summer, temperatures reached 40.9 degrees Celsius (105.6 F) in Kumamoto. That's crazy hot.
Well, that does it for this year's top 10 buzzwords / hot phrases prize. I thought that one of them was pretty interesting, and three of them were completely worthless. The others are somewhere in between. It was kind of fun looking some of this stuff up though.
Bad OmensToday started off with a bad omen: I slept in for an entire hour. Usually I'm very good about getting up on time, but I was up a bit late last night. Even though I went home early (home by about 7:45pm) I logged on to some machines at work, and (slowly, while watching House) did some work-related stuff. I ended up going to bed at about 1am, instead of my usual 11pm, with a 7am alarm.
I almost never use the snooze function on my alarm (which is actually my cell phone) but this morning it was so cold that I just couldn't stand it. I turned on the heater, and then somehow an hour passed before it was warm enough to get out of bed.
Now, this isn't really a big problem since I don't have strict hours that I need to be at work (I just need to get my work done.) The problem comes in with the commute: they way things are now, a slight delay on my part changes my commute from annoying to unbearably crowded, hot, and sweaty.
If I wake at 7am, wash my face, and then hop on the train I generally will be able to sit on the second leg of my trip (~20 minutes) and can sit after the second station on the third leg of the trip (~20 minutes.) If I can't sit, at least I can stand and can hold a hand-strap, and generally I have some space and am not too crowded.
If I am delayed by twenty minutes or more, I skip the first train leg of my trip entirely (only 2 stops, maybe 5 minutes on the train) and walk the 15 minutes to the start of the second leg because that fifteen minute delay means that the train is so packed that when the doors open, you just see a wall of people. To get on the train you turn around with your back facing the people, and then press your way in. If you can get some leverage on the train door side that helps. Usually, somehow, miraculously, there is enough space to squeeze in. Your face will pressed up against the glass, which is slick with condensation from the hot breath of the people jammed into the train, making cattle cars seem roomy by comparison. If you are unlucky, more people will be getting on after you, and you will find yourself bent into improbably shapes as bags and briefcases force your lower body and legs one way, while other pressures force your upper body another way. If you can reach a strap that helps a lot, otherwise it is a crazy balancing act in which unusual muscles start to ache from holding odd positions. It doesn't matter much in the end though because you are packed in so tight it isn't possible to fall over, only lean more awkwardly onto the people around you.
So generally I'll just skip that mess entirely and walk the 15 minutes to Jiyugaoka. It is a nice walk anyway, and I can do with the exercise.
At Jiyugaoka things are slightly better because I can choose to take the local train, which isn't nearly as bad as the express, or god forbid, the commuter express, which is just comically packed. Typically though, even the local train is unbearably hot and humid from all the people. Also, don't think that there is the up-side of at least sometimes being pressed up against cute women: the rush is worst from 7:20am until about 9:30am, which probably 70% of the ridership is male. The women are smarter and try to avoid the typical salary-man hours.
Of course, on the express and commuter express train there are "women-only" cars so maybe more of them crowd in there. I don't know; I always take the local because it is only about five minutes longer from where I'm at and substantially less crowded (which isn't saying much.) The women only cars are supposed to address the problem of men groping women, which I might talk about at some point, but in reality I don't know much about it: I don't do it, and I don't know that I've ever seen it happen. I'm not sure I would know if it was happening though, so I generally just try not to think about it too much.
Anyway, today with my delay of one hour, I was in the packed train at Shibuya. It is usually pretty back until you hit Naka-meguro where lots of people get out (yay!) but then you are only two stops away from Shibuya, so it isn't really much of a win.
I transfer at Shibuya to the Hanzomon line. Today things were strange: I got down to the ticket gates, and there was a crowd of people backed up to the escalator. The place was jam packed. A few of the signs had information on the problem: due to a "personal accident" (人間事故, literally human or personal accident) the trains were severely delayed. A personal accident is a euphemism for suicide. They happen sometimes here in Japan, someone decides that the commute is unbearable, and in a sarcastic lash back at the commuting system they jump in front of a train. This has happened a few times in the approximately two years that I've been here, maybe four or five times. Usually the trains are running within twenty minutes to an hour.
This time, the accident happened at 6:15am and they were not letting people into the gates. I don't really know what happened, but I decided I wasn't getting anywhere fast, and I went for a cup of hot chocolate at the Starbucks in front of Shibuya Crossing.
I really need to remember this, but I hate that Starbucks.
Every few months I go there, and I hate it. Then, a few months later, I decide I want some hot chocolate or something, and I go back. And I hate it. The problem is that the place is always packed. You always have to wait for a place to sit. Even once you do sit, it is unbearably hot. The building is facing East (I think I don't know these things), and gets the full brunt of the sun as it comes up. It has a large glass face, and it is always unbearably hot. The tables are small and always crowded. One of my favorite things to do is to read a book and have a drink at the coffee shop, but in this place I can't spread out much which is a major problem: when I read, I need space for my book, my electric dictionary (ancient, so huge by modern-day standards) and a notebook that I write down unknown Japanese words (writing is still the best way to remember things.)
So while I'm drinking my hot chocolate, in a cramped counter seat in front of a huge glass window with the full force of the sun beating down on me in an over-heated coffee shop, I'm sweating like mad. Finally, the last thing about this place is that it is always packed with foreigners. Now, I'm a foreigner and I'm not one of those people that feels like other foreigners around me are invading my own special private Japan where I'm the only unique guy. But I don't like when I hear a bunch of people talking English loudly about things that annoy me. And you tend to get a lot of guys in this Starbucks talking about picking up Japanese women or other things like that which can be annoying. Or people doing impromptu English lessons - which is common in coffee shops, but this one is just so crazy crowded that it makes no sense to do one there.
Anyway, I eventually finished my hot chocolate, and headed back to the subway. They were finally letting people back on the trains, and I picked up my little ticket that said the trains were delayed for an hour (they pass them out so people can prove to their bosses that they weren't, in fact, just hanging out at a coffee shop making disapproving body language at strange foreigners) and finished the commute -- still crowded because of the delay -- to work.
I'm usually here at about 8:30am, today I didn't get in until 10:30am. Already two hours behind schedule!
And I love my schedules. Ah well. At least I get to rant about it on my blog. :)
November 30, 2007
Fedora Core / RHEL don't seem to come with up-to-date versions of Scalar::UtilI ran into this problem once before on a Red Hat Enterprise Linux machine, and now I am having the same problem on my Fedora Core (7 I think) machine. The problem is that CPAN is unable to install various things, in particular Bundle::CPAN, because:
You don't have the XS version of Scalar::UtilI have also run into problems where I get an error message like:
Weak references are not implemented in the version of perlBoth of these can be fixed by using CPAN to install an up-to-date version of Scalar::Util:
perl -MCPAN -e shellYou might have to force the install if you have an up-to-date version of Scalar::Util (which I did) but it had been compiled without the proper options to support XS.
force install Scalar::Util
If you are interested in finding out more a simple search should turn up lots more information. I find it shocking that modern Perl distributions can be around that leave out such a commonly-used feature. Hopefully Redhat / Fedora will get around to fixing it in their next release (and if not, at least I've left myself a note here.)
SELinux Problems, solutionsIn general, I really like the idea of SELinux. It conceptually allows you to specify users, roles, and types for files and then checks against those conditions when something tries to access the files. It will only allow users that match the user condition, roles that match the role condition, and types that match the type condition to actually proceed and work with the file.
So, for example, if you a role of "web object" which the webserver account fills, and it tries to write data into some directory that is not fit for that role, say /bin/, the operation will fail and the would-be hacker can't put their trojaned ls program or whatever in there. That is a good thing.
The problem is that the SELinux system is really kind of complicated. If you don't know that it is there, you will just have things failing mysteriously, especially if you add directories in places that aren't set up with the system already. Running a webserver on one of my linux machines, I ran into this problem. It is particularly an issue when you are trying to use executable scripts on your web server.
Here is an instance of a problem that I had: I copied some scripts over from a production machine to a dev machine so I could build some more functionality based on the existing scripts. They went into
/var/www/cgi-bin/, a normal place for scripts on my system. To find out the attributes they should have:
So that isn't good. When I try to access the file, I get a 404, which isn't really true: actually the file is there, but SELinux is preventing it from being used. So, what should I do? I need to make the files have the correct SELinux settings. First, I try setting the type of the file:
$ ls -ldZ /var/www/cgi-bin
drwxr-xr-x root root system_u:object_r:httpd_sys_script_exec_t:s0 /var/www/cgi-bin
$ ls -ldZ /var/www/cgi-bin/my.cgi-rwxr-xr-x root root /var/www/cgi-bin/my.cgi
sudo chcon -t httpd_sys_script_exec_t /var/www/cgi-bin/*Oh, that's no good. What's a partial context? Looks like you need to specify all the attributes of the file. Usually the files already have some default attributes, so it is ok, but for some reason these guys have nothing. I don't know why. But if we apply all of the attributes that we need:
chcon: can't apply partial context to unlabeled file /var/www/cgi-bin/
sudo chcon system_u:object_r:httpd_sys_script_exec_t /var/www/cgi-bin/*
And that fixed the problem. Also, if you need to know where SELinux error messages are, they are sometimes in /var/log/messages, sometimes in dmesg output, and sometimes in /var/log/audit/audit.log or possible /var/log/avc.log, depending on how your system is set up.
November 22, 2007
Using the Gimp to automate "cleaning" of scanned B&W imagesSometimes I play around with translating manga for fun. It doesn't really seem to get me much of anything except for lots of requests from punks to translate their favorite naruto doujinshi, but it is fun and relaxing with the bonus that I learn some cool casual Japanese.
I like to translate with a program I wrote for manga translation that puts all the text in the bubbles and whatnot, so I need to have scans of the manga to work from. So sometimes I'll scan manga.
The problem is that the scanner I have now doesn't do a great job of getting nice clean images. I often use (when I'm not feeling too lazy) pnyxtr's scan cropping program and his great scan rotation program, but if you have nasty scans that doesn't help much.
Since I'm both poor and lazy, and have a small amount of moral fiber, I use The Gimp for my image-editing needs. The Gimp has a nice scripting interface using a kind of baby scheme, so I wrote a script that will take a grayscale image, run the despeckle filter on it, re-level the image so that whites are whiter and blacks are blacker, then resizes the image to a reasonable size and converts it to a fixed number of colors. That makes the straight scanner output look just dandy, if you choose proper values for the high and low thresholds, and also automates a lot of clicking that I would have to do otherwise.
So in the off chance that anyone is interested, here is a Gimp script that will do all of that. If you place it in your proper gimp script location - on Linux or Mac OSX that would be ~/.gimp-2.2/scripts/ (or possible ~/.gimp-2.0/scripts/), and on Windows if you use the version of Gimp that I am using you can look in its application folder for something like a share/scripts folder and drop it there. On your next start-up of the Gimp you should see a new Script entry "Manga->DarkenResize" that will pop up a dialog and ask you for some values, with reasonable defaults specified.
You can get the script here: mangaDarkenResize.scm
One thing that annoys me is that I still have to manually set each picture to "Greyscale" mode. I should be able to do this automatically, but I don't know much about the Gimp, so I'm punting on that for now. It is also possible to use the Gimp in a batch processing mode, which would be totally awesome, but I haven't had time to make that work with this script. If someone makes any headway on that area, please let me know.
November 7, 2007
Spectating the New York Marathon
Jonathan Strange & Mr Norrell(Beware, spoilers may follow.)
Since I came to Japan I have not been reading too many English books. I really enjoy trying to read novels in Japanese, and am currently (slowly) fighting my way through Haruki Murakami's "Kafka by the Sea." I leave English books, which I devour, as fodder for passing time on the airplane. I can't sleep on planes, so the ten to twelve hour flights from Japan to America are exercises in endurance and boredom for me. Reading English books is one good way to pass the time.
Typically I will read from two to three books on one trans-pacific flight. On my last trip out I bought Susanna Clarke's "Jonathan Strange & Mr Norrell". This was a good book if for no other reason that I was unable to finish it in one flight. It actually lasted four flights (three of them were barely noticeable sub-three hour flights though) before I got through the 1006 page monster.
In my little databases of books read I gave this title a 7.5. It is a little odd because while reading the book, I was really drawn into it. The book has a peculiar language, spelling words in antiquated (or just outright strange for the sake of creating an atmosphere) way, and with Victorian era sensibilities. For the spelling, most noticeable was "show" -> "shew" / "showed" to "shewed" and so on. It is actually very annoying at first, then later on becomes only mildly annoying.
The novel is written in a quite victorian-era style, and reads like a serialized Dickens novel. There is entirely too much description, and too much emphasis on the social habits of upper-class gentlemen. Vast portions of the novel are just boring.
The portions having to do with magic are quite interesting (aside from anything Mr. Norrell has to say, which is intentionally boring) but unlike many books in the fantasy genre does not linger over the magical descriptions and incantations. The magical theory is very well developed, and expounded upon in crazy long footnotes, and there is an extensive history and library of books about magical theory in this world. It is an impressive accomplishment to flesh out the world so thoroughly, and in ways reminds me of the Lord of the Rings.
Near the end the story starts to speed up, and becomes quite engaging, but infuriatingly the ending is sudden and somehow unsatisfying. It feels like there is a deeper story about the meta-story of Mr. Strange and Mr. Norrell's actions as part of the Raven King's plans, but that is only hinted at.
Still, overall it was an engrossing read. I only lament that it was so unnecessarily long, and after reading it I am not sure that I am the better for it. Unlike most of the trashy fiction that I read on airplanes that are short sci-fi or fantasy novels, this one was long and required a commitment to get through. I'm a bit conflicted about that.
Has anyone else read this one? Comments?
Overheard at the bar
When she said priori probability, I think she meant a-priori probability ...Of course, I have to admit that this bar is the one in the hotel where many attendees of the TREC conference are staying, but still, I think it is a very funny bit of overheard conversation. I kind of like the idea of a bar in which conversations about statistics are commonplace. Perhaps that is what every bar in the MIT area is like, but certainly it isn't anything I run into at my favorite bars. I'm lucky to hear English being spoken at the bars that I frequent. :)
October 15, 2007
Catching up on MusicLately I haven't been listening to very much music. I've been busy with work, then last week I caught a cold and was sick all week. I still came into work, but left pretty early and slept a lot. I'm finally just about over that, but work has gotten busy again as I have to prepare a talk for the TREC conference early next month, and there isn't much time to coordinate with my supervisor about it. I also sprained my ankle a week ago, and haven't been running since then. Usually I listen to some music while I run, so I've been missing out on my usual music listening opportunities.
RadioheadI just bought Radiohead's "In Rainbows", but haven't had a chance to listen to it yet. (Well, I'm listening to it now.) I think it is great that they are distributing their music themselves, and love the "pick your price model". I thought I would pay about $7 or $8, but ended up paying 5 pounds plus their processing fee, and who knows how much that is in American dollars. Maybe something like $13? It is a bit more than I wanted to pay, but I completely support their move to a new business model for self-distribution. I should mention that another favorite band of mine, Bishop Allen, also sells their stuff on their own website for very reasonable amounts.
Inspired by RadioheadOne group that I've been keeping my eyes on, Hard 'N Phirm, has a new post on their website where they are distributing for free two songs of theirs that are Radiohead inspired: "Fitter, Clappier" (not so great, but worth a listen for the price) and "Rodeohead", which is very nice. A kind of blues-grass Radiohead montage. More than that you, you really should check out the video for their song "Pi". The Youtube clip is below. I think it is hilarious and a great parody of the 80s style "Electric Company" edumacational TV shows.
Flight of the ConchordsNot too long after finding that Pi video (forwarded on by someone) I heard about Flight of the Conchords from the Hard N' Phirm guys. I have their website's RSS feed in my feed reader, and it popped up one day and said I should check out the HBO show "Flight of the Conchords". So I did, and I thought it was hilarious. I thought it was great, and that my little sister would love it. She always seems to hang out with people that are cool, but are somehow cool in spite of themselves, with a bit of a nerdy flavor. That kind of describes the Flight of the Conchords guys pretty well, I think. (Contrast this with myself: I am definitely nerdy, but have not even been able to attain the geek-chic style that has somehow popped up. I just land squarely in the "geek" demographic.) Since I thought Jana would like this stuff so much, I bought her the DVD for her birthday. Sadly, her birthday is in October, and the DVD isn't shipped until sometime in November, but as long as she doesn't read this website she'll still be surprised. Who expects a birthday present a month late? (Outside of my sisters, mothers, fathers, and friends?)
For your enjoyment, I recommend that you check out the Flight of the Conchords song Hiphopopotamus vs. Rhymenoceros. It is very funny. It is also probably findable on Youtube.
Say HiAnother group that I absolutely adore, Say Hi To Your Mom, recently changed their name to the shorter "Say Hi", and put out their newest album, "The Wishes and the Glitch". The album is supposed to be released on Feb. 5th, but if you are up on the interweb stuff you can order it from their website and get it now. It is a mere $7 for the digital download, which is I think a bit inaccurately named as the "Immediate Digital Download" because I ordered two hours ago but haven't received any download instructions yet. I suppose they will show up within a day or so, but that doesn't quite fit my description of "Immediate". More like, rapid. According to the FAQ, you should get the link for the download from 12-24 hours after your order, or on Monday if you hit them up over the weekend. I guess that means that they have a human approving the process somehow, which kind of baffles me since you really can automate the whole process. It is kind of rapid I guess, but not nearly what I would call "Immediate".
Still, I'm a huge Say Hi fan, I absolutely love their 2004 album "Numbers and Mumbles", and like their other stuff as well. I'm really excited to listen to the new one - even more than the new Radiohead album. With Radiohead, I expect a good album. With Say Hi, I expected something that could be only good, but might possibly be mind-blowing, or at least has a very good chance of being very specific to me and my life. What I mean is that I can sometimes very strongly identify with Say Hi's music in a way that the more large-issue, big-world, Radiohead stuff doesn't reach me.
Radiohead will not sing about being a 13-year-old kid hanging out with your friends dreaming of robots and spaceships. Say Hi very well might. Or he might have a song about falling in love with a girl, and then falling out of love with that girl, but not wanting to face it, and wanting to talk about spaceships instead of the relationship. Sometimes I misunderstand and relate so poorly to women that I don't understand why a conversation about spaceship design would be a bad thing when we should be talking about failings in communication about our relationship.
I really like the range that can come out of Say Hi. Of course, not everything is gold, but I think having valleys to go along with your peaks makes life more interesting.
September 30, 2007
One week with Papa and Daughter (パパとムスメの七日間)On Saturday I was working at the computer with the TV on, and came across a re-broadcast of the first two episodes of パパとムスメの七日間, a Japanese weekend drama that was on a while back. I usually don't watch Japanese TV since it consists of essentially talentless タレント芸の人 (celebrities) on quiz shows, or possibly cooking shows, or quite possibly celebrity cooking quiz travel shows. Actually, you can draw any keywords from the set (cooking, celebrity, quiz, game, challenge survival course, travel, food) and come up with a plausible Japanese TV show. I have to admit that I enjoy some of the survival course shows, but generally I don't watch too much Japanese TV.
Every once in a while I'll watch a drama, but because they are always broadcast on some sort of schedule and I don't generally work regular hours I find it really hard to watch something broadcast on a schedule.
This drama, A week with Papa and Daughter, is only seven shows long. It was broadcast on the weekend, and has a kind of short run (usually they are 12 episodes or so I would guess?) That is a short enough run that I can get into it, and since I just "watched" two episodes I headed over to d-addicts.com and downloaded the rest of the series.
I really recommend it for intermediate and advanced level Japanese speakers. It is a funny series, and fairly easy to understand. A very brief description of the series:
A daughter, Koume, and her father (papa) don't get along very well. Returning from Grandma's house one day, they eat a magical peach that switches their bodies around, and hilarity ensues. The father works at a famous beauty supplies company, and is in charge of a new product launch: the perfume Beautiful Dream that they are aiming at high school girls up to office ladies.
The daughter, Koume, is a high school student with a crush on a student on the soccer team. You can imagine how a high school girl trying to be the boss of a project at work could be difficult (and also how a high school student could be useful for directing the product direction.) Of course, her father isn't going to have any easy time with the midterm tests or Koume's high school crush...
I found the entire series over on d-addicts in Japanese, and it looks like they also have English and Chinese subtitles for it.
It's worth checking out!
September 15, 2007
On the outside looking inA quick post.
Today has been a peaceful Saturday, where I woke up early, did some housework, cleaned up around the place, and caught up on casual website reading. I also enjoyed my traditional hour or two at the local coffee shop reading my Japanese book - I will eventually finish this thing, but it might take me another six months.
I went home and started to read a few academic research papers related to some work stuff.
At about five thirty I decided to head to the local supermarket to buy some orange juice and start some rice for dinner. Once outside my door, I heard some shouting and drums, and realized that I was about to run into another festival of some kind. I vaguely remembered seeing signs advertising for recruits to help carry the portable shrines for a festival coming up in mid September, which is about now.
Walking half a block to the East shopping street, I caught sight of a small portable shrine being carried by some kids down the road, and right at the parking lot on the corner a more unusual scene. (For an American, seeing something more unusual than a portable shrine carried by kids who are chanting and walking in unison looks odd even to me.)
This all happened quite quickly, but here is what I saw:
A well-dressed Japanese man in his mid to late thirties, prostrating himself in the traditional Japanese fashion (土下座.) The open door and vacant driver's seat of a black luxury SUV in the middle of the road seemed oddly out of place; you don't usually see those things with the door open and engine running, vacant. Standing in front of the man was an older, slightly pudgy Japanese man in traditional dress - the kind that you commonly see at festivals worn by the people participating or working there, perhaps a happi (半被), all in black. He was yelling at the other man, and it was scary. He had a rough edge to his voice, reminding me of what the Yakuza in the movies sound like. This was all quite quick, and I didn't know what was going on, but I heard things like "What were you thinking" and "why'd ya do that?" -- or things to that general meaning.
Then the older man kicked the kneeling man, in the face. His wooden sandals flew off. I kind of spaced out momentarily, but then noticed that he kicked the guy with his other foot. His other sandal flew off. He went and retrieved them, berated the guy some more, and I froze.
I was thinking "This is not right!" I wanted to go over to see if the man who had been kicked was ok, but suddenly was absolutely convinced that the man in black was Yakuza, and that this was a dangerous situation.
The most dangerous situation that I've been in since I moved to Japan a year and a half ago. It was dangerous in an unusual way; I knew that if I just turned my head slightly, and watched the portable shrine procession go by, nothing would happen to me. In fact, there were many people in the exact same situation that I was in: the traffic conductors for the procession, who were not policemen, but were some sort of official with power over directing traffic, a few people who came to watch the processing, the local shopkeepers. It only made me more worried when I saw that the shopkeepers were looking at the man getting kicked and then intentionally looking away.
The reason this is scary is because the Yakuza are a fact of life in Japan. In general it isn't something that you notice or are supposed to notice, but it is clear that they exist. As an outsider, I have trouble knowing exactly what is going on often, but in this case it was clear that the people around me were afraid of acting against this guy, which scared me even more.
Of course, it could also be that in general Japanese people are not likely to get involved in business that isn't their own, but for that same reason anytime you see someone that is blatantly breaking the social rules in Japan, that guy is probably in a position of power.
(Or alternatively, has little power at all. Another case entirely is a recent fight that I saw on the street. A business-suited man who had clearly been drinking a lot was arguing with another guy that looked pretty much the same as him. He lunged at the guy and started swinging. The friends of the two, also business men who had drank plenty, pulled the two guys apart, did some yelling at each other and themselves, then walked off in separate directions. That is somehow entirely compliant with the Japanese sense of social behavior.)
About by the time I had processed this and consciously decided to not get involved, the Yakuza-like man turned around, and walked away slowly, as if now everything was fine. The character on the back of his jacket was not legible for me, but was not one of the local groups involved in the festival (to the degree that it wasn't repeated on any of the hundred or so jackets that I saw afterwards.) The character itself looked somehow scary to me; I saw (or imagined?) the radical for sword (刀) in there.
People ignored the man who had been kicked, who continued to prostrate himself, while his glasses had flown off somewhere to his right. Luckily I didn't see any blood on the man -- unlike a particularly scary incident I saw once in Roppongi many years ago, where a man's glasses were punched into his eyeball and there was an unsettling amount of blood spurting out. I turned to head towards the main street, following the Yakuza-man, who somehow disappeared quite completely even though I was watching him. Only about one hundred meters ahead of me, turned a corner, and completely disappeared.
Walking up the road the people involved with the procession (the traffic people) were talking about the incident and didn't seem to know much more than I did. Behind us one of the shopkeepers went to talk to the kicked man. We got to the main road, and they alerted the police, who didn't seem too happy to hear about it. I watched some more of the portable shrine procession, and a few minutes later noticed an ambulance headed down towards where I live, and presumably the kicked man.
Afterwards I did my shopping, and walked home. At the corner where things took place -- perhaps two hundred meters from my apartment building -- the kicked man was still there, kneeling now, but not with his head to the ground as before. He was not talking the the policeman, who was questioning him. There was no sign of the ambulance. The people that remained in the area were talking in hushed voices, clearly not interested in getting involved.
While I suppose I could have gone and spoke with either the man or the policeman, as a complete outsider in a situation where the Japanese themselves were also outsiders, I thought it was best to leave this alone. I went home. A few steps later, I passed the same luxury SUV, this time pulled back slightly away from the road.
I have no idea what happened. I have a feeling that it was some kind of near traffic accident, but I really don't know. I honestly do not understand why the man was so passive, or just willing to take the abuse from the Yakuza. I can guess, and I'm sure that it is fairly tightly tied to the Japanese culture, but I don't know if that guy is involved with the nefarious underworld, or just an unlucky regular guy to cross paths with the scary Japanese underbelly. In any case, the Police didn't seem to have much to do with it either from the point of view of prevention, investigation, or follow-up care.
Times like this (this is, of course, the most poignant one that I've had) really make me feel like a complete outsider in this country.
September 4, 2007
I haven't been swimming in agesSo, due to a variety of circumstances I have become a member of the Fitness Club Esforta, near Suidoubashi. Today for the first time, I decided to go down there and take a swim.
I haven't been swimming in ages. I have been running a few times a week, so I like to think that I'm in pretty good shape. Unfortunately, I haven't been losing any weight at all, so I thought I would add swimming to my regime. I've never really been swimming for real exercise though, so I wasn't sure about what to expect. I hoped to be able to swim for about 20 minutes.
The fitness club has lots of things that they loan out to you: new balance sneakers, towels, socks, and even bathing suits. The bathing suits are speedos, and I took the second largest size, but the thing was skin tight. Since I took my glasses off though, I couldn't see anything and it didn't seem too embarrassing. Everyone else was wearing them too. How Japanese. We all match!
So I got into the pool, and swam a lap. My form was atrocious. I didn't know when to breathe. I'm pretty sure that when I breathed in it was the wrong time because I was having a lot of trouble with it. The second lap my arms were heavy. The third lap was really tough, so I tried to swim it on my back, but I couldn't see very well. The fourth lap was a very slow affair, with heavy arms and it was hard to breathe.
That was it. I got out and checked the clock. Only ten minutes had passed. I couldn't believe how heavy my arms were, and I was starting to get a bit light-headed. I changed and took a fifteen minute break before heading back to the station.
By the time I got back to Jiyugaoka, about an hour later, I was fine again. My arms had quit tingling and my head was no longer light.
Next time I'm trying for 11 minutes.
September 2, 2007
(Unexpected) Jiyugaoka Portable Shrine Festivalposted previously about reading Japanese novels, and have continued to try to struggle through another book. The current book, Murakami Haruki's Kafka by the Sea is significantly harder to read. Anyway, on the weekends I usually go to get lunch at Excelsior, a local coffee shop in Jiyugaoka. I like the café in front of the station, which has a large seating area on the second floor with a wide window that gives a nice view of the plaza. I also look forward to their "Four Cheese and Mushroom" sandwich along with a hot chocolate. I usually spend about an hour reading, maybe an hour and half if I am interested in the story, and then I wander around Jiyugaoka (usually hit the arcade for a game of Street Fighter II) and bike back home. This particular Sunday, I was a little surprised because there was a nice wooden stage built up in the center of the plaza, which usually happens when a festival is being held. Not too much longer, and a whole bunch of shouting and chanting people round the corner carrying a portable shrine (Mikoshi, 神輿). I've blogged about other festivals with portable shrines before as well, most notably the Asakusa Sanjya Matsuri, but this one was interesting to me because it is a local festival. These portable shrines all came from somewhere nearby, a temple that I can go visit. Nice. I spent about an hour and a half eating lunch, reading, and watching the festival. It worked out very well because I finished a complete chapter in one sitting. I think it was just a short chapter though. At the pace I'm currently reading at, I should be finished in another six months. There are lots of things that I like about Japan (and a number of things that I do not!) These random, everyday occurrences brighten up my days.
August 31, 2007
A Visit to the Japanese National ArchivesLast week, I took a trip to the National Archives of Japan, arranged by Visiting U.C. Berkely Professor Fred Gey. I didn't realize this, but the National Archives are a short five minute walk from where I work in Jinbouchou, right next to the Japanese National Museum of Modern Art.
The mission statement of the National Archives is to preserve important cultural documents from Japan's history. The documents in the archive range from the 1600s up until about the end of World War II. They have some extensive, high resolution scans of maps, pictures, documents, scrolls, and so on available on the web. I was very surprised that they are using JPEG2000, which I really haven't seen in use anywhere but generally am in favor of. They have some really great maps of Japan from times ranging back in the 1700s to just after World War II. I am going to try to find where I live on one of these olds maps one of these days - but I'll have to do that on my windows machine since I don't have JPG2000 support on my Mac.
There is a really cute flash-based GUI with a man walking over a timeline that lets you click on a year, and then browse through documents from that year. Unfortunately, I can't get Flash to display Japanese characters to me correctly.
The National Archive is also somehow related to the Japan Center for Asian Historical Records, which has an interesting online retrospective on the US-Japan War Talks based on documents from the time. Based on the talk with the engineers there, it sounds like they have helped spread their technical know-how on archive architecture and document search to a few other institutions.
Anyway, there is a wealth of information there to look through. I don't see how anyone can get through any reasonable amount of it in a lifetime. The maps are really great though.
Go to Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29