my laptop hunt woes

I have been hunting/narrowing down on a laptop i want or need and have come to the conclusion that, unless i build/assemble one myself, i am doomed to buy one of those pre-packaged,over-priced junk.
Sites-wise, Dell’s site is the only one that provides a decent UI of filtering based on features. Lenovo’s is the worst.. It forces you to choose some series based on whatever junk their marketing department decided was their goal. I mean there perhaps is some correlation and it is a good navigation for someone who doesn’t want to spend comparing hardware specs.

But for a Techie like me, that’s outright condescending.
On the packaging, part clearly there is an established habit among consumers to correlate price and HDD size and all the laptop vendors are utilizing it as much as they can.
Don’t get me started on Acer, they have 3 categories Notebooks, Ultrabooks, Netbooks.. WTF is the difference between these nonsense categories??

Toshiba UI compares nicely to the Dell one in terms ability to search by price, but still has the packaging problem. Guess that’s the standard in laptop market and it’ll take sometime for the business model to be disrupted, by a clever, laptop assembling company.

Here’s what i want:
1. Storage: A SSD for hard disk(anything > 32G will do). The point of SSD is just to hold the OS and packages i end up installing and can get to use on the fly. Guess a 64G is a good limit for it. For any data am just going to be using my external SATA Disk.
2. Processor; most of my operations i plan to do are computation intensive. I plan to run some NLP algorithms, Machine Learning algorithms etc… Perhaps i can expand my master’s thesis. So a good processing power is a must. preferably core i7(but due to the packaging and price limit, i might end up going for core i5)
3. RAM: Again given my usage, and that am not a fan of heavy loading complex physics games, a minimum of 4GB DDR3 sounds reasonable.
4. Graphics Card: Again, not being a frothing at the mouth fan of video games, am willing to forgo heavy acceleration graphics card, and settle for normal,decent graphics performance. Intel HD graphics 3000 seems to fit the bill.
5.OS: My biggest grouch/pain-point. I don’t care for Windows 7’s new shiny UI. I have been on linux for a couple of years now, and find it painful to work even on Windows XP. Given that, i would rather, get one without any OS, but it seems like i won’t. I just can’t find a laptop without Windows installed.

From what i understand about the hardware prices, it should be possible to put together a laptop with these component within the 50K-60K INR price range.
But no apparently according to the Dell business/pricing team, if i go for a 6GB RAM i will also want a 1TB hard disk. Darn..

And if i go with a i7 i’ll have to go with a minimum of 500GB HD or 256GB SSD..Gaargh…Either am totally missing something about the hard ware price ranges.. or dell is designing it’s laptop packages to maintain their profit margin. And given my decent Quant. Aptitude skills i suspect it’s the latter.

effects of news of death

It’s amazing the effect death has on one. Or rather the differencehaving met someone makes in the news of death of someone. When i heard my manager’s husband killed himself, was sad for him.

When I heard prabhu, a guy i met at CTC during the yercaud cycling trip, died during another trek, it has upset me long enough to disrupt my work for the day so far. (4-5 hours) .
And am sure, it will get back to me again some time during the week. one of the first thoughts is damn, it could have been me running away from bees and falling into a pool. and drowning.

The more i think about it, the more i am puzzled by the affect this guy’s death raises/arouses in me. I did not know him very well, we met on that cycling trip, and i’ve been out of touch with him after that. He was one of the first bunch to notice me i had fallen and hurt myself, after i was back on the bike and these guys caught up with me.

Maybe, that’s why. the simple act of noticing torn pyjamas and enquiring about it, must have had an impact. Hmm. interesting.

Infact, so much so that, i want to go and meet his parents, but realize, i can’t say much. Usually, these cases, people say their experiences with the dead person,(biased in a positive light ),.

One part, was that i don’t know swimming and i go to treks. Another was the realization of my own mortality.

Not to mention, i was up till 0500 in the morning watching human anatomy videos, cutting and taking apart, cadavers and explaining what happens.

programming abstractions

I remember my first program in C. I remember my self-chosen first programming challenge, write a image processing library in C++ and learn C++ on the way.. Duh.. how naive was i.

Once upon a time i did imagine that new programming languages will make it easier and simpler, how naive was I.

Now 12 years on from when I first learnt C, i see myself still running into frustrating, stuck dead-ends, it actually seems i run into the more often than I used to when i started, funny.. But as joel puts it here, new programming languages don’t make the learning curve shorter or easier. They just make it easier to deal with higher complexity programming projects.

Anyway, right now am stuck at the abstraction level of nagios nrpe application/daemon trying to connect.

And what do i do? i take a break go home.. do nonsense and other stuff and then come back.. I end up getting exhausted or frustrated by the sheer volume and variety of open-source software out there. begin to lose interest in figuring out all those, especially since technology seems to be coming out very very fast. Decidi i should go back to math and work on it.. duh..

But overall it has been an interesting experience so far and good training. one of the next things i need to do is quit the GUI for most of my focused work-mode.. the window focus changing si too demanding and distracting if i have to think deeply. I am beginning to understand why so many people working on multilpe languages and stuff, use the console mode for work.

C_learnings from trying to fix cpython bug #8452

argc passed to a C main function is a special type of variable.
it seems immutable. and not only that it seems like an implicit pointer.
whenever i use it in say memset(ptr,0,argc) it throws me a runtime error
“Use of uninitialised value of size 4”
on the valgrind

Phew,.. i have been trying to moonlight on fixing a cpython bug to add another readline function to the python readline module.
What a task it has been. i have clearly been mis evaluating my C knowledge. While a majority of the language concepts still seem to hold solid, boy my memory of the syntax has been lost.. and perhaps more sadly, my thinking/design thinking has gone so used to python that i just don’t think about types before i use variables… My brain just conveniently ignores them.. damn it.. that’s a bad addiction in general anand….

Anyway, even without all those problems, it turns since i haven’t used gcc, or worked on the cpython code base, it’s stupid of me to make optimistic time expectations.. that eventually led to frustrations..
Anyway, after what seemed to be 10 days’ amount of work (scattered over 2 months of free time), i have got to the state of getting some of the functions registered with python readline module and being able to call them…. Now time to get on to passing on the variables and functionality checking..

I think it’s a good time to write test cases.. will look into that…

i got the prototype function not found error enough no of times , to look it up finally, and learnt that it is an effect of C standard changes.
in a way to work around/for different C versions(pre-ANSI,post-ANSI,ISO C, etc..), it seems gcc has introduced an option of converting function declarations to the format as prescribed by the given C standard in preprocessor directives. Ofcourse, they don’t try to do it themselves, but allow the C programmer to check of the C-implementation and write a prototype(aka template) of function declarations to convert.

To run the gcc compiler with a strict check use -Wstrict-prototype.

Initial part of this activity was painstaking as i used to either cat and grep or manually search for function defs(based on their names and my guess at what they mean). But sometime after a couple of days, i came across cscope -R. i now just hit Ctrl-Shift-t and run cscope -R in the new terminal… I know there’s vim option but am lazy…:). Anyway, thanks to the authors of cscope program.

And now i run into some function called begin_unwind_frame, with cscope’s help i find it is in a file called prot.c and is supposed to be a function from the unwind protect module for bash. Now what the hell is unwind protect module?? I can’t figure from the source code of prot.c what it does, as it seems to use some magic variable ent to set and unset. weary of having to figure out which import header files,contain this variable, i reach for google and end up reading this instead. Ok that’s interesting but the only way it seems relevant to bash or readline is in ensuring that the file handler for the std. input stream gets set and released. Oh well then i can ignore it as after all my work is for the python readline module functionality and not even the interpreter’s readline functionality… thankfully.. phew..

Quote from the source code for bash/unwind_prot.c
“/* I can’t stand it anymore! Please can’t we just write the
whole Unix system in lisp or something? */”


After all these diversions and excursions and more learnings and junk, i finally get the code for query_bindings function from bash builtin bind.def source code into cpython readline module and get it to compile and import the module fine.. (Mind it i had to figure out cpython’s method of registering a new function with python module. )So what happens now, when i call the query_bindings function? does it work yet? can i just post the diff and let cpython regular people chirp in and criticize/clean it up? Ofcourse not, it segfaults..

well now to do some real work instead of just reacting to the compiler’s yellings and fixing errors.. i.e: to actually understand what that piece of C code does, it seems to involve me reading more linked C code so i have put it off, but can’t avoid it anymore.

turns out readline.h has some conventions. i need to figure out what exactly that keyseqs variable is i.e: the return type of the rl_invoking_keyseqs function… i have to go down the rabbit-hole of C call stack to find out and i forgot what i saw on the way, but it returns keymaps
and what is keymaps? it is a structure with a char and a function pointer(mapped to a readline function). ok that makes sense, now how do i convert this to a string, that too a python string and print it out. Once i convert it to a python string i can just return it and the python interpreter will take care of printing it, so atleast that part of the work doesn’t need to be done.. time to go poking out bash/builtins/bind.def for how it converts the output to a string and prints it..

Ok it turns out keyseqs is really just a pointer to a pointer to character data. So now the question now is how to convert it into a list of strings in python.

thoughts on s/w is eating the world

Marc Andreeson: in his interview reiterates his 3 forms of thesis on software is eating the world (weak, strong, strongest). I think the strongest form is where it will take the longest time period to come to frutition. Honestly,I have no hopes of seeing it in my lifetime. I think there are a lot of revolutionary changes in transportation, material science, etc.. for that to become true. I am thinking in terms of the logistics of materials problem. That problem needs a lot of basic science revolutions to improve.

The weak form i think is already underway and peak within 5-10 years(aka, within the decade). The strong form is what i find very intriguing, as it can have a big impact on my life, and i can do something about it. It basically says software is going to dominate other industries outside of the software industry.

kindle_android app review

I have been trying out kindle app on my android phone, by buying antifragile e-book. I have generally have a negative idea of paying for a DRM locked e-book, mostly because of the control i give up. 

1.highlight colour must be change able for the highlighted text

2. I like the partition/page/parts numbering method.

3. I hate the time lag it takes for the kindle app to switch layout..

4. Seriously, you have to wipe out my highlighted notes/comments? can’t you find a way to sync them too .. that’s lame..*
5. And for the love of god, why did you have to zoom into the selection text, when i am trying to highlight.. you’re just making it painful for me to choose till which point to highlight.
6. learn from the moon reader app with regards to note-taking and highlighting..

7. Again page turning moon reader app has a cool animation


But most of all i pay almost the same price as a hardcopy book , but can’t share it with a friend without really sharing my device? Please put in an ability to transfer it to another device. 

And more importantly, it spooks me that am at your mercy to remove my book. I know there haven’t been any incidents(after that one time), but no am not buying a kindle for myself.


* — Ok, i was wrong, i wasn’t using bookmarks, but highlighting and notes.. and to your credit you do have the last read page in memory fine.

UPDATE: ok , i am a convert. The convenience of e-books is undeniable, even though the physical book is irreplaceable.
For a bibliophile, the ability to carry around a set of books on hand is very convenient for evaluating new books to be added to the physical library.. So only thing remaining is if i am ok with the books pricing on kindle, given the fact that they have the power to wipe it out /take it back when i connect next.

UPDATE 2: OK, for all my conversion, i miss the ability to open a random page in a book and read.(Much like Gabriel Betteredge in “Moon Stone” does with every copy of his book “Robinson Crusoe”). I guess, i can still use kindle’s goto -> Location -> and type in a random number.
But it still doesn’t seem as quick and straightforward…. hmm..perhaps because i have already done the kindle equivalent of opening a book. I suppose it would be a good idea to get this option before touching the book icon within kindle. some kind of circular motion perhaps or double-tap/touch?? Hmm.. might work..