(define (make-link x)
`(a [[href "#top"] [class "internal"]]
,(splice x)))
This file contains hidden or 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 sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |
This file contains hidden or 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 sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]] | |
[cljs.pprint :refer [pprint]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |
This file contains hidden or 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
if [ ! -f .classpath ]; then | |
classpath=`boot show -c | tee .classpath` | |
else | |
classpath=`cat .classpath` | |
fi | |
planck -c $classpath ... |
This file contains hidden or 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
$ node test/perf.js | |
Testing file with 2865 lines | |
indent: 62.065ms | |
paren: 52.131ms | |
$ /usr/sbin/system_profiler SPHardwareDataType | |
Hardware Overview: | |
Model Name: MacBook Pro |
This file contains hidden or 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
(def foo| (bar | |
baz)) |
The file below is used by the search box on the official Closure API docs, which is generated by js-dossier. If we want more doc data besides name and type, we can modify js-dossier to spit those out as data.
The data is just a single array of objects at TYPES.types
.
Comparing ES7 and core.async
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
This file contains hidden or 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
;; dummy protocol | |
(defprotocol IFoo | |
(foo [this])) | |
;; dummy cljs type | |
(deftype Bar []) | |
;; extending a cljs type | |
(extend-type Bar | |
IFoo (foo [this] (println "Hello from IFoo.foo for Bar"))) |
This file contains hidden or 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
var atlas = (function(){ | |
var canvas,ctx; | |
var size = 22; | |
var cols = 14; // has to be ONE MORE than intended to fix some sort of CHROME BUG (last cell always blank?) | |
var rows = 22; | |
var creates = 0; |