Skip to content

Instantly share code, notes, and snippets.

View yogthos's full-sized avatar
🤷‍♂️

Dmitri Sotnikov yogthos

🤷‍♂️
View GitHub Profile
@yogthos
yogthos / gist:509994
Created August 5, 2010 16:44
infix math notation example
(def precedence {* 1, / 1, + 2, - 2})
(defn formula [& exprs]
(let [[x aop y bop z] (take 5 exprs)]
(if aop
(if bop
(if (< (get precedence aop) (get precedence bop))
(recur (into [(aop (formula x) (formula y))] (drop 3 exprs)))
(recur (into [x aop (bop (formula y) (formula z))] (drop 5 exprs))))
(aop (formula x) (formula y)))
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active March 25, 2025 21:21 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 26, 2025 19:13
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶