Wednesday, March 25, 2015

March 25, 2015

It's different this time:
Anupam Mittal, founder of People Group, which owns Internet ventures like, and an early investor in Ola, agrees. “Of course valuations have skyrocketed in the last one month. Even for a start-up raising $1 million, it has now gone to $2-3 million. Valuations may look running ahead of fundamentals for Flipkart, Snapdeal or Ola. However, it will look justifiable in the coming 12 months given the growth rates these firms are witnessing,” he says.
“If you look at Fortune 500 companies, 50 per cent of valuations are given for intellectual property. The same holds true for Internet ventures. It is the network effect. One has to pick and choose the right winners in the game,” he says.
That, dear reader (I accidentally typed 'readr' and corrected myself, but come to think of it, that's more appropriate in this age of quikr, fukr, and the like), is called "talking one's book". Intellectual property my ass.

International venture capital, having run out of options back home, is seeking yield in the next bubble, namely Indian e-commerce sites with a shaky business model (it helps if you have a mangled name; see above. Oh, and you have to have a FREE app. Those of you without one, please show yourself out. Thanks for your time).

If you're the sort who's willing to invest as large a sum of money as goes into a real estate deal just because you can book your flat online (gasp!) or take a virtual tour of the property, I have this amazing deal for you... oh wait, never mind.

Want to buy diamonds online? Check. Eyeglasses? We've got you covered. Try out ten sets of dresses at home and just keep the one you like best? You got it (pity those poor Myntra delivery guys carrying half the store on their backs, though). What about furniture? You bet.

But jokes aside, this is what is called a win-win situation by the jargon-mongers. On the one side you have a) savvy shoppers looking for and getting great bargains b) slick home-grown would-be entrepreneurs cutting their teeth on hoodwinking gullible investors c) app developers d) newspapers getting revenues from full-front-page ads and e) even folks like the aforementioned overworked delivery persons, while on the other side you have... what? Greedy investors who know very well what they're getting into ("What is this "due diligence" thing I keep hearing about? And so what if the caviar is empty? There's always room service...")? No contest.

Tuesday, February 10, 2015

February 10, 2015

This is about the upper middle class in America, but the argument applies equally to their Indian counterparts. From tax deductions for home loans to subsidized cooking gas, it's "you'll have to pry it from my cold dead fingers" all the way. Not to mention that they've thrown their weight behind promises of more shiny new things they can buy (Ultra HD TV, anyone?) as the economy is being unshackled by the latest saviour (the AAP has basically wiped the floor with their opponents in Delhi as I type this, so maybe there is some hope left).

Wiser words have never been spoken (via xymphora):
Instead, in every domain, over and over, the policies that prevail are those with business-models. Policies that create a large pool of wealth for a small number of players, enough money in few enough hands that there’s some left over to lobby for the continuation of that policy.
I think that we’ve tacitly acknowledged this in policy circles for years – if you have something you think would be good for society, you need to figure out how it will make a small group of people rich, so they will fight to keep it going. It’s how we got carbon trading! And carbon trading is a great cautionary tale for activists thinking of harnessing policy business models to attain their objectives: the people you make rich will fight for a version of your policy that makes them as rich as possible, even if it means subverting the underlying social good that your policy is supposed to attain.
From yesterday's The Hindu, about three Indian cities being chosen for the 100 Resilient Cities project:
The financial commitment for the project is $100 million. This doesn’t mean each city gets $1 million. What the cities would get are funds to recruit the chief resilience officer. Other than that, support would be in the form of tools, people and the network.
One million dollars at current exchange rates translates to about Rs 30 lacs per annum for two years, about enough time to attend about five to ten  local and international soirees and hobnob with the movers and shakers, give an equal number of interviews to magazines and newspapers (whose editors you met during said soirees), and utilize the time in-between to type up a 500-page report (double-spaced, naturally), and still be left with a couple of months in which to polish your resume for your next gig. The word you're looking for is 'sinecure'. 'Bribery' if you don't want to mince words.

Staying with The Hindu, their International page devotes more column inches to cover the International Film Festival in Berlin than to report on the much more important happenings in Ukraine.

#9 and #10 in the list of Indian names released as part of the HSBC leak are the Ambani brothers. What lends credence to this, despite the protestations of innocence, is that the balances against their respective names are identical ($26, 654, 991). Indian Express is the Indian partner of the consortium who took part in this expose, so there is always the lingering doubt that it's a copy/paste error, but an equally plausible reason is that the amount probably works out to a nice round figure when converted to rupees. I'm too lazy to do the math, but this looks to be in the ballpark of Rs 100 crores at the time in question (2007).
Must-read articles about the recent AI-Skynet brouhaha (I discovered Wait But Why only recently, via RI; some seriously good brain food there). I have been fully inoculated by John Michael Greer against the whole "Rapture of the nerds" thing, so I'm compelled to ask: would an Artificial Super Intelligence be able to defy the laws of thermodynamics? Even so, some good stuff there.

Monday, January 05, 2015

January 5, 2015

(Reason #2534 why Lisp rules)

The Lisp assembly code generated by the compiler in pLisp is already in continuation-passing style, but I wanted to have a fresh look at the whole compilation process so that the current limitations related to compiling the FRAME instruction are overcome, and also wanted to correctly handle continuation objects in the full-native-code mode where we will not have reg_accumulator, reg_current_value_rib and the other machinery that the Lisp assembly depends on.

Time to hit the books; in particular, Appel's Compiling With Continuations.

We first compile the source code into continuation-passing style, apply closure conversion to this, and then do the remaining good stuff like elimination of nested scopes, register spilling, target assembly generation and so on.

In this post I'm just going to talk about the first step, i.e. conversion to CPS-style, as I've progressed only to Chapter 5 in the book so far. But even at this stage, the advantages of programming in Lisp stand out. More specifically, two features: a) 'Code is data' (I might as well print a T-shirt with this emblazoned in the front) and b) gensym (yeah, this is not exactly a universal Lisp feature, but the ability to create and manipulate symbol objects programmatically is, I guess). Oh, and since we're doing the entire thing in pLisp itself, a tip of the hat to the whole meta-circular interpreter thing; the ability to write and test out these things in Lisp itself is a godsend not only in terms of saving time, but is also central to leveraging the features mentioned above.

The CPS version of pLisp source code is a CONS object, the CAR of which is the expression to evaluate, and the CDR of which is a lambda expression to which the result of the evaluation is passed. Textbook CPS stuff. As an example,

((cons a b) <exp>)

is converted to

(cons (lambda (x) 
        (a (lambda (y) 
             (b (lambda (z) 
                  ((x y z) <exp>)

where <exp> is the rest of the computation (also a CPS expression) where our expression fits in.

To convert to and evaluate CPS expressions within the interpreter, we need an environment to map variables--both source expression variables and the lambda variables created as part of the conversion. A normal way to do this is to create an ASSOC-PAIR object and get and put stuff into it. But no, we do things the cool way (this is a nifty technique to mimic environments in interpreters):

(defun env0 (x)

(defun lookup (e var)
  (if (primop var)
    (e var)))

(defun update (e var val)
  (lambda (v)
    (if (eq var v)
      (e v))))

The environment is not a data object; it's a closure. We start out with an initial environment that simply returns NIL. When a new symbol is added to it, we produce a new closure that returns the value corresponding to this symbol if the argument matches the symbol, and defers to the original environment otherwise. Symbol lookup is just invoking the environment with the symbol (an added wrinkle is that we need to evaluate symbols corresponding to primitive operators to themselves). Brilliant, if you ask me.

Conversion to CPS-style is done by the to-cps function (from this point on, the code is in image form, apologies; click on the image to see it fully):

The function takes a source expression [e.g. (cons a b)] and a receiver CPS expression, and produces a CPS expression that is the receiver expression into which the converted source expression is embedded. An example:

(to-cps '(cons x (+ x x)) nil)

evaluates to:

(imagine that the LAMBDAs are preceded by a left paren as CONsing them with a symbol removes the left paren in print mode).

All the #:G symbols may look ugly, but if we're counting on GENSYM to generate symbols on the fly for us, we're going to have to live with them.

Evaluation of CPS expressions is done by eval-cps:

Since we're doing everything within the pLisp interpreter, and code is data, all we need to do for the actual evaluation is to invoke apply.

(eval-cps (to-cps '(cons x (+ x x))) (update env0 'x 100))


(100 . 200)

And voila, we've implemented Chapter 5 in less than 50 lines of Lisp code (arguably for a more elegant and powerful language). Less than 25 lines if you ignore eval-cps.

Wednesday, December 24, 2014

December 24, 2014

As Sheldon would say, "bazinga!" (emphasis mine):
It’s a tough decision to normalize relations with a country whose police force murders its own innocent civilians on almost a daily basis, and even more abroad, but Cuba needs to do it.

There's been a lot of hand-wringing and "what kind of people would do something like this" about the Peshawar massacre. 'Joe Hillshoist' at RI gets it right:

From what I understand a recent Pakistan Army offensive left between 500 and 2500 civilians dead in the border region where the Pakistan Taliban are based. I'm not justifying killing kids - what seems to have happened at Peshawar is horrific, like the 7 or 8 kids found stabbed, along with their mum, in a house in Cairns today. But you can't just single out one horrific act in a series of tit for tat horrific acts and pretend it signifies anything other than a horrible cycle of revenge. A cycle that needs more than one actor to perpetuate it. I'd like to think that if someone blew up my wife and child while I was at work I wouldn't want to retaliate like that but who knows really. I hope I never find out.

One bomb
The whole block gone
Can't find my children
And dust covers the sun
Everywhere is noise, panic
And confusion
But to some another fun day in Babylon
I'm going to bury my wife
And dig up my gun
My life is done
So now I'm going to kill someone...
This post is turning into a quote-fest, last one, I promise. This time from a letter to the editor in The Hindu (side note: the letters section in The Hindu is the place you go to to bone up on your collection of barely-appropriate figures of speech and metaphors [a sample from letters on the same day: eye-opener, take with a pinch of salt, hand-in-glove, pillar of support, riding on the plank of, nip the trouble in the bud, ...]) -- a rare voice of critical thinking:

The findings (that if the intelligence agencies of the UK, US and India had shared information and connected the dots, 26/11 could have been prevented) are striking, but one needs to take them with a pinch of salt. It is a fact that the U.S. still has not come clean on the role of David Headley. Or it could be that India knows the truth and has chosen not to pursue the matter keeping in mind the importance of economic interests. The West definitely knows a lot more about global plots and plans than it ever reveals. Wikileaks is a good example of doublespeak by the West.
(Yeah, I know, "pinch of salt", but still)
Question time: Do you remember the kiss you stole when she was standing under the mistletoe? Or the time you got a buzz from splurging on plum cakes? What about the time you went a-carolling late at night, with the snowflakes grazing your face as you stamped your feet and buried your hands deep into your jacket pockets to keep away the cold?

If you are a typical denizen of the tropical lands of India for whom all this Christmas revelry means is nothing more than a break from work and a disgusted shake of the head at the way the festival is being commercialized just to ring in a few more pieces of silver into the coffers of businesses, your answers to these questions would have been "No", "No", and  "Fuck no" respectively. The correct question to ask is "What the fuck is Coke doing with a half-page ad peddling its wares as a staple of Christmas revelers ("Plum cakes, bright lights / Mistletoes,carol nights / Christmas is about togetherness / With Coca-Cola (R), family and friends") in India?

Thursday, December 04, 2014

December 4, 2014

In a move that's bound to offend Lisp purists, I have added support for C-style arrays in pLisp; it is now possible to get and set array elements by syntax like a[10 2]. I initially thought of doing this the canonical way, i.e. a[10][2], but this complicates the lexical analysis (I have already introduced shift/reduce conflicts with these changes), so a single pair of square brackets will have to do.

You can thus do things like these now:

USER> (define a (array (2 2) 1))

[[1 1] [1 1]]

USER> a[0 0]

USER> (aset a[0 0] 100)

[[100 1] [1 1]]

array and aset are macros that internally call make-array and array-get/array-set respectively:

(defmacro array (dims default-value)
  (if (eq (length dims) 1)
      `(make-array ,(car dims) ,default-value)
    `(make-array ,(car dims) (array ,(cdr dims) ,default-value))))

(defmacro aset (ref val)
  (let ((a (second ref))
    (last-index (last ref))
    (indexes (butlast (cddr ref) 1)))
    `(array-set (build-ref ,a ,indexes) ,last-index ,val)))

During lexical analysis, the form a[x y] is converted into a list (aref x y) so that the sanctum sanctorum of the interpreter and other bits of pLisp are not polluted by the impurity of the square brackets.

build-ref is a macro that is used internally to convert a reference of the form (aref array-name i1 i2 ...) to one that uses array-get.

(defmacro build-ref (a indexes)
  (let ((rev-indexes (reverse indexes)))
    (if (eq (length rev-indexes) 1)
    `(array-get ,a ,(car rev-indexes))
      `(array-get (build-ref ,a ,(cdr rev-indexes)) ,(car rev-indexes)))))

Monday, November 17, 2014

pLisp FAQ

What is pLisp?
pLisp is an integrated Lisp development environment.

What dialect of Lisp is pLisp based on?

pLisp is not based on any single Lisp dialect, but draws inspiration from Scheme. However, its macro system is based on Common Lisp (backquote, comma and comma-at).

What features does pLisp support?

1. Basic operators like CAR, CDR, and other language primitives
2. Other operators and utility functions written in pLisp itself
3. Exception handling in the form of '(try .. (catch ..) ..)'
4. Garbage collection
5. Foreign function interface
6. Ability to store and load images (both at the system level and at the level of individual objects)
7. Macros
8. Debugger (break, resume, inspect variables)
9. A package/namespace system
10. Continuations
11. A basic but complete object system that supports inheritance, encapsulation, etc.
12. Graphical IDE

Why do we need yet another Lisp system?
pLisp started out as a hobby project, an implementation of an interpreter embodying the concepts in Paul Graham's "Roots of Lisp". As its feature-set kept growing, my dissatisfaction with existing Lisp development systems and my missing the beauty, power and elegance of Smalltalk environments in these systems prompted me to make pLisp more than just a command-line interpreter and add features like a system browser, workspace, and other good stuff.

My current objective with pLisp is for it to serve as a) a friendly Lisp environment for beginners and b) an end-to-end demonstration of the construction of a Lisp-based programming language system from scratch (object system design, virtual machines and intermediate code generation, garbage collection, serialization, just-in-time compilation, exceptions/continuations, and so on). And also serve as my personal programming environment, of course.

What platforms is pLisp available on?
pLisp is right now Linux-only. I may port it to other platforms in the future.

What about the license?
pLisp is licensed under GPL v3.

How do I install pLisp?
pLisp is installed by running 'make' on the provided make file.

What do I need to install pLisp?
You will need a) the GTK+3.0 development package (libgtk-3-dev) b) the Tiny C Compiler development files (libtcc.h and libtcc.a) and c) libffi

pLisp also uses Emin Martinian's Red Black Tree code in its GC implementation (this code is shipped along with pLisp, so you don't have to go out and grab it).

How do I report bugs and other issues?

You can email me at rajesh dot jayaprakash @ gmail dot com

Where is the documentation?
A user manual is in the works. I have some blog posts that talk about pLisp internals. I may expand these posts into a developers' manual in the future.

Friday, November 14, 2014

pLisp Updates

Thought I'd share some updates related to pLisp.
  1. pLisp has been migrated completely to Linux. I was already doing this in a half-assed way by using Cygwin, but faced issues with migrating to GTK 3.0, so a move to Linux made sense. I also wanted to make it completely portable, but one look at the horror that is autoconf/automake made me beat a quick retreat.
  2. I have been working on native code compilation, and it's been a partial success. Most of a closure/macro's code (the assembly Lisp that was being generated for the VM's consumption) is now native, except for the FRAME instruction. This instruction is problematic mainly because of the need to handle continuations. We need to maintain the calling stack even when we're doing native code, so the reliance on the present 'instruction set' (reg_accumulator, reg_current_stack, et al) is still there, making going full-native still some way off. I guess I need to grok Appel's Compiling With Continuations before I can do this. The Tiny C Compiler is used for the native code compilation; we dynamically create function pointers by converting the Lisp assembly code to C and invoking the TCC API to convert the C code to native code.
  3. Command line options have been introduced. Now you can run pLisp in console mode (-c), invoke it with an image (-i) or use it to just evaluate a single expression and quit (-e).
  4. A user manual and FAQ are in the works. I'm also looking for a new descriptive title ("pLisp is a Lisp-1 interpreter" doesn't really do it justice; since the UI draws a lot of inspiration from Smalltalk, maybe I'll change it to "Don't Lisp. Talk". Provocative much?)

Friday, October 17, 2014

October 17, 2014

You're not really a powerful country if you have to indulge in ridiculous-sounding trash talk like "Today, no one can give warning (sic) to India. We are a very powerful country".

The new Chief Economic Adviser's earlier connections with the Peterson Institute (of the "Social Security is for slackers" fame) do not bode well for what passes for the public safety net in India. Channeling provident fund money into the stock market is not a Good Idea.

Thursday, September 25, 2014

September 25, 2014

Holy Newspeak, Batman.

You wake up in the morning, feeling groggy, and make your way to the kitchen, where your better half has thoughtfully kept an inviting pitthalai tumbler and dabara of Kumbakonam filter coffee made from decoction brewed fresh just this morning. You take the coffee and head over to the front doorstep and pick up the The Hindu (could it be anymore South Indian? I could make it so, but let's not digress). You park your South Indian butt on the couch, mutter an expletive at the ad (real-estate, natch) that the folks at The Hindu have whored out their front page for and start reading the news, while at the same time taking the first sip of hot coffee.

And spit out the housefly that somehow made it into your coffee when you weren't looking, and continue the stream of expletives triggered by the first-page ad.

Alright, I made this up (the decoction and the pitthalai bits are true though, and I do read The Hindu every morning) but nothing compares better to the reaction I had on reading excerpts from Obama's speech linked to above. As someone who weaned himself away from the mainstream news a long time ago, I shouldn't really be surprised, but the chutzpah still hits you hard.
Russia’s actions in Ukraine challenge this post-war order. Here are the facts. After the people of Ukraine mobilized popular protests and calls for reform, their corrupt President fled. Against the will of the government in Kiev, Crimea was annexed. Russia poured arms into Eastern Ukraine, fueling violent separatists and a conflict that has killed thousands. When a civilian airliner was shot down from areas that these proxies controlled, they refused to allow access to the crash for days. When Ukraine started to reassert control over its territory, Russia gave up the pretense of merely supporting the separatists, and moved troops across the border. 
This is a vision of the world in which might makes right – a world in which one nation’s borders can be redrawn by another, and civilized people are not allowed to recover the remains of their loved ones because of the truth that might be revealed. America stands for something different. We believe that right makes might – that bigger nations should not be able to bully smaller ones; that people should be able to choose their own future.
 Far more articulate and better-informed folks on the internet will give this the reply that it deserves. I will stick to what I do best, i.e. writing dodgy haikus.

Crimea secedes?
Bad. What about Kosovo?
That's different, folks.

Voentorg for brothers?
Sorry, we frown on these too.
Syria? Not same.

Russians invade? Where?
Can't tell you. What? Don't trust us?
'K, here's a twitpic.

Buk Buk Buk Buk Buk Buk Buk.
Read the RUE report.

Links courtesy of The Saker and Dmitry Orlov. Also check out Mish's posts on Ukraine. 

Wednesday, August 27, 2014

August 27, 2014

I have become a fan of Game of Thrones, after recently getting myself one of those newfangled gadgets that everyone has been raving about -- what are they called again, let me think... yeah got it, tablets -- and discovering Show Box, one of those newfangled programs that everyone has also been raving about (apps, I think they're called).

The level of violence in the show is simply appalling, not to mention gratuitous, but the more important thing is how soon we're able to simply tune it out. Case in point (spoiler alert): Season 3, Episode 9: Caitlin Stark's throat gets slit end-to-end, and all you can think of is Does blood really flow in such a laminar fashion? Wonder how they mimicked the gurgling sound...

The show starts off in a gripping manner, up to and including the siege of King's Landing, but then sort of degenerates into a typical soap opera where your continued interest is on account of the familiarity with the characters rather than the plot itself. Things are not helped with the basic premise of the show being "The only rule of GoT is Valar morghulis", aka "Every character that you like will die a violent and/or undeserved death".

Speaking of characters I like, Tyrion is my favourite. His character has just been arrested for (spoiler alert) poisoning Joffrey, so I'll have to wait and see if he escapes execution. Wouldn't bet on it though. Another character whom you start out hating but then change your mind is Jaime. He's already been maimed, so I guess the odds on his surviving are somewhat better.

I know it's fiction and all that, but it's still a reflection of how badly life must have sucked in medieval times -- the palace intrigues, the back-stabbings and the betrayals people (at least the royalty) must have put up with, not to mention all the gory ways people were dispatched to their Maker during war.

The whole north-of-the-wall thing is more or less a sideshow at present, and a distraction at that. In my opinion, GoT is better off as an out-and-out medieval drama than as medieval drama + horror fiction. Let Cowboys and Aliens be the lord of the Mixed-Genre-F***up.

What's the most cringe-inducing thing in the world? Bollywood celebrities doing the ice bucket challenge for a disease that probably 0.0000001% of Indians suffer from. I have a better idea for a fundraising plan: allow folks to pee on you for 50 bucks (premium option: for 500 bucks you can do Number 2). Please deduct 25% from the charge if you just want to fling the pee/poo from a container instead. Containers available for a small fee.

Wednesday, July 09, 2014

July 9, 2014

Drat, I forgot to set the alarm and slept through the Brazil-Germany match. The match must have really been weighing on my mind as I drifted off to sleep, because I dreamt that I actually watched the match, and that Germany beat Brazil 7-1, with five of those seven goals scored before thirty minutes.

Oh wait, that wasn't a dream.

You know you're losing badly when the broadcaster needs to employ scrolling in the onscreen display to accommodate all the goals scored by your opponent.

Jokes aside, the match reminded me of something similar that happened in the eighties. Some genius in India's football administration had the idea of bringing PSV Eindhoven over to India and having them play one of the Calcutta 'giants' in a series of games. Needless to say, the giants had their asses handed to them (if I remember right, the score was 8-0 or something similar in all the matches) -- it was a master class in tactics and skills more than anything else. As I mentioned at that time, we would have been better served if we had invited one more team (say Ajax) and asked them to play each other. Heck, a cheaper option would have been to divide PSV into two elevens (throwing in a bunch of Indian players if the numbers were insufficient) and make them play each other.

While the Brazilian fans should be commended for not abusing their players, throwing stones at the players' houses, and so on (Update: I guess I spoke too soon), their grief was way overblown. Folks, reserve such emotions for more important things in life, like say, having your entire town leveled by artillery fire, losing dear ones and becoming refugees (Novorussia, in case you're wondering. The Saker has some gut-wrenching videos if you have the stomach for it). Passing on your passion to your child who weeps uncontrollably at the sight of the mauling your team is getting borders on child abuse to me.

Two defining images from the match: a shell-shocked Brazilian spectator hugging a replica Jules Rimet trophy, even as the chances of his team lifting the real one are all but gone in smoke, and Luiz and Gustavo sinking to their knees at the end of the match, eyes tightly shut as they said their prayers to God (folks, this is Faith. With a capital F).

Monday, June 30, 2014

June 30, 2014

Some brilliant prose about Tony Blair via xymphora. Choice bits (the entire thing is definitely worth a read):
Tony Blair rises every couple of months, like a bubble of swamp gas. First there’s an uneasy buried rumbling, then small tremors shake the surface, and then suddenly he bursts through, a gassy eruption stinking of farts and sulphur. It doesn’t matter how many rounds you fire into his shambling frame; he just won’t die. Whenever something unpleasant happens in the Middle East, whenever some huge corporation is discovered to be starving people to death or poisoning them through calculated negligence, whenever the chaos of the international order starts to wobble into another death-spiral, a damp wind blows through a graveyard somewhere in England and Tony Blair emerges from his tomb. There’s something viscerally revolting about the man. His fake chumminess and his sham gravitas are both as nauseatingly contrived as his shiny oily skin, hiding what can only be bloated rotting organs inside. He’s a gremlin, an incubus, very strange and very cruel and very foreign to our world. But still there’s a decaying vestige of that charm, the memory of the love in which he was once held, that universal joy when he finally ended a generation of Conservative rule by ending the Tory monopoly on evil. We’ve deluded ourselves into thinking that we’ve learned from the experience, we’re past all that now, but every time Tony Blair re-emerges there’s still a shock. There he stands, with his jug ears and his peg teeth and his manic eyes full of an otherworldly certainty – it’s like the shock of seeing a former lover going through your bins at night, or a long-forgotten childhood toy waiting for you on your bed. He represents something that’s been repressed, and even though the repressed always returns, it’s always a surprise. Who is this hideous figure? Why is he still alive? Why won’t he just leave us alone? Of course, Tony Blair was never alive. He’ll never leave us alone.
While on the subject, The Saker hits one out of the park as well ('see who will get the title of "employee of the month" from Uncle Sam').

I haven't been following the World Cup as closely as I'd like to. To be honest, I'm not sure whether I'd really like to; I know this sounds like heresy coming from somebody who watched every match in Italia 90 at least twice--once live, one or more times the repeats, but the fact is that most of the action in a football match seems to have become quite pointless to me. There are spells when somebody does something breathtaking on the field or when a team is laying siege to the opponents' goal in a do-or-die battle to survive as the clock is ticking inexorably, but the rest of the time the action is not dissimilar to the Simpsons parody of soccer. The cynical attitude of the players doesn't help either. I have mentioned this earlier too, but the one question that comes to mind when watching their antics is "Dude, what the hell were you thinking when you did that?", be it van Persie's blatant shirt-pulling in the opposition penalty area, or Arjen "The word you're looking for is sissy" Robben's *ahem* 'simulation'.

Friday, June 20, 2014

June 20, 2014

I made this table mainly to confirm and schadenfreude over (a. yeah, not a verb, and b. can't believe I spelled 'schadenfreude' correctly on the first try) England's misery, then thought I might as well share it -- joy shared is joy doubled and all that. The only scenario where England makes it to the knockout is the one in red, even then subject to other factors (goal difference? phase of the moon?). All this is based on the assumption that England beat Costa Rica, of course.

The violation of the law of conservation of points (ever since they introduced three points for a win) grates as usual.

Friday, May 30, 2014

May 29, 2014

So these are the Club of Rome predictions (via Dmitry Orlov):

I am as much of a collapse porn aficionado as the next guy, but if these predictions are an important component of the collapse story, the script needs to be rewritten. If you look at the graphs carefully, the trend predictions could have been done by a layman simply through visual inspection of the data (aka, take a ruler and just extend the lines), and you wouldn't have been too far off the mark for any of the parameters (in fact, your prediction would've been more accurate vis-a-vis food per capita). We have not reached the years corresponding to the predicted peaks yet (except maybe for per capita industrial output), so we need to go a bit easy on the hosannahs for the accuracy of the predictions so far.

Thursday, May 22, 2014

May 22, 2014

(This year's obligatory IPL post will be in the form of bilious haikus)

Kingfisher ad sucks
Celebs demeaning themselves
Yodelling eunuchs

Ex-celebs pimping
Wares in their commentary
Danny please shut up

None cares what you think
Oh random Twitter posters

Flag-waving faux fans
Long-dead purists spin in graves
Monkeys jump at fruits

Zoomi zoomi ka
Je se va ke po shi kumm
musho va
re va [*]

[*] Dead horses scream "Stop!"
Stuff that nightmares are made of
Incubus R  Us

Saturday, May 17, 2014

May 17, 2014

I've recently taken to chess again after a long hiatus. Online chess has come a long way in the last 15 years (which was when I last checked things out); I signed up at, and it's been great fun all the way. If you want to keep up with what I've been doing there, simply follow the buzz there about the mysterious stranger from India who's been making waves and giving the highly-rated old-timers a run for their money (just kidding, I'm the guy with the puppy avatar who's languishing with a tactical rating in the 1290s after briefly touching 1344).

This post is not about the cerebral aspects of the game, the strategy, the tactics, and so on, but about the emotional aspects. Consider this Daily Puzzle entry from yesterday:

It's white's turn to move, and a cursory look at the board immediately shows the danger: the white king is all alone on the right side, seemingly at the mercy of a phalanx of attackers led by the black queen. Also, the black knight is a move away from forking the white queen. All the white pieces look helpless, stuck on the wrong side of the board (with the exception of the rook on a3, who looks like he may be able to charge to the king's rescue and die heroically on the king's lap--ignoring for the moment what an elephant lying on a person's lap would mean to said person's state of health--in the process, gasping out an "Alas, I have but one life to give to my emperor"). I used the word "seemingly" upstream because, as I mentioned earlier, it's white's turn to move, which means appearances are deceptive, and there is some avenue of escape (maybe even victory?) open to white. Is it the bishop on e2 who can produce the check, ineffectual though it may be? Can the white queen somehow find the time to rush forward and cause a back-rank mate? Should the king charge forward boldly to g2 and meet the attack head-on? Would such a charge enable the other white rook to find some action on the h-file? One can cut the tension with a knife. Or considering the context, maybe I should say 'saber'.

Cerebral the game may be, but take away the emotions and the drama, and you might as well sit with paper and pencil and solve partial differential equations.

Thursday, May 15, 2014

May 15, 2014

Michelle Obama's Instagram picture backfiring spectacularly, as it rightly should. The more accurate content for her sign would have been '#Doh' (or alternately, '#I am the wife of the most powerful man in the world, and the best way I think I can help is hold a piece of paper with a hashtag and look seriously dumb').

On a related note, compare Putin's recent address to the Russian Duma with the usual hopey-changey rhetoric from Obama. And folks still wonder why Putin is held in higher esteem globally. The problem is, Mr Hopey-Changey's target audience are, to quote JimQ from Washingon's Blog: 
...the technologically entranced zombies shuffling along the sidewalks staring blankly at a tiny screen, tapping away on an itsy bitsy keypad as if whatever they are conveying is of vital importance to the future of mankind. # Give me a break.

Tuesday, April 29, 2014

April 29, 2014

GoDaddy doesn't have much of a reputation in their place of origin, and they're not doing anything to remedy this in India. Nothing says 'Pimp!' better than using a gaudily-dressed Mithun "Dude, where's my neck?" Chakraborty and an entourage of scantily-clad women for selling their wares here.

Staying on the subject of TV ads, I think the phrase you're looking for is "Botox Barbie".

I think it's time to invent a new acronym, unwieldy as it may be, IKIGTHFT: I Know I'm Going To Hell For This, considering the amount of snark I've been using recently.

Dileep Premachandran's excellent article on Chelsea's recent win over Liverpool. Master tactician my ass, indeed. To me Mourinho will always be a crass boor with a perennial chip on his shoulder. I did applaud the second goal (a little schadenfreude now and then never hurt anybody), but I'm of two minds as to whether I want City or Liverpool to win the Premiership. No two ways about how I would feel if Chelsea sneaked in.

Saturday, April 19, 2014

April 19, 2014

If the AAP government in Delhi rouses some people from Africa on suspicion of drug dealing and other illegal activities, it's called racism. When The Hindu calls the entire state of Arizona 'rednecks', it's not. Got it.

Friday, April 04, 2014

April 4, 2014

A couple of questions (disclaimer: I love Dave's writing):
  1. What is a conspiracy theorist doing on LinkedIn?
  2. How the %^&$ does LinkedIn know my interest in Dave's writing? I bought Programmed to Kill eons ago, but I can't for the life of me think of any other connection.

Thursday, April 03, 2014

April 3, 2014

Long ago I made a promise to myself that I would not read anything from The New York Times, but I have broken this promise on multiple occasions since. This piece is the latest one benefiting from my lack of resolve. Well, 'benefit' might be a misnomer, since I don't have anything nice to say about it. As the saying goes, if you don't have anything nice to say, move your ass pronto to your personal blog, so move my ass I did.

Let's focus on a couple of things.
Don’t mindlessly favor people with high G.P.A.s. Students who get straight As have an ability to prudentially master their passions so they can achieve proficiency across a range of subjects. But you probably want employees who are relentlessly dedicated to one subject. In school, those people often got As in subjects they were passionate about but got Bs in subjects that did not arouse their imagination.
Students who get straight A's have demonstrated something quite valuable from an employer's point of view: giving their best and excelling in all courses, even the ones which may not have been their favourites (let's face it, even when you major in a discipline of your choice, you will not love all of them. If you do, we get it, you're really exceptional; hold on a sec while I finish this post, I'll go get your candy treat). Replace courses with projects on the job, and you have stick-it-to-vity.
Bias hiring decisions toward dualists. The people you want to hire should have achieved some measure of conventional success, but they should have also engaged in some desperate lark that made no sense from a career or social status perspective. Maybe a person left a successful banking job to rescue the family dry-cleaning business in Akron. Maybe another had great grades at a fancy East Coast prep school but went off to a Christian college because she wanted a place to explore her values. These peoples have done at least one Deeply Unfashionable Thing. Such people have intrinsic motivation, native curiosity and social courage.
Nope, rescuing the family dry-cleaning business or going off to a Christian college to explore one's values is not a Deeply Unfashionable Thing; these are things that get you brownie points in the 'right' circles (and probably help you get laid a lot too, come to think of it. Chicks dig deep guys who explore their values. Not to mention clean laundry). You know what's a really Deeply Unfashionable thing? Taking a year off to explore the dynamics of violence-based sexual relationships by becoming a serial rapist. Try spinning that one in your first interview coming in from the cold.

Monday, March 31, 2014

March 31, 2014

Book review time again. An oldie which I discovered only recently.

I'd like to say I enjoyed reading Flow, but the style and prose are not exactly conducive to a, whatchamacallit, a flow experience (pun quota for blog post exceeded, please contact our staff immediately). The text is mercifully bereft of footnotes and references, but this still doesn't lead to a very pleasant reading experience.

Having said this, this is an extremely important book, a must-read for anyone looking for personal growth, reinventing themselves and rediscovering their calling. Buddhists have every right to say "I told you so", but it's still good to have scientific backing and research for such common-sense intuitions.

Quick summary, more for self-reference, as I had to return the book to the library: pleasure vs enjoyment, matching of skills vs challenges, feeling of being in control, constant feedback, integration and differentiation. Oh, another important aspect: the flow experience is value-neutral (it's possible to be in the flow and still do things that are immoral or make others think you're crazy).

If at all there is any criticism of the book, it is an effort to, in my opinion, shoehorn enjoyable experiences into the flow paradigm even when it seems somewhat contrived. I'd provide examples, but no book, so no go.

Friday, February 28, 2014

February 28, 2014

Holy shit, it's obvious when you start on the thought experiment that Greer is talking about Hitler, but the superficial similarities with AAP practically jump out at you (not least the similar-sounding names). Example (the entire post is well worth a read):
Through all this, the new party keeps building momentum. As spring comes, Halliot begins a nationwide speaking tour. He travels in a school bus painted green and black, the NPAPP colors, and a Celtic tree-of-life symbol, the party’s new emblem.  The bus goes from town to town, and the crowds start to build. A handful of media pundits start talking about Halliot and the NPPAP, making wistful noises about how nice it is to see young idealists in politics again; a few others fling denunciations, though they don’t seem to have any clear sense what exactly they’re denouncing.  Both mainstream parties, as well as the Libertarians and the Greens, launch youth organizations with their own t-shirts and slogans, but their lack of anything approaching new ideas or credible responses to the economic mess make these efforts a waste of time.

Why do some sites (I'm looking at you, LinkedIn) frown upon the use of Privoxy when accessing their services? Try accessing them this way, and all you get is a 'We detect unusual activity from your network' or something similar, and there's no way to continue till you turn Privoxy off.

Thursday, February 20, 2014

February 20, 2014

Dear Flipkart,

Thank you very much for your very thoughtful question "How has your experience using Chhota Bheem been?".

Bheem been. Bheem been. Bheem been. Hee hee hee.

Sorry, got carried away a bit there.

Anyway, the experience has been simply wonderful; I can't for the life of me imagine how things would have turned out, had I used, say, Red Bird or Blue Bird, or, god forbid, Yellow Bird. I'm sure these characters have their share of hardcore supporters, but I'm a Chhota Bheemer myself, and wouldn't have it any other way.

With that out of the way, here are the ways the Chhota Bheem figurine has enriched my life:
  1. He is an excellent paperweight. I would like to highlight the stellar role he played when there was a sudden gust of breeze from the open window. But for his weighty presence, all the papers below him would have been blown clean off the table.

  2. He also makes a very effective blunt instrument. My last three adventures as a stalker-cum-serial-killer have been a hoot because of him. Just one firm blow, the satisfying crunch of weapon on skull, and very little blood (I can actually buy another Chotta Bheem figurine just from the money I saved on cleaning fluid, but I digress).

  3. He is an excellent conversation piece. I've lost count of the number of new friends I have made since getting him -- all I have to do while walking down the street is to suddenly whip him out of my bag at random strangers and start humming the signature tune from Pogo. Instant friendship, I tell you. In fact, I acquired my last three 'special' friends this way; see also #2 above.
However, it would be remiss of me if I claim that it's been a bed of roses all the way, and I must point out ways I've felt let down by CB (hope you don't mind me calling him that).

  1. He doesn't respond to commands. "Get me that book on the table" elicits only the same village-boy-in-awe-of-modern-gadgets look. Adding a "Please" doesn't work, either.

  2. He doesn't seem to have an appetite at all. Going by the gusto with which he gulps down laddus before doing a number on the baddies, you'd think he'd react at least a little bit favorably when I offer him similar (if not better) laddus. Nope, same village idiot look.

  3. I don't have any proof for this, but I think he's been playing naughty with my other toys. The stuffed Chutki on the top shelf has a distinct look of horror on her face -- something she definitely did not have when I stole received her as a gift from that kid on the bus. Nothing I can take to the court, but still.
But all in all, a five-stars experience. Would I recommend him to my friends? You bet. In fact, I would be surprised if you haven't already received a glut of orders for the figurine, with a special add-on request for  a handy, removable velcro grip (makes removing the bloodstains a lot easier) -- I sure have been spreading the good word among my Stalker Club buddies.


Tuesday, February 11, 2014

February 11, 2014

The Hindu with some rare egg on its face. No, make that a Baked Florentine Omelette with spinach, Mozzarella, Ricotta and other great stuff. It strains one's credulity to believe that they got such a critical quote wrong, and that too in the editorial of all places. I'm not a conspiracy theorist (ha, whom are we kidding), but it sure looks like national security concerns trumped adversarial journalism. The simultaneous appearance of the opinion piece by Praveen Swami is interesting, not just for the fine line he walks trying to stay on the side of democracy, morals and all the good stuff, while also trying to ensure that access to sources in the national security apparatus remains in place ("Everything has a context" -- verily, verily).

Meanwhile, things are heating up in IPL Land, and our friends at DC are practically slipping and sliding over their drool, climbing to the rooftops to shout out the good news. They must have been really slighted by the BCCI coterie when the Chargers were in the IPL, I tell you.

Sunday, January 26, 2014

January 25, 2014

(Disclaimer: I donated some money to Aam Aadmi Party quite a while back, so I might be a member, if they confer membership automatically on all donors; other than this, I have no link to them that I'm aware of, past results do not indicate future performance, please read the instructions carefully before proceeding, goods once sold ... somebody please take the keyboard away from me)

This post was prompted by two things: 1. A series of discussions I've been having with folks who a) supported AAP till their dharna and other 'antics' turned them off or b) still support AAP, but wish they'd behave in a more responsible and mature manner and 2. This post (while it's a bit over the top, I agree fully with its gist).

Before proceeding further, let me get this off my chest first:

Screw you, Congress. Screw you, BJP. Screw you, the Indian one-percenters. Screw you, corrupt, high-handed, lapdogs-of-the-powerful figures in authority. And while we're at it, screw you, Guy Who Kept Honking At Me in Traffic When There Was No Frigging Way To Move Forward.

That felt good. Would have been even better if I could have been freer in my choice of verbs.

Question time. Out of the following list, identify the things AAP folks are accused of:

1. Awarding government contracts and otherwise showing favour to people who *ahem* helped you to come to power.

2. Nepotism -- as in neta's son's/daughter's genes inheriting parent's charisma, leadership and sagacity, so he/she is automatically eminently qualified to ru(i)n the country/state as successfully as the parent.

3. Driving in SUVs bearing party flags and terrorizing/intimidating other motorists into giving way to them ("Appa, I keep noticing these coloured lights when I drive through some intersections, what are they? Why do they have only three colours? It would look much better if we had more.")

4. Letting loose your followers to wreak havoc on your enemies. Taken to its extreme, carrying out pogroms.

5. Arranging for a plane, at taxpayers' expense, natch, to go to Mumbai to pick up the shoes you're planning to wear for your birthday party tomorrow.

6. Shutting down the entire street for five minutes to celebrate the ex-Minister's visit to your locality by lighting x-walla crackers (replace 'x' with suitable integer that produces requisite noise for five minutes).

7. Doing a dharna that inconveniences folks for a short time in the interests of fixing issues long-term.

8. Coughing incessantly.

Three charges that merit a response are that they:
  1. Encourage anarchy, 
  2. Are socialist/populist and 
  3. They don't know how to govern properly
These charges are respectively countered by three questions:
  1. Golly, is this anarchy? Waiter, I'd like two more plates. And extra sauce, please.
  2. Are they any more socialist/populist than the Congress?
  3. Um, how long have they been in power exactly? What? Twenty months? Oh, twenty days. For a moment there I thought you said "months".
The anarchy bit needs some explaining. Anarchy does not mean 'absence of law and order'; it means 'absence of authority'. 'Authority' as in all-powerful, unapproachable entities (be they government, corporate or bureaucratic) who screw over the common man (Aam aadmi. Get it?) in myriad ways while imposing their solutions and diktats from far way, liberally using violence (physical or economic) to achieve their ends. Any move towards breaking this stranglehold (there was this guy called Mohandas Gandhi -- no, he was NOT Indira Gandhi's father -- who had this weird idea of giving more autonomy to village councils, something called Panchayat Raj?) is long overdue. The textbook definition of anarchy goes even further, but we need not go there. And staying on the subject of Mahatma Gandhi, I'm sure there were naysayers shaking their heads in disapproval when he said "Guys, listen to this great idea I had last night when I was spinning my charka -- ha ha, very funny, Jawaharji, can we get serious for a minute? -- I call it satyagraha, here's how it works...".

All this does not mean that I hold a torch for AAP unconditionally: only that, unless they're accused of things like #1 to #6 in the list above (and no, false stings do not count), and these charges stick, I'll be an AAP supporter (sans the topi; to be honest, I think it looks quite silly).

In closing, a fun factoid from the People-in-Glass-Houses department: did you know that Kiran Bedi invoiced an NGO for executive class tickets when she actually traveled economy class? It's becoming clearer and clearer that "What do you think about AAP?" is the litmus test for judging people.

Monday, January 13, 2014

January 13, 2014

Some public service activism for a change.

Considering the recent (failing) drive by the government to rein in the Chennai auto drivers and the fact that I've been personally on the receiving end of the fleecing from the scumbags on innumerable occasions, I've been thinking long and hard about the most effective way to solve the problem: something that doesn't rely on either government fiat/initiatives or a law-and-order approach (the first is easily defeated by the time-tested perversion of the Gandhian way of protests, road-blocks, general hooliganism and court stays; the second by the level of corruption in the system in the form of hidden ownership, false or non-existent documentation abetted by the bureaucracy, and so on).

One of the first solutions that came to mind was a somewhat frivolous one: a Tumblr page called 'Do an Auto Today', where participants anonymously post reports of their surreptitious actions on an auto whose driver fleeced them that day -- actions that, shall we say, are mildly inimical to the vehicle in question (a strategically applied razor blade to the vinyl seat cushion suggests itself). But this is illegal and immoral, and this blog does not condone such activities in any manner or form (I love you, Internet Thought Police, and consider your service yeoman. Please don't hurt me), so it's out of the question.

The solution I'm going to propose is however similar, and is called 'Boycott All Autos Day'.  It's conceptually quite simple: everybody agrees not to use autos on a designated/pre-arranged day. Yeah, I know, getting everybody to coordinate their actions is quite difficult, in the absence of a common messaging platform. Maybe this will become practical someday in the future and somebody will invent a wireless phone that's small enough to fit in our pockets and yet be as powerful as our mainframes, and somebody will figure out a way to connect all these phones/computers so that we can share our thoughts instantly on a single platform ('It's like a yearbook with the faces of all your friends, but the kicker is that the captions underneath the pictures keep changing based on their thoughts')...

Having beaten the straw horse to death, moving on to the details.
  1. If you use autos to commute to work, resolve to take the public transport or call a cab. The extra stress or money for one day is worth the long-term benefit.
  2. Ditto for traveling to the railway station or the airport.
  3. If it's a planned trip -- shopping, visiting friends or relatives, going to the mall -- postpone it to the next day.
  4. Unplanned trips like emergency visits to the hospital are exempt from this boycott.
  5. If you use autos for a part of your commute, use a share auto. Or better still, walk.
  6. If you feel bad because you will be hurting your friendly neighbourhood auto stand folks, please move to the side over there; our trained staff will be shortly with you to administer our in-house behaviour modification regimen that will wean you off the practice of being friendly with unethical and unsavory characters.
  7. Lather, rinse and repeat once every month for the next six months, or till all autos run on meters (whichever occurs earlier).
I think that about covers it. I'll update this list when I think of more scenarios and objections.

One objection is what if the tables are turned on us in the form of an auto strike? There are two answers to this:
  1. Thanks very much for the pre-season practice.
  2. To paraphrase the IRA's rejoinder to Maggie Thatcher, 'We can do this every month; heck, every week. Your wallets will allow you to do this only a few times'.
One can always dream.

Friday, January 10, 2014

January 10, 2014

... and the award for Honesty in Nomenclature goes to The Centre With Potential for Excellence in Environmental Science.

In this age of shameless self-promotion and hyperbole, it's refreshing to see somebody state exactly where they are: they've not achieved excellence yet, but the potential is there. Although I'm somewhat skeptical of the claim of potential too, considering that they're a government organization (going by the 'G' on their vehicle's license plate). But still. Well played, sirs.

Tuesday, December 31, 2013

Book Review: Keeping Up With the Quants

When all you have is a six-step formula, even a philosopher running naked through the streets of Athens, genitals flapping furiously in the breeze, can be shoehorned to fit into your pet paradigm.

Don't. Buy. This. Book.

Credit is however due to the authors for turning what should have been nothing more than a lengthy blog post into a book with all of 200-odd double-spaced pages. It does help when you can liberally quote blog posts and other more-or-less unrelated text snippets as well, not to mention repeat your six-step mantra every opportunity you get. No credit to you if you were unlucky enough to have bought the book rather than borrowing it from the library like I did.

While on the subject of inducements to buy, here's a pro-tip for aspiring authors: liberal application of maalish, in the form of quotes for your book from popular figures (Larry Summers excluded; the page containing his words of wisdom alone is enough grounds for taking the book to the shredder and torturing it slowly, while giving it false hopes by periodically pretending to put it back on the bookshelf) can persuade these quoters (don't bother; it's not a real word) to provide some more quotes to adorn the back of the dust jacket.

One might argue that the book is targeted at senior executives who don't know quantitative analytics, but if a senior executive reads gems like "Since data itself does not tell us anything, we need to analyze it in order to decipher its meaning and relationships" and a light bulb goes off in his brain, it's time to short his company's stock, folks.

The book does have some good things, stuff like when to use which statistical technique, references to other material, and so on, but as I mentioned earlier, nothing that can't be said in a crisp blog post.

Oh, and providing free advertising for NCSU's MSA program? You've got to be kidding me.