This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns play.grids) | |
(defprotocol Grid | |
(select-by-row [x r]) | |
(select-by-col [x c]) | |
(print [x])) | |
(defrecord GridSize [vvs] | |
Grid | |
(select-by-row [x r] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns doesthisactuallywork) | |
(defprotocol foobar | |
(foo [x y]) | |
(bar [{x :x} {y :y z :z}] [x y z])) | |
(defrecord foobarrec [a] | |
foobar | |
(foo [x {y :y z :z}] [(:a x) y z]) | |
(bar [{x :a} {y :y z :z}] [x y z])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns peg-game.core | |
(:require | |
[cljs.core.async :as async | |
:refer [<! >! chan close! sliding-buffer put! alts! timeout]] | |
[jayq.core :refer [$ append ajax inner css $deferred | |
when done resolve pipe on bind attr | |
offset] :as jq] | |
[goog.dom :as dom] | |
[goog.events :as events] | |
[monet.canvas :as monet]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns nested-vector-ops) | |
(def nested-vector [[:salt 0 5 :deviation 5 10] | |
[:milk 5 4 :deviation 1 2] | |
[:cream 0 0 :deviation 0 0]]) | |
(->> | |
nested-vector | |
(remove (fn [[_ _ _ _ a]] (= "N/A" a))) | |
(sort-by (fn [[_ _ _ _ a]] a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun backward-whitespace-line () | |
(interactive) | |
(let ((n (current-column))) | |
(beginning-of-line) | |
(backward-word) | |
(move-to-column n))) | |
(defun forward-whitespace-line () | |
(interactive) | |
(let ((n (current-column))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns coogle.core | |
(use [clojure.core.typed] | |
[clojure.core.typed.base-env] | |
[compojure.core]) | |
(require [compojure.route :as route] | |
[hiccup.core :refer [html]]) | |
(:gen-class)) | |
(cf +) | |
(defmacro get-sigs [symbols] | |
`(zipmap ~symbols |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:+ {:app {"pmeta-r" [:refresh-connected-browser] | |
"pmeta-shift-n" [:window.new] | |
"pmeta-o" [:navigate-workspace-transient] | |
"pmeta-shift-o" [:open-file] | |
"pmeta-shift-f" [:searcher.show] | |
"ctrl-shift-d" [:docs.search.show] | |
"pmeta-n" [:new-file] | |
"ctrl-space" [:show-commandbar-transient]} | |
:editor {"pmeta-enter" [:eval-editor-form] | |
"pmeta-shift-enter" [:eval-editor] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; User keymap | |
;; ----------------------------- | |
;; Keymaps are stored as a set of diffs that are merged together together | |
;; to create the final set of keys. You can modify these diffs to either add | |
;; or subtract bindings. | |
;; | |
;; Like behaviors, keys are bound by tag. When objects with those tags are active | |
;; the key bindings are live. Keys can be bound to any number of Light Table commands, | |
;; allowing you the flexibility to execute multiple operations together. To see a list | |
;; of all the commands you can execute, start typing a word related to the thing you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:+ {:editor.keys.hinting.active {"tab" [:auto-complete] | |
"esc" [:auto-complete.remove] | |
"down" [(:filter-list.input.move-selection 1)] | |
"up" [(:filter-list.input.move-selection -1)] | |
"ctrl-n" [(:filter-list.input.move-selection 1)] | |
"ctrl-p" [(:filter-list.input.move-selection -1)]} | |
:app {"alt-x" [:show-commandbar-transient] | |
"ctrl-x o" [:tabs.next] | |
"ctrl-x ctrl-f" [:navigate-workspace-transient] | |
"ctrl-x ctrl-s" [:save] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`{:org.clojure/clojurescript #{"clojurescript" "cljs"} | |
:org.clojure/core.async #{"core.async" "async"} | |
:org.clojure/core.cache #{"core.cache" "cache"} | |
:org.clojure/core.logic #{"core.logic" "logic"} | |
:org.clojure/core.match #{"core.match" "match"} | |
:org.clojure/core.memoize #{"core.memoize" "memoize"} | |
:org.clojure/core.typed #{"core.typed" "typed"} | |
:org.clojure/data.json #{"data.json" "json"} | |
:org.clojure/data.xml #{"data.xml" "xml"} | |
:org.clojure/java.jdbc #{"java.jdbc" "jdbc"} |