<commit_before>;; Game of Life

(import (use "lib/sturm")
  cbreak-mode)
(import (use "lib/ansi-term")
  home clear-screen cursor-show cursor-hide)

(to (main `(,prog ,@args))
  (let n-steps (match args
                 ('() 20)
                 (`(,n-str) (number<-string n-str))
                 (_ (error ("Usage: ~d [#steps]" .format prog)))))
  (let grid (grid<- 24 39))
  (paint grid 10 18 '(" **"             ;TODO: read in a pattern
                      "** "
                      " * "))
  (for cbreak-mode ()
    (display cursor-hide)
    (begin running ((grid grid) (step 0))<commit_msg>tweak<commit_after>;; Game of Life

(import (use "lib/sturm")
  cbreak-mode)
(import (use "lib/ansi-term")
  home clear-screen cursor-show cursor-hide)

(to (main args)
  (let n-steps (match args.rest
                 ('() 20)
                 (`(,n-str) (number<-string n-str))
                 (_ (error ("Usage: ~d [#steps]" .format (args 0))))))
  (let grid (grid<- 24 39))
  (paint grid 10 18 '(" **"             ;TODO: read in a pattern
                      "** "
                      " * "))
  (for cbreak-mode ()
    (display cursor-hide)
    (begin running ((grid grid) (step 0))
{'fraction_non_alphanumeric': 0.1773109243697479, 'fraction_numerical': 0.019327731092436976, 'mean_word_length': 1.8222748815165877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2831704', 'n_tokens_mistral': 427, 'n_tokens_neox': 391, 'n_words': 113}