HNHacker News
TopNewBestAskShowJobs

crazydiamond

316 karma · joined December 27, 2009

part-time ruby programmer http://totalrecall.wordpress.com
submissionscomments
crazydiamond··on Ask HN: what code text editor do you enjoy the most?
This slowness could also be due to keeping a swap/backup file. Maybe try switching that off.

For that poster above, I've never understood the appeal of gvim or macvim, I am very happy with vim in a console (with tmux.) Perhaps there are some plugins that work better under (mac|g)vim.

crazydiamond··on Rust for Rubyists
Thanks for posting this. I've been looking at some new languages of late and might dip into your book in a few days. Wondering what you thought of "go" since you were looking for a systems language?

Did you evaluate various languages before deciding to go with rust ?

crazydiamond··on Open python session in terminal, type "import antigravity"
Interesting tooltip too if you mouse over the pic :)

> "Perl, I'm leaving you"

crazydiamond··on 15 Greatest Open Source Terminal Applications Of 2012
I'd like to mention vshnu, ranger and vifm for directory browsing and traversal.

Dterm is also great (OSX only, i think). Can pop up a command line from anywhere and copy the results of a command easily. (Come to think of it, its not a terminal app, but terminal lovers should like it).

What good music players are there? I use cmus, but it does freeze after a day. Article mentions screen, but not tmux.

crazydiamond··on Love Your Terminal
Could someone elaborate how x11/xterm compares to iTerm2? I've been using tmux in iTerm. After reading this discussion, i installed x11 and quartz-wm. Why would I switch to X11 ?

(I do notice that within tmux on iterm, i can use the mouse for selection (using Alt), but the mouse does not work in tmux in xterm.)

crazydiamond··on Bash One-Liners Explained, Part V: Navigating around
| I'd love to find a cheat sheet for vi bash usage (and also an indicator for which editing mode I'm in).

In zsh, you can type: "bindkey" to get a listing. IIRC, in bash it is "bind -p".

crazydiamond··on Bash One-Liners Explained, Part V: Navigating around
Some awesome ones he did not mention:

Control-q: push-line-or-edit -- this saves the current command without executing it, allows you to run another command, then puts back the saved command for you to edit/run.

Esc-A: accept-and-hold -- execute command and maintain cursor position, so you can edit command and re-run.

Esc-' : quote-line -- escapes the single quotes in a line.

Old Vim user here, who has used emacs mode since moving from ksh to bash for about 8-10 years. Recently, switched back to vi mode, however, I have mapped Ctrl-A, Ctrl-E and a few more so i can use them in vi mode too. e.g.

    bindkey "^A" beginning-of-line
crazydiamond··on A better, prettier, cross-browser OK plateau typing tutor
Seems to hang (stop responding if i make a couple of errors), I am able to backspace, but unable to type further. This happened both on Firefox and Safari (OSX ML). On FF, i got some error about javaac or javacc. However, by pressing space, i could start a new page.
crazydiamond··on Using VimWiki as a distributed, encrypted lab notebook for programming
TLDR: Notational Velocity to vimwiki.

I was using NV, but the Find-Next feature stopped working from OSX Lion. I then renamed the file extensions to ".wiki". I used some perl scripts to remove the spaces in file names and camel-case them. Used "ls" to create an index page with links to each note. Now i can access my notes both through vim (using vimwiki) and through NV.

vimgrep and the ack plugin are good replacements for NV's search.

crazydiamond··on Textadept: fast, minimalist, and Lua-extensible cross-platform text editor
Has anyone tried this out in terminal (ncurses version). I get an error on osx, so i can't load a file. I get this if I give a file on command line.

> ....0.osx/Textadept.app/Contents/Resources/core/file_io.lua:143: bad argument #1 to 'iconv' (string expected, got nil)

Open file (M-S-O) does nothing.

Tried C-u (snapopen) and get a similar iconv error:

> pt.app/Contents/Resources/modules/textadept/snapopen.lua:67: bad argument #1 to 'iconv' (string expected,

I am executing the textadept-ncurses.osx file. Thx. Please note that <backspace> is acting like a TAB but C-h is working correctly.

crazydiamond··on Ask HN: How do you read Hacker news?
Sometimes article first, sometimes first few comments to see if article is worth reading. e.g. the link about 'Linus not reading code' was quite a misnomer and I should have checked the comments first. Also, i use Pentadactyl which allows for vim keys -- works great on this clean, imageless site.

I tried loading HN in elinks, but the More button gives an error?

Strangely, I don't see a box to post. Only one or two posts have a "reply" link, so I had to use that.

crazydiamond··on What shell should I use?
I'd probably go back to perl, and in fact I've back-ported some scripts from ruby (part shell, part ruby).

Issue with shell scripts: commands have different options on BSD vs Linux. e.g. date. If I use coreutils packages, I don't know if other users (or my later installs) will have the "g" prefix.

Issue with ruby (I am a rubyist): 1.9 has broken most of my scripts due to the unicode string thing. Some scripts run as both a cronjob which runs a stock 1.8 ruby, and interactive (1.9) so that results in errors with string parsing.

Perl 5.x has remained the same over the years. Just comment your code enough. There's a perl power tools (ppt) project somewhere on sourceforge that might interest you. Python should be fine, too. I'll investigate these 2 shells you've mentioned.

Edit: homebrew supports scsh. you can try installing the brew. Had a look at both. Both are lispy. What is the benefit of something like scsh for scripting over zsh/bash ?

crazydiamond··on Textmate to VIM
Thanks, this answers my previous point, of having set clipboard push every delete/cut into the clipboard.

In addition, I found this:

    vmap <C-c> "+y
crazydiamond··on Textmate to VIM
This is nice, except that every cut gets added to the clipboard. Including deleting an individual character. Deleting/cleaning up text ... it all goes into the clipboard. Soon my clipboard is full of junk.

I'd have liked only yanked stuff going onto the clipboard, not deleted stuff.

crazydiamond··on Ask HN: Alternatives to iGoogle?
There are several, if you google, but I did not get to like any. I am still using iGoogle, and Google Reader (but GR is just not the same). Here is one link: http://www.maclife.com/article/features/5_worthy_alternative...

One of them only shows buttons which you then have to click. The others are too complicated.

crazydiamond··on The Ultimate Vim Distribution
I've been using oh-my-zsh and the startup is really slow. I hear prezto solves this. How do i upgrade from oh-my to prezto? No one seems to answer that ?
crazydiamond··on Seven habits of effective text editing
Vim lovers would love Steve Losh's Coming Home to Vim: http://stevelosh.com/blog/2010/09/coming-home-to-vim/

This was on HN a couple years back. http://news.ycombinator.com/item?id=1710702

crazydiamond··on Use Zsh
Thanks, I have the same slow startup issue with oh-my-zsh. But the link does not talk about how to migrate from oh-my-zsh to prezto.

Which files should I copy over, or compare and update once I install prezto ?

crazydiamond··on Chunky Bacon in the Land of Lisp
Thanks, I have a Java background, so that should help. However, from what I recall many of the articles on learning Clojure recommended learning Lisp/Scheme first. Do you agree?

Also, they strongly recommended learning Emacs (I have been a Vim'mer for about 20 years, and I like keeping my Vim simple with only a few plugins).

Does one just jump into Clojure or how do you recommend it? If lisp/scheme first, then which one? Thx.

crazydiamond··on Chunky Bacon in the Land of Lisp
I am a rubyist who has wanted to learn lisp. However, the plethora of lisps has made this choice difficult with people advising to start with one lisp (scheme, iirc) and then move over to lisp.

Could you tell me which lisp you are using? IIRC, there's SBCL and various others. Thanks for putting down the resources you are reading. Have you considered clojure or other alternatives? How did you decide on CL ?

crazydiamond··on Ruby ASCII Table Generator
This is an old, very interesting project (its part of a larger project). However, it has issues with alignment of tables if escape codes have been used for coloring or attribute setting of text. There are some hacks to fix that but none are very good.

I use escape codes a lot in projects that display tabular data on terminals (to highlight important info for example) so this was a major issue with me.

crazydiamond··on [dead]
> I have a text editor I’ve been using myself that is so complicated it makes VIM look like Notepad — maybe I’ll release that.

Lol, Linus uses micro-emacs. I like how the post seems serious to begin with, and then you realize it's made up.

crazydiamond··on What is your favorite IDE for development?
Vim within tmux/GNU Screen. Snipmate (or Ulti-snips) are great. Great set of plugins, try pathogen (for bundle management).
crazydiamond··on Zsh is your friend.
You haven't told me how to do a `!!` in fish. (I do understand that it re-executes the previous command). I am used to using this in other shells like bash and zsh, and would like to know if there's some way of doing it in fish.
crazydiamond··on Zsh is your friend.
I tried out fish a month back, but got stuck on 2 things, one which i use frequently.

1. I use the Alt-. (dot) to get last argument of previous command.

2. Getting output of previous command such as : `!!` (backtick !! backtick) for which I get a "no such file".

I asked on reddit, but got no replies. Thx.

crazydiamond··on Clint, Command Line Library for Python
Yes, I've seen a bunch of shell and perl utilities that use this approach. You can't use them when you want 256 colors. You can check http://cbouvi.free.fr/download/colorize/ and http://code.google.com/p/ansi-color/.

Ruby has highline and colored, and perhaps some more too.

crazydiamond··on Steve Losh's .vimrc
You can bind a key to a command too. However, mapping to keys allows you to create your own. To give you a crude example, you could map a key to go down 5 times (5j). A real example would be more complicated for some specific task -- jump to other window, maxmimize it, go down to 5th line or some bookmark, etc.
crazydiamond··on Vim Text Objects : The Definitive Guide
Steve You have a line regarding setting "fuoptions". That only works in mac_vim, so you need to put that in a condition.
crazydiamond··on Vim Text Objects : The Definitive Guide
Not clear what this does:

    " Stop it, hash key.
    inoremap # X<BS>#
I tried it too. It's in insert mode, so it types an X, backspaces and then types a '#'.
crazydiamond··on Prince of Persia for Commodore 64/128 released
This was my favorite game (way back 1989). Missed it all these years. I used to complete the whole thing in 20 or 25 minutes. Was so happy to see the screenshots. Any way I could run this on a new OSX machine ?
← PreviousPage 3 of 12Next →