Compiling Afner fails with gcc 4.5+

August 26th, 2011 googlefood, Software

WARNING: Googlefood, thus boring…

Issue: Afner compiled fine with GCC 4.4, but when trying to compile Afner with GCC 4.5 or later, the compilation dies with:


suffixtree.h:66:14: error: class ns_suffixtree::suffixtree::node is protected
suffixtree.cpp:208:19: error: within this context
suffixtree.cpp:208:1: error: ns_suffixtree::suffixtree::node::node names the constructor, not the type

Problem: Between GCC 4.4 and 4.5, the compiler changed to support “specializing C++ constructor templates.” This caused the meaning of “class X::Y::Y” to change.

Fix: Edit src/suffixtree.cpp, and at line 208: change suffixtree::node::node * to suffixtree::node * (i.e. delete the trailing ::node.)

I would have sent it upstream, but Afner doesn’t appear to be under development any more, there’s no open repo that I can check if this is already fixed and just not released yet, and I don’t really want to take responsibility for forking the project just to fix one line. :)

Note that the general fix should work for any “X::Y::Y names the constructor, not the type” error – Drop the duplicate ::Y. Of course, your mileage will undoubtedly vary.

References:

Photos from Fanime 2011

June 10th, 2011 Cosplay, pictures

I forgot to link to my galleries of cosplay photos from Fanime 2011… Saturday and Sunday:

How to find which linux distribution you are running from a shell script

June 10th, 2011 googlefood, Howto, Linux, Shell Scripting

sed -n -e ‘s/ *(.*)//g’ -e ‘s/ /-/g’ -e ‘1p’ /etc/issue

Examples:

nethead2:$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
Scientific-Linux-release-6.0

dhollowa-106$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
CentOS-release-5.6

Anime I Enjoyed at Fanime 2011

June 7th, 2011 Anime

When I wasn’t busy taking tons of photos of cosplayers at Fanime, I did manage to see quite a few new anime. Here’s my 2011 list, in approximate order from “must see terebi” to “if there’s nothing better on…”

Hanasaku Iroha
A coming of age drama, sort of like Spirited Away, but without the fantasy elements. Ohana, a more-or-less useless young woman, is forced to move in with her grandmother after her mother flees the country to avoid debt collectors. Her very strict grandmother runs a traditional Japanese inn, demands that she start working at the inn, and shows little patience for anything less than perfection from her staff. Currently about 1/2 way through airing in Japan, and streaming at crunchyroll. Wikipedia entry.

Nichijou
Very funny school-life gag comedy; basically, take some girls who look like they’ve escaped from Lucky Star, drop them into Sayonara Zetsubou Sensei, then turn the weirdness knob to 11. When I walked in, the girl on screen threw a Frisbee for her dog, then trap-shot it with her handy shotgun just before the dog grabbed it. Then it started getting strange. Currently running in Japan and streaming on crunchyroll. Wikipedia entry.

あの日見た花の名前を僕達はまだ知らない
Otherwise known by some people as “that anime with the title that’s way too long to remember,” and known by me as “that anime with the long title that surprisingly I can understand, yet still has nothing to do with the story.” Kind of a combination drama / mystery. A group of childhood friends drift apart after one of them, Menma, dies in an accident. Years later, her ghost appears to one of them, asking him to fulfill a wish she made years ago but cannot remember. The catch is that the old group has to be reunited to do so. Currently running in Japan; I think the next episode is #9 out of 11. Link to Wikipedia Entry.

Gin Tama
A comedy in which 19th century Japan is conquered by aliens, and a former samurai has to do odd jobs to pay the rent. Currently running in Japan. Here’s the Wikipedia entry. There are 200+ episodes available on crunchyroll; I’d be watching this right now if I wasn’t already 161 episodes into Bleach.

Soredemo Machi wa Mawatteiru
Surprisingly well executed comedy about a high school student who works in a maid cafe that never seems to get any customers. Completed, 12/12 episodes. Wikipedia entry-poko.

To Love Ru
More or less standard harem anime, except the main female character is an alien from another planet. No wait, that’s still within the standard. Somewhat funny, but nowhere near Gin Tama. Finished in Japan three years ago. Wikipedia entry.

Amagami SS
Yet another anime made out of a dating simulation game. The funny thing is that the game upon which this is based came out during my first trip to Japan, and I saw posters and demos for it everywhere. Watching it on the big screen, it seems so easy – the poor guy makes stupid mistakes, yet the girl still falls in love with him. Conversely, when I’m playing Tokimeki Memorial 3, none of the girls ever agree to go on a second date with me, yet they keep rabbit-punching me in the back of the head because apparently I’m not paying enough attention to them. Wikipedia entry.

There were also several that I saw that didn’t make it above this line…

Quote of the day

March 3rd, 2011 Quotes

There is value in being able to implement a linked list. There is no value in doing so more than once.