Reference Implementation: Formatting with Color Marc Nieper-Wißkirchen (22 Feb 2019 08:46 UTC)
Re: Reference Implementation: Formatting with Color Jim Rees (22 Feb 2019 15:38 UTC)
Re: Reference Implementation: Formatting with Color Marc Nieper-Wißkirchen (22 Feb 2019 15:45 UTC)

Re: Reference Implementation: Formatting with Color Marc Nieper-Wißkirchen 22 Feb 2019 15:45 UTC

Did a similar thing in my implementation.

(Note that you can combine ANSI escape sequence as follows: ESC [ 4 ; 31 m.)

P.S.: The solution gives another argument for hygienic state variables
as it is now leaking three state variables. (The reference
implementation is also not safe because it is leaking "color".)

Am Fr., 22. Feb. 2019 um 16:39 Uhr schrieb Jim Rees <xxxxxx@gmail.com>:
>
> In case it's helpful...
>
> https://github.com/jimrees/chibi-cheme/commit/12ae1e149d1703b0eac66a193d966244c0cc1a5c
>
>
> On Fri, Feb 22, 2019 at 3:46 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>>
>> The following gives an unexpected result:
>>
>> (display (show #f (as-red (as-bold (as-underline "Hello!\n") "World!\n"))))
>>
>> The color of "Hello!\n" is red, but the color of "World!\n" is white.
>>
>> (The reference implementation uses an (undocumented) state variable
>> "color". I think it has to make use of two more state variables,
>> namely "underline?" and "bold?".)
>>
>> Marc
>> To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=EvvNvm9ydcsHzVnadSGpgW6nii8cUCwx

--
Prof. Dr. Marc Nieper-Wißkirchen

Universität Augsburg
Institut für Mathematik
Universitätsstraße 14
86159 Augsburg

Tel: 0821/598-2146
Fax: 0821/598-2090

E-Mail: xxxxxx@math.uni-augsburg.de
Web: www.math.uni-augsburg.de/alg/mitarbeiter/mnieper/