Thursday, April 11, 2013

Building a Lisp Interpreter from Scratch -- Part 4: Memory System

(This is Part 4 of a series of posts on pLisp)

(Note: This post is quite out of sync with the code base; please see Part 13)

As I mentioned briefly in Part 3, memory in pLisp is allocated from a fixed-size heap and objects are referred via indexes (called RAW_PTRs) into this heap.

Memory is addressed in pLisp not at the byte level, but at the word (32 bit) level, as indicated by the typedef for OBJECT_PTR (unsigned int). This is inefficient when we're dealing which characters, for example, but efficiency is not the primary concern for us.

The interface to the memory system is through three calls:

RAW_PTR object_alloc(int);
void set_heap(RAW_PTR, OBJECT_PTR);
OBJECT_PTR get_heap(RAW_PTR);
  1. object_alloc() is the equivalent of C's malloc(). It takes as argument the number of four-byte words to be allocated, and returns a RAW_PTR that points to the newly allocated space in the heap.
  2. set_heap() sets the pointed-to memory location in the heap to the given OBJECT_PTR value.
  3. get_heap() is the read counterpart of set_heap().
There is no deallocation procedure because we have GC that kicks in right after a form has been evaluated and its results reported to the top level. GC is a topic for another post.

The memory system is a straightforward text book implementation. We maintain a list of available chunks/segments of memory in the form of a linked list (initially there is just one big segment as big as the full heap; this gets chopped up as allocation requests are serviced).

The first word of a segment contains its size; the next word points to the next available segment. The subsequent words constitute the space available in that segment:



We maintain two variables called 'free_list' and 'last_segment' to store the start and end of the linked list respectively. To allocate memory of a certain size, we walk the free list and stop when we encounter the first segment that is large enough for our needs. The segment is removed from the list and its space is given to pLisp; whatever is left over is packaged off into a new (smaller) segment. An obvious improvement would be to look for the segment whose size most closely matches the amount of memory requested, rather than settle for the first segment that meets our needs. When it's time to free memory -- through GC -- the segment to be deallocated is simply attached to the free list at the end.

To illustrate this with an example, here's the implementation of the CONS operator:

OBJECT_PTR cons(OBJECT_PTR car, OBJECT_PTR cdr)
{
  log_function_entry("cons");

  RAW_PTR ptr = object_alloc(2);

  set_heap(ptr, car);
  set_heap(ptr+1, cdr);

  insert_node(&white, create_node((ptr << CONS_SHIFT) + CONS_TAG));

  log_function_exit("cons");

  return (ptr << CONS_SHIFT) + CONS_TAG;
}

Ignore the call to insert_node() for now; this is for GC and doesn't have a bearing on what we've discussed so far. Creation of objects of other types in pLisp follows the same template:
  1. A call to object_alloc() to allocate the memory
  2. Call(s) to set_heap() to populate both the type-specific information (e.g. length for array objects) and the object content itself (array elements, for example)
  3. Decorating the RAW_PTR with the relevant object tag and returning it.
And we're done with memory.

Tuesday, April 09, 2013

April 9, 2013

Netherlands is the next crisis candidate to fall (via Mish):
The Netherlands is still one of the most competitive countries in the European Union, but now that the real estate bubble has burst, it threatens to take down the entire economy with it. Unemployment is on the rise, consumption is down and growth has come to a standstill. Despite tough austerity measures, this year the government in The Hague will violate the EU deficit criterion, which forbid new borrowing of more than 3 percent of gross domestic product (GDP).
It's a heavy burden, especially for Dutch Finance Minister Jeroen Dijsselbloem, who is also the new head of the Euro Group, and now finds himself in the unexpected role of being both a watchdog for the monetary union and a crisis candidate.
Is this the same joker who got into trouble over his 'what's happening in Cyprus is a template' comment?  What do you know, it is. If you swing your leg too far back to kick someone, watch out, it could be your own ass that's gets the whupping.

Shouldn't speak ill of the dead, but this is hilarious:
"How should we honor her? Let’s privatize her funeral. Put it out to competitive tender and accept the cheapest bid. It’s what she would have wanted." said left-wing film director Ken Loach, according to Yahoo Movies. The funeral at St Paul's Cathedral is expected to cost around £8 million.

Friday, April 05, 2013

Building a Lisp Interpreter from Scratch -- Part 3: The Object System

(This is Part 3 of a series of posts on pLisp)

(Note: This post is quite out of sync with the code base; please see Part 13)

As I mentioned briefly at the end of Part 1, objects in pLisp are denoted by OBJECT_PTROBJECT_PTR is nothing but a fancy name for unsigned 32-bit integers:

typedef unsigned int OBJECT_PTR;

The 32 bits in an OBJECT_PTR do two things:

1. Specify what type of object we're looking at
2. Depending on the type of the object, either store its value, or point to where the value is stored.

#1 is accomplished by the last four bits, called the tag bits, and the remaining 28 bits take care of #2. Before dissecting OBJECT_PTR, a brief digression is in order: we need to understand how memory is handled in pLisp. I plan to do a separate post on the memory model, so I'll stop with a few key pieces of information that are relevant here.

Memory is allocated out of a heap, whose size is specified in the code (TODO: pass this as a command line parameter):

#define HEAP_SIZE 8388608

This memory is in the form of an array indexed by RAW_PTR values which are, surprise surprise, unsigned integers in drag:

typedef unsigned int RAW_PTR;

Digression over.

The table below lists the pLisp object types and how an OBJECT_PTR value is deconstructed to yield them (click to see full size):




Most of this is pretty self-explanatory, however a couple of explanations are in order:


First, implementing the full IEEE floating point format is too painful (I had done this for Vajra), so I enlisted the help of the C runtime for this. A float value is stored in a union:


union float_and_uint
{
  unsigned int i;
  float f;
};

When we want to extract the float value from an OBJECT_PTR, we simply extract the first 28 bits from it, index into the heap using these bits,  and store the heap content at that index into the 'i' value of the union, and voila, the 'f' value automagically contains the correct float representation. The same process in reverse works for creating the OBJECT_PTR value.

Second, we resort to some hackery for continuation objects as well. The only piece of information a continuation object has to store is the stack object active at the time of the creation of the continuation, so it seems wasteful to use the heap for this. Instead, we simply convert the stack object (a CONS) into a continuation object by manipulating the last four tag bits.

Thursday, April 04, 2013

Building a Lisp Interpreter from Scratch -- Part 2: Core Forms

(This is Part 2 of a series of posts on pLisp)

Before looking at the object model of pLisp, we turn our attention to the core forms in our interpreter. Core forms are the primitive expressions that need to be handled by the interpreter; they cannot be palmed off to the libraries, where they could be implemented in pLisp itself.

Here's a list of the core forms. Quite a few of them are there because of necessity (see above), while some of them are more for convenience, i.e, life as we know it would not end if they were absent. Also, if you want to do anything practical, say arithmetic, strings, arrays, and so on, and not end up with an interpreter that just manipulates symbols, you need things like +, -, ARRAY-GET, and ARRAY-SET (not to mention PRINT for output).

'Core' core forms QUOTE, LAMBDA, IF, SET, CALL-CC, DEFINE, CONS, EQ, ATOM, CAR, CDR
Basic real-world stuff+, -, *, /, GT, PRINT, ERROR
Intermediate real-world stuffSTRING, MAKE-ARRAY, ARRAY-GET, ARRAY-SET, SUB-ARRAY, ARRAY-LENGTH, PRINT-STRING
Advanced real-world stuffCREATE-PACKAGE, IN-PACKAGE, CREATE-IMAGE, LOAD-FOREIGN-LIBRARY, CALL-FOREIGN-FUNCTION
ConveniencePROGN, SETCAR, SETCDR, LISTP, SYMBOL-VALUE
MacrosCOMMA, COMMA-AT, BACKQUOTE, MACRO, GENSYM
DebuggingENV, BREAK, RESUME, BACKTRACE, EXPAND-MACRO
Up to elevenEVAL

A few things:

1. EQ tests for equality of content.

2. QUOTE, BACKQUOTE, COMMA and COMMA-AT are not the operators' real symbols; they are indicated so to avoid confusion with punctuation (ditto for GT, but this has more to do with my laziness in working with HTML tags).

3. PROGN can actually be implemented as a macro using a series of LAMBDAs; I just went with a native implementation. Macros involving LAMBDAs are used for implementing WHILE and LET, however (the LET macro uses the MAP function in turn):

(defmacro while (condition &rest body)
  `(((lambda (f) (set f (lambda ()
                          (if ,condition
                              (progn ,@body (f)))))) '())))

(defun map (f lst)
  (if (null lst)
      nil
    (cons (f (car lst)) (map f (cdr lst)))))

(defmacro let (specs &rest body)
  `((lambda ,(map car specs) ,@body) ,@(map cadr specs)))

4. The other comparison operators are implemented using macros. 

5. LISTP can be implemented as a macro as well, through ATOM.

6. Strings are implemented as arrays, the corresponding GET and SET are again taken care of by macros.

7. DEFUN and DEFMACRO are macros that build on LAMBDA and MACRO respectively.

8. Did I mention that macros are awesome?

Astute readers may be wondering by now what kind of a bastard Lisp they're looking at. I initially started out with Common Lisp in mind (though building pLisp as a Lisp-1), then made a detour into Scheme -- mainly for the continuations -- before I decided to persist with the veneer of CL (maybe not just the veneer; the macro system is more or less full CL; I didn't venture into Scheme syntax rules territory at all). Anyway, to a large extent, one dialect of Lisp can be made to look like another by liberal and injudicious usage of macros, so it doesn't matter that much for our purposes, I guess.

Tuesday, April 02, 2013

Building a Lisp Interpreter from Scratch -- Part 1: Syntax and Parsing

(This is Part 1 of a series of posts on pLisp)

OK, first things first. Before we can start interpreting our lisp code, we need to parse it. Conventional wisdom says that we don't need to use tools like Flex and Bison for this, since Lisp syntax is simplicity itself, and we can roll out our own parsing and scanning functionality. We're not bowing to conventional wisdom; at least I didn't, so Flex and Bison it is. I can hear somebody in the back benches muttering "so much for the 'from scratch' bit": I assure you, this is the only place where we don't roll out our own (actually there are two other pieces of functionality where we make use of third party code, but those are orthogonal to or not directly related what we're trying to achieve, so they don't count. Sue me).

The tokens we're interested in are:
  • Symbols (abc, x, ...)
  • Integers
  • Floating point numbers
  • String literals ("Hello world")
  • Character literals (#\a)
  • Left and right parentheses
  • Quote
  • Back quote
  • Comma
  • Comma-At
Inquiring minds can now mosey over to GitHub for a look at plisp.lex.

In addition to these, we also handle single- and multi-line comments, ignore white spaces and arrow key presses.

A Lisp form begins and ends with parentheses. When all the currently open parentheses are closed, it means the interpreter has something to start interpreting. Needless to say, if you pass the interpreter a parenthesis-less form, i.e., a symbol, a literal or a number constant, this will also be interpreted.

Before we feed the interpreter the form in a, well, form suitable for interpretation, we need to discern its structure. This structure is represented by a typedef (oh, by the way, now would be as good a time as any to mention this: we're doing the whole thing in C):

typedef struct expression
{
  int type;
  char *package_name;
  char *atom_value;
  int integer_value;
  float float_value;
  char char_value;
  int nof_elements;
  struct expression **elements;
} expression_t;

The type member indicates what is the type of the expression, captured in these #define's:

#define SYMBOL 1
#define LIST 2
#define INTEGER 3
#define STRING_LITERAL 4
#define CHARACTER 5
#define FLOAT 6

(Source)

The rest of the fields store the value of the expression, depending on its type (e.g. atom_value will be for the case where the expression is a symbol, char_value for when it is a single character, and so on). The elements member stores the elements in case the expression is a list. An added wrinkle is the package name, to handle cases where the symbol name is preceded by the package name, as in 'math:power').

The conversion of the token stream into an expression_t structure is done in plisp.y, the scanner. The distilled logic is as below:

expression: atom | list;
atom: integer | float | string_literal | character_literal | symbol;
list: expressions_in_parens | quoted_expression | backquoted_expression | comma_expression | comma_at_expression;
expressions_in_parens: left_paren expressions right_parens;
quoted_expression: quote expression;
backquoted_expression: backquote expression;
comma_expression: comma expression;
comma_at_expression: comma_at expression;
expressions: /* empty */ | expressions expression;

On a side note, by suitable manipulation of the yyin variable, we can feed the interpreter input from stdin, or from a file of our choosing (e.g. to load the pLisp library).

Once yyparse() has had its way with the input, the interpreter is all set to begin. But we'll delay things a bit more, for a very good reason: in Lisp, code and data are the same (the fancy word for this is homoiconicity), so we get a lot of bang for our buck if we convert an expression_t object to a pLisp object (denoted by OBJECT_PTR) before giving the interpreter the go-ahead. The pLisp object model is the subject of another post.

Building a Lisp Interpreter from Scratch


pLisp now has continuations. It took a lot of effort, slogging through the relevant literature, and a significant rewrite of the code, but it's finally done (I have not updated the GitHub repository yet; plan to do it shortly [Update: Done]).

Before proceeding further with other features, I thought I'd do a series of how-to posts on pLisp. These will serve as a sort of de facto documentation of pLisp (beats the 'You want documentation? Go to The Source, my friend' approach), and also provide pointers to folks looking to do their own projects (there's plenty of material out there on building/embedding an interpreter within a Lisp implementation; in my opinion, while this is good, it's a cop-out; such interpreters are meant mainly for illustrating concepts, trade-offs in design choices, etc. We still don't pierce the veil, so to speak. Not to mention the obvious hit in performance).

Here's a tentative list of posts:
Stay tuned.

Tuesday, March 26, 2013

March 26, 2013

"I personally believe that Hugo Chávez was murdered by the United States"
-- William Blum

I have been meaning to mention this earlier, but got around to it only now: kudos to William Blum for stating something that is on every progressive's mind but not voiced out loud for fear of being accused of tin-foil hattery.  From the referenced essay:
Chávez said he had received words of warning from Fidel Castro, himself the target of hundreds of failed and often bizarre CIA assassination plots. “Fidel always told me: ‘Chávez take care. These people have developed technology. You are very careless. Take care what you eat, what they give you to eat … a little needle and they inject you with I don’t know what.”
 Six words for doubters: Confessions of an Economic Hit Man.

Sunday, March 24, 2013

March 24, 2013

After seeing that their whining full page ads (grammatical errors, misplaced commas and extra-liberal application of exclamation marks and all -- couldn't such a wealthy industrial house afford a decent copywriter?) failed to elicit any support or sympathy for their cause, the Sahara parivar have resorted to more blatant means: flaunting their political connections by publicizing (through full-page ads, natch) pictures of the movers and shakers who attended the rice-eating ceremony of one of their scions (didn't know the rich and the famous celebrated something as mundane -- and yet out of reach for millions of Indians -- as eating rice; maybe that's why they're rich).

Saturday, March 23, 2013

March 23, 2013

From a column (via Deccan Chronicle) about the Sri Lankan issue:
What’s clear is that India’s ability to influence the course of events in the island nation is negligible. Sources close to the powerful first family have told this writer that they see India as an “irritating gnat that can be smacked away at will”.
This is exactly what's wrong with journalism, something Markandey Katju can train his guns on: quotes -- inflammatory ones, at that -- attributed to anonymous sources that only the journalist is privy to. Do we have any way to distinguish genuine quotes from those that are simply pulled out of journalists' asses, journalists serving interests other than that of the public? We don't, so just stop using such quotes. We may lose the insights that genuine quotes provide, but this is a small price to pay to ensure the integrity of the press. On a side note, the incendiary nature of the quote makes it all the more likely that revealing it to the public is meant to elicit reckless action, either from the government or from jingoistic elements outside.

The CBI inquiry scandal throws up an interesting thought: were the raids/investigations initiated by somebody against the UPA? Maybe somebody with leanings towards the BJP? What better way to make the Congress tie itself into knots, trying simultaneously to condemn the action (and protect its erstwhile allies) and to show that it doesn't pull the CBI's strings? Our politicians' actions are a conspiracy theorist's delight, aren't they?

Monday, March 18, 2013

March 18, 2013

The Cyprus bailout fiasco is being described as " the single most inexplicably irresponsible decision in banking supervision in the advanced world since the 1930s.":
[EU officials who engineered this weekend's Cyprus bank bailout] have weakened – perhaps catastrophically – the principal pillar supporting modern banking. This pillar is deposit insurance. Ordinary savers who had received a solemn assurance that deposits up to 100,000 euros were safe are now being asked to take a haircut. This raises questions about deposit insurance throughout the EU and invites runs on banks not only in the most “financially-challenged” nations such as Greece and Spain but even in Italy and France.
Methinks life will go on. They said the same thing about the sanctity of contracts and the credit markets when holders of Greek bonds were made to take haircuts; the haircuts were 'voluntary' to avoid triggering credit default swap payments.

Welcome to Flight Club, where the only rule is "We make up the rules as we go".

Wednesday, March 13, 2013

March 13, 2013

Leaving aside the emotions, jingoism and nationalism on both sides, what could be a possible solution to the Italian Job controversy? Well, here's a part-pragmatic, part-diplomatic and part-mafioso proposal that our MEA boys can reach out to the Italian government with:
  1. Send the two marines back to India (no, hear us out, seriously).

  2. We will pull strings here to make sure that they will return to Italy for good, within two months. You can trust us on this -- after all, we're talking about a sovereign country here, an upstanding member of the international community that honours its commitments... oh wait, never mind. On to the next point, anyway.

  3. As escrow/guarantee, we will depute one of our respected diplomats -- maybe even the head honcho himself -- to spend the two months in Rome, all expenses paid by us, of course. He/She will return to India only when the marines make it back to Italy. Heck, the same flight can do both legs of the journey, with the personnel exchange being witnessed on the tarmac by a designated and disinterested third party. We know we're preaching to the choir, but still: if you have any clarifications, please refer to The Godfather for modalities and variations on the theme.

  4. Coming to how we will pull off #2 above, the case against the two marines is not watertight, anyway. If there's still any uncertainty, leave it to us; we have handled such things before.

  5. To sweeten the deal, and to pacify the natives, please deposit a sum of Rs 20 crores as compensation to the victims' families. The Rs 6 crore bank guarantee can be adjusted against this amount, of course.

  6. If you would like to discuss this further, or propose changes, discuss logistics, etc., please don't hesitate to either call us at our toll-free number 1-800-WE-MAKE-DEALS or email us at mea@top-secret.gov.in. Thank you.

Tuesday, February 12, 2013

February 12, 2013

When we think of our government, what comes to mind is the avuncular and benign face of Manmohan Singh, who means well but is way out of his depth; Sonia Gandhi, who has experienced personal tragedies because of her family's involvement in politics, and who still perseveres in serving the country; venal politicians and bureaucrats, who engage in petty machinations in their quest for power and pelf.

But once in a while, something happens that changes our perspective; we see the government for what it actually is (whether this happens consciously or is, for want of better words, an epiphenomenon, or more accurately, an example of swarm 'intelligence'): a scheming sociopath. A government that keeps the rejection of a mercy petition secret and sets a date for the execution. A government that sends the intimation to the death row prisoner's family by Speed Post one day before the planned execution when it knows that Speed Post only guarantees that articles will be delivered anywhere in India in four to six days. A government that is so paranoid about its survival prospects that it is willing to end a person's life just to send a message to the voters that it is as good as the opposition in some nebulous metric like "Strong/Firm on terror". A government that pretends to be afraid of the backlash that would supposedly arise if news of the planned execution was released, but is strong enough and brave enough to face the backlash -- through curfews, preventive/house arrests and tear gas and lathi charges -- when the execution has been carried out. A government that is engulfed in white-hot rage because somebody dared to attack it in its own den, its seat of power.

Irrespective of how one feels about Afzal Guru's guilt and whether capital punishment should be abolished or not, one thing we don't want our government to be is a relentless, vengeful, all-powerful serial killer who also keeps stealing stuff, while occasionally shooting himself in the foot accidentally.

On a side note, Praveen Swami's demolishing of Arundathi Roy's melodramatic piece on the execution is a must-read, if only to avoid being misled by her half-truths and general BS (I know, I've said nice things about her in the past, so bite me).

Friday, January 18, 2013

January 18, 2012

Well, it looks like beheadings by both sides are pretty common:
Despicable as the alleged beheading of Indian soldiers by the Pak­i­s­t­anis was that led to the present military crisis, the fact is that both armies are or have been in it to­g­e­ther. India’s ace TV anchor Barkha Dutt will do the country and the community of journalists a great service by speaking up at this time. She gave the following eyewitness account of the Kargil War to more or less affirm a tradition of beheading the enemy that unfortunately seems to exist on both sides and pe­r­haps straddles other countries too. And I quote from writer-acti­vi­st Shuddhabrata Sengupta’s web­po­st for the piece Barkha Dutt published in Himal magazine in June 2001. 
“I had to look three times to make sure I was seeing right. Bal­a­nced on one knee, in a tiny alley behind the Army’s administrative offices, I was peering through a hole in a corrugated tin sheet. At first glance, all I could see were some leaves. I looked harder and amidst all the green, there was a hint of black — it looked like a moustache. ‘Look again,’ said the Army Colonel, in a tone that betrayed suppressed excitement. This time, I finally saw. It was a head, the disembodied face of a slain soldier nailed on to a tree. ‘The boys got it as a gift for the brigade,’ said the Colonel, softly, but proudly.”

Friday, January 11, 2013

January 11, 2013

If you gaze into the abyss, does the abyss also gaze into you even if you are an Indian? Is my country always right? If you are a 70-year-old grandmother sneaking into PoK, and nobody knows that you've sneaked in, are you an Azad Kashmiri, and is the ceasefire broken? Does it matter if Reshma Bi ran across the Line of Control 16 months ago or six weeks ago? Can we extradite her to India and request her to give a series of expert lectures on guerrilla warfare to our OTA cadets? Is constructing watchtowers a violation of the ceasefire? Even if the watchtowers are facing inwards? Is intimation through a public address system the only way to let somebody know that they're violating the ceasefire? Who pays the bill for the hot line between the GOCs? Is beheading enemy soldiers so common as to warrant something like "...both sides have engaged in cross border raids, which have on occasion included beheadings", almost as if one were referring to an exchange of sweets on Independence Day ("You must try these rasgollas... Oh, almost forgot..." <chop>)? What is a controlled retaliation? Does Praveen Swami have an inside track with respect to the Indian military establishment? Speaking of the establishment, what are the covert actions that B Raman is referring to as retaliation for the Pakistani action? Who are our prospective allies in Pakistan? Does Sarabjit Singh know what these covert actions are? If he does, what does he think of them? What does Afzal Guru think of all this? What about Rabbani Khar? Ban Ki Moon?

(Apologies to Crispin Glover)

Thursday, December 20, 2012

December 20, 2012

Shame on you, Saina:
Cocking a snook at the Badminton Association of India, a defiant Saina Nehwal chose to withdraw when holding two match-points against Russian Ksenia Polikarpova in the first round of the $120,000 Syed Modi Grand Prix Gold badminton championship here.
The World No. 3 cited a knee-injury that had troubled her from this year’s Denmark Open as the reason for her decision to withdraw when leading 21-17, 20-18 against a rival ranked 165th.
“With many important tournaments lined up next month, I decided not to aggravate the injury,” said a smiling Saina after she waved to the disappointed crowd for cheering her all the way in the 29-minute encounter.
and
“Throughout the year, the BAI does everything that Saina wants. Government allows Saina economy class (airfare) but BAI helps her travel First Class by paying the difference in fare. In return, BAI wants her to play in a couple of events in the country. But that is not happening,” said a senior BAI official on condition of anonymity.
and
By the end of the day, a ‘chastened’ BAI must have realised that it is better to accept a firm ‘no’ than a reluctant ‘yes’ from Saina. As one of the BAI official put it, “Sadly, the truth is, the Indian badminton needs Saina Nehwal more than Saina needing Indian badminton.” 
Methinks somebody's shoes are getting too small for them. To be fair, it could be advice from questionable sources that is causing this kind of behaviour.

Thursday, December 13, 2012

December 13, 2012

It may be possible to test whether we're living in a simulation.

An earlier article that says there may be a 20% chance that we do.

Via Rigorous Intuition, a mind-blowing argument.

Let's see:
  1. This explains the Big Bang. Things started when the simulator program was kicked off.
  2. Things are discrete in the quantum world because the simulation is, by nature, discrete -- whether it's event-driven or time-stepped.
  3. Non-local connections are explained as well -- the 'master controller' is the CPU running the simulation, and it has access to (and is able to maintain) all the simulation objects and their dependencies, irrespective of where they are in the simulated world.
  4. The usual paradoxes like wave-particle duality, the uncertainty principle, and so on are explained by the analogy of mathematical formulas and 'lazy initialization'.
  5. Karma and synchronicity? Global state/memory/logic in the simulator program.
  6. God is the entity running the simulation.
Of course, this still doesn't explain things like ultimate cause (is our God also a simulated entity? How many levels does this go?).

Related: good stuff from Reddit.

Tuesday, December 11, 2012

December 11, 2012

fool  

/fo͞ol/
Noun
A person who acts unwisely or imprudently; a silly person: "what a fool I was to do this".

id·i·ot  

/ˈidēət/
Noun
  1. A stupid person.
  2. A mentally handicapped person.
Effing idiots. Or are they fools? Now I'm confused.
Context: this and this.

Tuesday, December 04, 2012

December 4, 2012

Awfully decent of the Chinese, preferring to pay for stuff rather than pillaging and plundering the to-be-annexed Indian territory:
In 1962, for example, Deak warned the CIA that China was planning to invade India after his company’s Hong Kong branch was swamped with Chinese orders for Indian rupees intended for advance soldiers.

Wednesday, November 28, 2012

November 28, 2012

Sachin Tendulkar:
When I feel it is time, I will take a call. It is going to be a tough call nevertheless. It is going to be tough because this is what I have been doing all my life. It is going to be difficult to suddenly hang up my boots one day.
I have the highest regard for Tendulkar, but somebody please give the man a copy of Who Moved My Cheese?

Reason #1876 why I'm glad I didn't take the civil services exam -- questions like this:
Domestic resource mobilisation, though central to the process of Indian economic growth, is characterized by several constraints. Explain in ten words.
I made up the "ten words" bit, but I think I would have shown myself the door because my ten words would have been roughly divided as below:
  • Babus
  • Netas
  • Corruption
  • Nexus
  • Six words unprintable in a family blog

Monday, November 26, 2012

November 26, 2012

One little-noticed wrinkle in the recent failed no-confidence motion is that it serves as 'inoculation': no other such motions can be brought up against the government for the next six months. Watch out for attempts to push through more audacious policies/legislation, without any worries about the government falling because of such attempts.

Friday, November 23, 2012

November 23, 2012

Even when victorious, let there be no joy,
    For such joy leads to contentment with slaughter.
Those who are content with slaughter
    Cannot find fulfillment in the world.
-- Tao Te Ching

Something entirely lost on these joyous folks. Contrast this with the reaction of Major Unnikrishnan's father.

I think I've said this before, but will say it again: the best way to decide whether somebody gets the death penalty is the Arab/Shariah custom of putting the question to the victim's family. Needless to say, this is not a pardon, but only to decide whether the murderer is put to death or spends the rest of his life (life; not 14 years commuted to 10 on account of Gandhi Jayanti, good conduct, and so on) in prison.

Wednesday, November 21, 2012

November 21, 2012

Yeah, that about sums it up:
Let's clear this up again. The ECB is going to buy bonds of bankrupt banks just so that the banks can buy more bonds from bankrupt governments. Meanwhile, just to prop this up the ESM will borrow money from bankrupt governments to buy the very bonds of those bankrupt governments.
Another interesting tidbit from the report: the demographics are so bad in Japan that they actually have adult diaper fashion shows.

Wednesday, November 14, 2012

Quote of the day

[H]aving the career of the beloved CIA Director and the commanding general in Afghanistan instantly destroyed due to highly invasive and unwarranted electronic surveillance is almost enough to make one believe not only that there is a god, but that he is an ardent civil libertarian.
-- Glenn Greenwald

Tuesday, November 06, 2012

Predicting the English Premier League - Part 3

Having just completed the machine learning course in Coursera, time to put the knowledge to good use. Neural networks seem to be the most promising among the classification algorithms (logistic regression and SVMs being the others covered in the course) -- I did do bit of mucking around with logistic regression, but the results were singularly disappointing.

Since we're dealing with neural networks, no need to be picky with what features to use; in addition to the ten parameters considered the last time, let's throw in as many additional ones that we can think of, and let the algorithm sort it out. Here are the features forming the input layer (the features are normalized -- something I didn't do the last time):
  1. Home record of home team
  2. Away record of away team
  3. Record of home team
  4. Record of away team
  5. Record of home team in last three games
  6. Record of away team in last three games
  7. Record of home team in last five games
  8. Record of away team in last five games
  9. Record of home team in last seven games
  10. Record of away team in last seven games
  11. Record of home team in last three home games
  12. Record of away team in last three away games
  13. Record of home team in last five home games
  14. Record of away team in last five away games
  15. Record of home team in last seven home games
  16. Record of away team in last seven away games
  17. Total goals scored by home team
  18. Total goals scored against home team
  19. Total goals scored by away team
  20. Total goals scored against away team
  21. Position of home team in points table
  22. Position of away team in points table
We use one hidden layer with five activation units -- could've used more hidden layers, but the code I wrote for the course assignments is for a single hidden layer, and I'm too lazy to bother to make the code more general. Not to mention that the efficacy of using more layers is moot.

The examples are a total of 560 matches from the 2010-11 and 2011-12 seasons (we ignore the first few weeks of each season to a) get things to settle down and b) avoid division-by-zero errors for some of the features (e.g. when we're considering the first match a team plays in the season).

350 matches are used as the training set and 30%, i.e. 105, from the remainder form the cross validation set.

After a lot of number crunching, the results are not too good, at least not yet. It looks like I'll be needing more data (as indicated by the results from the learning curve plots). A lambda value of 0.16 or 0.32 seems to be the most promising.


The next step is to get the results for the 2009-10 season -- and earlier if required. More grunt work. Stay tuned.

Update: Well, I went all out and got the results for three seasons -- 2007-08, 2008-09 and 2009-10 -- but no cigar; the prediction accuracy refuses to go above ~50%, whatever values of lambda and feature list I consider (I added two more features to the above list: total games played so far by both teams). It might be possible to squeeze out a bit more by running a genetic algorithm and figuring out the best lambda value and features, but I don't think the effort is worth it. Question: what is the minimal prediction accuracy required to get a 20% return on bets over the long-term, e.g., over an entire season?

Friday, November 02, 2012

Question of the day

"After hundreds of drone strikes, how could the United States possibly still be working its way through a 'top 20' list?"
-- Gen. Ashfaq Parvez Kayani to Adm. Mike Mullen

Sunday, October 28, 2012

October 28, 2012

Imagine a slightly larger-than-life statue of a naked boy-man wearing only the remnants of a pair of jeans and a hat that looks like a flak helmet, his foot resting on the severed, blood-dripping head of a Roman legionary.

Oh wait, you don't have imagine it. Here's an actual picture:


Picture courtesy of the Rock Garden, Malampuzha, Kerala. I'm too lazy to google for it, but I bet there is a back story involving a twisted and diseased mind that spawned the whole house of horrors (the above picture is only a sample; there's a lot more cringe-inducing crap in my vacation pictures folder). 

Saturday, September 29, 2012

September 29, 2012

Comment of the decade (on Business Insider's 1068th Marissa Mayer story):

Is Farrukh Dhondy aware of Nafeez Ahmed's post about Abu Hamza's links with MI6? The sad part is that the visibility such an op-ed column gets is orders of magnitude greater than what Nafeez Ahmed's writing does.

Thursday, September 20, 2012

September 20, 2012

The Hindu on allowing FDI in retail:
Even within the retail trade, the government’s claim that FDI is good for the nation is difficult to defend. The success of large retail cannot be based only on the expansion of the retail space, but requires acquiring a share of the existing space occupied by small retailers. NSSO data for 2009-10 indicate that the occupational category consisting largely of the wholesale and retail trade employed 44 million Indians. The displacement of a substantial number of these workers is inevitable. Since the economies of scale and scope that size delivers in organised retailing are expected to reduce costs by raising labour productivity, the expansion of large retail will not compensate for this employment loss.
Which reminds me of this comment by 'StarmanSkye' at RI:
 I guess the New Politics of neo-Conservative values which we see in the unprecedented official government protection that encourages the power & privilege of the financial criminal class suggests a kind of logical argument can be made that the trend from "Its the duty of every American industry, company, corporation, business person and citizen to maximize their profits by any *legal* means allowed, including evading, deflecting, eliminating or deferring their tax liability" leads to:
"Its the duty of every worker to inhibit productivity by any and all means *legally* allowed so as to stimulate maximal employment of the work force".
Game, set and match.

Thursday, September 13, 2012

September 13, 2012

Rotten meat? More like local traders being undercut by low-cost 'imports' from neighbouring states protecting their turf by siccing the authorities on the pretext of hygiene.

Reminds me of restaurant owners suddenly developing concern for their patrons and trying to protect them from the unhygienic food in roadside eateries some time back.

Thursday, September 06, 2012

September 6, 2012

Well, Mish finally addressed the real estate scenario in India and, as I expected, didn't have nice things to say about it.

There are times when you hear so many good things about something -- be it a book, a movie, or a song -- and when you finally get around to reading/watching/listening-to it, the experience is quite underwhelming because of the raised and unrealistic expectations. Cryptonomicon falls into this category for me. While portions of it were good reading (especially the crypto anarchy bits), overall the book simply rambles on and on for 900+ pages. The fact that I enjoyed Bruce Schneier's appendix on the Solitaire crypto system more than at least 50% of the book says a lot.

Monday, August 13, 2012

August 13, 2012

The Hindu on the trial of Gu Kailai:
However, a detailed account of the prosecutor’s case that emerged late last week has provided rare insights into the dealings of one of China’s most popular politicians, who was a key figure in the 25-member Politburo before his suspension in April. Part of the account was released by the official Xinhua news agency, while other details came from an Anhui student who sat in on the court’s proceedings. His account was independently verified by a lawyer who was present in the courtroom.
Read that again carefully. They're not talking about the lack of transparency regarding the government in China -- contracts, policies, and so on; they're talking about the lengths one has to go to to even know how the trial is being conducted. It's not like state secrets would be laid bare if the proceedings were not held in camera (so to speak); this is just a plain old murder case. But again, this is China we're talking about. There is a good chance that a body double would serve Ms Gu's sentence out.

On a related note, we're once again reminded of the questionable non-merit-based admission policies of Ivy League universities.

Friday, August 10, 2012

August 10,2012

Nicholas Kristof (emphasis mine):
US President Barack Obama's finest moments in foreign policy, like the Osama bin Laden raid or the Libya intervention
Stopped reading right there. Mr Kristof, welcome to the kill file. We have some delightful companions for you there.

Thursday, August 09, 2012

Monday, July 30, 2012

July 30, 2012

The Hindu's policy regarding online comments:
  1. Comments will be moderated
  2. Comments that are abusive, personal, incendiary or irrelevant cannot be published.
  3. Please write complete sentences. Do not type comments in all capital letters, or in all lower case letters, or using abbreviated text. (example: u cannot substitute for you, d is not 'the', n is not 'and').
  4. We may remove hyperlinks within comments.
  5. Please use a genuine email ID and provide your name, to avoid rejection.
I can see where they're coming from with respect to #3 -- they don't want their pages to be polluted by the Neanderthals hanging out at rediff.com -- and find their grammar nazi behaviour naive and endearing, but I still think their backsides need a strong and liberal application of the cluestick.

Tuesday, July 10, 2012

July 10, 2012

Quote of the day: "Next, we'll probably hear that Lloyd Blankfein over at Goldman Sachs has been tinkering with the rotation of the earth in order to gain a few micro-milliseconds of advantage in his firm's high frequency trading rackets."
-- James Howard Kunstler

There has been a lot of commentary about the confusion regarding the name of the Indian prisoner released from Pakistan. In particular, somebody mentioned that the returning (pardoned) prisoner should keep his trap shut and not blab about being a spy for India, as this makes the task of negotiating the release of other such people all the more difficult. Can't really fault this logic, but I have more fundamental issues: why are we sending folks into enemy territory to engage in such acts (not to mention bombings, if the allegations against Sarabjit Singh have any merit)? This may be a naive view of how foreign policy is conducted, but ahem, we are different, aren't we? Ours is the land of Gandhi and the Buddha -- we would never do these things, things that only other countries do, would we? In my rule book, if a fair and impartial trial (best conducted by a disinterested third country like, say, Iceland (I wanted to say Norway, but some folks may remonstrate against this since Norway is -- was? -- involved in mediation efforts in Sri Lanka and may not fully qualify as a disinterested party)) shows that Sarabjit did commit these things he's accused of, he should hang. Period. No 'My country, right or wrong', 'But he was only doing his patriotic bit for the country' business. Patriotism is taking a gun and defending your border against an enemy, not terrorism or other nefarious activities that would get you peremptorily -- and legally, I think -- executed in wartime. One positive fallout of such an action would be that we can mete out the deserved justice to Kasab as well, instead of waiting on him hand and foot in prison. This will also open the eyes of gullible folks who get railroaded into doing James Bond duty for the country.

Friday, June 15, 2012

Quote of the day

"... at times, it was like watching a practice game involving ten green traffic cones as Spain cut Ireland apart.
-- On Ireland's exit from Euro 2012

Ouch.

Wednesday, June 13, 2012

The JEE Controversy

Some thoughts on the JEE controversy (disclosure: I received my bachelor's degree from IIT Madras):
  1. There is merit to the argument that IITs have not fulfilled their mission of making India a science and technology powerhouse. There is a big disconnect between the quality of the undergraduate students (leaving aside the dilution of the standards in recent years) and the quality of the engineering and R&D output produced. Also, a very small fraction of the undergrads take up careers related to their majors (I too am guilty of this). However, this argument is orthogonal to the problem of determining the best way to admit students to engineering colleges in India.

  2. Having each IIT conduct its own entrance examination is not the answer. Subjecting a high school student to, say, 15 entrance examinations borders on child abuse.

  3. The UPA government seems hell-bent on wreaking havoc with the IITs. First it was the increase in the number of IITs, now this. There is a strong lobby of bureaucrats and other elites who want their wards to go to prestigious institutions like the IITs, but are stymied by pesky things like the JEE. The more enterprising of them wangle admissions from top American universities using their connections -- don't even get me started on the backdoor alumni recommendation route that gets somebody like Bush Junior into Yale; god forbid the day such a thing becomes reality in India. The reservation for other backward classes is also an attempt by the elites in this direction. If you can't beat 'em, dilute 'em.

  4. One of the charter goals of the alumni associations should be to protect the IIT brand. I have not been recently involved in the goings-on of the IITM alumni association, so I don't know if this is being taken up. If things continue to progress at this rate, there may come a time when degrees from the IITs are accorded the same respect as those from some of the more infamous colleges in Chennai (one would be surprised to know of the esteem those degrees were held in two or three generations ago).

Friday, June 01, 2012

June 1, 2012

Well, it took three years for my prediction to come true. "We cannot wait forever" -- indeed, how magnanimous of you.

Tuesday, May 29, 2012

May 29, 2012

IPL 5 is over. While the matches provided a lot of excitement, I would be more convinced about the genuineness of the whole thing if someone did an analysis of the numbers and proved that there were no match/spot fixing shenanigans. One thing that comes to mind is no balls: some statistical significance studies on the number of no balls bowled versus the bowlers and at what stage in the match they were bowled, was it a touch-and-go decision or was it blatant overstepping, and so on.

Having recently witnessed the scenes of celebration at the Etihad Stadium, the contrast with the IPL final could not have been starker. The inordinate focus on the owner -- who might as well have worn a clown costume, by the way -- instead of the players who made it happen, the lack of genuine grassroots support (Usha "Look at me, I have a whistle in my mouth" Uthup, Juhi Chawla and other assorted celebrities trying to warm themselves in the spotlights do not count), the contrived joy and enthusiasm of the players who did not figure in the playing eleven -- there is a difference between waiting 44 years for a trophy as compared to five.

Monday, May 14, 2012

May 14, 2012

"Some people believe football is a matter of life and death, I am very disappointed with that attitude. I can assure you it is much, much more important than that"
-- Bill Shankly

You don't care about the quality of the passing, the skills on display, or the individual brilliance. The only thing that matters is that the ball crosses the line between the goalposts, and twice at that. The tears that slowly begin to roll when it looks like it's all over, the look of despair that turns into joy (and vice versa for the United fans -- a bonus if you're a staunch anybody-but-United guy like me), Aguero's shirtless run towards the corner flag, Joey Hart terminating the interview on account of becoming overwhelmed by the situation, the commentator's schadenfreude ("How will the fans face somebody in a red shirt this evening? How will they have the moral fiber to get up tomorrow morning and go to work...?" Fuck you.) turning into astonishment.

The Beautiful Game? No, but this is football.

On a personal note, I'm not even a City fan, but the euphoria I felt when they scored the winner was comparable to what I felt when Del Piero scored in the 2006 World Cup semi-final.

Oh, and by the way, I stubbed my toe quite hard when I jumped up from the couch to celebrate. Still hurts, but totally worth it.

Thursday, May 10, 2012

May 10, 2012

The Times of India might as well rechristen themselves as The Pimps of India.

There is a reason they sell the paper for less than 25 bucks a month: it isn't their readers they make their money from.

Wednesday, May 09, 2012

May 9, 2012

Yesteryear's heartthrob
Is it trademark shake of head?
Is it Parkinson's?


The Havells ad featuring Rajesh Khanna has to be the most depressing thing I've seen on TV for some time.

Monday, April 30, 2012

April 30, 2012

This is probably a hoax, but intriguing all the same.

Staying on the subject of pop culture and hip hop, have you ever watched a movie that was so bad that it went around the world and became good when it came back? Something along the lines of music that gets voted the worst and climbs the chart because of this? Well, I watched such a move yesterday (Torque, in case anyone's interested). Bad (or non-existent, since we're talking about Ice-Cube here) acting, cliched dialogue (case in point: "Don't pick on girls", says the resident bimbo after boinking a bad guy -- my brain cells are still tingling at this repartee), you name it, this movie had it. My only regret is that I couldn't watch it till the end. Just kidding. Maybe not.

Thursday, March 15, 2012

March 15, 2012

I have said this before, but my comment bears repetition in light of today's cartoons. Why do the folks at The Hindu give pride of place (i.e., the op-ed page) to insipid crap like this:


when they have a much better talent on their payrolls, producing stuff like this, stuff which has to languish in the inner pages:

Tuesday, February 21, 2012

Quote of the day

"I am getting out in funny way, like flicking to point"
-- Virender Sehwag on his recent form

Don't know whether to laugh or to cry.

Thursday, February 02, 2012

The Goonda Regiment

The men in uniform are at it again, demonstrating that pesky little things like respect for the rule of law don't apply to them. A couple of questions for them: didn't you swear to protect the country -- which, last time I checked, includes its citizens -- when you signed up in the army? Does beating up innocent civilians who had nothing to do with your tiff with the police jibe with the oath you took? The excuse that the police behaved in an abusive manner does not cut it: two wrongs do not make a right. The particularly galling thing is that the violence was perpetrated not by jawans, but by fricking captains, who are supposed to set an example for the men they command (Update: it looks it was jawans). But then again, I guess this is in keeping with the state of things when you have a Chief of Staff hell-bent on clinging on to his position at any cost.

Tuesday, January 31, 2012

Where are we going?

(Warning: I don't know where I'm going with this post; I guess it ends when it ends)

I used to read Clusterfuck Nation and Club Orlov on and off in the past, whenever somebody in one of my regular haunts made a mention of one of their more noteworthy posts. I subscribed to their RSS feeds a while back (RSS is just like Twitter, except there is no 140 character restriction, and the content is slightly more meaningful than updates about celebrities' breakfasts *snark mode off*). A regular dose of doom and gloom stuff (maybe I should include Mish Shedlock's blog here as well), while fulfilling its disaster porn role, doesn't result in any constructive or positive outcome; for someone in India, being exposed everyday to the 'things have never been better, buy your dream car, your dream house, take your dream vacation, and while you're doing all this, tweet about it to your 1579 Facebook friends in real time using your ultra slim shiny smartphone' hard sell, this seems a world away, but is it really so? What would happen to us if the eurozone crisis finally comes to a head and countries start defaulting? If the price of oil goes through the roof because the USS Enterprise is torpedoed in the Straits of Hormuz? If there is a global ban on travel because of the next outbreak of bird/swine/monkey/rhino flu that came about because some scientist in a lab somewhere was wondering 'Gee, what would happen if I take this test tube of monkey piss and slightly shake it above the head of this disgruntled pigeon who has been looking askance at me since yesterday morning?'? What if the Indian real estate bubble finally bursts? What if the Sensex tanks? What if our exports took a nosedive, taking along with them the aspirations of the newly rich middle class? What if we run out of drinking water? Electricity?

The answer to these questions is pretty simple, really: a lot of people will be screwed, some more so than others. But how many of these scenarios will actually play out within the next year or so (ignoring the bits about electricity and water; I think we're safe on both fronts for another decade)?

One can go about analyzing these issues in a rational manner and doing our research, but this is not really needed; we can figure things out if we keep in mind certain things:

1. If bad things are coming down the pike, they will invariably be dumped on the people at the bottom of the food chain, those who cannot complain too much.

2. People in positions of power and wealth will game the system and get away with it every time.

3. No one can be proven right or wrong when it comes to principles of economics and ideology. The world is too complicated, there are too many variables, you cannot do double blind experiments with control groups, etc. In practical terms, this means that no philosophy or approach can ever be definitively disproved and jettisoned; any pundit worth his salt can rationalize away the failures and non-conformances to the 'model'.

4. People keep expecting the next messiah to solve all their problems. Not going to happen.

5. The kind of hyperinflation or currency crash similar to the experiences of the Zimbabweans or the Wiemar Republic will not happen with either the dollar or the euro.

6. When people in power are in trouble, watch out for distractions, both catastrophic (Iran vs USrael) and merely irritating (retail FDI controversy, Salman Rushdie). Also be prepared for dirty tricks. These people have too much vested in the status quo to go without a fight. They're are also very smart (which is a given considering where they are and how long they have remained there). Cf. Women's reservation bill, Lokpal bill.

7. Everybody has their price.

Applying these, for want of a better term, principles, to all the questions raised above is left as an exercise for the reader.

Friday, December 02, 2011

The Retail FDI Controversy

With all the noise and disruption of parliament over the allowing of FDI in the retail sector, who's now talking about the Lokpal bill? Mission accomplished.

Tuesday, November 22, 2011

pLisp v0.1 released

pLisp (The 'p' stands for 'personal', at least as of now) is an interpreter for a Lisp-1 dialect I have been working on. I had four broad objectives when I started out:
  1. Use the experience to learn Lisp at a much deeper level than what a casual user would attain
  2. Build my own language/development environment, one that I would use for all my personal projects from now on
  3. If I manage to take the project sufficiently forward, build a Lisp development environment for newbies that rivals those of Smalltalk
  4. Use pLisp as a test bed for new research ideas related to programming
I think things are sufficiently mature enough to warrant a 0.1 release, although a not-infrequent assertion failure or segfault cannot be ruled out.

These are the features currently supported:
  1. Basic operators like CAR, CDR, and other language primitives (cf. Paul Graham's 'Roots of Lisp')
  2. Other operators and utility functions written in pLisp itself (there is a rudimentary library at present)
  3. Error handling in the form of an '(error "...")' operator
  4. Garbage collection
  5. A somewhat buggy foreign function interface
  6. Ability to store and load images (aka serialization)
  7. Macros
  8. A rudimentary debugger (step, break, resume, abort)
  9. A package system
TODO list:
  1. More comprehensive error handling; there are a lot of places where sanity checking of parameters is absent, leading to assertion failures or core dumps
  2. Enhancements to the core library
  3. Graphical development environment
  4. Compiler
  5. Continuations and implementations of other 'cool' research ideas
pLisp uses tpl for serialization and libffi for the foreign function interface.

Sunday, October 09, 2011

October 9, 2011

Some random thoughts on the ongoing Rugby World Cup:

1. I've really made an effort to understand the nuances of the game and enjoy it, but it's not easy. The most important thing to keep in mind is that there is only a single line of defence to stop the attacking team from piercing through and running all the way to score a try. This, coupled with the 'no forward passing' and offside rules, pretty much dictates the dynamics of the play. But there is still an element of ugliness to the game, most notably exemplified by the pile of bodies that takes place during a ruck. We have no idea what's happening inside, where the ball is, and so on (wonder how the referee keeps on top of things, short of jumping into the orgy himself). Things are not clean and simple, so to speak (compare this to football: 'you can only kick the ball with your foot; now try and put the ball between the two posts'). The skill displayed by a player is not readily apparent to someone who is not a fan of the sport.

2. Speaking about the refs, it's refreshing to hear the referee (and the adjudicating referee) on the microphone most of the time. More transparency this way.

3. The small number of fouls is quite amazing when compared to, say, football (not talking about technical violations here). My theory is that the 'almost anything goes' nature of the game does away with the need to commit physical fouls. Who needs to break the law when you can legally do a number on your opponent? Rugby players can both dish out and take stuff, unlike footballers who writhe on the ground in feigned agony if an opponent so much as looks at them funnily.

4. Notwithstanding the fact that it takes more strength and stamina to go through 40 minutes of non-stop action than to get through a comparable period in American football, American football is eminently more watchable. The skipping of the heartbeat every time the quarterback is about to pass the ball is missing. There are exhilarating moments in rugby too, like for example when a player dodges the defence and is streaking towards the tryline, but these are few and far between. The strategizing, playbooks, etc. of American football is missing (or maybe I can't figure things out on account of my noobiness).

5. The pre-match war dance (saw the New Zealand team do it today) is extremely silly. Sure, some opponents may get freaked out by a bunch of brutes grunting in tongues, crowing about how they will shove their brawny and tattooed arms up their opponent's asses and punch their intestines black and blue, but any half-intelligent person is more likely to struggle to not double up on the ground with laughter.

Saturday, September 24, 2011

Obama's actually right

Peace will not come through statements and resolutions at the UN. Only wars of aggression, crimes against humanity, and the murder of innocent men, women and children do.

While asking for full membership at the UN is a positive thing, as long as things are decided by the five veto-wielding so-called superpowers, the UN is as good as non-existent. In fact, at least the child-trafficking and other abuse would stop if it were disbanded.

Monday, September 19, 2011

September 19, 2011

One of my pet phobias is large objects. It's not exactly a phobia per se, but more of a slight shiver that runs down (or up?) your spine for a fleeting moment and you quickly think of shining happy thoughts to distract yourself. I think this had its genesis in the movie The Independence Day in which, if I remember correctly, a spaceship a few miles in diameter fills the sky above Washington, DC.

Now just imagine that it's not a spaceship, but the planet Jupiter, and that it's not a few miles in diameter, but is 71,492 fricking miles from one end to the other, and is so big that your entire sky is but a closeup of the planet's terrain.

You don't have to imagine this, actually. You can see a simulation video.

Sweet dreams, here I come.

Saturday, September 17, 2011

Speculators Behind 2008 Oil Shock

Via Rigorous Intuition:
Leaked Documents Reveal Major Speculators Behind 2008 Oil Price Shock

Last month, Sen. Bernie Sanders (I-VT) leaked confidential data about oil speculation to a number of media outlets, including the Wall Street Journal. Ordinarily, the Commodity Futures Trading Commission, the regulatory body that oversees futures trading, does not provide identities of speculators to the public. However, the data leaked by Sanders provides a rare snapshot into the trading volumes by major speculators right before the oil price spike in the summer of 2008.

As experts from Stanford University, Rice University, the University of Massachusetts, and authorities have concluded, rampant oil speculation was the prime driver of the record high prices for crude oil three years ago.
Ahem.