HNHacker News
TopNewBestAskShowJobs

crazydiamond

316 karma · joined December 27, 2009

part-time ruby programmer http://totalrecall.wordpress.com
submissionscomments
crazydiamond··on Why most of the time hacker news shows "Unknown or expired link" error?
The worst is when you spend time typing in a post and it gives this errors on submission. Although one can back-tab, copy, refresh, paste and resubmit.
crazydiamond··on The easiest way to test Ruby 2.0
Bitnami Rubystack: (from the link)

BitNami Ruby Stack greatly simplifies the development and deployment of Ruby on Rails applications. It includes ready-to-run versions of Apache, MySQL, Ruby and Rails and required dependencies. It can be deployed all-in-one free native installers, virtual machines and Cloud Images. BitNami Ruby Stack is distributed for free under the Apache 2.0 license.

crazydiamond··on J for C Programmers
Can you brief us on why you tried "J". Did you stick around with "APL" ?

To the OP, I am a little lost, someone's posted a link to a book or manual, what is the purpose of the thread. Who is the above link of interest to ? Which kind of C programmer ?

Has the OP used J, how long, any experiences. I heard of J several years back, has it picked up at all ?

crazydiamond··on Julia v0.1 released
Are you one of the development team ?

I've just started looking at Julia. I've read the 2 blog posts on Shell sucking. A couple quick questions:

1. Reading from STDIN. I only succeeded with "readlne(STDIN)". All attempts to use open() failed. i tried open(STDIN,Int64) but had to Ctrl-c out of it.

2. How to read one character from STDIN. Is there some getch() alternative. I tried `read -k` etc but all attempts to call the system `read` failed.

3. How to execute a system (zsh) builtin? e.g. i tried:

    readall(`print -rl -- *`)
(the backticks may not print here.)

I did read that the shell will not be able to expand the asterisk. Is there any way to execute this?

4. Is there any direct way of getting directory listings and details other than using `ls` which is not standards across systems and does not use a proper delimiter for separating columns.

crazydiamond··on Hacker with terminal illness seeks to opt out of death
Reddit has a thread by Bill Gates (thisisbillgates). Why not write him, he is a humanitarian who will surely help you.

http://www.reddit.com/r/IAmA/comments/18bhme/im_bill_gates_c...

crazydiamond··on Why I Use Perl...and Will Continue to Do So
Thanks. Seems dwim is more for web apps or servers. And its pretty new. I have downloaded Modern Perl recently and do have a lot of books on perl bought (and read) in the early 2000's.

I am wary of generally downloading modules from CPAN since I have already earlier found some to be broken, or have dependencies that are abandoned. Which is why I sort of look for a curated list that is likely to be maintained. I;ve had the same issues with ruby and other languages as well, and am careful of what I depend on. Currently, I've been bitten by ruby's unicode issues (string functions crashing out of the blue in 1.9) and am thus considering going back to perl.

crazydiamond··on Why I Use Perl...and Will Continue to Do So
Thanks. I have been looking for a list of top downloads for perl modules (at CPAN or anywhere else). Do you know of such a list ?

I moved from awk to perl (for my scripting) around 2000, while using Java at work. However, I moved to ruby in 2004. I remember finding perl's @array and $array[n] being quite irksome. Anyway, I am thinking of revisiting perl for large shell-script apps, and I'd like to know of the most popular modules. (my work is command line/shell related, not web/Rails).

Do you have any template for your perl apps you can share. Have you put any apps up on github ?

crazydiamond··on Julia, I love you (2012)
I have just started going through the docs a bit. I am interested in 2 things. One, programs that interface with other commands -- essentially rewriting large shell programs in a "better" language. I saw the section on "external commands" and that looks very promising. Are there any other links or sample programs I can check out. Would Julia be just as good as say Ruby in this respect ?

Is there a readline interface ?

Second, I haven't yet come across an ncurses interface yet.

Thanks.

edit: Just came across your article "Shelling out sucks". | In my followup post, I will describe how Julia makes constructing and executing pipelines of external commands as safe as Python’s subprocess and as convenient as shelling out. I could not find a link to the followup. Do you have something ?

crazydiamond··on Ruby 2.0.0-rc2 is released
Yes, command line and ncurses (rbcurse / highline, ffi-ncurses).
crazydiamond··on Twig: Your personal Git branch assistant
Besides the name making it difficult to come back to (google shows an older twig thread on HN) ... I come across various nice projects like this one, and "tig" and also "eg" (easy git). However, its tough to find a compelling reason to use most of these add on tools over some home-backed script or just the command line.
crazydiamond··on How SublimeText Bodybags vim+Terminator
Sooner or later someone is going to tell you to put this in your .vimrc:

    inoremap  <Up>     <NOP>
    inoremap  <Down>   <NOP>
    inoremap  <Left>   <NOP>
    inoremap  <Right>  <NOP>
    noremap   <Up>     <NOP>
    noremap   <Down>   <NOP>
    noremap   <Left>   <NOP>
    noremap   <Right>  <NOP>
This will get you to stop using the arrow keys for moving around, use either hjkl, or faster combinations such as "f" "t". Hope you get out of insert mode soon!
crazydiamond··on How SublimeText Bodybags vim+Terminator
I have been using vi/vim since 1989, and I found spf13 to be a totally frustrating experience. Twice I tried it out and quit. It messes with settings of neocomplcache (issues reported and verified with authors), it installs plugins like autocomplete (??) which can also be frustrating. I had hunt through the source of some 20 or more plugins to figure out the offending ones and remove them.

However, that's just my experience. I'd suggest he try a clean vim and add plugins as he needs them. There are plenty of links suggesting great plugins for developers. "sjl" (steve losh) has an article which was linked here (Coming Home to Vim) that mentions some good plugins.

crazydiamond··on Ask HN: How do you deal with your mediocrity?
| Suicide is an option, but I'm mediocre also in this area.

Thankfully, you are mediocre in that area.

There must be something you enjoy doing, which if you work hard enough on, you can achieve some level that you can proud of. Within that area, you just might find some niche where your mediocrity is useful for others. As I've mentioned above I right mediocre software for the command-line (my niche is commandline and ncurses). Some people like what I do, some don't.

As far as suicide, besides the normal medical paths, please also try meditation seriously. There are enough threads in HN on that -- there are great secular meditations such as mindfulness or just breath watching -- so i won't elaborate.

crazydiamond··on Ask HN: How do you deal with your mediocrity?
I discovered I was not very smart long back (about 20 years back when I started working). I compensated by working harder, reading more books than others, reviewing more carefully, thinking more about the things I am doing -- professionally and in personal life. Maybe my issue has to do with dyslexia, or some kind of social anxiety disorder that totally "freezes" my brain when i am in company.

Anyway, I did well and rose to management positions (in software) which I detested but soldiered on (spending as much time as I could on tech work which I love). However, after 14 years of working I finally seemed to hit my "level of incompetence" and just could not continue in management. I can only suggesting working hard, and finding something you enjoy doing.

I also saved a lot of money which allowed me to retire at 40. I now spend my time writing open source software (which I admit is mediocre) and reading HN to keep myself updated and "sponge" off the intelligence of others.

crazydiamond··on Show HN: A New Basic Vim Motion
To the creator: What about all the other plugins and macros that already use "s" ? I'd love to try this out, but remapping basic keys has always led to some other function or mapping or macro suddenly failing.

Why can you not rework the "f" key itself to take 2 keys if pressed in quick succession? "f" waits a millisecond to see if another key is pressed, if not it behaves identically to the default "f", else it uses 2 or even 3.

crazydiamond··on Music For Coding
Youtube has a huge list of "Chillout Ambient Mix" which is quite good to program or read books with. There's also classical music.
crazydiamond··on The Safe C Programming Language (Tutorial)
Is this the same as http://sourceforge.net/projects/safeclib/ ?

If not, is it new? Where is it hosted ? What license is it under ?

crazydiamond··on Ask HN: Where can I learn meditation and mindfulness without the bullshit?
> As to your question here: "Who is this "my" who has a goal in meditation"

> The my is me; all of me. Not just the observing me, not just the thinking me, or the feeling me, but the inseparable combination of the three.

Seriously, when _in_ meditation try asking or seeking this "me". Not in words or concepts but actually try to locate it.

This is just my take on Tolle, don't try understanding what he says. Try being and living in "presence" or "being" or the now or mindfulness whatever you call it. It's the same thing. Then the insights come on their own. I rejected Tolle's book as being too simplistic etc around 2004 or so. After independently discovering "presence" or being, i came back to his book (around 2006) and found it to be greatly helpful. Whenever i get stuck in the mind/ego due to relationship issues or struggling with what's happening in life, I find his later chapters to be very helpful in bringing me back to clarity and presence.

However, I understand that each of us will find different things helpful or bogus. I never really cared for Deepak Chopra. In my opinion he is one of those who has read a lot of Indian books and can put things well for western audiences, but he hasn't put in the mileage himself.

crazydiamond··on Ask HN: Where can I learn meditation and mindfulness without the bullshit?
I think first of all I'd like to know why you want to learn meditation, are you expecting something. Although, I myself don't believe in getting lost in books and concepts, however at some stage you may find it motivating or helpful to read a bit of what others who have been down this path have to say.

I've been in this for a decade and here are some helpful works that are easily available online and free. YMMV. In no particular order, works of Nisargadatta Maharaj (esp I am That), Michael Langford (awareness watching awareness), books on mindfulness (already linked below). A very approachable book has been Power of Now by Eckhart Tolle.

I follow self-enquiry (Sri Ramana Maharshi) but sadly that is 'lost in translation' and wrongly/poorly explained everywhere. I find Langford's online book to be very motivating although my technique varies from his.

crazydiamond··on Ask HN: Where can I learn meditation and mindfulness without the bullshit?
A very good post but I don't understand your dissing of ET. Where does he separate the mind into "observer mind". He certainly does say "observer" or maybe even observing consciousness.

| I could write a whole blog post on the problems I have with it, but it boils down to one fact: our mind, ego, thoughts and feelings are inseparable from each other.

Who said they were separate ?

I agree that sometimes Tolle does use terms which may not be real such as "pain body" ( I also did not like it when I first read Power of Now) but I understand that he creates these terms more to help understand something.

| he is imprecise with language

I don't think you can be precise in this particular case. When you speak of something which is actually the subject, and not an object, where there is no subject-object separation, then it is very difficult to be precise.

Let me give you an example from your own post:

| There is one consciousness, and my goal in meditation is to focus my consciousness on my consciousness

Who is this "my" who has a goal in meditation and even more importantly when you say "my consciousness" then whose consciousness is this you speak of. Are you some other entity who has a consciousness ?

Let me clarify that I am _not_ a Tolle follower, I follow self-enquiry, but I have found Tolle's PON to be a great book that I been able to appreciate _after_ having reached some measure of "presence".

crazydiamond··on Advanced Vim Registers
Try http://www.vimtips-blog.com/

Also vimcasts.org, and check the zzapper page linked in the tips blog.

crazydiamond··on Advanced Vim Registers
I used it (YankRing) for some time, but it was never consistent. The plus point is that it works across terminal, otoh often "p" did not work, so i would have to do "YRShow" and select.

Often this is used, but everything you delete gets copied to your clipboard.

       set clipboard=unnamed
So i prefer to map C-c and C-x (or whatever) to copy/cut to clipboard.

    " regardless of clipboard option, c-c copies selection to clip
    vmap <C-c> "+y
    " cut into clipboard
    vmap <C-x> "+d
    " copy to clipboard, http://news.ycombinator.com/item?id=4767227 , use 3 \y to copy 3 lines
    map <leader>y "+yy
    " paste from clipboard
    map <leader>p "+p
    " delete to black hole register, not going to clipboard etc
    nnoremap <leader>d "_d
    vnoremap <leader>d "_d
I've also mapped a key to write selected lines to a file, and another to read from it.

    map <silent> <leader>ww  :w! ~/tmp/vimxfer<CR>
    map <silent> <leader>wa  :w!>> ~/tmp/vimxfer<CR>
    nmap <silent> <leader>rr  :r ~/tmp/vimxfer<CR>
Pls refer to post below on "reattach to user namespace" for OSX ML users.
crazydiamond··on Favorite Unix Commands
The part about written in C was just added on. My point was "better or faster". If you say "faster is better" I'll have to agree :)
crazydiamond··on Howdoi – Instant Coding Answers via the Command Line
btw, on my system the `brew install` failed giving an error about "make the appropriate changes to your system". When I tried installing pyquery I realized it requires sudo access to write to /Library. I was able to install using "sudo python setup.py install". (pip gave a stack trace).

Tried "howdoi split string zsh" and it gave me a good answer.

crazydiamond··on Show HN: Hacked Hacker News - new comment highlighting and keyboard navigation
I believe FF is heavily used in the HN community.
crazydiamond··on Favorite Unix Commands
On zsh, "print -rC2" for printing some listing in 2 column format. The number of columns (C) can be specified. (print is a builtin).

zsh's file globbing is awesome. Some simple ones:

    *(.)  - only files  
    *(/)  - only dirs  
    *(.m0) - files modified today  
    *(.om[1,15]) - 15 recently modified files
crazydiamond··on Favorite Unix Commands
"better" or just faster since its written in C ?

It is not a drop-in replacement for ack. e.g. there are some basic usages it does not support -- iirc counts (ag -c pattern).

crazydiamond··on Favorite Unix Commands

   less -F
Won't page if less than one screenful. zsh users can also do:

    < filename
(less than character)
crazydiamond··on Show HN: Hacked Hacker News - new comment highlighting and keyboard navigation
Works great on OSX ML. Anything similar for Firefox ?, I just prefer that to Chrome (FF esp with Pentadactyl).
crazydiamond··on A job posting mentioning the Indian rape case
| "The police have their priorities skewed," complains B Arun, a journalist with a prominent newspaper. Theoretically, Delhi has a policeman for every 223 people, but what’s unstated is that most of their duty hours are spent on protecting the teeming number of political leaders who crowd the nation’s capital. Policing streets therefore is shoddy as is investigation of crime".

Delhi is full of construction work (flats being developed by builders). The police are too busy fleecing the builders (who are financed by the politicians to buy land) to take our calls for help. At the same time, they are literally "in the pay" of these builders, so they listen to the builders in the case of disputes with other citizens.

← PreviousPage 2 of 12Next →