HN user

sri

143 karma
Posts12
Comments47
View on HN
HTC 1 16 years ago

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.

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?

[dead] 17 years ago

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

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.

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.

Arc's Out 18 years ago

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

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!!

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.)

Here are the languages that have big communities: Perl, Python, Ruby, PHP, Javascript, C#/VB.NET and Java.

Subscribe to lots of blogs from each community. (Many of them have planet aggregators like "Planet Python" and "Planet Ruby".) Also visit local user groups, wherever your are.

Read/visit them for a while -- say a month or two. Whichever community makes you go, "wow, that's cool" -- join that community and learn the language. You can also interact with those communities via Google Groups.

Lots of people will say -- "that's easy" or "this is elegant" or "that language sucks". Feel free to ignore them.

Have fun!! Invest in yourself. Go back to school and major in something that you were slightly curious about but never got around to learning -- I'm sure there'll be a startup idea buried there somewhere...

Wow: the mouse becomes the remote control!

That's the way i watch TV -- next, next, next ..., OK interesting but next, OK i like...

This is way better that the Joost interface.... I just want a quick preview, but a even quicker way to get to get to the next one...