Home

Previous 20

Dec. 14th, 2008

tachikoma valentines

What kind of a first-world country relies on overhead power lines?

One year ago, Storm Leaves Northeast Buried in Snow:

A pre-winter blend of snow, sleet and freezing rain cut visibility and iced over highways from the Great Lakes to New England, dumping up to a foot-and-a-half of snow, stranding air and road travelers and causing an airliner to skid off a runway.

The storm knocked out power to thousands of homes and businesses Sunday, including 137,000 in Pennsylvania, at least 10,000 in northern New England and 20,000 in eastern Canada, authorities reported.

I’d take snow over ice any day, though.  This past week, Ice storm cripples north-east US:

As many as 1m people have been left without power in the north-eastern US after one of the worst ice storms in a decade crippled the electricity grid.

States of emergency have been declared in Massachusetts, New Hampshire and in parts of Maine and New York state.

About 1.4 million homes and businesses across the four affected states were left without electricity on Friday morning after a widespread overnight ice storm coated power lines, pylons and trees.

<title/> is an overheard line from a conversation between people forced to temporarily relocate due to the icy storm.

I’ve actually returned home just now; power has finally been restored to my neighborhood (although reports are warning that as the ice melts, trees snapping back to their original positions could cause further outages).  Our house’s heat and running water relies on electricity, so my family grabbed our stuff and escaped to a hotel in Waltham.  Boston and its nearby surroundings were lucky enough to escape most of the damage.  Not so much for other population centers like Worchester, Fitchburg, and Lowell, nor the little town where we live.

At least we’re not in New Hampshire.  Their power grid might not be back in service until Thursday or Friday – one whole week later.

Dec. 11th, 2008

tachikoma valentines

Wow, I suck.

I can't say that I'll post more often, because I probably still won’t.  Sorry.

Google Reader - chibiryuu's shared items does get updated frequently, with stuff I find interesting, so check there for updates if you want to poll for my aliveness.  Also, if you publish a public RSS feed, thank you for making it easy to stalk keep in touch; if you don’t, shame on you for being anti-social.

Anyhow, I was pretty happy to find a graph of RPM over MPH for various gears of a 2006 Civic Si while randomly browsing: its data corroborates my experiences driving my car.

No, I don’t drive up to max RPMs.  (Okay, I did that sometimes, but not very often.  Besides, I’ve never brought 4th gear to max rev: that’s over 100mph!)  It means that I now have numeric quantification for an interesting pattern I’ve noticed:
gear         2000 rpm                3000 rpm
----  -----------------------  ---------------------
1st   14 km/h = 10 km/h + 43%  13 mph = 10 mph + 34%
2nd   22 km/h = 20 km/h + 12%  20 mph = 20 mph +  5%
3rd   31 km/h = 30 km/h +  5%  29 mph = 30 mph -  2%
4th   41 km/h = 40 km/h +  4%  38 mph = 40 mph -  3%
5th   51 km/h = 50 km/h +  4%  48 mph = 50 mph -  3%
6th   73 km/h = 70 km/h +  5%  68 mph = 70 mph -  2%
Rev-matching anything outside of 1st gear is so very simple.  It seemed far too coincidental when I discovered it experimentally, but the numbers back it up.

Notice how the gear ratios get tigher and tigher packed from 1st to 5th, and then there’s that big jump from 5th to 6th?  When I shift by ear (RPM is correlated to pitch of engine noise), that always throws me off.  Basically, shifting by a single gear usually involves a nice-sounding change in pitch — a major third or perfect fifth interval — except for that 5/6 transition, which is a dissonant tritone.

Sep. 22nd, 2008

tachikoma valentines

Assembly review, part 1 of 3

None of this will be new to most of my readers… because I’m pretty sure I have 3 at most, and 2 of them should know this stuff already.  But!  This is for the sake of the third.

Say you’re given a disassembly.  For example, here’s some that might be outputted by objdump -d fun.o:
fun.o:     file format elf32-i386

Disassembly of section .text:

00000000 <fun>:
   0:        55                           push   %ebp
   1:        89 e5                        mov    %esp,%ebp
   3:        53                           push   %ebx
   4:        83 ec 08                     sub    $0x8,%esp
   7:        83 7d 08 01                  cmpl   $0x1,0x8(%ebp)
   b:        77 08                        ja     15 <fun+0x15>
   d:        8b 45 08                     mov    0x8(%ebp),%eax
  10:        89 45 f8                     mov    %eax,-0x8(%ebp)
  13:        eb 23                        jmp    38 <fun+0x38>
  15:        8b 45 08                     mov    0x8(%ebp),%eax
  18:        83 e8 02                     sub    $0x2,%eax
  1b:        89 04 24                     mov    %eax,(%esp)
  1e:        e8 fc ff ff ff               call   1f <fun+0x1f>
  23:        89 c3                        mov    %eax,%ebx
  25:        8b 45 08                     mov    0x8(%ebp),%eax
  28:        83 e8 01                     sub    $0x1,%eax
  2b:        89 04 24                     mov    %eax,(%esp)
  2e:        e8 fc ff ff ff               call   2f <fun+0x2f>
  33:        01 c3                        add    %eax,%ebx
  35:        89 5d f8                     mov    %ebx,-0x8(%ebp)
  38:        8b 45 f8                     mov    -0x8(%ebp),%eax
  3b:        83 c4 08                     add    $0x8,%esp
  3e:        5b                           pop    %ebx
  3f:        5d                           pop    %ebp
  40:        c3                           ret   
Let’s work step-by-step to figure out what this is.

Assumption: cdecl calling convention.

Assumption: fun is a function.  Stuff other than functions can and do end up in the .text section, but this seems to disassemble just fine, so it’s probably executable code.  So let’s start with a skeleton:
… fun(…);

Bytes 0-6 are the function prelude: saving the old %ebp, setting %ebp to the top of our frame, and growing our stack by 0x8.

Quick, what does the stack look like?
....
....^-- arguments are above the return address
....<-- return address
    v-- top of our frame -- %ebp now points here
....<-- the eight bytes of our frame
....<-- that we just reserved...
    ^-- bottom of our frame -- %esp now points here

Bytes 7-c compare the literal value 1 to the 4-byte value at an address 8 bytes above %ebp — in other words, the first argument — then if (unsigned)arg1 > 1, we jump to byte 15 (ja is the unsigned version of jg, jump-if-greater.)  Now we know that fun takes at least one argument, the first of which is an unsigned 4-byte value, so:
… fun(unsigned arg1, …);

Suppose we didn’t take the jump, meaning that (unsigned)arg1 ≤ 1.  Bytes d-14 copy arg1 to %eax, then %eax to the bottom of our frame — that’s a local variable.
… fun(unsigned arg1, …) {
    unsigned local1;
    if (arg1 <= 1)
        local1 = arg1;
    …
}


Alright, so suppose that bytes b-c do jump us to 15.  Bytes 15-24 copy arg1 to %eax, subtract 2, push it on the stack, recursively call fun, then save the return value in %ebx.  Bytes 25-33 copy arg1 to %eax, subtract 1, push it on the stack, recursively call fun, then add the return value to %ebx.  Bytes 35-37 then take %ebx, the sum, and saves it to what we decided to call local1.  From this, we can gather that fun takes a single argument, since that’s all we push onto the stack before calling it, and returns a 4-byte value, since we treat %eax as one:
unsigned fun(unsigned arg1) {
    unsigned local1;
    if (arg1 <= 1)
        local1 = arg1;
    else
        local1 = fun(arg1 - 2) + fun(arg1 - 1);
    …
}


Bytes 38-40 copy local1 to %eax — the return register — then go through the standard teardown of our frame and return.  We’ve completed analyzing this function:
unsigned fun(unsigned arg1)
    unsigned local1;
    if (arg1 <= 1)
        local1 = arg1;
    else
        local1 = fun(arg1 - 2) + fun(arg1 - 1);
    return local1;
}


That looks very familiar… almost like a naïve Fibonacci number generator!  In fact, if we write this:
unsigned fib(unsigned n) {
    if (n <= 1)
        return n;
    return fib(n - 2) + fib(n - 1);
}
and pass it through gcc -S, it outputs this:
        .file  "fib.c"
        .text
.globl fib
        .type  fib, @function
fib:
        pushl  %ebp
        movl   %esp, %ebp
        pushl  %ebx
        subl   $8, %esp
        cmpl   $1, 8(%ebp)
        ja     .L2
        movl   8(%ebp), %eax
        movl   %eax, -8(%ebp)
        jmp    .L4
.L2:
        movl   8(%ebp), %eax
        subl   $2, %eax
        movl   %eax, (%esp)
        call   fib
        movl   %eax, %ebx
        movl   8(%ebp), %eax
        subl   $1, %eax
        movl   %eax, (%esp)
        call   fib
        addl   %eax, %ebx
        movl   %ebx, -8(%ebp)
.L4:
        movl   -8(%ebp), %eax
        addl   $8, %esp
        popl   %ebx
        popl   %ebp
        ret
        .size  fib, .-fib
        .ident "GCC: (GNU) 4.2.4 (Gentoo 4.2.4 p1.0)"
        .section       .note.GNU-stack,"",@progbits
So we pretty much nailed it on the head.  (As to be expected from a simple example like this.)

Jun. 26th, 2008

tachikoma valentines

Bleh

So I'm driving home from work today, and being distracted because the cold engine's autochoke makes the shift points feel funny. As I exit the parking lot and get onto the road, BOOM. I've hit the curb.
W. T. F. I drive this way *every single (week)day* and never does this happen.
Half a mile down the road, I realize, "oh %$#@, the tire's flat". So I pull off onto some random driveway and change to the spare, but GYAAARGH it sucks.

Last night I tried beating Metroid Prime 3 again. I've been stuck on the final boss for months now. After another series of failed attempts, I went upstairs to beat on the walls instead. Much less painful.

Dear old laptop, you're supposed to be high-quality hardware. Why are you breaking? The keyboard has been on the fritz for the past week or so, and is now totally dead.

Other shoddy hardware: the LCD hooked up to my desktop started dying last year, unable to sync the video signal, and it's gotten worse to the point where it will no longer display an image.

However, unlike the above complaints, this last one has actually been resolved: today I have a new Acer P223Wwd, veeery nice.

Apr. 28th, 2008

tachikoma valentines

Birth of a new in-joke


rotfl.

I feel like if I don’t explain, those who weren’t there will be utterly confused by this post.  But it’s not funny enough to warrant an explanation…



So I once again missed my weekly post, oops.  Some past events:
  • Ubuntu 8.04 Hardy Heron is released.  Fedora 9 is delayed by two weeks.
    That being said, I’ve dropped both Ubuntu and Fedora for my own personal use, as both have demoted PowerPC support.  Now going Debian and Gentoo all the way!  Even if releases are slow, at least they’re still well-maintained.
  • A couple weeks ago, I bought a new car.  Vroom vroom.  For those of you who want to borrow it to learn how to drive a standard: get ’yer own!  ;)
  • Current soundtrack in my car: Metroid Metal.  This marks the first music I’ve actually paid for in… a long time.
  • I am 90% through Gitaroo Man for PS2 on normal mode.  So hard.  Somebody needs to help me beat that un-frigging-believably impossible last level.
The end.  Well, there’s probably other interesting things that have happened, but nothing immediately recallable.  Hurray for having a sieve-like memory.

Apr. 19th, 2008

tachikoma valentines

Upon exiting “Forbidden Kingdom”

me: What did we learn about mythology?
poo-chan: Nothing.
khan: It’s freely interchangable.

(correct me if I got your lines backwards…)

Apr. 13th, 2008

tachikoma valentines

Awesome misconceptions

No, Poodle, you don’t need a special license to drive a stick shift.

Apr. 7th, 2008

tachikoma valentines

Linkage

Via Lemonodor:
what's south of the Land of Lisp?

Via elfsIs homophobia associated with homosexual arousal?

On that note, via Biella ColemanMajor breakthrough in Christian genetics.

Okay, enough of that.



Back in the day, I used to visit a bunch of websites regularly.  This list of websites went through several revisions.

Version 0:  Whatever I remembered.  Unfortunately, I have a very porous memory.
Version 1:  I kept a master list of “interesting stuff” in a HTML file in my homedir.  This kinda worked, but would get out of sync between my different computers, and occasionally was lost when I accidentally deleted it or when a hard disk crashed.
Version 2:  del.icio.us.  It was pretty good; I still use it for keeping up with webcomics which don’t all have feeds.
Version 3:  Akregator, a news feed reader for KDE.  It still had the problem of being out-of-sync between different machines and being lost in hard disk crashes.
Version 4:  Google Reader.  Not only is it a wonderful interface I can access from anywhere, from almost any browser (not very compatible with Opera and Konqui, but works fine on my n810), but also it’s got better keyboard shortcuts than most desktop feed readers!  Soon, Akregator synchronization with Google Reader will make life even more awesome.

As a side-effect of moving to news feed readers, though, I’ve been dropping any blog or site which lacks public RSS/Atom feeds.  Any former friend on Xanga/LJ who doesn’t have a public feed: dropped.  Any news site which doesn’t have a public feed: dropped.  Any … well, you get the point.  Webcomics are an exception, because too many that I don’t want to give up quite yet are feedless.

(BTW, Poodle!  Write a RSS/Atom generator for your blog already!)



So what do I follow nowadays?  Lots of math and CS blogs; development of Linux, KDE, Gnome, Haskell, Lisp, Perl, Ruby, etc., tech news like ars and Phoronix, and…

In the “cute” folder: Cute Overload, I CAN HAS CHEEZBURGER?, Lambdacats, Let’s be friends (hasn’t updated in a while), Meme Cats (hasn’t updated in a while), Stuff On My Cat, and The FAIL Blog, which isn’t cute, but falls into the general category of image macros, and is horribly amusing.

Apr. 1st, 2008

tachikoma valentines

Seriously, I do not consume caffeine

Mar. 30th, 2008

tachikoma valentines

I’m back?

I missed the LiveJournal content strike.  Or maybe I participated in it, since I was too busy to be using LJ…

On Wednesday I went to a piano recital held by an acquiantance I haven’t seen since high school; there were lots of other people there that I haven’t seen in ages, mostly former classmates, but I ran into my old boss from a previous job too.  Needless to say, there were lots of people whose faces or names (or both) I’d forgotten in the intervening years… sigh.  At least the music was wonderful and amazing.

I found a pack of simfiles that turned out to be a lot of fun.


A couple weekends ago, Khan got Smash Bros. Brawl and invited Poodle, ’baasan, and I to come over and play.  We ended up playing all night, it was pretty awesome.  Last weekend J and I raided Khan’s for the Wii (Smash) and PS2 (Katamari Damacy), that was great too.  On the downside, it means that I’ve been missing my weekly dose of Metroid Prime 3 and Hayate no Gotoku for a while now…

This weekend, I drove down to J’s place to replace a computer fan that had died a horrible screechy death.  We dragged Poodle along and attended the local sci-fi/fantasy/anime/gaming convention.  I came back with a wallet about $100 lighter (in exchange for manga; GSC Revised 1-4 and Translucent 2-3) and a few sticks of Pocky from winning at the 2-hour “Name That [Anime/J-Pop/Game] Tune” panel.  (Not to brag, but I won quite overwhelmingly.  It was great fun.)  Most importantawesomest of all, though, we attended a panel by the artists/writers of The Devil’s Panties, Questionable Content, Minimalist Stick Figure Theatre, and xkcd, and I got to play some DDR.  I got A’s and B’s on 1234 while J and Poodle switched off.  Lazy slackers :P

Mar. 11th, 2008

tachikoma valentines

Smorgasbord

ephemient
http://maria-sama.rightstuf.com/
wow
add up the prices for the preorders, comes to about $100 for all three seasons
khan32k1
whoa
rightstuf has marimite?
ephemient
they do now
khan32k1
hmm
i'll have to preorder sometime in june
ephemient
why in june?
khan32k1
comes out in july

khan32k1
man
I want marimite
ephemient
hehe
judging by the responses on AoD, ANN, ALC ML, /u/, etc... I think RightStuf got like thousands of preorders as soon as it was announced
khan32k1
marimite is a really popular series
ephemient
for a series with no action and fairly low-key humor and other lacks of common exciting features, it's pretty darn popular
I mean, it's really just a (good) slow character drama, right?
khan32k1
heh
yeah


[ ウッーウッーウマウマ(゚∀゚) a.k.a. Caramelldansen is eating my brain.]


I’m considering buying a VPS from Layershift or Linode.  Not having a school UNIX account means that the number of Linux machines I can play around in is limited to the number of machines in my home, and these guys have way more bandwidth than I do.

Also stole dad’s PCI System Architecture and Understanding the Linux Kernel books while he’s on a vacation business trip.  (His car, too.)

Aside from the fact that they presently make up at least a quarter of my real-life manga collection, what do these series have in common?
Hana-Kimi, Kashimashi, Ouran High School Host Club, Pretty Face, W Juliet, Yubisaki Milk Tea
(Heck, a couple pages in the first volumes of Hayate the Combat Butler and One Thousand and One Nights (the manhwa) qualify too.)
Man, can I pick ’em or what?

Mar. 3rd, 2008

tachikoma valentines

Epic

Watching Moyashimon right now.  Up to episode 10.
ROTFL.  Kei pulls it off even better than Ayumi Saitō.
(Spoiler warnings if you click through to the Wikipedia links, of course.)

Feb. 28th, 2008

tachikoma valentines

It’s easier to post videos than to think of stuff to write

Taking down a cabbage with a tennis ball cannon:


Taking down a tree with a gatling gun:

Feb. 22nd, 2008

tachikoma valentines

(no subject)

Oops, missed my self-inflicted “post at least once a week” schedule.

To make up for it, here is a video:

Feb. 14th, 2008

tachikoma valentines

(no subject)

Feb. 13th, 2008

tachikoma valentines

Living in a material world

Being a full-time employee is weird.  I get semi-weekly paychecks, health insurance, retirement funds, and daily snail-mail offers for pre-approved credit cards.

20% of my income goes to taxes.
25% of my income goes to savings.
A small portion goes towards student loans.  This proportion will rise as the grace periods on various loans expire.
A majority of the remainder goes to household expenses.

I have a new Nokia n810.  I’m not sure how much Verizon is charging me for GPRS usage, but most of the time I use WiFi.  Works awesomely well.

As it is no longer practical for Dad and I to carpool to work, I need to procure some means of personal transportation.  Sadly, nobody makes good, cute cars anymore.  The VW Bug is too unreliable, the Cooper is too expensive, the Miata is too small.  The RAV4 was cute for one generation, but then they steroid-ized it.  I am strongly considering the Civic, though I’m disappointed by how it got fatter in 2001 and restyled in 2006.

Relatedly, planned tasks for the house are a garage expansion, driveway repavement, media center, repainting, re-roofing, …

And I want to upgrade my desktop, since I bought UT3 but am unable to play due to system specs.
tachikoma valentines

Infrequently Asked Questions

There are many FAQs but not many IAQs.

Sometimes they are sincerely helpful.  Actually, this is a list of ”infrequently answered questions”, not “infrequently asked questions”.
Sometimes they are playful misdirections.  Regardless of experience, anybody can tell at a glance not to trust its advice at face value.
And sometimes they are genuinely deleterious.  Those who know better will laugh their heads off, and those who don’t, will be completely confused.

Feb. 6th, 2008

tachikoma valentines

Happy New Year!

Oh, my poor neglected blog.

[Chinese] New Year resolutions aren’t part of tradition, are they?  Ah well.

I resolve to post something interesting (to me, anyhow) at least once a week.  This week’s:

Laffer Curve
Martin Gardner's Rendition of the Laffer Curve, licensed cc-by

Dec. 7th, 2007

tachikoma valentines

Exactly how I feel

AppleGeeks Lite 234
Tags:

Dec. 3rd, 2007

tachikoma valentines

♥♥♥ 100% WIN ♥♥♥


Lolcats + λ = ??

lambdacats!
♥♥♥

Tags:

Previous 20

tachikoma valentines

December 2008

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

Advertisement

Syndicate

RSS Atom
Powered by LiveJournal.com