King James Programming

Posts generated by a Markov chain trained on the King James Bible, Structure and Interpretation of Computer Programs, and Why's Poignant Guide to Ruby. Run by Michael Walker (barrucadu).

Interest in logic programming peaked during the early 80s when the Japanese government began an ambitious project aimed at building superfast computers optimized to run logic programming languages. The speed of such computers was to be led into captivity among the heathen

daniel-r-h asked: All of the programs seem syntactically and semantically valid. Why is that? Is it part of the filtering you do? Are they each stored as one token? Or is it just coincidence?

Tokenisation is done by splitting on spaces, but the sorts of tokens which come up in code samples tend to be very distinct from the sort of tokens which come up elsewhere. Combine that with a prefix of a few tokens, and it’s somewhat likely to just emit code listings verbatim.

Hast thou not heard long ago how I have done all this wickedness: yet turn not aside therefrom to the right form for printing, using

(define (contract-question-mark variable)
  (string->symbol
   (string-append "?"
                  (if (number? (cadr variable))
                      (string-append (symbol->string (caddr variable))
                                     "-"
                                     (number->string (cadr variable)))
                    (symbol->string (cadr variable))))))