From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yanbin Zhang Newsgroups: gmane.lisp.guile.user Subject: Re: [ANN] guile-colorized released! Date: Tue, 4 Dec 2012 21:58:40 -0600 Message-ID: References: <1354603350.25329.18.camel@Renee-desktop.suse> <1354675412.25329.32.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b33d132703bd304d012ff34 X-Trace: ger.gmane.org 1354679936 3139 80.91.229.3 (5 Dec 2012 03:58:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2012 03:58:56 +0000 (UTC) Cc: guile-user@gnu.org To: Nala Ginrut Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Dec 05 04:59:09 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tg68X-0005ox-Ql for guile-user@m.gmane.org; Wed, 05 Dec 2012 04:59:06 +0100 Original-Received: from localhost ([::1]:36822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg68M-0007uZ-3Q for guile-user@m.gmane.org; Tue, 04 Dec 2012 22:58:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg68D-0007tH-H1 for guile-user@gnu.org; Tue, 04 Dec 2012 22:58:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tg689-0003WG-Oq for guile-user@gnu.org; Tue, 04 Dec 2012 22:58:45 -0500 Original-Received: from mail-pa0-f41.google.com ([209.85.220.41]:43696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg689-0003WB-BP for guile-user@gnu.org; Tue, 04 Dec 2012 22:58:41 -0500 Original-Received: by mail-pa0-f41.google.com with SMTP id bj3so3185495pad.0 for ; Tue, 04 Dec 2012 19:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=IDNWJQhEjqkmk2Ee6zVe3IF/mQGjVqFrVujo3mFiKe4=; b=PjgePiWoFkH37tIB+k+gjLC+dN0qmfoxyFMm1iL3OFBm0NtFsPjujbqNvdEQveArwX nYkVQeLz1+FUIHXFbZFffr5/YxX2QvSADLYQM+qxpUiGgpK90C4F7SfdHcEnGyZ497RA KQA2cqVfQsYCGcn8FYq1oEWYNnMikTGsP9hhrDze6c62y00na7Hb48U5Orkxph8HX2jb K5h2p90DJ6RB6Gs1vNdJwgzGUJxN64HmIfYBOD3XRObQtk58Q1yuJD0ghfiCwWANlpFn aGBSfBwkYEeQwH89f+5EXxR79oE7m73kxHavaF5DjdkrYaCkLxYAy/FJuVPvQiqxxe7+ 9rpA== Original-Received: by 10.68.234.100 with SMTP id ud4mr44398838pbc.82.1354679920376; Tue, 04 Dec 2012 19:58:40 -0800 (PST) Original-Received: by 10.68.34.70 with HTTP; Tue, 4 Dec 2012 19:58:40 -0800 (PST) In-Reply-To: <1354675412.25329.32.camel@Renee-desktop.suse> X-Google-Sender-Auth: cY9hqjlXDO6Db6rMzWpqa_UOo94 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.41 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9732 Archived-At: --047d7b33d132703bd304d012ff34 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 # = =85)) trace: | #(# guile (guile) # ((guile) # #f) =85) trace: (#) trace: | (# =85) trace: | | (nested-ref-module # (guile)) trace: | | | (module-ref-submodule # guile) trace: | | | | (# =85) trace: | | | | # trace: | | | | (hashq-ref # guile) trace: | | | | # trace: | | | # trace: | | # trace: | | (# #) trace: | | | (# =85) trace: | | | # trace: | | # trace: | # trace: | (process-use-modules (((ice-9 colorized)))) trace: | | (map # = =85) trace: | | | (# =85) trace: | | | | (resolve-interface (ice-9 colorized)) trace: | | | | | (# =85) trace: | | | | | | (nested-ref-module # =85) trace: | | | | | | | (module-ref-submodule # =85) trace: | | | | | | | | (# =85) trace: | | | | | | | | # trace: | | | | | | | | (hashq-ref # =85) trace: | | | | | | | | # trace: | | | | | | | # trace: | | | | | | | (module-ref-submodule # =85) trace: | | | | | | | | (# =85) trace: | | | | | | | | # trace: | | | | | | | | (hashq-ref # =85) trace: | | | | | | | | # trace: | | | | | | | # trace: | | | | | | # trace: | | | | | | (# =85) trace: | | | | | | | (# =85) trace: | | | | | | | # trace: | | | | | | # trace: | | | | | # trace: | | | | | (# =85) trace: | | | | | | (# =85) 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) # =85) =85) trace: | | (#) trace: | | | (current-module) trace: | | | # trace: | | (module-use-interfaces! # #) trace: | | | (# =85) trace: | | | (# # =85) trace: | | | (memq # (#<=85> =85)) trace: | | | (#) trace: | | | (reverse ()) trace: | | | () trace: | | | (append (# # =85) = =85) trace: | | | (# # =85) trace: | | | (# =85) trace: | | | (# # =85) trace: | | | (# =85) trace: | | | # trace: | | | (hash-clear! #) trace: | | | # trace: | | (module-modified #) trace: | | (hash-set! # # = =85) trace: | | #t trace: | | (#) trace: | | | (hash-for-each # =85) trace: | | | | (# =85) trace: | | | | (module-call-observers #) trace: | | | | | (# =85) trace: | | | | | () trace: | | | | | (for-each # =85) trace: | | | | | # trace: | | | | | (# =85) trace: | | | | | # trace: | | | | (hash-for-each # =85) 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: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcut=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > ,tr (use-modules (ice-9 colorized)) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dend=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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 > > > > > > > > > > --=20 Yanbin Zhang --------------------------------------------- Research Assistant Department of Petroleum Engineering Texas A&M University 3116 TAMU - 702 RICH College Station, TX, 77843 979-847-8797 --047d7b33d132703bd304d012ff34 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 looki= ng at it):
scheme@(guile-user)> ,tr (use-modules (ice-9 colorized))
=
trace: | =A0(#<procedure 878a910> #(#<directory (guile-user) = 82006c0> #f # =85))
trace: | =A0#(#<directory (guile-user) = 82006c0> guile (guile) # ((guile) # #f) =85)
trace: (#<procedure 879ac80 ()>)
trace: | =A0(#<pro= cedure 821dd20 at ice-9/boot-9.scm:2493:4 (name #:option=85> =85)
<= div>trace: | =A0| =A0(nested-ref-module #<module () 8200d38> (guile))=
trace: | =A0| =A0| =A0(module-ref-submodule #<module () 8200d38>= guile)
trace: | =A0| =A0| =A0| =A0(#<procedure 8219b20 at ice= -9/boot-9.scm:170=85> =85)
trace: | =A0| =A0| =A0| =A0#<has= h-table 821dd70 121/223>
trace: | =A0| =A0| =A0| =A0(hashq-ref #<hash-table 821dd70 121/223&= gt; guile)
trace: | =A0| =A0| =A0| =A0#<module (guile) 8200e10= >
trace: | =A0| =A0| =A0#<module (guile) 8200e10>
<= div>trace: | =A0| =A0#<module (guile) 8200e10>
trace: | =A0| =A0(#<procedure 8235750 at ice-9/deprecated.scm:408:8= (mod)> #)
trace: | =A0| =A0| =A0(#<procedure 8219a20 at ic= e-9/boot-9.scm:1709:2 (m=85> =85)
trace: | =A0| =A0| =A0#<i= nterface (guile) 8200dc8>
trace: | =A0| =A0#<interface (guile) 8200dc8>
trace: |= =A0#<module (guile) 8200e10>
trace: | =A0(process-use-modu= les (((ice-9 colorized))))
trace: | =A0| =A0(map #<procedure 8= 2201a0 at ice-9/boot-9.scm:3244:25 (mi=85> =85)
trace: | =A0| =A0| =A0(#<procedure 82201a0 at ice-9/boot-9.scm:3244= :25 (=85> =85)
trace: | =A0| =A0| =A0| =A0(resolve-interface (= ice-9 colorized))
trace: | =A0| =A0| =A0| =A0| =A0(#<procedure= 821dd20 at ice-9/boot-9.s=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0(nested-ref-module #<module ()= 8=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0(module-= ref-submodule #<mo=85> =85)
trace: | =A0| =A0| =A0| =A0| = =A0| =A0| =A0| =A0(#<procedure 8219b20=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0| =A0#<hash-table 821dd70= 121/223>
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0| =A0(hash= q-ref #<hash-ta=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| = =A0| =A0| =A0#<directory (ice-9) 8200c18>
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0#<directory (ice-9) 8200c= 18>
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0(module-ref-subm= odule #<di=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| = =A0| =A0(#<procedure 8219b20=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0| =A0#<hash-table 82253a0= 26/31>
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0| =A0(hashq-= ref #<hash-ta=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| = =A0| =A0| =A0#<directory (ice-9 colorized) 852baf8>
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0#<directory (ice-9 colori= zed) 852baf8>
trace: | =A0| =A0| =A0| =A0| =A0| =A0#<direct= ory (ice-9 colorized) 852baf8>
trace: | =A0| =A0| =A0| =A0| = =A0| =A0(#<procedure 8235750 at ice-9/de=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0(#<procedure 8219a20 at i= c=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0| =A0#<inte= rface (ice-9 colorized) 852bab0>
trace: | =A0| =A0| =A0| =A0| = =A0| =A0#<interface (ice-9 colorized) 852bab0>
trace: | =A0| =A0| =A0| =A0| =A0#<directory (ice-9 colorized) 852ba= f8>
trace: | =A0| =A0| =A0| =A0| =A0(#<procedure 8235750 at= ice-9/deprecat=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0= (#<procedure 8219a20 at ice-9/bo=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0| =A0#<interface (ice-9 colorized) = 852bab0>
trace: | =A0| =A0| =A0| =A0| =A0#<interface (ice-9= colorized) 852bab0>
trace: | =A0| =A0| =A0| =A0#<interface= (ice-9 colorized) 852bab0>
trace: | =A0| =A0| =A0#<interface (ice-9 colorized) 852bab0>
trace: | =A0| =A0(reverse! (#<interface (ice-9 colorized) 852bab0= >))
trace: | =A0| =A0(#<interface (ice-9 colorized) 852bab0= >)
trace: | =A0(call-with-deferred-observers #<procedure 888f110 at ic= e-9/boot=85>)
trace: | =A0| =A0(#<procedure 8219820 at ice-= 9/boot-9.scm:1807:6 ()>)
trace: | =A0| =A0| =A0(lock-mutex #&l= t;mutex 80f1870>)
trace: | =A0| =A0| =A0#t
trace: | =A0| =A0#<unspecified&g= t;
trace: | =A0| =A0(#<procedure 849b130>)
trace:= | =A0| =A0(() ((filename . "ice-9/boot-9.scm") (0 1806 . 6) (3 #= . 8) #) #)
trace: | =A0| =A0(#<procedure 84c9850>)
trace: | =A0| = =A0(() ((filename . "ice-9/boot-9.scm") (0 1810 . 6) (5 # . 8) # = =85) =85)
trace: | =A0| =A0(#<procedure 888f110 at ice-9/boot-= 9.scm:3249:5 ()>)
trace: | =A0| =A0| =A0(current-module)
trace: | =A0| =A0| = =A0#<directory (guile-user) 82006c0>
trace: | =A0| =A0(modu= le-use-interfaces! #<directory (guile-user) 82006c0> #)
tra= ce: | =A0| =A0| =A0(#<procedure 8219fa0 at ice-9/boot-9.scm:1709:2 (m=85= > =85)
trace: | =A0| =A0| =A0(#<interface (guile) 8200dc8> #<autoloa= d (system base compi=85> =85)
trace: | =A0| =A0| =A0(memq #<= ;interface (ice-9 colorized) 852bab0> (#<=85> =85))
trac= e: | =A0| =A0| =A0(#<interface (ice-9 colorized) 852bab0>)
trace: | =A0| =A0| =A0(reverse ())
trace: | =A0| =A0| =A0()<= /div>
trace: | =A0| =A0| =A0(append (#<interface (guile) 8200dc8>= #<autoloa=85> =85) =85)
trace: | =A0| =A0| =A0(#<interf= ace (guile) 8200dc8> #<autoload (system base compi=85> =85)
trace: | =A0| =A0| =A0(#<procedure 8219f60 at ice-9/boot-9.scm:1709= :2 (m=85> =85)
trace: | =A0| =A0| =A0(#<interface (guile) 8= 200dc8> #<autoload (system base compi=85> =85)
trace: | = =A0| =A0| =A0(#<procedure 8219ca0 at ice-9/boot-9.scm:1709:2 (m=85> = =85)
trace: | =A0| =A0| =A0#<hash-table 8259480 0/883>
trac= e: | =A0| =A0| =A0(hash-clear! #<hash-table 8259480 0/883>)
trace: | =A0| =A0| =A0#<unspecified>
trace: | =A0| =A0(mod= ule-modified #<directory (guile-user) 82006c0>)
trace: | =A0| =A0(hash-set! #<hash-table 82198d0 0/31> #<dire= ctory (guile=85> =85)
trace: | =A0| =A0#t
trace: | = =A0| =A0(#<procedure 82197d0 at ice-9/boot-9.scm:1811:6 ()>)
trace: | =A0| =A0| =A0(hash-for-each #<procedure 82197f0 at ice-9/boot= -9=85> =85)
trace: | =A0| =A0| =A0| =A0(#<procedure 82197f0 at ice-9/boot-9.scm= :181=85> =85)
trace: | =A0| =A0| =A0| =A0(module-call-observer= s #<directory (guile-use=85>)
trace: | =A0| =A0| =A0| =A0| = =A0(#<procedure 8219c60 at ice-9/boot-9.s=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0()
trace: | =A0| =A0| =A0| = =A0| =A0(for-each #<procedure 861dd70 at ice-9=85> =85)
tra= ce: | =A0| =A0| =A0| =A0| =A0#<unspecified>
trace: | =A0| = =A0| =A0| =A0| =A0(#<procedure 8219be0 at ice-9/boot-9.s=85> =85)
trace: | =A0| =A0| =A0| =A0| =A0#<weak-key-hash-table 8259470 0/31&= gt;
trace: | =A0| =A0| =A0| =A0(hash-for-each #<procedure 862a= 350 at ice-9/=85> =85)
trace: | =A0| =A0| =A0| =A0#<unspeci= fied>
trace: | =A0| =A0| =A0#<unspecified>
trace: | =A0| =A0| =A0(hash-clear! #<hash-table 82198d0 1/31>)
trace: | =A0| =A0| =A0#<unspecified>
trace: | =A0|= =A0(unlock-mutex #<mutex 80f1870>)
trace: | =A0| =A0#t
trace: | =A0#t
trace: #<unspecified>

Thanks!

Yanbin

On Tue, Dec 4, 2= 012 at 8:43 PM, Nala Ginrut <nalaginrut@gmail.com> wrote:=
On Tue, 2012-12-04 at 16:2= 0 -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: <record-type&g= t;
>
Can you provide more information?
You may post a trace result like that:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcut=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
,tr (use-modules (ice-9 colorized))
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dend=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D

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<= br> > 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 <nalaginrut@gmail.com>
> wrote:
> =A0 =A0 =A0 =A0 hi folks!
> =A0 =A0 =A0 =A0 Here is the project to colorize Guile REPL:
> =A0 =A0 =A0 =A0 https://github.com/NalaGinrut/guile-colorized
> =A0 =A0 =A0 =A0 Play it according to README.
> =A0 =A0 =A0 =A0 Attached a screen shot for the effect.
> =A0 =A0 =A0 =A0 Enjoy it!
>
> =A0 =A0 =A0 =A0 And it uses 'before-print-hook', Daniel posted= a patch to add
> =A0 =A0 =A0 =A0 REPL
> =A0 =A0 =A0 =A0 optional printer in another thread.
> =A0 =A0 =A0 =A0 I'll update my project for this after that patch i= s accepted,
> =A0 =A0 =A0 =A0 and format
> =A0 =A0 =A0 =A0 a patch.
>
> =A0 =A0 =A0 =A0 PS: Though I've tested it, but maybe bugs remain.<= br> > =A0 =A0 =A0 =A0 =A0 =A0 Both bug-report/patches/suggestion are welcome= , thanks!
>
> =A0 =A0 =A0 =A0 Happy hacking!
>
>
>
>
>
> --
> Yanbin Zhang
> ---------------------------------------------
> Research Assistant
> Department of Petroleum Engineering
> Texas A&M University
> 3116 TAMU - 702 RICH
> College Station, TX, 77843
>
>
>






--
= Yanbin Zhang
---------------------------------------------
Research A= ssistant
Department of Petroleum Engineering
Texas A&M University=
3116 TAMU - 702 RICH
College Station, TX, 77843
979-847-8797

--047d7b33d132703bd304d012ff34--