HNHacker News
TopNewBestAskShowJobs

crazydiamond

316 karma · joined December 27, 2009

part-time ruby programmer http://totalrecall.wordpress.com
submissionscomments
crazydiamond··on Universe is most likely to end in ice
This refers to a 1998 study that says the universe is accelerating. I thought since then there had been news of dark matter being more than what we had thought of, which would exceed critical mass resulting in the universe coalescing again ???

p.s. I hope there'll be some whiskey to go with it :)

crazydiamond··on Are you a programmer with chronic headaches? If so please read
I am from the East. We rely on common sense and what has _actually_ worked for us in our life, and what has worked for generations. I take studies done in the West (esp wrt health) with a pinch of salt. (Which reminds me of the fad about low-salt for which their are many authoratative studies and research but its still not true)
crazydiamond··on Are you a programmer with chronic headaches? If so please read
| "If you have headaches, especially chronic ones do yourself a favor and have your eyes checked, you might need glasses without realizing it."

Glasses are a good way of weakening the eyes even further. Eye exercises are a better way of keeping you vision in good shape. Keep your arm extended, focus on thumb, slowly bring it as close as possible. Extend again.

When reading a page on the computer, avoid scrolling line by line with a mouse as you read. Better for the eyes to use the space bar to do page scrolling.

If you find reading a book is out of focus, you might wait for 10 seconds or so, for the eyes to focus. Happens if you are not used to focusing on near objects.

crazydiamond··on Vim Macros - 5 Minute Screencast
Basically shows how to record a macro using "q", do some stuff and then replay the macro.

Cannot see text clearly despite full-screen, and the delivery is rather poor and uninteresting. I'd rather just go over to vimcasts.org.

crazydiamond··on Modern Ruby Development
How are you getting this completion from ri ? I use zsh, and the rvm's ri (.rvm/rubies/ruby-1.9.2-head/bin/ri) gives no completion at all (ri 2.5.8).

However, /usr/bin/ri (ri v1.0.1 - 20041108) does give completion but different from your list. ri K<tab> gives Classes and methods (e.g. Kconv\#guess) and not just classes. So it's a huge list. Thx.

crazydiamond··on Modern Ruby Development
I've been using macports for ages, nothing wrong with it. Okay, it does not check to see the stock installs of OSX, and installs its own ruby, perl, python etc. Apart from that it's been very reliable.
crazydiamond··on RIP Ingres
This is kinda sad. I spent 3 years on my first job in 1989 on Ingres. Not just the database but creating applications using Ingres' tools (ABF, QBF, IIRC). I remember developers running a query and going off for coffee forgetting to type "commit".
crazydiamond··on A zsh Workshop
Have your tried https://github.com/zsh-users/zsh-history-substring-search ? Search history using substring of earlier command. Really good.
crazydiamond··on A zsh Workshop
I tried zsh when it came out, but gave up (too rough then). Recently, I made the move and I am quite happy. This workshop will hopefully help me get deeper into it. (I used the oh-my-zsh linked above).

I love how you can type "vim " and press up-arrow, to get previous commands with vim. In bash, after typing "vim " i would have to erase the line, do "C-r" and then type vim again.

crazydiamond··on Tart is a strongly-typed general purpose programming language
| At the same time, it also includes a number of features not seen in any of these languages.

I tried looking around for the new features and motivation for this language. The intro page (http://tart.googlecode.com/svn/site/intro/overview.html) opens as source for some reason (on FF6 and safari).

EDIT: Okay, intro page does have some features, although not exactly new (gc) ... hard to read due to rendering as source.

crazydiamond··on Shnake: classic snake game in Bash
Great work. For those on OSX, replace "seq" with "jot -" and it works. (perhaps you could check for seq at the start and use "jot -" instead.)

The "wasd" keys get me each time. I've not lasted more than 10 seconds! Any chance of using arrow keys or hjkl instead?

crazydiamond··on How to Design Classes (in Ruby, Python, Java or any OOP)
I found this to be a great (ruby based) design book. Ruby best practices by Gregory Brown (free download http://rubybestpractices.com/)
crazydiamond··on Glue Languages Make You a Better Coder
I've written stuff in shell over many years (I don't claim to be an expert, just average) but its not always smooth esp when I upgrade or change OS's. Most shell programs will make calls to other commands. These commands do not have standard arguments across unixes. Take the OSX (BSD) date and linux's date. On one machine I may have installed coreutils with default_names, on another without.

Sometimes, this forces us to make quick trips into perl or awk (to get yesterday or tomorrow). However, shell scripting has certainly made me more productive over the years. For most of my initial programming life (90's), I've generated boilerplate code using shell (often with awk).

crazydiamond··on Writing Vim Plugins
I'd rather keep off dependencies to other languages. Recently there were issues when compiling with the ruby option -- iirc, it was required for Command-T or some other plugin. Some version of ruby was required which was not compatible with the latest stable version of vim. Something like that. Also, won't this slow down startup ? (I know lua is fast). Also, lua is not even part of any default install, to my knowledge.
crazydiamond··on Writing Vim Plugins
Thanks Steve. Not only is your post on coming back to Vim (about plugins) excellent, but so is this. I've always wanted to write plugins but been lost. I would then write shell scripts and then call them from Vim. Hopefully, this will spur me to write plugins.
crazydiamond··on Ten Things Everyone Should Know About Time
I am not trying to obfuscate. And I am sorry if i sounded condescending when I mentioned "getting it".

When you dream at night, and see yourself in a "body", is the mind and consciousness of that body your real consciousness. Is that body's brain creating your real consciousness. If science points to that consciousness, then there is a strong possibility of it being the wrong consciousness. The consciousness of the sleeping person is the real one. The same applies here too.

Normally, since the conscious state is one of low awareness, one is not aware in deep sleep and swoon. However, when one practices being aware and raises the level of awareness, one is conscious in all states. All this becomes very apparent as one raises one's awareness and comes out of "mind consciousness" -- continuously living in thought.

crazydiamond··on Duuble: microblogging diary
Interesting. I wanted to edit a post in order to add a tag. Unable to edit. Also, why not use the same tag format as twitter since people will be used to that.

Is there any API so I can send feeds through command-line. I already have a bash script called "whatidid" which logs to a text file and mails the file to my gmail account. I could push it to duuble.

crazydiamond··on How to Successfully Procrastinate
| But I never feel guilty about it. Because when I'm done procrastinating there is nothing else to do but the work.

When I am done procrastinating, its usually time to take a nap. So I never really get work done, unless I am careful to take it easy on HN and reddit. Usually when I am coding full steam, I may not check HN/reddit etc for days, or just a quick glance at the titles.

I guess it's to each his own.

crazydiamond··on Ten Things Everyone Should Know About Time
| Considering we don't have great definition of consciousness

Yes, you will not be able to "define" consciousness. However, you can point to it, so others can get it. It is on the basis of that discovery of consciousness that we can say it is independent. And yes, modern/western science has it backwards. Consciousness does not depend on the brain or body, these are events in consciousness.

A simple book that can help you get it is The Power of Now by Tolle. Science assumes that consciousness depends on the brain, we often take these assumptions to be facts.

crazydiamond··on Ten Things Everyone Should Know About Time
Some misconceptions need to be cleared.

| 4. You live in the past. About 80 milliseconds in the past

This may hold true for sensory perceptions, thoughts etc but not for consciousness. When there are no thoughts, there is absolutely no gap in consciousness. When you live "consciously" there is no time-lag.

| 6. Consciousness depends on manipulating time. Many cognitive abilities are important for consciousness, and we don’t yet have a complete picture.

Who is this "we". Consciousness does not depend on anything, unless you've incorrectly defined it. Everything else depends on it.

| Consciousness wouldn’t be possible without the ability to imagine other times

Utter tosh. Who has cooked this up ? We've been through this for at least 2-3 millenia. Those who meditate, and there are lots on HN, understand that consciousness is independent.

"Everyone experiences time differently" -- if we talk of perception of time, then yes. A moment of boredom or pain can feel longer than an hour of pleasure but we all know that.

| 5. Your memory isn’t as good as you think. We all know this don't we.

| In that very real sense, all animal species experience “the same amount of time.”

We really don't know that do we. Just speculation.

crazydiamond··on Was Scotland's Most Famous Dog Living a Lie?
What's this doing in HN ? Sad to hear it's false.

I've recently seen the movie about Hachi (the Japanese dog) who for 9 years after his "master" died, came to the station at 5 pm every day. Very moving.

crazydiamond··on Gondor Launches
(From their website, like Heroku)

Gondor was designed for people who want to deploy their Django sites early and often.

Whether it's feature branches in development being deployed for review and testing, or a multi-server dedicated production stack, Gondor frees you up to focus on your site, not your infrastructure.

Gondor supports:

    command-line deployment
    unlimited domains
    revision control via git or mercurial
    dependency management using pip
    database migrations via South or nashvegas
    full backups of your entire application
    asynchronous and scheduled task execution
    full-text search using Solr and django-haystack
    caching via redis
crazydiamond··on Lab-grown meat might be only 6 months away
He said "but steak". There are various kinds of vegetarians as he says, some who have eggs, some who have milk products etc. Regarding fish, I actually have relatives from Kerala, South India who are vegetarians who eat fish. They call it "the vegetable of the sea".
crazydiamond··on Lab-grown meat might be only 6 months away
As someone who gave up non-veg food about 15 years back, I'd welcome lab-meat since it avoids killing animals. However, whether we would adopt it ourselves seems to be irrelevant. I, for one, would not like to cultivate the taste for meat again. As an animal lover, I'd certainly not like to see menu items like "Synthetic dog meat, tastes just like puppies". Going to the extreme, replace dog and puppies with human and babies. I'll stick to veggies, thanks.
crazydiamond··on Chrome Beats Internet Explorer To Become #2 Browser in India
I imagine IE is more the default browser when people buy PC's or laptops. FF and Chrome are browsers out of choice. I can't imagine lay people in India (my friends and relatives or people in my HR department) installing FF or wanting to check out other browsers. So it is remarkable that FF is #1.

Until other browsers can match FF's vimperator/pentadactyl, there's no way I can seriously consider moving. (I've tried Chrome, Opera and Safari)

crazydiamond··on Firefox on Mac textarea edit bug open since 2005
I've had the same problem with the backspace. When hitting backspace while editing, often (not always) the browser goes to previous page (in history), so I lose my edits. Going forward does not give me back my edits.
crazydiamond··on Learn Vim Progressively
This is an _amazing_ collection once you've gone past the beginner's stage:

http://www.rayninfo.co.uk/vimtips.html

For some great plugins, check http://stevelosh.com/blog/2010/09/coming-home-to-vim/

crazydiamond··on Why you should learn just a little Awk - A Tutorial by Example
If i recall, you also wrote a (wonderful) gawk script to download youtube videos (which I contributed some updates to). I still use it often (the famous python program link fails, btw). http://www.catonmat.net/blog/downloading-youtube-videos-with...
crazydiamond··on Why you should learn just a little Awk - A Tutorial by Example
That link (nosql) looks interesting. Also do look at crush-tools. You can even pivot data with it.

http://code.google.com/p/crush-tools/wiki/CrushTutorial

crazydiamond··on Why you should learn just a little Awk - A Tutorial by Example
I used awk 20 years back. Then I moved on. My awk scripts still run, those in other languages don't (major version changes e.g.). Also, I began manipulating text using grep, cut, sed and sort, but found that these read through the file each time, becoming slow as data increases. Using awk you can search, filter and manipulate data in ONE iteration of the file making it very fast. And so i once again brushed up on awk.

btw, i suggest using gawk since it has date functions.

← PreviousPage 4 of 12Next →