Wanderlust and Emacs for Your Gmail Needs

Wanderlust is quite a nice IMAP client for Emacs. It’s pretty fast and does a great job of handling email. Unfortunately there isn’t much documentation and some of it is in Japanese. To get started you need to install Wanderlust and its dependent libraries. You’ll probably also need this version of ssl.el for sending email. For a mirror of the latest sources go here. Follow the instructions to install those in order.

Once you have those in place, checkout this sample setting for some defaults to get it working with gmail. Also, wanderlust will not show all your folders by default. You need a ”.folders” file to tell it what folders to show. The good thing about this is you can fine-tune the labels/folders you want to display and even create virtual folders (think saved search). Here’s a sample folder file. Notice that the ”%” denotes IMAP folders and ”!” are used for negative conditions.

You might want to study key bindings to get used to them (since they are not the typical ones you expect) or remap them.

For some reason the default sort order is ascending order. Use this setting for the usual (although you need to sort folders again after fetching with “S !Date”.

(add-to-list 'wl-summary-sort-specs 'rdate)

Here are some of the better articles on setting things up to help you out:

Customising Wanderlust

My Wanderlust setup

E-mail with Wanderlust

wanderlust tips and tricks

wanderlust iii

Once you get it set up and working, it’s quite snappy after the initial download and the saved searches aka virtual folders are really nice because you get easy access to things such as “unread messages in an inbox meeting X conditions” or whatever you can dream of. After, you get yourself authenticated run the code below to store authentication credentials. You can flush them anytime.

M-x elmo-passwd-alist-save

Hope that’s enough to get you started.

Hurt Locker

There are a lot of stressful jobs in this world. Stock broker on a New York trading floor, emergency room surgeon, or a bomb squad in Iraq. Hurt Locker follows three soldiers in a explosives disposal unit. Sergeant James is the team leader flown in to replace Sergeant Thompson after he got blown to bits by a bomb detonated with a cell phone held by a terrorist disguised as a meat vendor. Sergeant Sanborn is a tough veteran and Specialist Eldridge is the youngest of the team and provides support to the other two.

Thompson sets the tone early by ripping off the plywood, designed to keep mortars out, from the windows of his barracks because “wants sunlight”. Plus, it wouldn’t be much help if mortars come in from the roof he notes. James has a different notion of danger that is fearless and pragmatic. He also has trouble falling in with standard procedure.

It’s against this backdrop that the movie progresses as it tracks the days left in their tour. The movie isn’t plot-driven but more a collection of gruesome scenes of suspense in the desert heat. It captures the futility of a war without clear enemies as these soldiers go from crisis to crisis against bombs and locals harboring hostility thinly veiled with apathy. It’s a frightening world where bombs assembled with explosives and Radio Shack parts can be planted anywhere and detonated with a cheap cell phone.

James has a taste for danger that’s borderline reckless as he faces down one bomb after another with steady nerves but it grates on Sanborn who simply wants to play it by the book and get out with minimal damage. Eldridge is the young guy torn up inside as he struggles with the ordeal of war and watching people die before his very eyes, leaving him with guilt. James betrays a sensitive and deeply patriotic side of himself despite his appearance as a weary maverick. He’s a natural leader that doesn’t feel alive unless he’s looking into death’s eyes.

The portrayals of the soldiers are gripping because the soldiers themselves are almost caricatures of your stereotypical soldier yet each actor gives their character a raw but multi-layered depth. While the scenes are surreal they do a great job of keeping suspense and tension at a peak. It’s definitely one to watch.

Superman Returns

Superman Returns definitely got the short end of the stick in the super hero comics reboot extravaganza sweepstakes. It’s a shame really, though understandable. Brandon Routh does an eery job of recapturing Christopher Reeves likeness and carrying on the legacy but that’s probably the greatest flaw of this movie, that it tried to carry on the legacy too much. Rumor has it that Warner Bros. wants to reboot it yet again with more darkness because hey it worked for Batman like a charm, so why not Superman right? Well, Batman was always dark. Even when he was wearing purple briefs and molesting Robin behind the scenes you can’t argue that the premise of losing your parents to violent crime as a child and re-inventing yourself to become a vigillante while living a double life isn’t potent with all kinds of issues.

Superman on the otherhand flew in from another planet, with super human powers. Although he lost his parents and the planet he was on, he was raised by loving parents. Superman represents a wholesome America hell-bent on doing good no matter what extremes he has to go through. Sure, he battles villains but he also spends a lot of time fishing people out of their own messes or brushes with bad luck. He’s a well-adjusted guy with a pure heart.

In Superman Returns, we literally find Superman returning after paying what was left of his planet a visit wandering the galaxy much like how a burnt out high-powered executive might backpack around the world. He goes back to the Daily Planet to claim his unremarkable job only to find that the love of his life, Lois Lane, has moved on to a new love and even has a child. To add insult to injury she won a Pullitzer Prize for an article telling the world why they didn’t need Superman.

Lex Luthor is out of jail and up to no good and the world is in chaos as usual. As Superman struggles with his still strong feelings with Lois Lane, he must carry on saving the world and face Lex Luthor. I thought the movie was well done. Nothing really amazing but not badly written. The Daily Planet is a tough sell in this age when all newspapers are struggling and Clark Kent transforming into Superman in broad daylight is hard to swallow when there are so many cameras around us. Also, the 9/11 attacks change the backdrop of New York so fundamentally and with all the terrorism and minor conflicts in the world, it makes you wonder how many Supermans the world needs.

So, I think the main problem with this movie is with framing the Superman universe in a way that’s relevant to the current audience and making Superman human without sacrificing his wholesomeness. I still struggle to understand Warner Bros. reasons for shelving the Superman franchise. I guess the Darknight success had them expecting big bucks but a $400 million box office on a $200 million budget is nothing to sneeze at and full of potential.

The Informant

Matt Damon is a fine actor. He always adds subtle touches to his portrayals. The Informant is no different. He let himself go physically to play a middle-aged executive that decides to blow the whistle on his company. Everything seems to be going well until the so-called “informant” gets caught up in his own web of deceit. It was a somewhat dark comedy but at the same time light-hearted. Matt was pretty funny and convincing as Mark Whitacre. The only failing of this movie is that it lacked punch. There weren’t any comedic highs, just an amusing portrayal of a corrupt company bureaucracy versus a federal bureaucracy. I thought the pacing was a bit off as well since a lot of the climax and twists happened near the end but there wasn’t enough suspense to expect anything like that during the first three quarters of the movie. Still, I found it entertaining and well-written. It’s a shame that subtle movies are simply under-appreciated because both the director and actors were on top of their craft.

Your Brain and Cardiovascular Exercise

It turns out that cardiovascular exercise is really good for your brain. I’ve been getting enough regular cardiovascular exercise to the point that I seriously need my daily kick. I’m not sure if strength exercise has the same kind of effect, probably much less so but even then after a day of thinking and mental exhaustion from battling with the computer. I’ve come home dead tired wanting to do nothing but lie down and die. Usually, I’d obey my so-called instinct only to wake up the next day feeling more tired than when I went to sleep. The funny thing about exercise is that after the first few minutes I feel more refreshed and all the fatigue vanishes. The same goes for anxiety situations. I never quite noticed this before for whatever reason but it’s something I’ve gotten addicted to lately. I can actually feel an endorphin kick setting in after the first 10 minutes of exercise.

The brain responds to cardiovascular exercise quite well, boosting neuron regeneration and releasing endorphins. Some schools are experimenting with making it mandatory to use the treadmill for a session before classes. As a result, attendance is up and so are grades. It makes you wonderer how we’ve managed to stray from something so fundamental.

From Vim to Emacs

The other day pretty much out of the blue I decided to switch my main editor from Vim to Emacs. Well, it wasn’t totally random as these things are. I’ve had to write more Japanese lately and Vim just wasn’t cutting it.

I’ve been using Vim for several years now. Originally I started using Vim out of necessity. I was about to change jobs and would no longer be able to use Textmate as my main editor. I didn’t really know much about using editors back then. I started with Ruby on Rails and that pretty much sold me on using Macs and Textmate. I barely used Textmate for anything fancy other than the odd tab-completion and some odd snippets. I suppose that using whatever basic memo pad editor that comes with the computer wouldn’t have made much of a difference.

However, this being Japan and the chance of using a Mac for programming being quite slim I decided to switch to Vim. The idea was that I wouldn’t be bound to any platform and not have to relearn the use of an editor. At that point the choice came down to Vim or Emacs. Neither of them really appealed to me. I’ve had terrifying brushes with both and tried to stay away from them. With Vim I could get in but not get out. How do I enter something? How do I even quit this thing? With Emacs the key combinations looked like alien code that I couldn’t decipher. In the end I decided on Vim because once I figured out that I needed to be aware of the mode I was in (either navigation or input) then I could stumble with the rest.

Learning an editor like Vim didn’t really make me a better programmer. I did become proficient with keyboard navigation but I still wasn’t using all the features. I did love the fact that I had one setup that I could take with me everywhere. All you have to do is clone your settings directory with all your plug-ins and you could setup shop in a matter of days.

One thing that bothered me about Vim was the fact that inputting Japanese was simply not feasible at least for me. Basically, Vim and Japanese input are modal in nature. When you type Japanese you put in the spelling and then you convert it to the proper Chinese characters. So with Vim you have to go into input mode and then switch to Japanese input mode, convert it to the proper characters, switch out of it and exit input mode. Essentially I stopped writing Japanese.

Another thing was the setup. Although there are now good packages for using Vim out of the box like MacVim, getting the command line version to compile was a chore when setting up the proper ruby and Perl bindings, some things that certain features depended on. I definitely put in too many plug-ins trying to cover all the Textmate features it was missing. In order to extend Vim’s features you could learn an esoteric shell language exclusively written to extend Vim called Vimscript. It’s kind of like Bash but a bit worse. Some people wrote their plug-ins in ruby or Perl and added the bare basic wrappers in Vimscript. I kept a safe distance from it all.

Naturally, with all the plug-ins, including many of a dubious nature, my setup became a bit of a nightmare. Load was a bit slow and plug-ins that did complicated things like matching parentheses and indenting code didn’t quite work sometimes and just got in your way.

Having said that, navigation was quite a breeze and actually quite fun. I could stay on the home row and jump around a file with ease through a combination of letters and numbers. If I was to set things up today, I’m sure I would have less plug-ins and a more stable setup. However, it still wouldn’t make it easier to write Japanese with it. Even the best plug-ins would be limited in what they could do.

Emacs on the other hand doesn’t switch modes. You navigate and manipulate text with an assortment of finger-twisting commands that even gangstas in LA would have trouble performing. Have you ever tried pressing down control and the letter “v” at once? Or how about “ctrl x meta m” or something like that? To get anything done, you essentially press these crazy combinations all day. Of course, this isn’t as hard as it seems when you get used to it. In fact, it starts to become natural just like you go up and down in Vim with “j” and “k”. The only reason I was able to make the transition was by enabling sticky keys though. I press ctrl, meta and alphabets separately aside from the really easy to press ones.

The good thing is that I can navigate and execute commands without first catching myself on whether I’m in Japanese or English. I can do everything I do in English that I do with Japanese. I always wondered why a lot of the respected hackers in Japan used Emacs.

The amazing thing about Emacs is that it basically adopts a programming language Elisp at its core to extend functionality. It has its own Lisp language and interpreter built in! Once you start delving into Emacs, the things you can do are nothing short of astounding. You can surf the Internet, manage your calendar, read email, chat, irc, blog, twitter, gtd, and whatever crazy thing you can dream of. There’s an amazing group of elite hackers developing plug ins and even enhancing Emacs. After all these decades the core is still in active development even though the interface is essentially text.

I can say that after a couple weeks of tinkering with it, I’m constantly amazed at the things I can do with it. Even with a ton of plug ins loaded up it’s very responsive. Start up is slightly slower than Vim but not that noticeable, especially once your extensions are compiled (yes, you can compile extensions through Emacs). I’ve got everything from on the fly spell checking, indentation, intellisense like auto-complete, dictionary look ups, among a truckload of other things working for me like a charm.

Everything I need is right here. Even manuals are easily accessed and looking up functions are easy. It’s like a self-contained distraction-free text universe at your fingertips. The downside is that you could lose yourself for days twiddling with things and adding yet more features. The GTD system called “Org Mode” is probably the world’s most powerful yet flexible system with crazy integration. It takes a while to get to a point where you feel settled once you start discovering all this amazing features and messing with settings. I never thought I’d touch Elisp but I was writing some functions in a matter of days and pouring over code to get a feature just right or tracking down conflicts. That was an unexpected bonus.

Dave McClure is No Devil

The more I read about this the more I’m angered by TechCrunch’s irresponsible reporting on Angel Gate. Unless, and I seriously challenge him to because he can’t, Michael Arrington can produce substantial evidence that collusion did occur he should issue an apology. I have every reason to believe that Michael showed up uninvited to a dinner of friends, got really pissed and hurt because they told him to essentially screw off and then assumed they were up to no good. Of course, that’s being generous. It seems more like he got so pissed he decided to damage their reputations using TechCrunch simply because he has the power to. The only place to find a balanced debate on this is the Quora thread. Then the post an innuendo-laden email bomb from Ron Conway regarding a dinner he didn’t attend.

All I got to say is screw Tech Crunch for writing whatever they damn well please simply because their founder got socially snubbed. It’s Tech Crunch doing the dirty Mafia type hits if you ask me.

End of updated rant. The original article below.

The recent crap storm about TechCrunch’s expose about back room Mafia-style price fixing by angel investors kept taking an unreal turn for the worse. First, I have to hand it to Michael Arrington for doing this. It takes balls to make accusations like this and pretty much turn the entire community against you. He has everything to lose and this is one sorry publicity stunt if it goes wrong. In the UK he’d be sued out of business for libel even on a blog. In some other country, he might never be seen again.

The first guy to fall under the bus is definitely Dave McClure. He was the first to respond and now he really got thrown under the bus. I spent the good part of the day with him last year when he came to Japan. That doesn’t make me an expert on him or make me privy to what he does for business but if does the things that people allege him of doing in this “Angel Gate” scandal this man definitely has the most elaborate smoke and mirrors act I’ve ever seen.

The Dave McClure I saw is generous with his time and despite his bad boy image he’s the most approachable guy on earth. I literally walked up to him in a crowded party, briefly introduced myself, and asked him to attend a startup event happening the next day. He did not know who I was and he did not care. He showed up first thing in the morning and stayed all day. He brought a Japanese startup founder with him, gave a great presentation and mentored people all day. The event was basically a workshop for amateurs throwing around ideas. If Dave was just pretending to be interested or being polite, I must be blind because he critiqued ideas and gave feedback like he was about to invest money.

I don’t know about the intricacies of the allegations or how this situation is going down now that Ron Conway threw down the gauntlet but Dave’s been on the grind. Dave does a lot of things that other people in Silicon Valley don’t like try to connect the Valley with entrepreneurs in Asia and other regions. He works hard, he gets his hands dirty, he’s more accessible than a lot of “classy” investors, and he’ll pick up the phone when you call.

I don’t know who else is implicated but if you look around a lot of people have got Dave’s back. That says a lot. These are the same people he would have been “screwing” if allegations are true. These people are also very smart. I don’t think you can really damage someone’s reputation if they’re the real thing. Dave sure was in the wrong place at the wrong time but the dude’s literally everywhere. If I needed advice I wouldn’t hesitate to ask him and anybody he invests in will get a great deal just because Dave McClure doesn’t do anything half-assed period.

Fire in The Valley, Fire in My Belly… and Yes, Mike, I Have Stopped Beating My Wife. – Master of 500 Hats

So A Blogger Walks Into A Bar…

One Year Without Alcohol

I went one year without drinking. There were three separate occasions I more or less got pressured into pretend sipping or an aperitif but otherwise I was sober the whole time and didn’t really obsess about it. It took a while for friends and people around me to realize I was dead serious about not drinking but once I established the fact, people left me alone. I ended up having a shot of tequila about one week after the anniversary. That seriously messed my head up. The alcohol felt like it got injected into my veins and took me a while to ground myself. For about a week after the tequila kept popping into my head.

Now I know why alcoholics and drug addicts need to stop cold turkey. It’s crazy but you spend all this time avoiding it and you don’t realize how much your commitment and reinforcement of values are doing behind the scene. One one level, you’re freed from all the baggage of keeping your “streak” going. On the other hand, you need to make sure all hell doesn’t break loose and wait for it to pass. I was never a heavy drinker though I always had a tendency to binge. When I stopped drinking my propensity to drink was getting more and more frequent. I abstained from alcohol a couple months before. This time I was slowly getting fed up with myself at how easily I’d go for a beer or two after work to relax, rather than just let the stress go, and then the tipping point came when I had too many drinks and totally embarrassed myself. Something inside me told me that I had to hit the “reset” button. So, I said to myself, “I’m not drinking for at least six months”.

What happens when you don’t drink alcohol? This is what happened with me.

  1. Slept way better.
  2. Felt way better.
  3. Went out less.
  4. Never stayed until the morning train at a party (this being Japan).
  5. People around you drink less.
  6. You manage to socialize with people at parties anyway (you just need to get used to it at first, if you’re shy and use alcohol to loosen up)

I know that recent studies claim heavy drinkers still live longer than people who don’t drink. These studies contradict each other every other month but I wouldn’t doubt the social component of drinking leads to better health. Still, I can’t really deny that I feel a lot better not drinking because the quality of life is way better when there’s no alcohol from last night in your system even without hangovers. It’s a lifestyle choice. Although that tequila shot puts me back on a new journey, I’d rather not go back to drinking although I’m not going to be fanatic about it. Just go with the flow and right now I’m not feeling alcohol.

Hot Tub Time Machine

Hot Tub Time Machine is a mid-life crisis movie. Three friends and a nephew go on a ski excursion when Lou attempts suicide to cheer him up. The dilapidated resort town of their youthful conquests is deserted and run down. As the situation degenerates into a train wreck situation, they find the hot tub in the backyard (where they just found a dead racoon) miraculously fixed. As they drink their way into oblivion the tub swirls them back into the 1980s in their youthful forms though they look young to everyone else.

There were some humorous moments but it’s pretty much a trailer movie, you know where if you see the trailer you saw the movie. The retro 80s fashion was definitely fun to see (and the women looked hot in their hair-spray and heavy mascara) but there wasn’t enough tension or comedic vehicles to carry the film through. It needed some kind of twist. Title was awesome, that’s without question.

Kick Ass

Kick Ass definitely blew me away (but not all in a good way). It takes the classic story of a nerd transforming himself into a super hero and deconstructs it in a modern, information technology-driven society where reality and real life can be blurred by personas created online. Our hero, to be known as “Kick Ass”, is a normal teenager geek that gets it in him to become a comic book super hero. The transformation begins by ordering a super hero outfit that consists of a diving suit and setting up a MySpace page to handle super hero assignments.

Of course, being a nerd, he’s totally unprepared physically and mentally so his first mission ends with him getting stabbed and beaten unconscious. As a result, his bone structure is fortified with plates and he becomes desensitized to pain. In order to hide embarrassment from being found in a super hero outfit, he corroborates a story with the paramedic that he was found naked. This leads to rumors at school that he is gay. The gorgeous girl he has a crush on takes an interest in him once she “finds out” he’s gay and makes him her bff.

Instead of giving up on the super hero idea, now that he has a high tolerance for pain and a taste of the exciting, crime fighting lifestyle, he clumsily forays back into the super hero business. This almost gets him killed and brings him into contact with real avengers (a father and daughter team) who are not afraid to kill villains.

That’s the setup. Any more would spoil it.

Call me old-fashioned but seeing a little girl cuss like a sailor while slicing mafia gangsters up in cold blood really disturbs me. The trailers, by necessity I suppose, really gloss this over. Artistically, it’s a bold move for the director to be faithful to the graphic novel’s depiction of it. However, with all comic book adaptations you have the problem of translating that into the big screen format. As a cross between a novel and comic book, readers are engaged in graphic novels so much that they fill in the blanks or “scenes between the scenes” and embellishing the artist’s rendition with their imagination. Drawings no matter how masterly executed have a way of softening violence and sex while emphasizing other aspects so when you do a literal depiction on screen, it comes across a lot stronger. The execution was well done though the characters needed a little more depth to me. Luckily the Nicolas Cage and Chloë Moretz (to a certain extent Aaron Johnson) brought that depth with them.

To me it was a cross between Super Bad and Chris Nolan’s Dark Knight, awesome depending on your qualms.