<commit_before>
(define mkht make-hash-table)
(define htr hash-table-ref)
(define htks hash-table-keys)
(define htvs hash-table-values)
(define hte? hash-table-exists?)
(define hts! hash-table-set!)
(define htd! hash-table-delete!)

(define primitive-type 'primitive-procedure)
(define not-found 'sexy-internal-this-name-was-not-found)
(define will-exist 'sexy-internal-this-name-is-about-to-be-defined)

(define (idk obj msg cont err)
    (err (list 'message-not-understood (sexy-view obj) msg) cont))

(define (debug x . xs)
    (define e (current-error-port))
    (if (null? xs)
        (begin (sexy-write x e) (newline e))
        (begin (sexy-write (cons x xs) e) (newline e))))

(define (debug-obj x)
    (define ps (sexy-view x))
    (map debug ps))

(define (for-pairs fn args)
    (if (not (eq? (modulo (length args) 2) 0))
        (error (list "for-pairs requires an even number of arguments!" args))
        (let loop ((newlist '()) (pairs args))
            (if (atom? pairs)
                newlist
                (let ((key (first pairs)) (val (second pairs)))
                    (loop (fn key val) (cddr pairs)))))))

(define (sexy-error form . args)
    (newline)
    (display "ERRORED!!") (newline)
    (display (sexy-view form)) (newline)
    (display (sexy-view args)) (newline)
    (newline)
    (exit))

(define (sexy-error-object name form to-text)
    (sexy-object `(type error name ,name form ,form to-text ,to-text) #f #f #f))

(define (sexy-bool obj cont err)
    (sexy-send obj 'to-bool cont err))

(define (sexy-view obj)
    (sexy-send-atomic obj 'view))

(define (sort-symbol-alist ps)
    (sort ps
        (lambda (a b)
            (string<? (symbol->string (car a)) (symbol->string (car b))))))

(define (sexy-bool? x)
    (or (eq? x 'true) (eq? x 'false)))
<commit_msg>Fixed internal error object generator<commit_after>
(define mkht make-hash-table)
(define htr hash-table-ref)
(define htks hash-table-keys)
(define htvs hash-table-values)
(define hte? hash-table-exists?)
(define hts! hash-table-set!)
(define htd! hash-table-delete!)

(define primitive-type 'primitive-procedure)
(define not-found 'sexy-internal-this-name-was-not-found)
(define will-exist 'sexy-internal-this-name-is-about-to-be-defined)

(define (idk obj msg cont err)
    (err (list 'message-not-understood (sexy-view obj) msg) cont))

(define (debug x . xs)
    (define e (current-error-port))
    (if (null? xs)
        (begin (sexy-write x e) (newline e))
        (begin (sexy-write (cons x xs) e) (newline e))))

(define (debug-obj x)
    (define ps (sexy-view x))
    (map debug ps))

(define (for-pairs fn args)
    (if (not (eq? (modulo (length args) 2) 0))
        (error (list "for-pairs requires an even number of arguments!" args))
        (let loop ((newlist '()) (pairs args))
            (if (atom? pairs)
                newlist
                (let ((key (first pairs)) (val (second pairs)))
                    (loop (fn key val) (cddr pairs)))))))

(define (sexy-error form . args)
    (newline)
    (display "ERRORED!!") (newline)
    (display (sexy-view form)) (newline)
    (display (sexy-view args)) (newline)
    (newline)
    (exit))

(define (sexy-error-object name form to-text)
    (sexy-object `(type error name ,name form ,form to-text ,to-text message ,to-text view (error ,name ,form ,to-text)) #f #f #f))

(define (sexy-bool obj cont err)
    (sexy-send obj 'to-bool cont err))

(define (sexy-view obj)
    (sexy-send-atomic obj 'view))

(define (sort-symbol-alist ps)
    (sort ps
        (lambda (a b)
            (string<? (symbol->string (car a)) (symbol->string (car b))))))

(define (sexy-bool? x)
    (or (eq? x 'true) (eq? x 'false)))

{'fraction_non_alphanumeric': 0.16453977735541678, 'fraction_numerical': 0.0010860711376595167, 'mean_word_length': 2.9358974358974357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4080924', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1322, 'n_words': 407}