Skip to content

Instantly share code, notes, and snippets.

attempting to learn how to better learn

Fogus fogus

attempting to learn how to better learn
View GitHub Profile
View cont.clj
(ns com.manigfeald.http2.cont)
(defn bind% [m f]
(fn [kont bundle]
(m (fn [value] ((f value) kont bundle)) bundle)))
(defmacro return% [value]
`(fn [kont# bundle#]
(let [v# ~value]
View trailing-map.clj
;; original emit on RHS of map destructure form
(if (seq? kvs)
(clojure.lang.PersistentHashMap/create (seq kvs))
(defn create-bl [& kvs]
;; replacement code for RHS of map destructure form
View endmap.clj
(defn add [& {:keys [:a :b]}]
(+ a b))
(add :a 1 :b 2)
;;=> 3
(add :a)
;;= No value supplied for key: :a
(add {:a 1 :b 2})
View kwarg-options.clj
;; Basis
(fn [& {:keys [a b]}] (+ a b))
;; gen param lists approach
(defn param-gen-style
(let [{:keys [a b]} a-map]
fogus / lbForth.c
Created Aug 13, 2020 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
View lbForth.c
* A minimal Forth compiler in C
* By Leif Bruder <>
* Release 2014-04-04
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
View jmc.lisp
; The Lisp defined in McCarthy's 1960 paper, translated into CL.
; Assumes only quote, atom, eq, cons, car, cdr, cond.
; Bug reports to
(defun null. (x)
(eq x '()))
(defun and. (x y)
(cond (x (cond (y 't) ('t '())))
('t '())))
View all.edn
[#{"Force of Will" "Urza, Lord High Artificer" "Lotus Field"
"Fragmentize" "Fact or Fiction" "Disenchant" "Skullclamp"
"Fierce Guardianship" "Baleful Stryx" "Scrubland" "Demonic Tutor"
"Bloodstained Mire" "Merchant Scroll" "Swords to Plowshares"
"Brainstorm" "Cephalid Coliseum" "Chromatic Lantern" "Mox Opal"
"Vandalblast" "Spellseeker" "Underground Sea" "Flooded Strand"
"Snapcaster Mage" "Necropotence" "Toxic Deluge" "Wishclaw Talisman"
"Canyon Slough" "Polluted Delta" "Chrome Mox" "Crucible of Worlds"
"Teferi, Hero of Dominaria" "Humility" "Mana Crypt" "Mana Drain"
"Snow-Covered Swamp" "Hallowed Fountain" "Vedlaken Shackles"
fogus /
Created Jun 24, 2020 — forked from rvagg/
Kindleberry "Paperwhite" Pi

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.


  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken)
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
    • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the forums and wiki.
View fs
View scratch.clj
;; use spec to define stateful protocols inspired by UBF(b)
(require '[clojure.spec.alpha :as s]
'[clojure.core.async :as async])
(defn ubfish
"Takes a protocol definition and four channels. Checks for protocol
violations while copying from-server to-client and from-client