Skip to content

Instantly share code, notes, and snippets.



  • NYC
View GitHub Profile
View maria-experts.cljs
;; # Maria for Experts
;; This is a short tour of abstractions we've made in the process of building Maria, which are also available while using the system. It is meant for people with experience using functional programming languages who already know how to evaluate forms in Maria. If you're a beginner to Maria or to programming in general, I recommend starting [here](
;; (For the impatient, Command-Enter — Control-Enter on a PC — within a code block with evaluate the code before the cursor.)
;; ## Notebook interface
;; In the notebook tradition exemplified by iPython Notebooks, one has a mix of prose and code with the ability to visualize the results of evaluating a particular piece of code.
Sh4pe /
Last active Apr 11, 2018
Pretty-print methods of a Java class in Clojure. Useful inside the REPL.

The function print-methods is intended to be used inside a REPL. Just copy and paste it to your REPL and enjoy:

main=> ; paste print-methods
main=> (print-methods 1)
class java.lang.Long
bitCount(long) -> int
byteValue() -> byte
compare(long, long) -> int
mrb /
Last active Sep 13, 2019
"Programs that eat programs" Works cited/bibliography
malyn / vim-fireplace-figwheel.diff
Created Feb 20, 2015
vim-fireplace patches/hack for compatibility with Figwheel
View vim-fireplace-figwheel.diff
diff --git a/plugin/fireplace.vim b/plugin/fireplace.vim
index 6c32caa..a415bf8 100644
--- a/plugin/fireplace.vim
+++ b/plugin/fireplace.vim
@@ -232,7 +232,9 @@ function! s:repl.piggieback(arg, ...) abort
let arg = ' :repl-env ' . a:arg
- let response = connection.eval('(cemerick.piggieback/cljs-repl'.arg.')')
+ "let response = connection.eval('(cemerick.piggieback/cljs-repl'.arg.')')
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
CmdrDats / cqrs.clj
Last active Jan 2, 2016
Simple foray into Clojure CQRS/ES example. Now with Datomic.
View cqrs.clj
(ns server.db.cqrs
[datomic-schema.schema :only [schema fields part]])
[datomic.api :as d]
[datomic.function :as df]
[datomic-schema.schema :as s]))
;; Some simple helper functions:
(defn error [^String msg]
View dropin.cljs
(ns interop.core
(:require [cljs.nodejs :as nodejs]))
(def Immutable (js/require "immutable"))
(extend-type Immutable.List
(-seq [coll]
View transducerfun.clj
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)
jackrusher / rhyming-and-scheming.clj
Created Jan 26, 2014
Finding rhymes with clojure and CMU's pronunciation dictionary. Tested with this file, minus comments, as 'cmudict.txt':
View rhyming-and-scheming.clj
(def rhyme-txt
(map #(string/split % #"[ ]+") (string/split-lines (slurp "cmudict.txt"))))
(def word-to-rhyme
(reduce (fn [m [word & rhyme]]
(assoc m
(string/lower-case word)
(mapv #(keyword (string/replace %1 #"[0-9]" "")) (reverse rhyme))))
{} rhyme-txt))
You can’t perform that action at this time.