diff --git a/TODO.org b/TODO.org index 4c0d3a22..f61963d2 100644 --- a/TODO.org +++ b/TODO.org @@ -1059,6 +1059,11 @@ An unknown call whose near miss is a value — =(context-allocator)= against =context/allocator=, or a global — says the name is a value written without parentheses, and names no call at all when the call had arguments. +** NEXT (max-of T) and (min-of T) +Decided 2026-09-25: the type-limit constants as a form taking a type, Odin's +max(T), valid at any numeric type or a numeric?-bounded variable. For a float, +min-of is the most negative finite value. + * Backends ** DONE The x86 backend tracks LLVM at -O0 diff --git a/sand.flan b/sand.flan index f5f48b6d..95e78fe6 100644 --- a/sand.flan +++ b/sand.flan @@ -25,28 +25,6 @@ (defonce velocity [rows [cols f32]]) (defonce current-color dyn 0) -(defn insertion-sort [coll [$t]] () - {:where (ordered? $t)} - (let [i 1 - length (length coll)] - (while (and (< i length)) - (let [j i] - (while (and (> j 0) - (< (at coll j) (at coll (dec j)))) - (let [temp (at coll j)] - (set (at coll j) (at coll (dec j))) - (set (at coll (dec j)) temp)) - (-- j))) - (++ i)))) - -(comment - (insertion-sort [\I \N \S \E \R \T \I \O \N \S \O \R \T]) - (insertion-sort (slice [6 2 4 9 1 9 4 5] 0 8)) - (let [str (bytes "INSERTIONSORT")] - (insertion-sort str) - (println str)) - :-) - (defn clear-grid [] () (set grid (zeroed)) (set velocity (zeroed)))