unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19177: 25.0.50; pretty printer
@ 2014-11-25 11:04 Leo Liu
  2019-08-03 14:14 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Liu @ 2014-11-25 11:04 UTC (permalink / raw)
  To: 19177


The very limited pp.el can easily print hundreds of lines for what can
be beautifully put into dozens of lines. This makes the pp'd text hard
to read.

In the following example, pp would print nearly 300 lines while SBCL's
pprint only prints 50ish lines:

([1 ((env nil) (bound nil) (free nil)) ]
 (([1 ((env nil) (bound nil) (free nil)) ]))
 (([1 ((env nil) (bound (f tree)) (free nil)) ]
   (([1 ((env nil) (bound (f)) (free nil)) ])
    ([1 ((env nil) (bound (tree)) (free nil)) ]))
   (([2 ((env (f tree)) (bound nil) (free (f tree))) ]
     (([2 ((env (f tree)) (bound nil) (free (tree))) ]
       (([2 ((env (f tree)) (bound nil) (free nil)) ]
         (([2 ((env (f tree)) (bound nil) (free nil)) ]))
         (([2 ((env (f tree)) (bound nil) (free nil)) ]))))
       (([2 ((env (f tree)) (bound nil) (free (tree))) ]))))
     (([3 ((env (f tree)) (bound nil) (free (f tree))) ]
       (([3 ((env (f tree)) (bound nil) (free nil)) ]))
       (([4 ((env (f tree)) (bound nil) (free (f tree))) ]
         (([4 ((env (f tree)) (bound nil) (free (f))) ]))
         (([4 ((env (f tree)) (bound nil) (free (tree))) ])))))
      ([5 ((env (f tree)) (bound (gs tree1)) (free (f tree))) ]
       (([5 ((env (f tree)) (bound (gs)) (free nil)) ]))
       (([6 ((env (f gs tree)) (bound (tree1)) (free (f gs tree))) ]
         (([6 ((env (f gs tree)) (bound (tree1)) (free nil)) ]))
         (([6 ((env (f gs tree)) (bound nil) (free (f gs tree))) ]
           (([6 ((env (f gs tree)) (bound nil) (free nil)) ]
             (([6 ((env (f gs tree)) (bound nil) (free nil)) ]))
             (([6 ((env (f gs tree)) (bound nil) (free nil)) ]))))
           (([6 ((env (f gs tree)) (bound nil) (free (tree))) ]
             (([6 ((env (f gs tree)) (bound nil) (free nil)) ]
               (([6 ((env (f gs tree)) (bound nil) (free nil)) ]))
               (([6 ((env (f gs tree)) (bound nil) (free nil)) ]))))
             (([6 ((env (f gs tree)) (bound nil) (free (tree))) ])))
            ([7 ((env (f gs tree)) (bound nil) (free (f gs))) ]
             (([7 ((env (f g gs tree)) (bound nil) (free (f g))) ]
               (([7 ((env (f g gs t tree)) (bound nil) (free (f t))) ]
                 (([7 ((env (f g gs t tree)) (bound nil) (free nil)) ]))
                 (([7 ((env (f g gs t tree)) (bound nil) (free (f))) ])
                  ([7 ((env (f g gs t tree)) (bound nil) (free (t))) ]))))
               (([7 ((env (f g gs tree)) (bound (t)) (free (g))) ]
                 (([7 ((env nil) (bound (t)) (free nil)) ]))
                 (([7 ((env (f g gs tree)) (bound nil) (free (g))) ]))))))
             (([8 ((env (f gs tree)) (bound (g)) (free (gs))) ]
               (([8 ((env nil) (bound (g)) (free nil)) ]))
               (([8 ((env (f gs tree)) (bound nil) (free (gs))) ])))))))))
        ([9 ((env (f gs tree tree1)) (bound nil) (free (f tree tree1))) ]
         (([9 ((env (f gs tree tree1)) (bound nil) (free (f))) ]))
         (([9 ((env (f gs tree tree1)) (bound nil) (free (tree tree1))) ]
           (([9 ((env (f gs tree tree1)) (bound nil) (free nil)) ]
             (([9 ((env (f gs tree tree1)) (bound nil) (free nil)) ]))
             (([9 ((env (f gs tree tree1)) (bound nil) (free nil)) ]))))
           (([9 ((env (f gs tree tree1)) (bound nil) (free (tree))) ])
            ([9 ((env (f gs tree tree1)) (bound nil) (free (tree1)))
             ])))))))))))))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19177: 25.0.50; pretty printer
  2014-11-25 11:04 bug#19177: 25.0.50; pretty printer Leo Liu
@ 2019-08-03 14:14 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-03 14:14 UTC (permalink / raw)
  To: Leo Liu; +Cc: 19177

Leo Liu <sdl.web@gmail.com> writes:

> The very limited pp.el can easily print hundreds of lines for what can
> be beautifully put into dozens of lines. This makes the pp'd text hard
> to read.
>
> In the following example, pp would print nearly 300 lines while SBCL's
> pprint only prints 50ish lines:
>
> ([1 ((env nil) (bound nil) (free nil)) ]
>  (([1 ((env nil) (bound nil) (free nil)) ]))
>  (([1 ((env nil) (bound (f tree)) (free nil)) ]

[...]

>            (([9 ((env (f gs tree tree1)) (bound nil) (free (tree))) ])
>             ([9 ((env (f gs tree tree1)) (bound nil) (free (tree1)))
>              ])))))))))))))

(I'm going through old bug reports that unfortunately have not received
any responses yet.)

I see that SBCL's pretty-printer has its oddities, too -- the space
before the "]" and a newline at one point...

Anyway, `pp' prints arrays in pretty much the same way it prints lists,
and I think this makes sense, and it pretty readable.  (If a bit
verbose.)  So I'm closing this bug report as a "wontfix".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-03 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 11:04 bug#19177: 25.0.50; pretty printer Leo Liu
2019-08-03 14:14 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).