[ prog / sol / mona ]

prog


How can I run my own instance of this

284 2020-06-13 14:24
(define *sexp* "data/sexp")
[...]
(define *max-posts* 300)
(define *board-list* (map pathname-name (cddr (directory-read "data/sexp/*"))))
(define *range-regex* "[1-9][0-9]{0,2}(-[1-9][0-9]{0,2})?(,[1-9][0-9]{0,2}(-[1-9][0-9]{0,2})?)")
[...]
(define (range? posts)
  (irregex-match (string-append *range-regex* "{0," (number->string *max-posts*) "}") posts))

That string-append is a constant computation. Is there some reason for it not to happen in the global define block, instead of being repeated on every range? Similarly, *board-list* and *sexp* seem to duplicate the sexp path instead of using a string-append, while the commit label is

Allow to quote every single posts as comma separated values. Deduplicate regex code

301


VIP:

do not edit these