Re: repl, abridged output?

2012-12-04 Thread Ludovic Courtès
Hi!

Daniel Hartwig  skribis:

> On 3 December 2012 20:39, Daniel Llorens  wrote:
>> I've seen that there's a REPL command ,inspect that produces
>> abridged output. Is it possible to have this as the default for
>> printing to the REPL? Is there any way to configure this?
>
> scheme@(guile-user)> (eval '(set! repl-print
>   (lambda (repl val)
> (if (not (eq? val *unspecified*))
> (begin
>   (run-hook before-print-hook val)
>   (format #t "~20@y" val)
>   (newline)
>(resolve-module '(system repl common)))
> scheme@(guile-user)> (use-modules (srfi srfi-1))
> scheme@(guile-user)> (iota 500)
> $1 = (0 1 2 3 4 5 6 7 …)

Indeed.  Perhaps there should be a standard, simple way to do that.
Would you like to propose a patch?  :-)

Ludo’.




Re: [ANN] guile-colorized released!

2012-12-04 Thread Ludovic Courtès
Hi!

nalaginrut  skribis:

> Here is the project to colorize Guile REPL:
> https://github.com/NalaGinrut/guile-colorized
> Play it according to README. 
> Attached a screen shot for the effect.

Looks nice!

I’ll look at the patch you posted to guile-devel eventually.

Ludo’.




Re: repl, abridged output?

2012-12-04 Thread Daniel Llorens

On Dec 4, 2012, at 02:43, Daniel Hartwig wrote:

> On 3 December 2012 20:39, Daniel Llorens  wrote:
>> I've seen that there's a REPL command ,inspect that produces
>> abridged output. Is it possible to have this as the default for
>> printing to the REPL? Is there any way to configure this?
> 
> scheme@(guile-user)> (eval '(set! repl-print
>  (lambda (repl val)
>(if (not (eq? val *unspecified*))
>(begin
>  (run-hook before-print-hook val)
>  (format #t "~20ATy" val)
>  (newline)
>   (resolve-module '(system repl common)))
> scheme@(guile-user)> (use-modules (srfi srfi-1))
> scheme@(guile-user)> (iota 500)
> $1 = (0 1 2 3 4 5 6 7 …)

Excellent, thank you.

For the benefit of the list, AT in the format string is the at character.

Daniel





Re: [ANN] guile-colorized released!

2012-12-04 Thread Luiji Maryo
That's pretty awesome! I'll try it out later and report any bugs if I find
them.


On Tue, Dec 4, 2012 at 1:42 AM, nalaginrut  wrote:

> hi folks!
> Here is the project to colorize Guile REPL:
> https://github.com/NalaGinrut/guile-colorized
> Play it according to README.
> Attached a screen shot for the effect.
> Enjoy it!
>
> And it uses 'before-print-hook', Daniel posted a patch to add REPL
> optional printer in another thread.
> I'll update my project for this after that patch is accepted, and format
> a patch.
>
> PS: Though I've tested it, but maybe bugs remain.
> Both bug-report/patches/suggestion are welcome, thanks!
>
> Happy hacking!
>
>


-- 
- Luiji Maryo
mail: lu...@users.sourceforge.net
blog: http://brainboyblogger.blogspot.com/
corp: http://www.entertainingsoftware.com/
fun: http://www.secretmaryo.org/


Re: [ANN] guile-colorized released!

2012-12-04 Thread Yanbin Zhang
Hi,

In the example of the README file, the module is spelled as "colorised". I
guess it should be "colorized".

I tried the example but I got:
scheme@(guile-user)> (use-modules (oop goops) (rnrs) (ice-9 colorized))
While compiling expression:
ERROR: In procedure module-lookup: Unbound variable: 

I am using Guile 2.0.5

This is definitely a cool feature if I can get it working. But myself is
quite new to Guile and does not know my way around very well. Thanks.

Yanbin


On Tue, Dec 4, 2012 at 12:42 AM, nalaginrut  wrote:

> hi folks!
> Here is the project to colorize Guile REPL:
> https://github.com/NalaGinrut/guile-colorized
> Play it according to README.
> Attached a screen shot for the effect.
> Enjoy it!
>
> And it uses 'before-print-hook', Daniel posted a patch to add REPL
> optional printer in another thread.
> I'll update my project for this after that patch is accepted, and format
> a patch.
>
> PS: Though I've tested it, but maybe bugs remain.
> Both bug-report/patches/suggestion are welcome, thanks!
>
> Happy hacking!
>
>


-- 
Yanbin Zhang
-
Research Assistant
Department of Petroleum Engineering
Texas A&M University
3116 TAMU - 702 RICH
College Station, TX, 77843


Re: [ANN] guile-colorized released!

2012-12-04 Thread Nala Ginrut
On Tue, 2012-12-04 at 16:20 -0600, Yanbin Zhang wrote:
> Hi,
> 
> 
> In the example of the README file, the module is spelled as
> "colorised". I guess it should be "colorized".
> 
Ah~thanks!
> 
> I tried the example but I got:
> scheme@(guile-user)> (use-modules (oop goops) (rnrs) (ice-9
> colorized))
> While compiling expression:
> ERROR: In procedure module-lookup: Unbound variable: 
> 
Can you provide more information? 
You may post a trace result like that:
===cut=
,tr (use-modules (ice-9 colorized))
===end=

And Guile-2.0.5 is old, maybe bugs there.
I use the latest Guile, and I suggest you update to Guile-2.0.7.

> I am using Guile 2.0.5
> 
> 
> This is definitely a cool feature if I can get it working. But myself
> is quite new to Guile and does not know my way around very well.
> Thanks.
> 
> 
> Yanbin
> 
> 
> 
> On Tue, Dec 4, 2012 at 12:42 AM, nalaginrut 
> wrote:
> hi folks!
> Here is the project to colorize Guile REPL:
> https://github.com/NalaGinrut/guile-colorized
> Play it according to README.
> Attached a screen shot for the effect.
> Enjoy it!
> 
> And it uses 'before-print-hook', Daniel posted a patch to add
> REPL
> optional printer in another thread.
> I'll update my project for this after that patch is accepted,
> and format
> a patch.
> 
> PS: Though I've tested it, but maybe bugs remain.
> Both bug-report/patches/suggestion are welcome, thanks!
> 
> Happy hacking!
> 
> 
> 
> 
> 
> -- 
> Yanbin Zhang
> -
> Research Assistant
> Department of Petroleum Engineering
> Texas A&M University
> 3116 TAMU - 702 RICH
> College Station, TX, 77843
> 
> 
> 





Re: [ANN] guile-colorized released!

2012-12-04 Thread Yanbin Zhang
Hi Nala,

It may be the old version of guile that caused the problem. Unfortunately,
I usually do not live on the bleeding edge...
Here is the trace (I have to admit that I am totally lost by looking at it):
scheme@(guile-user)> ,tr (use-modules (ice-9 colorized))
trace: |  (# #(# #f # …))
trace: |  #(# guile (guile) # ((guile) #
#f) …)
trace: (#)
trace: |  (#
…)
trace: |  |  (nested-ref-module # (guile))
trace: |  |  |  (module-ref-submodule # guile)
trace: |  |  |  |  (# …)
trace: |  |  |  |  #
trace: |  |  |  |  (hashq-ref # guile)
trace: |  |  |  |  #
trace: |  |  |  #
trace: |  |  #
trace: |  |  (# #)
trace: |  |  |  (# …)
trace: |  |  |  #
trace: |  |  #
trace: |  #
trace: |  (process-use-modules (((ice-9 colorized
trace: |  |  (map # …)
trace: |  |  |  (# …)
trace: |  |  |  |  (resolve-interface (ice-9 colorized))
trace: |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  (nested-ref-module # …)
trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
trace: |  |  |  |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
trace: |  |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
trace: |  |  |  |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
trace: |  |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  #
trace: |  |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  |  #
trace: |  |  |  |  |  |  #
trace: |  |  |  |  |  #
trace: |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  (# …)
trace: |  |  |  |  |  |  #
trace: |  |  |  |  |  #
trace: |  |  |  |  #
trace: |  |  |  #
trace: |  |  (reverse! (#))
trace: |  |  (#)
trace: |  (call-with-deferred-observers #)
trace: |  |  (#)
trace: |  |  |  (lock-mutex #)
trace: |  |  |  #t
trace: |  |  #
trace: |  |  (#)
trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1806 . 6) (3 # . 8) #)
#)
trace: |  |  (#)
trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1810 . 6) (5 # . 8) #
…) …)
trace: |  |  (#)
trace: |  |  |  (current-module)
trace: |  |  |  #
trace: |  |  (module-use-interfaces! # #)
trace: |  |  |  (# …)
trace: |  |  |  (# # …)
trace: |  |  |  (memq # (#<…> …))
trace: |  |  |  (#)
trace: |  |  |  (reverse ())
trace: |  |  |  ()
trace: |  |  |  (append (# # …) …)
trace: |  |  |  (# # …)
trace: |  |  |  (# …)
trace: |  |  |  (# # …)
trace: |  |  |  (# …)
trace: |  |  |  #
trace: |  |  |  (hash-clear! #)
trace: |  |  |  #
trace: |  |  (module-modified #)
trace: |  |  (hash-set! # # …)
trace: |  |  #t
trace: |  |  (#)
trace: |  |  |  (hash-for-each # …)
trace: |  |  |  |  (# …)
trace: |  |  |  |  (module-call-observers #)
trace: |  |  |  |  |  (# …)
trace: |  |  |  |  |  ()
trace: |  |  |  |  |  (for-each # …)
trace: |  |  |  |  |  #
trace: |  |  |  |  |  (# …)
trace: |  |  |  |  |  #
trace: |  |  |  |  (hash-for-each # …)
trace: |  |  |  |  #
trace: |  |  |  #
trace: |  |  |  (hash-clear! #)
trace: |  |  |  #
trace: |  |  (unlock-mutex #)
trace: |  |  #t
trace: |  #t
trace: #

Thanks!

Yanbin

On Tue, Dec 4, 2012 at 8:43 PM, Nala Ginrut  wrote:

> On Tue, 2012-12-04 at 16:20 -0600, Yanbin Zhang wrote:
> > Hi,
> >
> >
> > In the example of the README file, the module is spelled as
> > "colorised". I guess it should be "colorized".
> >
> Ah~thanks!
> >
> > I tried the example but I got:
> > scheme@(guile-user)> (use-modules (oop goops) (rnrs) (ice-9
> > colorized))
> > While compiling expression:
> > ERROR: In procedure module-lookup: Unbound variable: 
> >
> Can you provide more information?
> You may post a trace result like that:
> ===cut=
> ,tr (use-modules (ice-9 colorized))
> ===end=
>
> And Guile-2.0.5 is old, maybe bugs there.
> I use the latest Guile, and I suggest you update to Guile-2.0.7.
>
> > I am using Guile 2.0.5
> >
> >
> > This is definitely a cool feature if I can get it working. But myself
> > is quite new to Guile and does not know my way around very well.
> > Thanks.
> >
> >
> > Yanbin
> >
> >
> >
> > On Tue, Dec 4, 2012 at 12:42 AM, nalaginrut 
> > wrote:
> > hi folks!
> > Here is the project to colorize Guile REPL:
> > https://github.com/NalaGinrut/guile-colorized
> > Play it according to README.
> > Attached a screen shot for the effect.
> > Enjoy it!
> >
> > And it uses 'before-print-hook', Daniel posted a patch to add
> > REPL
> > optional printer in another thread.
> > I'll update my project for this after that patch is accepted,
> > and format
> > a patch.
> >
> > PS: Though I've tested it, but maybe bugs remain.
> > Both bug-report/patches/suggestion are welcome, thanks!
> >
> > Happy hacking!
> >
> >
> >
> >
> >
> > --
> > Yanbin Zhang
> > -
> > Research Assistant
> > Department of Petroleum Engineerin

Re: [ANN] guile-colorized released!

2012-12-04 Thread Nala Ginrut
Hmm...it's hard to find the problem.
Seems  wasn't exported in that version?
But you may comment out this line in colorized.scm:
-cut--
(, ,color-record-type dark-gray)
-end--
And give it a try.
I think it won't effect anything wrong for you, but  will
be rendered as an  object.

On Tue, 2012-12-04 at 21:58 -0600, Yanbin Zhang wrote:
> Hi Nala,
> 
> 
> It may be the old version of guile that caused the problem.
> Unfortunately, I usually do not live on the bleeding edge...
> Here is the trace (I have to admit that I am totally lost by looking
> at it):
> scheme@(guile-user)> ,tr (use-modules (ice-9 colorized))
> trace: |  (# #(# #f
> # …))
> trace: |  #(# guile (guile) # ((guile)
> # #f) …)
> trace: (#)
> trace: |  (# #:option…> …)
> trace: |  |  (nested-ref-module # (guile))
> trace: |  |  |  (module-ref-submodule # guile)
> trace: |  |  |  |  (# …)
> trace: |  |  |  |  #
> trace: |  |  |  |  (hashq-ref # guile)
> trace: |  |  |  |  #
> trace: |  |  |  #
> trace: |  |  #
> trace: |  |  (#
> #)
> trace: |  |  |  (# …
> )
> trace: |  |  |  #
> trace: |  |  #
> trace: |  #
> trace: |  (process-use-modules (((ice-9 colorized
> trace: |  |  (map # > …)
> trace: |  |  |  (# …
> )
> trace: |  |  |  |  (resolve-interface (ice-9 colorized))
> trace: |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  (nested-ref-module # …)
> trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
> trace: |  |  |  |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
> trace: |  |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
> trace: |  |  |  |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
> trace: |  |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  |  #
> trace: |  |  |  |  |  |  #
> trace: |  |  |  |  |  #
> trace: |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  (# …)
> trace: |  |  |  |  |  |  #
> trace: |  |  |  |  |  #
> trace: |  |  |  |  #
> trace: |  |  |  #
> trace: |  |  (reverse! (#))
> trace: |  |  (#)
> trace: |  (call-with-deferred-observers # ice-9/boot…>)
> trace: |  |  (#)
> trace: |  |  |  (lock-mutex #)
> trace: |  |  |  #t
> trace: |  |  #
> trace: |  |  (#)
> trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1806 . 6) (3 # .
> 8) #) #)
> trace: |  |  (#)
> trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1810 . 6) (5 # .
> 8) # …) …)
> trace: |  |  (#)
> trace: |  |  |  (current-module)
> trace: |  |  |  #
> trace: |  |  (module-use-interfaces! #
> #)
> trace: |  |  |  (# …
> )
> trace: |  |  |  (# # compi…> …)
> trace: |  |  |  (memq # (#<…> …))
> trace: |  |  |  (#)
> trace: |  |  |  (reverse ())
> trace: |  |  |  ()
> trace: |  |  |  (append (# # …) …
> )
> trace: |  |  |  (# # compi…> …)
> trace: |  |  |  (# …
> )
> trace: |  |  |  (# # compi…> …)
> trace: |  |  |  (# …
> )
> trace: |  |  |  #
> trace: |  |  |  (hash-clear! #)
> trace: |  |  |  #
> trace: |  |  (module-modified #)
> trace: |  |  (hash-set! # # > …)
> trace: |  |  #t
> trace: |  |  (#)
> trace: |  |  |  (hash-for-each # …
> )
> trace: |  |  |  |  (# …)
> trace: |  |  |  |  (module-call-observers #)
> trace: |  |  |  |  |  (# …)
> trace: |  |  |  |  |  ()
> trace: |  |  |  |  |  (for-each # …)
> trace: |  |  |  |  |  #
> trace: |  |  |  |  |  (# …)
> trace: |  |  |  |  |  #
> trace: |  |  |  |  (hash-for-each # …)
> trace: |  |  |  |  #
> trace: |  |  |  #
> trace: |  |  |  (hash-clear! #)
> trace: |  |  |  #
> trace: |  |  (unlock-mutex #)
> trace: |  |  #t
> trace: |  #t
> trace: #
> 
> 
> Thanks!
> 
> 
> Yanbin
> 
> On Tue, Dec 4, 2012 at 8:43 PM, Nala Ginrut 
> wrote:
> On Tue, 2012-12-04 at 16:20 -0600, Yanbin Zhang wrote:
> > Hi,
> >
> >
> > In the example of the README file, the module is spelled as
> > "colorised". I guess it should be "colorized".
> >
> 
> Ah~thanks!
> >
> > I tried the example but I got:
> > scheme@(guile-user)> (use-modules (oop goops) (rnrs) (ice-9
> > colorized))
> > While compiling expression:
> > ERROR: In procedure module-lookup: Unbound variable:
> 
> >
> 
> Can you provide more information?
> You may post a trace result like that:
> ===cut=
> ,tr (use-modules (ice-9 colorized))
> ===end=
> 
> And Guile-2.0.5 is old, maybe bugs there.
> I use the latest Guile, and I suggest you update to
> Guile-2.0.7.
> 
> > I am using Guile 2.0.5
> >
> >
> > This is definitely a cool feature if I can get it working.
> But

Re: [ANN] guile-colorized released!

2012-12-04 Thread Yanbin Zhang
Removing  makes things working fine. I got colorful outputs,
which is very nice! Thanks.

On Tue, Dec 4, 2012 at 10:08 PM, Nala Ginrut  wrote:

> Hmm...it's hard to find the problem.
> Seems  wasn't exported in that version?
> But you may comment out this line in colorized.scm:
> -cut--
> (, ,color-record-type dark-gray)
> -end--
> And give it a try.
> I think it won't effect anything wrong for you, but  will
> be rendered as an  object.
>
> On Tue, 2012-12-04 at 21:58 -0600, Yanbin Zhang wrote:
> > Hi Nala,
> >
> >
> > It may be the old version of guile that caused the problem.
> > Unfortunately, I usually do not live on the bleeding edge...
> > Here is the trace (I have to admit that I am totally lost by looking
> > at it):
> > scheme@(guile-user)> ,tr (use-modules (ice-9 colorized))
> > trace: |  (# #(# #f
> > # …))
> > trace: |  #(# guile (guile) # ((guile)
> > # #f) …)
> > trace: (#)
> > trace: |  (# > #:option…> …)
> > trace: |  |  (nested-ref-module # (guile))
> > trace: |  |  |  (module-ref-submodule # guile)
> > trace: |  |  |  |  (# …)
> > trace: |  |  |  |  #
> > trace: |  |  |  |  (hashq-ref # guile)
> > trace: |  |  |  |  #
> > trace: |  |  |  #
> > trace: |  |  #
> > trace: |  |  (#
> > #)
> > trace: |  |  |  (# …
> > )
> > trace: |  |  |  #
> > trace: |  |  #
> > trace: |  #
> > trace: |  (process-use-modules (((ice-9 colorized
> > trace: |  |  (map # > > …)
> > trace: |  |  |  (# …
> > )
> > trace: |  |  |  |  (resolve-interface (ice-9 colorized))
> > trace: |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  (nested-ref-module # …)
> > trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
> > trace: |  |  |  |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
> > trace: |  |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  |  (module-ref-submodule # …)
> > trace: |  |  |  |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  |  |  (hashq-ref # …)
> > trace: |  |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  |  #
> > trace: |  |  |  |  |  |  #
> > trace: |  |  |  |  |  #
> > trace: |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  |  #
> > trace: |  |  |  |  |  #
> > trace: |  |  |  |  #
> > trace: |  |  |  #
> > trace: |  |  (reverse! (#))
> > trace: |  |  (#)
> > trace: |  (call-with-deferred-observers # > ice-9/boot…>)
> > trace: |  |  (#)
> > trace: |  |  |  (lock-mutex #)
> > trace: |  |  |  #t
> > trace: |  |  #
> > trace: |  |  (#)
> > trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1806 . 6) (3 # .
> > 8) #) #)
> > trace: |  |  (#)
> > trace: |  |  (() ((filename . "ice-9/boot-9.scm") (0 1810 . 6) (5 # .
> > 8) # …) …)
> > trace: |  |  (#)
> > trace: |  |  |  (current-module)
> > trace: |  |  |  #
> > trace: |  |  (module-use-interfaces! #
> > #)
> > trace: |  |  |  (# …
> > )
> > trace: |  |  |  (# # > compi…> …)
> > trace: |  |  |  (memq # (#<…> …))
> > trace: |  |  |  (#)
> > trace: |  |  |  (reverse ())
> > trace: |  |  |  ()
> > trace: |  |  |  (append (# # …) …
> > )
> > trace: |  |  |  (# # > compi…> …)
> > trace: |  |  |  (# …
> > )
> > trace: |  |  |  (# # > compi…> …)
> > trace: |  |  |  (# …
> > )
> > trace: |  |  |  #
> > trace: |  |  |  (hash-clear! #)
> > trace: |  |  |  #
> > trace: |  |  (module-modified #)
> > trace: |  |  (hash-set! # # > > …)
> > trace: |  |  #t
> > trace: |  |  (#)
> > trace: |  |  |  (hash-for-each # …
> > )
> > trace: |  |  |  |  (# …)
> > trace: |  |  |  |  (module-call-observers #)
> > trace: |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  ()
> > trace: |  |  |  |  |  (for-each # …)
> > trace: |  |  |  |  |  #
> > trace: |  |  |  |  |  (# …)
> > trace: |  |  |  |  |  #
> > trace: |  |  |  |  (hash-for-each # …)
> > trace: |  |  |  |  #
> > trace: |  |  |  #
> > trace: |  |  |  (hash-clear! #)
> > trace: |  |  |  #
> > trace: |  |  (unlock-mutex #)
> > trace: |  |  #t
> > trace: |  #t
> > trace: #
> >
> >
> > Thanks!
> >
> >
> > Yanbin
> >
> > On Tue, Dec 4, 2012 at 8:43 PM, Nala Ginrut 
> > wrote:
> > On Tue, 2012-12-04 at 16:20 -0600, Yanbin Zhang wrote:
> > > Hi,
> > >
> > >
> > > In the example of the README file, the module is spelled as
> > > "colorised". I guess it should be "colorized".
> > >
> >
> > Ah~thanks!
> > >
> > > I tried the example but I got:
> > > scheme@(guile-user)> (use-modules (oop goops) (rnrs) (ice-9
> > > colorized))
> > > While compiling expression:
> > > ERROR: In procedure module-lookup: Unbound variable:
> > 
> > >
> >
> > Can you provide more information?
> > You may post a trace result l

Re: repl, abridged output?

2012-12-04 Thread Nala Ginrut
On Tue, 2012-12-04 at 13:59 +0100, Ludovic Courtès wrote:
> Hi!
> 
> Daniel Hartwig  skribis:
> 
> > On 3 December 2012 20:39, Daniel Llorens  wrote:
> >> I've seen that there's a REPL command ,inspect that produces
> >> abridged output. Is it possible to have this as the default for
> >> printing to the REPL? Is there any way to configure this?
> >
> > scheme@(guile-user)> (eval '(set! repl-print
> >   (lambda (repl val)
> > (if (not (eq? val *unspecified*))
> > (begin
> >   (run-hook before-print-hook val)
> >   (format #t "~20@y" val)
> >   (newline)
> >(resolve-module '(system repl common)))
> > scheme@(guile-user)> (use-modules (srfi srfi-1))
> > scheme@(guile-user)> (iota 500)
> > $1 = (0 1 2 3 4 5 6 7 …)
> 
> Indeed.  Perhaps there should be a standard, simple way to do that.
> Would you like to propose a patch?  :-)
> 

Daniel has posted a patch for that, and it simplified my color-REPL
work. My patch will be based on his patch, then I don't have to patch
'pp' now.

Coming soon.

> Ludo’.
> 
>