News for hackers. Stuff that matters.
Re:Gem install lolcat by walrus on Wednesday August 10, 2011 @11:11AM (#2868580)
Entertaining. Maybe hide the stack traces and just show the error messages:

    $ cat nonexistent
    cat: nonexistent: No such file or directory

    $ lolcat nonexistent
    /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/lib/lolcat/cat.rb:57:in `initialize': No such file or directory - nonexistent (Errno::ENOENT)
    	from /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/lib/lolcat/cat.rb:57:in `open'
    	from /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/lib/lolcat/cat.rb:57:in `block in cat!'
    	from /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/lib/lolcat/cat.rb:55:in `each'
    	from /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/lib/lolcat/cat.rb:55:in `cat!'
    	from /usr/lib/ruby/gems/1.9.1/gems/lolcat-42.0.21/bin/lolcat:24:in `<top (required)>'
    	from /usr/bin/lolcat:19:in `load'
    	from /usr/bin/lolcat:19:in `<main>'
Also:

    $ echo 'text' > tmp && stat -c %s tmp
    5
    $ echo 'text' | grep --color text > tmp && stat -c %s tmp
    5
    $ echo 'text' | lolcat > tmp && stat -c %s tmp
    80
grep seems to know when the output is going to a file rather than the terminal (I honestly have no clue how) and omits the color control sequences. lolcat does not, which prevents it from being used instead of cat in some cases.
Re:Gem install lolcat by thinkt4nk on Wednesday August 10, 2011 @11:33AM (#2868685)
It works best with apache access logs!
Re:Gem install lolcat by romac on Friday August 12, 2011 @03:21PM (#2878805)
$ cat /dev/urandom | base64 -b 80 | lolcat