Conversation
Notices
-
Embed this notice
hazlin (hazlin@annihilation.social)'s status on Saturday, 15-Aug-2026 01:32:57 JST
hazlin
> abstraction is free
> you wouldn't understand this
> my game has abstracted the player
> market cap just changed
> 9 billion to infinity-
Embed this notice
binkle (binkle@clubcyberia.co)'s status on Saturday, 15-Aug-2026 01:32:56 JST
binkle
@hazlin >abstraction is free
behead those who say this :muhammad: -
Embed this notice
mischievoustomato@0.5dollah.click's status on Saturday, 15-Aug-2026 01:32:56 JST
mischievoustomato
@binkle @hazlin :niggacoder: i didnt spend any money writing this abstraction
-
Embed this notice
hazlin (hazlin@annihilation.social)'s status on Saturday, 15-Aug-2026 01:40:45 JST
hazlin
@mischievoustomato @binkle Some people use AI to do the busy work. I use AI to push the boundaries of free abstraction.
/** * Sums all numbers in an array in factorial time O(n!). * Generates all n! permutations, sums each one, then divides by n!. */ function factorialSum(arr) { const n = arr.length; if (n === 0) return 0; let grandTotal = 0; let permutationCount = 0; function permute(remaining, runningSum) { if (remaining.length === 0) { grandTotal += runningSum; permutationCount++; return; } for (let i = 0; i < remaining.length; i++) { const nextRemaining = [ ...remaining.slice(0, i), ...remaining.slice(i + 1), ]; permute(nextRemaining, runningSum + remaining[i]); } } permute(arr, 0); // Each element appears in exactly n! positions across all permutations, // so grandTotal = n! * actualSum return grandTotal / permutationCount; }
-
Embed this notice