The Amulet of Samarkand

Its been a while, that I wrote about the books I have been reading. Its not that I am not reading anything – its just that I am reading lots of things. I generally read less fiction, and magic and magicians very rarely figure in my list of books. Its not that I am averse to reading them – its generally that there weren’t any good books that I came across or were suggested. The Bartimaeus Trilogy was suggested to me by a colleague of mine. He vouched for it, and said that it was better than Harry Potter (not that it made any difference to me, as I read neither). After some persuasion, I decided that I will read the books. I finished The Amulet of Samarkand and I think, I will continue with the trilogy.
Continue reading “The Amulet of Samarkand”

New category..and a new post in it..

After watching the barrage of senselessness on TV – also called commercials / ads /commercial breaks/ annoyances, I thought, why not write something about these things. Not as someone who wants to make ads, but as an aam admi. Just the plain simple thoughts that strike you when you see an ad. I might not be the target audience for the ads, but as a potential customer, I might be someone whose opinions might count. Anycase, I haven’t decided on how I will *rate* an ad, I will let that evolve. For now, let me just write what I think.

The ad in this post is the Parle Marie Sqaud ad. What do you think ? A Marie Squad – for heavens sake, people, its a biscuit. And Kajol as the ring-leader – hopeless !

Continue reading “New category..and a new post in it..”

Why geeks and nerds are worth it

Via reddit (which is part of my bookmarks folder, btw), I got this link; and what can I say, except for, now that is some publicity for my clan. I am not very sure wether I am a geek or a nerd or neither, but I know people (read girls) who categorize me in one of these categories. So, this particular post, in a sort, vindicates my stand 🙂 Not to mention, the fact that it might do all the geeks out there a tad good, especially in matters related to their social standing <g>. Now, I need to get back to trying some stuff in COM that I wanted to, and then may be start learning Lisp. Did you hear, Lisp – stay tuned !

Psyco internals oversimplified

I chanced on Psyco when searching for something on Partial Evaluations. And Psyco is similar to one – but does a lot more. It is, very simply put, a JIT specializer of Python code. Or, more simply put, it compiles python code into assembly code. What differentiates Psyco from the standard JIT environments is its memory. Psyco remembers the code that was generated for certain Python function, for a certain datatype (this is an important thing to note, as explained further) and when the same function with the same datatype is invoked again, Psyco knows that the machine code for this particular datatype was already generated, and uses the machine code, modifying the data value. A simple illustration will look thus:
Python –> Psyco compiler –> Assembly code –&gt Execute –&gt Psyco compiler
Of course there is more to Psyco than this, and I will try to write about it as I understood (thanks to Armin Rigo on #psyco).
Standard disclaimer: I haven’t looked / debugged the code yet, I am still reading the theory behind psyco – so, some of the things might sound vague / incorrect. Please point me to the mistake(s) and they will be corrected. Also there might be lots of other JIT environments for various languages which use this approach. Please point them, and I will be glad to write about them in a different post.
Continue reading “Psyco internals oversimplified”