sri's comments

sri | 15 years ago | on: HTC 1

Would love to see a screen at the back also -- dual screens, if you will. That way I can have one app running on the "front" screen and another on the "back" screen.

sri | 16 years ago | on: Google Chrome 4 now natively supports Greasemonkey user scripts

I have a Greasemonkey script in FF (http://defcraft.blogspot.com/2009/02/greasemonkey-search-hel...) that'll google for the current selection in a background tab when ALT-G is pressed. And it uses GM_openInTab API call.

Its equivalent in Chrome seems to be chrome.tabs.create. But when I tried that, I get this error: "chrome.tabs is not supported in content scripts". It seems that these "content scripts" aren't as powerful as extensions (http://code.google.com/chrome/extensions/content_scripts.htm...). Am I missing something here?

sri | 16 years ago | on: 5 Reasons I'm addicted to Chrome

I use a Greasemonkey script: select & hit Alt-A, searches Amazon in background tab. Alt-G, google. Alt-Y, youtube. etc.

sri | 17 years ago | on: A Django Developer’s Views on Rails

ruby uses < (less than) for inheritance; also regular expressions start & end with / (slash). you have %W, %w for arrays and %q, %Q for string. things like "class << self ..." looks weird to those new to ruby. also stuff like "a ||= ...". and of course pre-pending '@' for instance variables and '@@' for class variables.

also when i use regexps in ruby i then say "/re(g)ex/ =~ 'string' && $1". in python that would be multiple statements: "m = re.match('re(g)ex', 'string'); m.group(1)"

in python existing syntax (or more familiar syntax) is used to accomplish all the above.

sri | 17 years ago | on: Ask HN: I'm Tired of Hacking. What Do I Do? Please Advise.

Try something totally different. It could be a totally different technology: say Ruby on Rails or maybe Flex/Flash & Actionscript. How about becoming a designer? Something you have never considered before or never thought of as worthwhile. Something that brings back the "lightness" feeling you seem to be missing.

sri | 18 years ago | on: Arc's Out

looks like pg in europe taking the picture of a old hotel from the outside

sri | 18 years ago | on: Pmarca donates US$28 million to Stanford's hospital

very inspiring, pmarca! with your blog -- you have given a lot to the startup geeks! and with this, you have given something amazing to your local community. Thank you. and looking forward to your "fondest hope"!!!

sri | 18 years ago | on: Google's Achilles Heel

oops, accidentally clicked the down bar (making your comment 0 points) while scanning thru the newcomments section. sorry, can't seem to undo it :-( apologies!!

sri | 18 years ago | on: Python 3000 Alpha 1 Released

I made this http://defcraft.org/hacks/pycmds/pii.py to help define "commands" in the interactive interpreter. Commands like "ls" and "h os".

"ls" is a simple command -- invokes the Unix command "ls -l". A more complicated one: "h os" -- run help on the os module (just like "help(os)"). This is kinda tricky because "h os" is actually a syntax error in Python. When interactive, I catch syntax errors and see if they are user defined commands, in which case I execute the desired command. This works for Python 2.5, but shouldn't be too hard to port to Python 3.0.

I briefly looked at IPython, but that seemed to complicated for my needs.

(Also, http://defcraft.org/hacks/pycmds/strftime_helper.py uses the above file to help the user with strftime spec usage. I can never remember all the special characters.)

page 1