guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Colorized REPL


From: Nala Ginrut
Subject: Re: [PATCH] Colorized REPL
Date: Thu, 06 Dec 2012 12:28:08 +0800

On Thu, 2012-12-06 at 11:09 +0800, Daniel Hartwig wrote:
> On 6 December 2012 10:43, Nala Ginrut <address@hidden> wrote:
> > But if we need the original author to assign the copyright, I'm not sure
> > how long will it be. Last time I assigned the copyright took about one
> > month, since it's long way to send a hand-written assignment to USA.
> > Or I just request the original author to assign the copyright in the
> > code?
> > Which one is right?
> 
> On those things, I don't know.
> 
> In the mean time do not worry about merging of ansi-color, just adjust
> your syntax as discussed and continue to develop in your git repo.  If
> it should later become merged then we can remove the duplicates.
> Or—again and for the final time—target this work at guile-lib.
> 

OK, I'll keep updating it here, in 'upstream' branch:
https://github.com/NalaGinrut/guile-colorized/tree/upstream
The 'upstream' branch won't guarantee an independent module to be used.

> I presume that in the long term you would integrate this directly with
> the existing pretty-print procedure, rather than, e.g., reimplementing
> how to print vectors, arrays, etc..  That makes a lot of sense, and
> saves you having to figure out all the details of correctly formatting
> an array: just intersperse the colourize code throughout pretty-print.

I was aimed to patch pretty-print for coloring. But I changed my mind
because an independent module is easy to develop and debug.
Anyway, I think it's nice to integrate it into pretty-print and
inner-debugger in the long term.

BTW, I added custom-color-scheme feature, then the users can define
their own color-scheme in '~/.guile'. As you suggested, they my define
the color for any data-type they like, they can pass their own
type-checker/colorize-method in. 
For a instance:
==========================~/.guile=============================
(use-modules (ice-9 colorized))
(add-color-scheme! 
  `(,(lambda (data) (> data 10000)) 'MY-LONG-NUMBER ,colorize 'BLUE))
=============================end===============================
And 10001 would be rendered as blue one.


Regards.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]