/usr/share/racket/collects/dynext/filename-version.rkt is in racket-common 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #lang racket/base
;; This module provides the string that should replace xxxxxxx's in
;; file names. The version number is combined into a single integer,
;; and converted to a string in base 36.
(provide filename-version-part)
(require version/utils)
(define filename-version-part
(let* ([ver (version->integer (version))]
[digits "0123456789abcdefghijklmnopqrstuvwxyz"]
[radix (string-length digits)])
(let loop ([n ver] [r '()])
(cond [(> n 0) (loop (quotient n radix)
(cons (string-ref digits (modulo n radix)) r))]
[(< (length r) 7) (loop n (cons #\_ r))]
[else (list->string r)]))))
|