Skip to content

Instantly share code, notes, and snippets.

🔮
~*~*sorcery*~*~

Philip Diaz lambdahands

🔮
~*~*sorcery*~*~
  • Chicago
Block or report user

Report or block lambdahands

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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](https://www.maria.cloud/intro).
;; (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
Sh4pe / README.md
Last active Apr 11, 2018
Pretty-print methods of a Java class in Clojure. Useful inside the REPL.
View README.md

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
mrb / abstint.md
Last active Sep 13, 2019
"Programs that eat programs" Works cited/bibliography
View abstint.md
@malyn
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
else
let arg = ' :repl-env ' . a:arg
endif
- 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
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@CmdrDats
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
(:use
[datomic-schema.schema :only [schema fields part]])
(:require
[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]))
(nodejs/enable-util-print!)
(def Immutable (js/require "immutable"))
(extend-type Immutable.List
ISeqable
(-seq [coll]
View transducerfun.clj
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)
@jackrusher
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': http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict.0.7a
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.