I'm removing memoization to make things 8x faster ... #cachingishard #clojure
I'm removing memoization to make things 8x faster ... #cachingishard #clojure
I don’t know how to feel about this, on one hand I dread dynamic scope, on the other, cool, huh? I didn’t know it’s optional in #Clojure by using a macro #fennel https://andreyor.st/posts/2025-06-09-implementing-dynamic-scope-for-fennel-and-lua/#implementing-dynamic-scope-in-fennel
#Clojure(Script) Minecraft roguelike dungeons.
https://youtu.be/7cVoa5E8DwI
I've recently released Ring 1.15.0-beta1 for #clojure. This includes some improvements to response streaming, and the addition of wrap-content-length middleware for string and file response bodies. https://github.com/ring-clojure/ring
以 EDN 檔案撰寫測試
➤ 簡化單元測試流程
✤ https://biffweb.com/p/edn-tests/
作者分享了其持續改進的單元測試方法,核心思想是定義輸入數據,並將預期返回值儲存於 EDN 檔案中。 透過比對實際返回值與 EDN 檔案,來驗證測試結果。 此新方法簡化了測試流程,使其更接近在 REPL 中執行程式碼的體驗,降低了認知負擔。
+ 這種方法看起來很有趣,直接用EDN檔案儲存測試案例,可以減少很多模板程式碼。
+ 感覺這個測試方法更接近實際開發流程,更容易上手,也方便協作。
#開發 #測試 #Clojure
This code works in #clojure.
(def ^def ^:def ^"def" def "def" def)
Geeking out on Maidenhead grid squares. Golfed #Clojure:
(defn latlon->maidenhead [lat lon]
(let [c #(char (+ 65 (quot %1 %2)))
p #(let [a (long (* (+ %1 (%2 90)) 240))
s (%2 240)
f (* 10 s)]
[(c a f)
(quot (mod a f) s)
(c (mod a s) (%2 10))])]
(apply str (interleave (p lon #(* % 2))
(p lat identity)))))
(latlon->maidenhead 41.71 -72.7) => "FN31PR"
I don't understand why yet but I am obsessed with #clojure
#CommonLisp sturdy, industrial
#Scheme elegant, academic
#Emacs lisp the only actually useful lisp
#clojure if it weren't JVM-based... there's always one bad apple
Structuring large Clojure codebases with Biff https://lobste.rs/s/3cigc9 #clojure #lisp #web
https://biffweb.com/p/structuring-large-codebases/
AGI 最後的邊境:CLJ-AGI 基準測試
➤ 通用人工智慧的評估標準:CLJ-AGI 挑戰
✤ https://raspasov.posthaven.com/the-agi-final-frontier-the-clj-agi-benchmark
本文提出一個名為 CLJ-AGI 的全新 AGI 基準測試。作者認為,當人工智慧系統能夠根據特定需求增強 Clojure 程式語言,甚至創造全新語言,同時盡可能保持與現有 Clojure 的相容性時,便代表我們已達到通用人工智慧 (AGI) 的里程碑。此基準測試著重於函數式優先設計、延遲執行、以及使用 CRDT 資料結構等進階特性。
+ 「這個基準測試很有意思,它跳脫了傳統的圖靈測試,直接挑戰 AI 的程式設計能力。如果 AI 能通過,那的確可以說 AGI 離我們不遠了!」
+ 「維持與現有 Clojure 的相容性是個很大的難題,這不僅需要 AI 具備強大的程式設計能力,更需要對現有系統有深入的理解。」
#人工智慧 #AGI #基準測試 #Clojure #程式語言
phew… I just solved Daily Programmer #399 (which is a very easy programming puzzle, if you’re using a language you’re familiar with) in #Clojure and it was one of the most difficult programming problems I’ve solved in a very long time
my code probably looks terrible if you’re an experienced #Lisp user, but it was the best that I could figure out how to do. I’m especially unhappy with char-to-lowercase
and how many layers of indentation I needed to do something so simple
here’s my solution: https://pastebin.com/u8kcTd5c
Writing your tests in EDN files
https://biffweb.com/p/edn-tests/
I've previously written about my latest approach to unit tests: [Y]ou define only the input data for your function, and then the expected return value is generated by calling your function. The expected value is saved to an EDN file and checked...
Today the #clojure jet CLI tool to transform between JSON, EDN and Transit is 6 years old!
What would you name a #Clojure library for handling terminal/console codes? A library not as fancy as Lanterna, but in the same family.
Worklog: spent the whole day hacking a roguelike dungeon generator into Minecraft Bedrock edition via the undocumented websockets API using #Clojure(Script).