guix-devel
[Top][All Lists]
Advanced

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

Re: Fwd: Re: Patch file for colorize module


From: Ricardo Wurmus
Subject: Re: Fwd: Re: Patch file for colorize module
Date: Sat, 09 Jun 2018 02:57:40 +0200
User-agent: mu4e 1.0; emacs 26.1

Hi Sahithi,

> As per discussion in irc, I tried using "pk str" and "(pk
> (string-append …))" to show values.
>
> I dint find any differences with and without pk.

That’s expected.  “pk” only peeks at the value — it does not modify it.

The goal of using “pk” was to help you figure out if the values of any
of the inner expressions really are what you want them to be.

> I thought I overlooked, so I tried copying terminal lines to files and
> compared. I couldn't find differences except that of timing.

I found the error already, but I’m sure you can too.  Here’s a hint:
play around with “(colorize-string "hello" '(GREEN))”.  Does this look
right?  If not, why is that?  Look closely at the definition of
“colorize-string”.  What arguments does it expect?  How are arguments
bound to variables?  How many arguments does “colorize-string” accept?
Are you really sure about that…?

Please really do play with this in the REPL and remind yourself of what
you expect to see.  Let’s even ignore color.  What should really happen
to the first argument to “colorize-string” in terms of ANSI codes?

--
Ricardo




reply via email to

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