main
Matthew Butterick 6 years ago
parent b09c5097bb
commit 35b952b101

@ -1,3 +1,3 @@
#lang quad/typewriter 32
#lang quad/typewriter 8
◊quad[#:fontsize "11"]{Get Ready ◊quad[#:link "http://beautifulracket.com"]{An expression that} is not a value can ◊quad[#:fontsize "22"]{always} ◊quad[#:fontsize "7"]{be partitioned} into two parts: a redex, which is the part that changed in a single-step simplification (highlighted), and the continuation, which is the evaluation context surrounding an expression. In (- 4 (+ 1 1)), the redex is (+ 1 1), and the continuation is (- 4 []), where [] takes the place of the redex. That is, the continuation says how to "continue" after the redex is reduced to a value. ◊quad[#:link "http://beautifulracket.com"]{An expression that} is not a value can ◊quad[#:fontsize "22"]{always} ◊quad[#:fontsize "7"]{be partitioned} into two parts: a redex, which is the part that changed in a single-step simplification (highlighted), and the continuation, which is the evaluation context surrounding an expression. In (- 4 (+ 1 1)), the redex is (+ 1 1), and the continuation is (- 4 []), where [] takes the place of the redex. That is, the continuation says how to "continue" after the redex is reduced to a value. ◊quad[#:link "http://beautifulracket.com"]{An expression that} is not a value can ◊quad[#:fontsize "22"]{always} ◊quad[#:fontsize "7"]{be partitioned} into two parts: a redex, which is the part that changed in a single-step simplification (highlighted), and the continuation, which is the evaluation context surrounding an expression. In (- 4 (+ 1 1)), the redex is (+ 1 1), and the continuation is (- 4 []), where [] takes the place of the redex. That is, the continuation says how to "continue" after the redex is reduced to a value.}

@ -126,7 +126,6 @@
#:finish-wrap-proc (λ (pcs) (list ($page (hasheq 'offset '(36 36)) (filter-not $break? pcs))))))
(define (typeset qarg)
(current-layout-caching #true) ; from fontland/font
(define chars 65)
(define line-width (* 7.2 chars))
(define lines-per-page (* 40 line-height))
@ -152,11 +151,13 @@
[pipe (open-output-file path #:exists 'replace)]
[font (path->string charter)]
[fontSize 12]))
(define q (typeset qin))
(report draw-counter)
(time-name draw (draw q doc))
(report draw-counter)
(time-name end-doc (send doc end))))
;; 181127: with layout caching, draw takes about 1.5x linebreak; without, about 2x
(parameterize ([current-layout-caching #true]) ; from fontland/font
(define q (typeset qin))
(report draw-counter)
(time-name draw (draw q doc))
(report draw-counter)
(time-name end-doc (send doc end)))))
(define-macro (mb . ARGS)
(with-syntax ([PS (syntax-property #'ARGS 'ps)]

Loading…
Cancel
Save