[Top][All Lists]

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

Re: [RFC] Convention for marking pretty-printers output

From: Jose E. Marchesi
Subject: Re: [RFC] Convention for marking pretty-printers output
Date: Sun, 27 Oct 2019 02:01:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Bruno.
    > However, this also leads to long printouts in the REPL that can get
    > tiresome to read, ...  That's the reason why poke supports
    > pretty-printers.
    For a moment, I thought what you wanted is an algorithm that inserts
    an appropriate amount of whitespace, in order to transform
    BPF_Insn {opcode=BPF_Insn_Opcode {ldst=#<lddw>},regs=BPF_Insn_Regs
    BPF_Insn {opcode=BPF_Insn_Opcode {ldst=#<lddw>},
              regs=BPF_Insn_Regs {src=#<%r0>,dst=#<%r0>},
              offset=0x0H, imm=struct {imm64=#<0000000000000000>}}
    (assuming $COLUMNS = 80).
    But I guess this is a different discussion, right?

Yes, but actually I want to support multi-line output as well.
    I'm asking because the algorithm used for this purpose in
    Common Lisp [1] is not really good: it has the tendency to move to
    the right border quickly and then produce many lines of output,
    each beginning with 60 or more spaces. There are better ones.

Do you know of some free software program implementing the better ones?

reply via email to

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