<commit_before>; notice : string -> boolean
; (notice "hello world, from a scheme module")

; critical : string -> boolean
; (critical "hello world, from a scheme module, as a critical message")


; make-module : symbol string list(symbol string*)* -> boolean
(if (make-module 's-hello "some dummy module"
                 (list 'provides "s-dummy")
;                 (list 'requires "c" "d")
;                 (list 'after "e" "f")
;                 (list 'before "g" "h")
    )
    (notice "dummy module created")
    (critical "couldn't create dummy module"))

; define-module-action : symbol symbol procedure -> boolean
(define-module-action 's-hello 'enable
 (lambda (status)
  (begin
   (feedback status "abc")
   (feedback status "def")
   (feedback status "ghi")
   (shell "echo hello world; sleep 10; true"
          'feedback: status))))

(define-module-action 's-hello 'disable
 (lambda (status) #t))

; make-event : symbol ['symbol: value]* [string] [list(string)] -> einit-event
;(display
; (make-event 'core/update-configuration
;  'status: 22
;  "some string"
;  '("a" "b" "c")))

; event-emit : einit-event -> #void
;(event-emit (make-event 'core/update-configuration))


#!
; event-listen : symbol procedure(event -> #void) -> boolean
(event-listen 'any
 (lambda (event)
  (begin
   (display "dummy.scm: received event: ")
   (display event)
   (newline))))
!#<commit_msg>well, still don't work, stupid gc<commit_after>; notice : string -> boolean
; (notice "hello world, from a scheme module")

; critical : string -> boolean
; (critical "hello world, from a scheme module, as a critical message")


; make-module : symbol string list(symbol string*)* -> boolean
(if (make-module 's-hello "some dummy module"
                 (list 'provides "s-dummy")
;                 (list 'requires "c" "d")
;                 (list 'after "e" "f")
;                 (list 'before "g" "h")
    )
    (notice "dummy module created")
    (critical "couldn't create dummy module"))

; define-module-action : symbol symbol procedure -> boolean
(define-module-action 's-hello 'enable
 (lambda (status)
  (begin
   (feedback status "abc")
   (feedback status "def")
   (feedback status "ghi")
   (shell "echo hello world; sleep 10; true"
          'feedback: status))))

(define-module-action 's-hello 'disable
 (lambda (status) #t))

; make-event : symbol ['symbol: value]* [string] [list(string)] -> einit-event
;(display
; (make-event 'core/update-configuration
;  'status: 22
;  "some string"
;  '("a" "b" "c")))

; event-emit : einit-event -> #void
;(event-emit (make-event 'core/update-configuration))

#!
; event-listen : symbol procedure(event -> #void) -> boolean
(event-listen 'any
 (lambda (event)
  (begin
   (display "dummy.scm: received event: ")
   (display event)
   (newline))))
!#
{'fraction_non_alphanumeric': 0.16338934572756525, 'fraction_numerical': 0.002860207365033965, 'mean_word_length': 3.207518796992481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '2958678', 'n_tokens_mistral': 906, 'n_tokens_neox': 877, 'n_words': 277}