which came first - the bacon or the egg?
the "contracting universe" theory
"silence" is my new superpower
EAT LESS
MOVE MORE
I will reach my destination
MATH
R0mS41dN
PRIZE
https://groups.google.com/g/Hutter-Prize/c/7Ez6QcMQ4MI
https://web.archive.org/web/https://ytp.me



"If I believe in causation then the very existence of the universe is a mystery but if I see only correlation then there is no mystery at all"
CORE [6633442536]
Hazel
Zelah






enter number (decimal or binary): 6633442536
cut and paste bits to the right of the first zero bit
round trip: 6633442536
see what happens when you try automated decompression of random looking numbers - this is how you encode information !!



scan my business card here:







<a href="https://web.archive.org/web/https://core.puter.site/">CORE</a> by <a href="https://web.archive.org/web/https://ytp.me/">Zelah Hutchinson</a> is marked <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/zero.svg" alt="" style="max-width: 1em;max-height:1em;margin-left: .2em;">











https://web.archive.org/web/https://zps.puter.site/Desktop.zip

Does Time-Symmetry Imply Retrocausality?
Does Causality Imply Retrocausality?


Backwards Time Theory
Determinism In One Direction Looks Like Randomness In The Other.










HOWMENEY?


https://groups.google.com/g/Hutter-Prize/c/7Ez6QcMQ4MI


;; -------------------------------
;; Minimal-Scheme Huffman Encoding
;; -------------------------------
;; foldl (simple definition in case your Scheme doesn't have it)
(define (foldl f acc xs)
(if (null? xs)
acc
(foldl f (f (car xs) acc) (cdr xs))))
;; remove (predicate-based)
(define (remove pred xs)
(cond
((null? xs) '())
((pred (car xs)) (remove pred (cdr xs)))
(else (cons (car xs) (remove pred (cdr xs))))))
;; Count frequencies of characters in a list
(define (freq-table xs)
(define (inc tbl ch)
(let ((p (assoc ch tbl)))
(if p
(cons (cons ch (+ 1 (cdr p)))
(remove (lambda (x) (eq? (car x) ch)) tbl))
(cons (cons ch 1) tbl))))
(foldl (lambda (ch tbl) (inc tbl ch)) '() xs))
;; Priority queue insert (sorted by weight)
(define (pq-insert node q)
(cond
((null? q)
(list node))
((< (car node) (caar q))
(cons node q))
(else
(cons (car q) (pq-insert node (cdr q))))))
;; Build initial queue from frequency table
(define (make-pq freq)
(foldl (lambda (p q)
(pq-insert (list (cdr p) (car p)) q))
'()
freq))
;; Build Huffman tree
(define (build-tree pq)
(if (= (length pq) 1)
(car pq)
(let* ((a (car pq))
(b (cadr pq))
(rest (cddr pq))
(wa (car a))
(wb (car b))
(node (list (+ wa wb) a b)))
(build-tree (pq-insert node rest)))))
;; Generate code table from tree
(define (make-codes tree)
(define (walk node prefix)
(cond
;; leaf: (weight char)
((and (pair? node)
(not (pair? (cadr node))))
(list (cons (cadr node) prefix)))
(else
(append (walk (cadr node) (string-append prefix "0"))
(walk (caddr node) (string-append prefix "1"))))))
(walk tree ""))
;; Encode a list of chars using code table
(define (encode xs codes)
(apply string-append
(map (lambda (ch) (cdr (assoc ch codes))) xs)))
;; Top-level convenience function
(define (huffman-encode str)
(let* ((chars (string->list str))
(freq (freq-table chars))
(pq (make-pq freq))
(tree (build-tree pq))
(codes (make-codes tree)))
(list
(cons 'codes codes)
(cons 'encoded (encode chars codes)))))
;; Example:
(huffman-encode "hello world")
;; ============================================================
;; FULL CPS HUFFMAN ENCODER — MINIMAL SCHEME, ALL TAIL CALLS
;; ============================================================
;; reverse in CPS
(define (reverse xs k)
(define (loop xs acc k)
(if (null? xs)
(k acc)
(loop (cdr xs) (cons (car xs) acc) k)))
(loop xs '() k))
;; foldl in CPS: f : elem acc k -> ...
(define (foldl f acc xs k)
(if (null? xs)
(k acc)
(f (car xs) acc
(lambda (new-acc)
(foldl f new-acc (cdr xs) k)))))
;; remove in CPS
(define (remove pred xs k)
(define (loop xs acc k)
(if (null? xs)
(reverse acc k)
(if (pred (car xs))
(loop (cdr xs) acc k)
(loop (cdr xs) (cons (car xs) acc) k))))
(loop xs '() k))
;; freq-table in CPS
(define (freq-table xs k)
(define (inc tbl ch k)
(let ((p (assoc ch tbl)))
(if p
(remove (lambda (x) (eq? (car x) ch)) tbl
(lambda (rest)
(k (cons (cons ch (+ 1 (cdr p))) rest))))
(k (cons (cons ch 1) tbl)))))
(foldl (lambda (ch tbl k2)
(inc tbl ch k2))
'()
xs
k))
;; pq-insert in CPS
(define (pq-insert node q k)
(define (loop q acc k)
(cond
((null? q)
(reverse (cons node acc) k))
((< (car node) (caar q))
(reverse acc
(lambda (r)
(k (append r (cons node q))))))
(else
(loop (cdr q) (cons (car q) acc) k))))
(loop q '() k))
;; build-tree in CPS
(define (build-tree pq k)
(if (= (length pq) 1)
(k (car pq))
(let* ((a (car pq))
(b (cadr pq))
(rest (cddr pq))
(wa (car a))
(wb (car b))
(node (list (+ wa wb) a b)))
(pq-insert node rest
(lambda (newq)
(build-tree newq k))))))
;; make-codes in CPS
(define (make-codes tree k)
(define (walk node prefix k)
(if (and (pair? node)
(not (pair? (cadr node))))
(k (list (cons (cadr node) prefix)))
(walk (cadr node)
(string-append prefix "0")
(lambda (left-codes)
(walk (caddr node)
(string-append prefix "1")
(lambda (right-codes)
(k (append left-codes right-codes))))))))
(walk tree "" k))
;; encode in CPS
(define (encode xs codes k)
(define (loop xs acc k)
(if (null? xs)
(reverse acc
(lambda (r)
(k (apply string-append r))))
(loop (cdr xs)
(cons (cdr (assoc (car xs) codes)) acc)
k)))
(loop xs '() k))
;; top-level CPS huffman-encode
(define (huffman-encode str k)
(let ((chars (string->list str)))
(freq-table chars
(lambda (freq)
(foldl (lambda (p q k2)
(pq-insert (list (cdr p) (car p)) q k2))
'()
freq
(lambda (pq)
(build-tree pq
(lambda (tree)
(make-codes tree
(lambda (codes)
(encode chars codes
(lambda (enc)
(k (list
(cons 'codes codes)
(cons 'encoded enc)))))))))))))))
(huffman-encode "hello world"
(lambda (r)
(display r)
(newline)))
