Re: [PATCH] Colorized REPL

2013-01-31 Thread Nala Ginrut
Sorry again. Forget to add it into test-suite/Makefile.am So many things to do for a new feature ;-) On Thu, Jan 31, 2013 at 10:31 PM, Nala Ginrut wrote: > Sorry, forget to add it into ice-9/Makefile.am > Send again. > > > On Thu, Jan 31, 2013 at 10:25 PM, Nala Ginrut wrote: > >> patch updated.

Re: [PATCH] Colorized REPL

2013-01-31 Thread Nala Ginrut
Sorry, forget to add it into ice-9/Makefile.am Send again. On Thu, Jan 31, 2013 at 10:25 PM, Nala Ginrut wrote: > patch updated. > Thanks! > > > On Mon, Jan 28, 2013 at 10:56 PM, Nala Ginrut wrote: > >> Thanks David! >> It's nice to know that, I thought Guile use PCRE, but I realized it's >> p

Re: [PATCH] Colorized REPL

2013-01-31 Thread Nala Ginrut
patch updated. Thanks! On Mon, Jan 28, 2013 at 10:56 PM, Nala Ginrut wrote: > Thanks David! > It's nice to know that, I thought Guile use PCRE, but I realized it's > posix RE. > > > On Mon, Jan 28, 2013 at 9:58 PM, David Pirotte wrote: > >> Hello, >> >> > But I have some trouble with the rege

Re: [PATCH] Colorized REPL

2013-01-28 Thread Nala Ginrut
Thanks David! It's nice to know that, I thought Guile use PCRE, but I realized it's posix RE. On Mon, Jan 28, 2013 at 9:58 PM, David Pirotte wrote: > Hello, > > > But I have some trouble with the regexp in Guile, seems "\\d+" can't > > work, others, like "\\w+" works. > > i also had this 'prob

Re: [PATCH] Colorized REPL

2013-01-28 Thread David Pirotte
Hello, > But I have some trouble with the regexp in Guile, seems "\\d+" can't > work, others, like "\\w+" works. i also had this 'problem' and someone suggested to rather use [[:digit:]]+ and friends - [:blank:] [:alpha:] ... Cheers, David

Re: [PATCH] Colorized REPL

2013-01-28 Thread Nala Ginrut
Move test func to test-case. And I think all the issues fixed. Updated things attached. Thanks! ;; Copyright (C) 2013 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as p

Re: [PATCH] Colorized REPL

2013-01-27 Thread Nala Ginrut
On Sun, 2013-01-27 at 11:06 +0100, Andy Wingo wrote: > On Sat 26 Jan 2013 11:15, Nala Ginrut writes: > > > Please review it. ;-P > > A drive-by review (i.e., just style comments and random questions) > > > ;; Copyright (C) 2012 Free Software Foundation, Inc. > > 2013 > > > Author: Mu Lei

Re: [PATCH] Colorized REPL

2013-01-27 Thread Andy Wingo
On Sat 26 Jan 2013 11:15, Nala Ginrut writes: > Please review it. ;-P A drive-by review (i.e., just style comments and random questions) > ;; Copyright (C) 2012 Free Software Foundation, Inc. 2013 > Author: Mu Lei known as NalaGinrut > (define-module (ice-9 colorized) > #:use-module

Re: [PATCH] Colorized REPL

2013-01-26 Thread Nala Ginrut
colorized.scm updated. Please review it. ;-P Thanks! ;; Copyright (C) 2012 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; ei

Re: [PATCH] Colorized REPL

2013-01-22 Thread Nala Ginrut
Hi folks! Manual of (ice-9 colorized) updated. Patch attached. Thanks! >From 4e4acbe884716b0c84f1c39bc054244112daf17d Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Tue, 22 Jan 2013 19:02:06 +0800 Subject: [PATCH] Update manual for (ice-9 colorized). * doc/ref/misc-modules.texi: Add (ice-9 col

Re: [PATCH] Colorized REPL

2013-01-21 Thread Andy Wingo
On Wed 05 Dec 2012 10:50, Daniel Llorens writes: >> On 5 December 2012 15:21, Nala Ginrut wrote: > >> I don't think it's proper to use (ansi term-color) >> purposely, since it's not in Guile. > > Maybe we should start moving a few things from guile-lib into Guile proper. > > (ansi term-color) ma

Re: [PATCH] Colorized REPL

2013-01-21 Thread Nala Ginrut
hi folks! test-case is ready. I've tested, it works and passed all items. Please review it. I'll work on manual for it ASAP. Thanks! On Fri, Jan 11, 2013 at 10:33 PM, Ludovic Courtès wrote: > Hi Nala, > > Thanks for the update. > > Nala Ginrut skribis: > > > On Fri, 2013-01-04 at 15:06 +0100,

Re: [PATCH] Colorized REPL

2013-01-13 Thread Ludovic Courtès
Hi! Noah Lavine skribis: > Yes, I agree with everything you said here. I'm torn, because I think that > in general having more portable Scheme code is good for everyone, and the > RnRS standards are the best way to do that, so maybe we should just accept > that the most recent 1 or 2 standards w

Re: [PATCH] Colorized REPL

2013-01-12 Thread Ludovic Courtès
Hi Daniel, Daniel Hartwig skribis: > On 11 January 2013 22:33, Ludovic Courtès wrote: [...] >> I still think that using a disjoint type for >> colors would be better than symbols. > > These are arbitrary control codes and can be applied in any > combination. Essentially, the best you can do

Re: [PATCH] Colorized REPL

2013-01-12 Thread Noah Lavine
Hello, On Fri, Jan 11, 2013 at 6:26 PM, Ludovic Courtès wrote: > Hello, > > > I know that supporting other peoples' r6rs programs is also a reason, > but I > > think that Guile should be able to use the libraries it itself > > bundles. > > I agree in general, yes. But when the run-time footpri

Re: [PATCH] Colorized REPL

2013-01-12 Thread Nala Ginrut
hi Daniel & Ludo! === ** Here are the changes: 1. Use srfi-9 record & fields comment But I still like r6rs record, since it's less code to write. The only good point for me is easy to comment each field. ;-P 2. Fix function define convention I'm not aware of that, but are

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 18:40, Nala Ginrut wrote: > Yes, that's a good point, and the test case could move out of the module > itself. It should. >> I suppose the original comments were not so clear. It is not only the >> string but other members such as “data” that do not fit the concept of >> “col

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 22:33, Ludovic Courtès wrote: >>> > +(define *color-list* >>> > + `((CLEAR . "0") >>> > +(RESET . "0") >>> > +(BOLD. "1") >>> > +(DARK. "2") >>> Would it make sense to define a new type for colors? Like: >>> >>> (define-record

Re: [PATCH] Colorized REPL

2013-01-11 Thread Ludovic Courtès
Hello, Noah Lavine skribis: > On Fri, Jan 11, 2013 at 9:33 AM, Ludovic Courtès wrote: > >> >> Nala Ginrut skribis: >> > record-type in r6rs is more convenient I think. >> >> That’s not the question. ;-) It doesn’t justify pulling in all of R6RS. >> > > This is just a small part of a much larg

Re: [PATCH] Colorized REPL

2013-01-11 Thread Noah Lavine
Hello, On Fri, Jan 11, 2013 at 9:33 AM, Ludovic Courtès wrote: > >> Nala Ginrut skribis: > > record-type in r6rs is more convenient I think. > > That’s not the question. ;-) It doesn’t justify pulling in all of R6RS. > This is just a small part of a much larger review, but it should be possi

Re: [PATCH] Colorized REPL

2013-01-11 Thread Ludovic Courtès
Hi Nala, Thanks for the update. Nala Ginrut skribis: > On Fri, 2013-01-04 at 15:06 +0100, Ludovic Courtès wrote: [...] >> Nala Ginrut skribis: >> >> > 1. colorized-REPL feature: >> > Add two lines to your ~/.guile, to enable colorized-REPL feature: >> > (use-modules (ice-9 colorized)) >> >

Re: [PATCH] Colorized REPL

2013-01-11 Thread Nala Ginrut
On Fri, 2013-01-11 at 16:13 +0800, Daniel Hartwig wrote: > On 11 January 2013 14:29, Nala Ginrut wrote: > > On Thu, 2013-01-10 at 16:19 +0800, Daniel Hartwig wrote: > > I changed these: > > string-in-color => colorize-string > > display-string-in-color => colorized-display > > > > What do you thin

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 14:29, Nala Ginrut wrote: > On Thu, 2013-01-10 at 16:19 +0800, Daniel Hartwig wrote: > I changed these: > string-in-color => colorize-string > display-string-in-color => colorized-display > > What do you think? Nicer anway. >> Also, the “/” in “1/2” appears as a different colo

Re: [PATCH] Colorized REPL

2013-01-10 Thread Nala Ginrut
On Thu, 2013-01-10 at 16:19 +0800, Daniel Hartwig wrote: > Hello again > > Some comments in addition to Ludo's below. I have not inspected the > code of your latest submission thoroughly, but enough to agree that > there are many stylistic and algorithmic issues. I will probably not > be looking

Re: [PATCH] Colorized REPL

2013-01-10 Thread Daniel Hartwig
Hello again Some comments in addition to Ludo's below. I have not inspected the code of your latest submission thoroughly, but enough to agree that there are many stylistic and algorithmic issues. I will probably not be looking in to it any more, and remain a satisfied user of emacs+geiser. I s

Re: [PATCH] Colorized REPL

2013-01-09 Thread Nala Ginrut
On Fri, 2013-01-04 at 15:06 +0100, Ludovic Courtès wrote: > Hi Nala, > > Thanks for your work! > > Nala Ginrut skribis: > > > 1. colorized-REPL feature: > > Add two lines to your ~/.guile, to enable colorized-REPL feature: > > (use-modules (ice-9 colorized)) > > (activate-colorized) > > I did

Re: [PATCH] Colorized REPL

2013-01-04 Thread Mike Gran
Hi Nala, Ludo- > Could you comment this?  I’m not clear on what each field is. > >> +(define *color-list* >> +  `((CLEAR      .  "0") >> +    (RESET      .  "0") >> +    (BOLD        .  "1") >> +    (DARK        .  "2") >> +    (UNDERLINE  .  "4") >> +    (UNDERSCORE  .  "4") >> +    (BLINK     

Re: [PATCH] Colorized REPL

2013-01-04 Thread Ludovic Courtès
Hi Nala, Thanks for your work! Nala Ginrut skribis: > 1. colorized-REPL feature: > Add two lines to your ~/.guile, to enable colorized-REPL feature: > (use-modules (ice-9 colorized)) > (activate-colorized) I did that, and actually had to jump into a recursive REPL to see it in effect. Would

Re: [PATCH] Colorized REPL

2012-12-31 Thread Nala Ginrut
I have the honor to release this patch for colorized-REPL. For a brief description about (ice-9 colorized) module, I listed them below: 1. colorized-REPL feature: Add two lines to your ~/.guile, to enable colorized-REPL feature: (use-modules (ice-9 colorized)) (activate-colorized) 2. custom color

Re: [PATCH] Colorized REPL

2012-12-16 Thread Nala Ginrut
hi folks! guile-colorized upstream updated! Please review it here: https://github.com/NalaGinrut/guile-colorized/tree/upstream Changelog: * move 'float?' to 'is-inexact?, and 'fraction?' to 'is-exact?' which predicates number? first. (these two won't be exported) * unexport all predicates for the

Re: [PATCH] Colorized REPL

2012-12-11 Thread Nala Ginrut
I sent a mail to the author of (term ansi-color), but seems the emal-address was invalid. Well, anyway, to the reason mentioned above, I think it's enough. New implementation works now, I'll have some tests before release. Suggestions are welcome ;-) https://github.com/NalaGinrut/guile-colorized/t

Re: [PATCH] Colorized REPL

2012-12-10 Thread Nala Ginrut
On Mon, 2012-12-10 at 22:42 +0100, Ludovic Courtès wrote: > Hi, > > Nala Ginrut skribis: > > > Since (term ansi-color) code is small one, except for the comment, do we > > still need to ask him for integration? IMO, we just borrowed something > > interfaces from his code. > > Well yes, the co

Re: [PATCH] Colorized REPL

2012-12-10 Thread Ludovic Courtès
Hi, Nala Ginrut skribis: > Since (term ansi-color) code is small one, except for the comment, do we > still need to ask him for integration? IMO, we just borrowed something > interfaces from his code. Well yes, the color table itself is public data, not even copyrightable per se. > Another q

Re: [PATCH] Colorized REPL

2012-12-09 Thread Nala Ginrut
On Mon, 2012-12-10 at 00:29 +0100, Ludovic Courtès wrote: > Hi! > > Daniel Hartwig skribis: > > > I am not sure about the licensing there. That module is copyrighted, > > though GPLv3+. A merge /may/ require the original author to assign > > the copyright. > > It’s not a requirement, but we s

Re: [PATCH] Colorized REPL

2012-12-09 Thread Ludovic Courtès
Hi! Daniel Hartwig skribis: > I am not sure about the licensing there. That module is copyrighted, > though GPLv3+. A merge /may/ require the original author to assign > the copyright. It’s not a requirement, but we should probably try to get in touch with him (Richard Todd) because he actual

Re: [PATCH] Colorized REPL

2012-12-09 Thread Nala Ginrut
On Sun, 2012-12-09 at 08:50 +0800, Daniel Hartwig wrote: > On 9 December 2012 05:35, Ian Price wrote: > > Or, you could use the package manager I keep pimping :) > > Yes indeed, it works quite well. As does just adding such files to a > site- or user-local module path. > > > (os process) might

Re: [PATCH] Colorized REPL

2012-12-08 Thread Daniel Hartwig
On 9 December 2012 05:35, Ian Price wrote: > Or, you could use the package manager I keep pimping :) Yes indeed, it works quite well. As does just adding such files to a site- or user-local module path. > (os process) might be reasonable, since we are forever complaining about > the popen modul

Re: [PATCH] Colorized REPL

2012-12-08 Thread Ian Price
Daniel Llorens writes: > Maybe we should start moving a few things from guile-lib into Guile proper. Or, you could use the package manager I keep pimping :) > (ansi term-color) may be a candidate. I think that (os process) should be > merged in Guile in some form, run-with-pipe has appeared in

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 6 December 2012 12:28, Nala Ginrut wrote: > I was aimed to patch pretty-print for coloring. But I changed my mind > because an independent module is easy to develop and debug. Yes, I thought as much. Do keep the eventual integration in mind, since I'm sure the maintainers are not interested i

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
On Thu, 2012-12-06 at 11:09 +0800, Daniel Hartwig wrote: > On 6 December 2012 10:43, Nala Ginrut 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 h

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 6 December 2012 10:43, Nala Ginrut 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 a

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
On Wed, 2012-12-05 at 19:19 +0800, Daniel Hartwig wrote: > On 5 December 2012 18:27, Nala Ginrut wrote: > > I can understand this too. So your suggestion is to write a > > (term ansi-color) compatible interface. I think it's easy to do. > > But I'm afraid that Guile don't integrate (term ansi-colo

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 18:27, Nala Ginrut wrote: > I can understand this too. So your suggestion is to write a > (term ansi-color) compatible interface. I think it's easy to do. > But I'm afraid that Guile don't integrate (term ansi-color). In your code, one uses "(light-blue yellow)", and only some

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
On Wed, 2012-12-05 at 17:45 +0800, Daniel Hartwig wrote: > On 5 December 2012 16:48, Nala Ginrut wrote: > >> Is there some advantage to using the GOOPS classes rather than > >> equivalent predicates, which are more universal? Of course, the order > >> of the tests matters highly in both cases. >

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 17:50, Daniel Llorens wrote: > I think that (os process) should be merged in Guile in some > form, run-with-pipe has appeared in the lists a few times. Yes, this was ACK during one of those discussions. I believe most of the problem with open-pipe may have been resolved by ch

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
On Wed, 2012-12-05 at 10:50 +0100, Daniel Llorens wrote: > > On 5 December 2012 15:21, Nala Ginrut wrote: > > > I don't think it's proper to use (ansi term-color) > > purposely, since it's not in Guile. > > Maybe we should start moving a few things from guile-lib into Guile proper. > > (ansi te

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Llorens
> On 5 December 2012 15:21, Nala Ginrut wrote: > I don't think it's proper to use (ansi term-color) > purposely, since it's not in Guile. Maybe we should start moving a few things from guile-lib into Guile proper. (ansi term-color) may be a candidate. I think that (os process) should be merge

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 16:48, Nala Ginrut wrote: >> Is there some advantage to using the GOOPS classes rather than >> equivalent predicates, which are more universal? Of course, the order >> of the tests matters highly in both cases. >> > > GOOPS classes covered all the possible types in Guile, and i

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
Wrong again. I forget add 'before-print-hook' and *unspecified* situation. Resend again. On Wed, 2012-12-05 at 16:48 +0800, Nala Ginrut wrote: > On Wed, 2012-12-05 at 16:23 +0800, Daniel Hartwig wrote: > > On 5 December 2012 15:21, Nala Ginrut wrote: > > > Hi folks! > > > Here's a patch to add c

Re: [PATCH] Colorized REPL

2012-12-05 Thread Nala Ginrut
On Wed, 2012-12-05 at 16:23 +0800, Daniel Hartwig wrote: > On 5 December 2012 15:21, Nala Ginrut wrote: > > Hi folks! > > Here's a patch to add colorized-REPL. > > Some comments :-) > > diff --git a/module/ice-9/colorized.scm b/module/ice-9/colorized.scm > new file mode 100644 > index 000..f

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 15:21, Nala Ginrut wrote: > Hi folks! > Here's a patch to add colorized-REPL. Some comments :-) diff --git a/module/ice-9/colorized.scm b/module/ice-9/colorized.scm new file mode 100644 index 000..fe42a9a --- /dev/null +++ b/module/ice-9/colorized.scm @@ -0,0 +1,290 @@ +;;

[PATCH] Colorized REPL

2012-12-04 Thread Nala Ginrut
Hi folks! Here's a patch to add colorized-REPL. With Daniel's optional REPL printer patch, this one based on the former would print colored result more pretty than guile-colorized. Thanks Daniel Hartwig! And I didn't patch the doc to add an usage for this module, since it's very easy, like (ice-9