Re: RHS: libterm-ansicolor-ruby
The Fungi <firstname.lastname@example.org> writes:
> Of course, I can't imagine an ANSI library would be anything more than a
> few dozen string constant definitions, unless you wanted routines to
> recognize and condense inefficient ANSI sequences into something denser,
> consisting of fewer characters (most the ANSI art apps create some
> extremely verbose/pedantic strings which can be distilled quite a lot).
I'm amused to see this idea show up as a Ruby library. I and another
person wrote the Term::ANSIColor Perl module after a comp.lang.perl.misc
discussion many years ago, and indeed, it's mostly just a set of
definitions, but it's handy to be able to do things like:
$string = colored ($string, 'white on_blue');
so there's some glue and a few functions. From the name, it wouldn't
surprise me if the Ruby module works similarly (I haven't looked at it).
For a one-off module that we put together on a whim, the Perl module has
been amazingly popular, seems to be used all over the place, and is now
included in Perl core, so there's some indication that people really do
like having this sort of functionality.
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>