Skip to content

Instantly share code, notes, and snippets.

View fogus's full-sized avatar
💭
attempting to learn how to better learn

Fogus fogus

💭
attempting to learn how to better learn
View GitHub Profile
@fogus
fogus / maf.scm
Last active August 29, 2015 14:07
(def f
{| f | (f)
| f s | (out! "Calling with " s) (f s)})
(def g {| a | (+ a 1)})
(def f
{[ f ] (f)
[ f s ] (out! "Calling with " s) (f s)})
@fogus
fogus / foami.clj
Last active August 29, 2015 14:07 — forked from cgrand/foami.clj
(ns foami.core
"FOreign Asynchronous Mechanism Interop"
(:require [clojure.core.async :as async]))
(def ^:private abandon (doto (async/chan) async/close!))
(def ^:private pending-writes (async/chan))
(defn put!
"Tries to put a val into chan, returns either: true if put succeeded, false if chan is
(defn splat-map [m]
(reduce (fn [acc [k v]] (-> acc (conj k) (conj v))) [] m))

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

To make a slave of the imagination, even though what is vulgarly called happiness is at stake, is to fail profoundly to do justice to one’s deepest self.

%!PS-Adobe-3.0
%%Title: Printable Havannah Boards
%%Creator: Zhen Wang [zmxv.com]
%%Pages: 7
%%BoundingBox: 0 0 612 792
%%DocumentPaperSizes: Letter
%%EndComments
%%BeginProlog
@fogus
fogus / cells.clj
Last active August 29, 2015 14:13 — forked from richhickey/cells.clj
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(set! *warn-on-reflection* true)
(defn sqr [n] (* n n))
(contracts/provide
(sqr "Constraints for squaring"
[x] [number? (not= 0 x) => number? pos?]))
(sqr 10)
;=> 100
(sqr 0)

2011.03.10

Recursive Interfaces for Reactive Objects by Travers

Talks briefly about Kay's Vivarium Project... TODO: find out more

Frames

(require '[clojure.walk :refer [macroexpand-all postwalk]]
'[clojure.pprint :refer [pprint]])
(def ^:dynamic *platform* :clj)
(defmacro +clj [form]
(if (= :clj *platform*)
form
::elide))