mahiwaga

I'm not really all that mysterious

it's never enough (successfully migrating from mephisto to simplelog)

When you get down to it, Mephisto has all the things I want in a blog engine. Non-crufty permalinks. (Only Wordpress formats its permalinks similarly, although you can easily get this from Blosxom.) A clean interface (Simplelog is probably the only one that is as clean.) A templating system that doesn’t utilize nested angle-brackets (something that every single templating system out there has a problem with, except for Liquid, XSLT, and Erubis.) A templating system that strives to separate business logic from presentation (this is something I hate about PHP, and it’s the thing that drove me away from Wordpress and which keeps me away, despite the fact that it has been the easiest blog engine to deal with so far. This is the thing that I love about XSLT despite its obtuse, arcane syntax. This is what I fear about Erb, because it makes it so easy to insert Ruby into your templates, leading to the potential of a PHP-like mess. Granted, Ruby is a much cleaner language than PHP, but still.)

Unfortunately, to get the most out of Mephisto, you’ve got to be running trunk, and trunk requires Edge Rails. Not that this is immediately a fatal flaw, but for some reason, ever since trunk stopped working with Rails 1.2.3, I haven’t been able to get Mephisto running stably. I keep getting that dreaded 500 error. It doesn’t help that I’m running on shared hosting using Apache and Fast CGI. It doesn’t help that it looks like Googlebot and Yahoo Slurp has been beating the crap out of my host.

Sometimes you’ve got to say enough is enough.

So Simplelog. It’s fast. It’s quick. Faster than Mephisto. Way faster than Typo, which is unfortunately extremely bloated. Simplelog looks pretty nice, too, what with the shading in the title bar that for some reason makes me think of an Apple Macintosh.

The down side. Little nitpicks, really. No dashes allowed in the tags. Underscores instead of dashes in the permalinks. (I’m pretty confident I can fix this with either .htaccess or config/routes.rb.) Crufty permalinks with past in it. (Again, .htaccess or config/routes.rb will likely save the day.) The template engine is Erb, which likes to utilize nested angle-brackets sometimes, and in which it can be tempting to throw in business logic. (Is it possible to use Erubis instead? Hmmm.)

Let’s see how long I’ll keep running this before jumping back to Mephisto.

(Actual tips and tricks on how to migrate to follow!)

posted by Author's profile picture mahiwaga

i am seriously dying

I just wanted to say that there is a beautiful girl sitting across the room from me and it just reminds me how fucking hopeless I am. Hahaha.

Ah well. It’s just too damn late, man. It’s just too damn late.

posted by Author's profile picture mahiwaga

migrating from mephisto to simplelog

So I managed to teach myself how to use Rails a little, mainly, how to utilize the magic that is ActiveRecord (which unfortunately probably took me at least 48 hours of sustained effort spread out over the last six days.) ActiveRecord makes me almost forget that I’m dealing with a SQL database. I don’t have know any arcane syntax. I just have to know Ruby, which is an extremely Zen-like thing to know. (I know it’s a stereotype, but, damn, you’ve got to hand it to the Japanese.) OK, I’m oversimplifying. I haven’t really gotten the hang of join tables, but its nothing that convoluted kludgery can’t get around.

As an aside, despite the fact that Rails rewards “convention over configuration”, I find it amusing that Typo, Mephisto, and Simplelog all store their data in slightly incompatible ways. You would think that there are really only so many ways to deal with blog entries. Oh well. Such is the open source world, is it not? A wondrous buffet of parts that don’t quite match and which frequently need, uh, retooling. (And yes, I purposefully chose that mismatched metaphor to prove my point.)

Mephisto→Simplelog Conversion Scripts

Well, without further ado, here is my take on a converter from Mephisto to Simplelog. It has been tested exactly once, with the apparently successful migration of my entries and comments from Mephisto to Simplelog without too much bloodshed. Still, you have been warned.

Download: mephisto_to_simplelog.tar.gz

This code is released under the GPL version 2.

Untar this file in $RAILS_ROOT, i.e., the top level directory of the Simplelog application.

cd /path/to/simplelog tar xvfz /download/directory/mephisto_to_simplelog.tar.gz

Due to historic accident and sheer laziness, the converter is split into two files: mephisto.rb and mephisto_comments.rb. The former only imports articles and tags. The latter only imports comments, and will only work after you’ve run the former.

Instructions

  1. Make sure you’ve at least installed the database schema for Simplelog. If you don’t know what this means, just install Simplelog as described on the Simplelog wiki. Once the schema is in place, I recommend backing it up so you don’t have to go through the whole process again in case the converter nukes it.

  2. Import your articles and tags: ` ./script/runner db/importers/mephisto.rb `{: .block}

  3. Import your comments: ` ./script/runner db/importers/mephisto_comments.rb `{: .block}

I would highly recommend running this only on an empty Simplelog install, although I will admit that I ran it on an install that already had a few entries in it. Hopefully you remembered to backup your database, right?

NOTE: You have to have unique permalinks, otherwise the comment importer may not work reliably. The way I wrote it, it isn’t possible to import entries that have the same permalink, but the script can be easily hacked to get around this by deleting a few choice lines.

Other Known Issues

  1. I forgot that Mephisto stores times in UTC, and Simplelog seems to use localtime. I haven’t investigated this thoroughly, but suffice it to say that there is a time discrepancy between the entries from Mephisto and the entries that I’ve created using Simplelog.

  2. All your tags that used to have punctuation in them will no longer have said punctuation. This is apparently the way Simplelog wants it, and you’d have to muck around with the code to make it otherwise.

  3. There is no migration of assets because, well, Simplelog doesn’t manage assets.

  4. While the basename of your permalinks (the so-called slug) should be preserved exactly, your path names will change. Whereas Mephisto favors http://domain.name/archives/yyyy/mm/dd/slug, Simplelog favors http;//domain.name/past/yyyy/mm/dd/slug. Nothing that a little tweaking of .htaccess or config/routes.rb can’t fix.

Miscellaneous

The class definitions for Mephisto live in the mephisto/ subdirectory, which contain the bare minimum code to be able to access a Mephisto database via ActiveRecord. If you want to play with them while running ./script/console, you can just require 'db/importers/mephisto_requires.rb'.

posted by Author's profile picture mahiwaga

clinical definition of blogorrhea? (damn Lord Byron)

I don’t know why. I’ve been once again obsessed with the sad and sorry life of Severus Snape, and how he lost the only woman he loved, and how his life was effectively ended after she was murdered.

Thinking about it makes me physical ill, and yet I can’t help but obsess.

Needless to say, this is mostly due to the disturbing parallels between my life thus far and his sad, pathetic story.

No, no, this is not to say that I was not loved as a child. In some ways, it’s like I grew up with three sets of parents. This, of course, has its own pitfalls. But surely there is still an important difference between dysfunction and non-function. Oh yes, I had a dysfunctional childhood, that at least is clear, especially since my mother, of all people, has at last admitted as such.

I wasn’t beaten. Much. Definitely not hard. No black eyes or bruises. Maybe red marks and welts from belts and slippers, but definitely nothing to call Child Protective Services over. And while my dad was/is very good at psychological warfare, and was pretty good at leveraging the threat of violence, he never hit my mom.

And while my parents haven’t exactly been the epitome of, ah, marital bliss, they somehow managed to stay together, despite the affairs and the arguments and the accusations.

I wasn’t poor, either. I wasn’t rich, but who really was rich in the 1980’s besides a bunch of crooks who are now working for the Bush Administration, selling oil, or selling cocaine and heroin? See, it’s not really the absolute amount of wealth that defines one’s means. It’s the gradient.

So, while I had reasonably new clothes that weren’t full of holes, and I even had a car in high school (albeit a car that was 10 years old, had 120,000 miles, didn’t go over 80 mph, and had been in a massive accident), it didn’t help that I was around people who had new clothes every week, who went on trips to Europe, and who got Lexuses and BMWs when they turned 16. Hilariously, the tactic of sending me, my brother, and my sister to private school ended up teaching us to hate the bourgeoisie, never mind the fact that we are part and parcel of the whole system anyway. We all ended up opting to go to public universities afterwards.

Sure, I grew up hating myself. What self-respecting teenager doesn’t have a well-developed sense of self-loathing? Maybe the only fault—though it wasn’t an uncommon mistake—was the fact that I had full-blown clinical depression for at least a couple of years, and no one really gave a shit about it.

Let’s just say that my mind has been conditioned to see the dark side of everything, and it is probably unavoidable that I see myself as not having a very happy childhood. There were definitely some really good moments, but none of them ever lasted, and a lot of them went very badly indeed.

I did have a girlfriend when I was 16. Nevermind that our courtship was in many ways excruciatingly painful, as she dated a couple of guys and told me all about it before she finally decided to be with me. Maybe that’s the happiest I’ve ever been. I think I was in love. Not that I can confidently say that I know what love is. But it was something.

I sometimes pat myself on my back whenever I think about how she tried to win me back after we broke up. Not that it matters much. She’s married now and has a kid, and has at last stopped talking to me, which has always been how I figured it would turn out.

Oh. Why did we break up? She slept with another guy.

Oh, I recognize that most adolescent romances never go anywhere, but surely there are less traumatic ways to end a relationship.

Actually, the older I get, the more bitter I become about it. Not everyone gets their heart completely mutilated at the age of 18, you know.

Which leads me to the thing that I find the most painful, because there is absolutely no one to blame. Even twelve years out, I still wonder, even though it has no relevance at all on real life.

If I hadn’t had my heart destroyed first, would I have had a fighting chance with the Woman of My Dreams?

This is where the whole Severus/Lily thing totally turns me inside-out. There is a woman whom I have been friends with for almost 13 years, but I fell in love with her, and I think that screwed everything up. And maybe it wouldn’t have gone down that way if I didn’t fall into a great big gaping pit of despair that one September evening 12 years ago, when my girlfriend told me she fucked some guy. Maybe I wouldn’t have been so needy and desperate and helpless and hopeless and unable to function as a human being. Maybe I could’ve been a better friend, and there wouldn’t’ve been this awful distance between us that I never dared to cross until it was too fucking late, and even then, maybe it wouldn’t’ve mattered.

I’ve lost a lot of friends along the way. Well, not lost, not in this hyperconnected world we live in, where I can always IM them or message them through Facebook or Myspace. But they’ve definitely dropped out of my life. There used to be a time when I would call my oldest friend in the world at least once a month, if not once a week. At least drop him an e-mail, see how he’s doing. My aforementioned ex-girlfriend, after we started talking to each other again, about five years after we broke up, used to call me up pretty often too. I last spoke to her maybe two years ago? Though I still hear about her from time to time thanks to the bizarrely provincial nature of the neighborhood I grew up in L.A.

The only people I see now with any regularity are my parents, my brother, and my dog. Oh, I hear from folks from time to time, but its never the same.

The upshot of all of this is that I’ve never been so alone in my entire life. If I worked in a cubicle, I bet you I could go for weeks on end without really talking to another human being, excepting the transactions over the counter or through a drive-through window. As it is, my job requires me to engage and gain the trust of human beings every single day. It’s a wonder I can do it all, considering how completely burnt-out my soul feels sometimes.

Thank God for happy pills, I guess.

But She… She has always been a good friend to me, despite my raging madness, despite my more-than-occasional boorishness, despite my lack of social grace, despite my bitter melancholy, despite the fact that I don’t answer the phone or return messages and never check in and say hi and ask how her husband and her kids are doing. Even when she had started dating her now-husband, and I ran away, crushed, defeated, directionless and unmoored, she sent me a card telling me that she missed my friendship. She even went on a road trip with two of our friends to visit me for my birthday that year.

When I had to make rushed plans for a clinical rotation in my fourth year and she was pregnant with her first child, she agreed to let me stay with her, her husband, her brother and his family because I didn’t have anywhere else to stay.

Whenever I make my way back to their neighborhood, she and her husband always make sure to meet up with me, however briefly.


The whole falling in love thing screws up a lot of good things, I guess. I think about Severus and his friendship with Lily. Here was a woman who always looked out for him, who treated him with respect, and who had insight into the good things about him.

Someone else brought up this passage and it sticks to me, how Lily could see in Severus what no one else seemed to:

“Really?” whispered Lily.

“Definitely,” said Snape, and even with his poorly cut hair and his odd clothes, he struck an oddly impressive figure sprawled in front of her, brimful of confidence in his destiny.

You never get the exact time course of how everything fell apart. Did Severus get drawn to the Dark Arts precisely because he felt that this kind of power would be the only way he could keep James from taking Lily out his life? (Shades of Anakin Skywalker seep in.) That this was the only way he could keep himself safe from James and Sirius? Or was it because besides Lily, only the Death Eaters treated him with respect, recognized him for the powerful, talented wizard that he was? Only the Death Eaters gave him a sense of actually belonging, of being wanted.

Would he have had a chance with Lily if he had decided to eschew the Dark Arts and reject Voldemort?

Like all “what if” questions, there are always at least two equally correct answers, neither of which help with resolving anything.

On one hand, anything that is not expressly forbidden by the Laws of Physics (or, I suppose the Laws of Magick, in this case) is always possible, and in a possibly infinite universe (whether in terms of time or space or both, since the two are interwoven), everything that is possible is actually inevitable given enough time.

On the other hand, clearly we are asking questions about an alternate universe from which we cannot obtain any information from, meaning that, since it didn’t happen, then there was no chance of it happening. The arrow of time turns even random chance into Fate. In other words, the answer is maybe, but it doesn’t matter now, does it?

I’ve long stopped asking “what if” questions. Though in moments of weakness, I will slip.

Severus’ “what if” haunts me because it is my “what if.”


But the more important question is this: if Severus did not fall in love with Lily, if Severus had understood what a good friend she was, and loved her back as a friend and nothing more, would it have gone down completely differently? Would he have striven harder to always have her back, to always support her, even when making decisions like deciding to marry James? Would the draw to the Dark Arts not matter, because he wouldn’t be so desparate to keep her in his life, because he would understand that she really cared for him in her fashion, and that this wouldn’t necessarily change just because she didn’t have romantic feelings for him, and that her friendship was enough of a sense of belonging for him? Would it have mattered if he realized what she saw in him, and even though it didn’t mean that she loved him in That Way™, it was still important, such that he would strive to always be someone who lived up to that ideal?

I suppose, in terms of the plot, it wouldn’t’ve, because Lily would’ve probably still been killed, and Severus would’ve still stood against Voldemort because of it, and because of his talents for occlumency, he still would’ve been the best man for the job of infiltrating the Death Eaters.

But maybe he would’ve been less bitter, knowing that, although he didn’t have True Love™, he had a True Friendship.


I don’t know. It would just be less sad and pathetic. The worst part was the scene where he found a letter Lily had written to Sirius, and ended up keeping the picture of her and her signature. As someone else brought up somewhere else on the Internet, I mean, c’mon, if they were friends, wouldn’t you think he would’ve had a few letters and pictures of her actually addressed to him? I mean, this is just sad and stalkerish.

(Not that I don’t keep everything she has ever written me, but still.)


There has been much written about the fact that Severus follows the long tradition of Byronic heroes. Wikipedia gives this particular definition, which describes Manfred, the prototypical Byronic hero, and which also well describes Heathcliff from Wuthering Heights and Sydney Carton from A Tale of Two Cities:

  • conflicting emotions, bipolar tendencies, or moodiness
  • self-critical and introspective
  • struggles with integrity
  • a distaste for social institutions and social norms
  • being an exile, an outcast, or an outlaw
  • a lack of respect for rank and privilege
  • a troubled past
  • being cynical, demanding, and/or arrogant
  • often self-destructive
  • loner, often rejected from society

I suppose contemporary pop culture has Anakin Skywalker to add to the list. And probably Batman, too.

I would also add Fëanor from The Silmarillion and Léon from “The Professional” Maybe even Cloud Strife from Final Fantasy VII, what with his unassuageable guilt regarding the death of Aeris, his eschewment of human companionship, and his somewhat self-destructive tendencies.


The devastating sense of alienation from the rest of the human race is what haunts me. The rest of the world is mostly uncaring, and uninterested in the hero, but is frequently also hostile, to the point of seeking complete annihilation of the hero, total extirpation from the universe of human concourse, sometimes, even for good reason. (Huh, suddenly Elphaba from “Wicked” also comes to mind. I could probably keep going on and on, in wider and wider tangents.)

And for some damned reason, they always all seem to die violent, unhappy deaths, often alone and unmourned.

I suppose that is one of my greatest fears: to die in a meaningless, anonymous manner, with my entire existence on earth unheralded, forgotten. While, like most people, I fear losing the people who matter to me, I have unfortunately come to the sad, inescapable conclusion that death is unavoidable. As the Flaming Lips sing, “Do you realize/that everyone/you know/someday/will die.” It gives me no pleasure to realize this, but I also recognize that there’s no point in fearing it.

It seems that in some ways, Time and Fate have been honing me into some sort weapon. Not like some superhero ninja, James Bond-like, Takashi Kovacs-like, Jason Bourne-like weapon, but a moral weapon, meaning that whatever cause I find myself attached to, I will feel that it is my moral obligation to see it to the bitter end. I won’t be able to stop it.

In other words, it sometimes feels like the rest of my life has nothing left for it but the preparation for death.


I freely admit that this is not a normal thought for someone who is only 30 years old. In many ways, my life is still beginning. An astute clinician would simply chalk this up to being yet another symptom of my intractable depression. But like the Byronic heroes I’ve mentioned, there is this sense that a watershed moment has passed. The one possibility in my life—however infinitesimal the probability—that might have given me lasting happiness has passed, and there is no turning back. There is only onward to the black abyss of oblivion.

I do wonder what might’ve gone on in the mind of a character like Severus Snape. Once Lily’s friendship was lost to him, did he just throw himself coldly, calculatingly, into a bid for power as a Death Eater? Did all he have left was his work? Always realizing that he would never get over her, having this empty feeling continuously gnawing at his soul? And no matter what triumphs and victories he might achieve on the Dark Side, nothing he did could give him lasting happiness. And maybe he thought to himself that this was the worst it could possibly get, to live a life devoid of any passion, only this playing of a game, and while the magic might give him ephemeral joy, the emptiness afterwards was always worse.

Maybe he could seek small solace in the fact that at least there was someone like Lily in the world, someone who could see something noble inside him, someone who tried to bring out the best in him, someone who had actually once cared about him. Maybe that little scrap of sentiment was enough, however pathetic it was.

But just when he thought it couldn’t possibly get any worse, it did. Not only was Lily destroyed by Voldemort, but he even became an indirect reason for it, when he relayed Trewlaney’s prophecy. He might as well have torn out his own soul and cut it up into little pieces to be blown into the wind. How many days, weeks, months, did he feel that cold, emptiness weighing down at the pit of his stomach. How many times did he replay all his memories over and over again, knowing it was all in vain, knowing that nothing he could do could ever make things right again? Awash in this numbing realization, perhaps he floated right through those meetings with the other Death Eaters, not really all there, his heart trapped entirely in his self-misery. He played his part as a spy like a puppet, an empty, hollow shell of a man.

One day maybe, he no longer felt a damned thing. Just utter numbness. He thought nothing of it. He had stopped thinking of either past or future, merely reacting to the present as it unfurled itself.

Until the day he saw her eyes again, borne by her son, and unravelling all the careful defenses he had laid around his heart like the hundreds upon hundreds of foldings of Masamune’s swords.

The fits of rage and passion that he is caught up in are not characteristic of a skilled occlumancer. And even worse, faces from his unhappy past are dredged up back to haunt him. Remus Lupin. Sirius Black. And while Harry Potter has his mother’s eyes, he also has his father’s looks and manner about him.

Alan Rickman does an excellent job with portraying the anguish roiling inside this character, all while trying to hold it in. When I first read the books, I didn’t think he really fit the role. But I guess he is a talented actor, and the character came to fit him anyway.

And while he still is cold, calculating, and unflappable, there are significant moments that betray him.


I wonder, was he like Sydney Carton, believing that no further good could possibly come out of his life, and that his eventual destruction would actually be a good outcome? Did he believe that there was no further possible hope for happiness in this life, and that all he could do was see this thing through, and—whether he failed or succeeded—reach the end of it all?

Or was he like Iñigo Montoya, fixated only in achieving vengeance or at least die trying, not even thinking at all of what might happen afterward? Live or die. Same difference. No point in thinking about it until this thing is completed.

Particularly with the way Rickman plays him, Snape does not seem like the kind of guy who has big plans after this whole Lord Voldemort thing blows over, who thinks of maybe buying a small place up in the mountains to get away from it all once in a while, and maybe invest a little in a few bluechips to squirrel something away for retirement. In many ways, he’s like a dead guy who just hasn’t stopped moving yet. He lives and breathes, but the soul is just evaporated, burnt out, nuked.

Why is it that I know this character all too well?


When you’re in excruciating pain and unending torment, the cessation of these sensations can mean one of two things. (1) Whatever it was that was hurting you has stopped, and you can now get up and get on with your life or (2) you are so badly damaged that you can’t even feel pain anymore, and it’s only a matter of time until the final darkness comes to take you away. When you get right down to it, I suppose I would rather suffer and have some hope for joy, than be numb and unfeeling. The days where I don’t feel a goddamn thing are the worst days. When I feel enough to want to weep and feel sorry for myself, at least I know I’m still alive. Otherwise, it’s like being trapped in a waking nightmare, unsure of whether you’re really there or not, and not giving a damn either way.

Today, for some reason, I had an acute attack of “I want to live” but I’m afraid I’ve spent way too much time setting myself up for a Byronic fall from grace to call it quits now. For the longest time (for the last nine years at least) I’ve been convinced that it’s all over, and nothing good is ever going to happen to me again, and the best I can hope for is to bask in the reflected glow of other people’s triumphs and milestones, and maybe someday I might die a meaningful and heroic death. While this fate may still be true, and I’m not holding my breath to wait for the universe to prove me wrong, I suddenly got the urge to want to jump off of this fasttrack to oblivion.

I want to get over it. Suddenly, I want to cash out and buy into the American Dream. Buy myself a house with at least 15% down in some upscale, rapidly gentrifying neighborhood. Make myself a little money, maybe buy myself a nice car. Maybe even find myself a trophy wife. It’s not love. It’s not kismet. But it would be human. I could actually join the human race. You know, talk to women like I wasn’t some kind of freakish outcast, some diseased pariah who had no place in human discourse.

I mean, if E.T. can win the hearts and minds of Americans, why can’t I?

And then reality slowly rebounds, springing back at me like a deformed mattress, and I wonder to myself, can I really reverse a decade old death wish now? You know, throw the whole thing in reverse? Somehow make up for lost time and repair the stunting of my wounded soul?

I have never been an optimist, and I’m going to be hard pressed to start being one right now.

But: Why not? Whatever isn’t expressly forbidden by the Laws of Physics is always theoretically possible.

To quote Charles Bukowski: “If you don’t have much soul left and you know it, you still got soul.”

I’m not dead yet, and with any luck, I won’t be any time soon. Here’s to hoping.

posted by Author's profile picture mahiwaga