ruby Archive

Vim: Using Ruby Regular Expression

I needed to remove line number from a web copy-pasted code snippet. I know there is a way to configure vim to use the perl style regular expressions but I couldn’t find how quickly. What I found was: http://vim.wikia.com/wiki/Perl_compatible_regular_expressions Here is my specific command: ...Read More

Ruby: String += vs <<

Learned this interesting tidbit on Seattle.rb mailing list that appending a string with << is 10 times more efficient than +=. This would matter if you are doing a lot of string concatenation. From: Joe Van Dyk Date: Fri, Nov 20, 2009 at 10:20 ...Read More

Ruby: Grid Computing Golf

My first attempt at really playing code golf, that is solving a problem in minimum characters of code and I did not do very well (200 character compared to the best 43 perl or 63 ruby characters). http://codegolf.com/grid-computing m = r = ...Read More