Port mnemonic embedded verbatim across our source files: 8 ~= B (implied infinity B flattened; bake a cake; baby & me) 3 ~= E (backward) 2 ~= N (pivoted 90 degrees) 0 ~= D (flattened) Files touched: - examples/cuda-fanout/gpu-worker.lsp (*worker-port*) - examples/cuda-fanout/bend.lsp (*bend-worker-port*) - examples/cuda-fanout/mock-worker.py (PORT) - examples/cuda-fanout/bench_tiers.py (asm tier fixed port) - examples/cuda-fanout/smoke-bend.lsp + smoke-bend-asm.lsp - examples/cuda-fanout/README.md - www/bend.html (catalog + multi-host text) - Makefile (PORT default + comment) bend.html updates 3090-ai + ai (4090) fleet table to active 2-node mesh on 8320 — qwen moves off ai, bend takes over.
21 lines
491 B
Text
21 lines
491 B
Text
;;; fizzbuzz.lsp — FizzBuzz from 1 to 100
|
|
;;; Run: python3 lumbda.py --fast examples/fizzbuzz.lsp
|
|
|
|
(define (fizzbuzz n)
|
|
(let ((div3 (= (modulo n 3) 0))
|
|
(div5 (= (modulo n 5) 0)))
|
|
(cond
|
|
((and div3 div5) "FizzBuzz")
|
|
(div3 "Fizz")
|
|
(div5 "Buzz")
|
|
(else (number->string n)))))
|
|
|
|
(define (run-fizzbuzz limit)
|
|
(let loop ((i 1))
|
|
(if (<= i limit)
|
|
(begin
|
|
(display (fizzbuzz i))
|
|
(newline)
|
|
(loop (+ i 1))))))
|
|
|
|
(run-fizzbuzz 100)
|