Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3239)

Issue 95710044: Issue 3935: Use (pretty-print) for some IR props. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by Mark Polesky
Modified:
9 years, 10 months ago
Reviewers:
dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

This patch uses (pretty-print) instead of (display) to show some IR properties, such as alists and vectors, that are really hard to read as it stands. It increases the internals.pdf page-count from 638 to 651, but I believe the increase in legibility is worth it. View some examples at: http://code.google.com/p/lilypond/issues/detail?id=3935

Patch Set 1 #

Total comments: 8

Patch Set 2 : Clarify code comments; (format) nitpicks. #

Patch Set 3 : Oversight: test for null instead of list. #

Patch Set 4 : Revive `scm->string' to fix compile. #

Total comments: 1

Patch Set 5 : Rewrite conditionals, rewrite `ly-type?', remove `#:display'. #

Patch Set 6 : Use `any' instead of `find'. #

Patch Set 7 : Restrict pretty-print width to 64 columns. #

Patch Set 8 : Load pretty-print module in lily-library.scm instead of documentation-lib.scm. #

Patch Set 9 : Leave space for single quote when pretty-printing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -60 lines) Patch
M scm/document-backend.scm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M scm/document-context-mods.scm View 1 1 chunk +13 lines, -14 lines 0 comments Download
M scm/document-translation.scm View 1 chunk +10 lines, -9 lines 0 comments Download
M scm/documentation-lib.scm View 1 2 3 4 5 6 7 4 chunks +15 lines, -20 lines 0 comments Download
M scm/lily-library.scm View 1 2 3 4 5 6 7 8 2 chunks +41 lines, -16 lines 0 comments Download

Messages

Total messages: 9
Mark Polesky
Here's a new patch to tidy up the IR a little bit. Please review. - ...
9 years, 11 months ago (2014-05-30 07:31:03 UTC) #1
dak
https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm File scm/documentation-lib.scm (right): https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode112 scm/documentation-lib.scm:112: (or (vector? val) ; vector is an ly-type Comment ...
9 years, 11 months ago (2014-05-30 08:38:23 UTC) #2
Mark Polesky
https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm File scm/documentation-lib.scm (right): https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode112 scm/documentation-lib.scm:112: (or (vector? val) ; vector is an ly-type On ...
9 years, 11 months ago (2014-05-30 09:11:57 UTC) #3
Mark Polesky
On 2014/05/30 09:11:57, Mark Polesky wrote: > https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode144 > scm/documentation-lib.scm:144: (string-regexp-substitute "\n " "\n " ...
9 years, 11 months ago (2014-05-30 09:41:51 UTC) #4
dak
https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm File scm/documentation-lib.scm (right): https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode112 scm/documentation-lib.scm:112: (or (vector? val) ; vector is an ly-type On ...
9 years, 11 months ago (2014-05-30 10:45:36 UTC) #5
Mark Polesky
On 2014/05/30 10:45:36, dak wrote: >> ; (ly-type? vector) => #t > > That's rubbish. ...
9 years, 11 months ago (2014-05-30 21:16:19 UTC) #6
dak
On 2014/05/30 21:16:19, Mark Polesky wrote: > On 2014/05/30 10:45:36, dak wrote: > >> ; ...
9 years, 11 months ago (2014-05-31 07:13:05 UTC) #7
dak
https://codereview.appspot.com/95710044/diff/150001/scm/lily-library.scm File scm/lily-library.scm (right): https://codereview.appspot.com/95710044/diff/150001/scm/lily-library.scm#newcode948 scm/lily-library.scm:948: (define (ly-type? x) Is this significantly different from (define ...
9 years, 11 months ago (2014-05-31 07:13:17 UTC) #8
Mark Polesky
9 years, 11 months ago (2014-05-31 20:17:33 UTC) #9
On 2014/05/31 07:13:17, dak wrote:
> https://codereview.appspot.com/95710044/diff/150001/scm/lily-library.scm
> File scm/lily-library.scm (right):
> 
>
https://codereview.appspot.com/95710044/diff/150001/scm/lily-library.scm#newc...
> scm/lily-library.scm:948: (define (ly-type? x)
> Is this significantly different from
> (define (ly-type? x)
>   (any (lambda (p) ((car p) x)) lilypond-exported-predicates))

No, but you didn't reply to the latest patch set there, where I had already
addressed that (although your way is still better).  By the way, I submitted a
bug report to guile on the (pretty-print #:width ...) question:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17657

- Mark
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b