#lang racket
(require slideshow

(define-runtime-path cover.jpg "cover.jpg")

(define-syntax-rule (go f) (begin (printf "building ~a: " 'f) (flush-output) (time (f))))


(go fable)

(go lifecycle)

;; -- something about effective communication has to go here.

  (let ([first-line (t "Redex")]
        [second-line (t "our tool designed to fill this niche")])
    (vc-append (scale/improve-new-text (t "Redex") (/ (pict-width second-line)
                                                      (pict-width first-line)))

(go study)

(define (recap c1 c2 c3 c4)
   (inset (para #:width 400 "Recap:") -50 0 0 0)
   (item #:bullet (if c1 checkmark cbullet) #:width 400 "Automatic typesetting")
   (item #:bullet (if c2 checkmark cbullet) #:width 400 "Unit Testing")
   (item #:bullet (if c3 checkmark cbullet) #:width 400 "Exploring Examples")
   (item #:bullet (if c4 checkmark cbullet) #:width 400 "Random testing")))

(define checkmark (colorize (t "✓") "forestgreen"))
(define cbullet (cbl-superimpose (ghost checkmark) bullet))

(recap #f #f #f #f)

(go typeset-amb)

(recap #t #t #t #t)

;; we discuss a number of ways in which
;; existing tools (and Redex too) can be
;; improved in the paper, but there is one
;; that really stands out as unappreciated
;; by our community: testing.

;; push button "did I do something stupid" check
;;    for theorems before attempting a proof
;; provides a way to check properties that
;;    are probably not worth the effort to attempt
;;    to prove, namely the correspondance between
;;    a model and an implementation
;; can ``accidentally'' falsify unstated properties:
;;    e.g. deadlock w/out busywaiting.
;; make sure that the examples you give are doing
;;    what you think they are doing

  (inset (para "Takeaways:") -50 0 0 0)
  (item #:fill? #f "Nobody will produce error-free papers")
  (item #:fill? #f "Errors introduce friction into our communication")
  (item #:fill? #f "Redex can help reduce the errors — with about as much effort as LaTeX requires")))

   (vc-append (t "Thank")
              (t "you."))
  (scale (bitmap cover.jpg)

(printf "done\n")