Wednesday, September 9, 2009

Moving to Wordpress

I've decided to move my main blog here, akuyume/inside, to Wordpress.

So check me out now on Wordpress!
akuyume/inside on Wordpress

Monday, September 7, 2009

Facebook Chat's Bold and Underline Text and Prodding Facebook Chat on a mission

I never noticed this before, but by placing asterisks around a word in Facebook Chat will bold the word, and placing underscores around one will underline the word. My first instinct was to figure out how to type italic text. Well a few Google searches showed that other people were looking for it as well; so I decided to go "straight to the horse's mouth," so to speak.

Figured the first place to start the search was in the messages that relay chat and see if the HTML conversion takes place there. Now mind you I've already poked and prodded Facebook Chat's message relay server before. Its a MochiWeb server, which you can see in the HTTP headers for chat packets. For more background specifics on the setup that is Facebook chat, see Facebook's engineering blog.

Server: MochiWeb/1.0 (I'm not even supposed to be here today.)

Anyhow, by reading the HTTP packet flow, I can get the "raw" information that the webpage uses to talk to the server. These I believe are in JSON although don't quote me on that, suffice to say I can at least read enough of the raw information they contain to see the message I just received. And sure enough these contain the text just as they would have been typed, that is, asterisks instead of HTML bold tags and underscores instead of HTML underline tags.

So, then this tells me that the replacement of "Facebook Chat style markup" takes place in the user's web browser. Problem is, there's a bunch of JavaScript files attached to any Facebook page. Fortunately for me though with Firefox with the FireBug extension the process of analyzing a web page's code is fairly streamlined.

Going straight to the code generated for a chat window, I noticed that the "pic_padding" class is on each message's node (which happen to be paragraph elements). So I searched for this class in the JavaScript given that is was the best lead I had. Fortunately this lead turned out results.

if(pendingMsgID||errorMarkup){
var pendingElementID=pendingMsgID?' id="pending_'+this.id+'_'+pendingMsgID+'"':'';markup+=''+
299(errorMarkup?errorMarkup:'')+'
';}

And just a couple lines below that, ta-da!

_processStyledText:function(textProcessor,str){return textProcessor(str).replace(/\b_([^_\*]+)_\b/g,'<u>$1</u>').replace(/(\s|^)\*([^_\*]+)\*(?=$|\s)/g,'$1<b>$2</b>');}

Yep, regular expressions. Just what I was expecting. No sign of a regex that replaces something with <i>..</i>. That's right, there is no way to type in italics.

So Facebook, why no italics?

Wednesday, September 2, 2009

Net Window Shopping: Lucky Star and Yotsuba&!

I've definitely decided to become more of a patron of my favorite bookstore. After finding a favorite manga of mine there the other day I decided to check out what books and other media I an order through them. I proceeded with my search and found that I can get both an anime I've dying to get my hands on and manga of which the fan translation I found absolutely hilarious.

My problem will probably be deciding what to get first. Kyoto Animation's Lucky Star fully available, including even the OVA. [Search results]

And from Kiyohiko Azuma, author of Azumanga Daioh, is Yotsuba&!. Completely crazy about Azumanga Daioh (which incidentally happens to be the manga I picked up last week) I read up on its creator and got my hands on a fan translation of Yotsuba, which might possibly be funnier than the work I was originally sold on. [Search results]

Monday, August 31, 2009

Danbooru OS and an anime Danbooru

Just stumbled upon an interesting read on where RDBMS and file systems merge in theory by fuzzysoul. Also happened on an anime Danbooru board, moe.imouto (NSFW, may contain hentai); high-res = love.

Another thing which caught my eye today, 4walled (also NSFW, images are from 4chan); just keep scrolling and keep finding awesome wallpapers...

Friday, August 21, 2009

Welch's Squeezable Strawberry Spread

Is it not logical that when you're making a spread that is supposed to be squeezed out of a small opening you would make a point reducing the size of fruit chunks in the spread? Well apparently that didn't occur to Welch's, as their spread as several large chunks of strawberry which cause the opening to be blocked. Quite frustrating.

Wednesday, August 19, 2009

Anime reviews moved

I've decided to declutter this blog; and thus I've moved my latest favorite category, anime reviews, to their own blog. Check it out and follow along at Akuyume's Anime Blog.

Saturday, August 15, 2009

[ARIV] Welcome to the NHK


Welcome to Welcome to the NHK! (N・H・Kにようこそ!) No, we're not entering anything related to the Japanese national broadcaster Nippon Housou Kyoukai. This, is the Nihon Hikikomori Kyoukai, although apparently by the end of the show the H is interchangeable but lets not go there.

The show follows the life of hikikomori (recluse and acute sufferer of social-withdraw and severe social anxiety) Tatsuhiro Satou. Laden with a few weightier topics, including pyramid schemes, drug abuse (only present in the anime for one character), conspiracy theories, suicide, and Comiket (okay listing that one here was a joke, laugh, I command you). With all of these themes NHK manages to be delightfully entertaining dark comedy. As all the characters have major psychological problems going on I'm tempted to compare it to Evangelion. Some have gone as far as comparing it to The Catcher in the Rye.

Character development is particularly enjoyable, maybe this is a factor of the depth of problems the characters have but nevertheless the characters do feel quite real for the length of the series. And plot clinchers were quite effective on me; and the ending of the series is full of quick twists and given the amount of dark comedy, its actually a little surprising, but I won't ruin it for those who haven't seen/read the series. 8/10.

hit counter