http://pedestal.io/guides/pedestal-with-component
lein new pedestal-service tnbsst
all pedestal deps already scaffoled, using jetty for this demo
http://pedestal.io/guides/pedestal-with-component
lein new pedestal-service tnbsst
all pedestal deps already scaffoled, using jetty for this demo
$ time echo '{:foo :bar}' |./bin/clack :foo | |
:bar | |
echo '{:foo :bar}' 0.00s user 0.00s system 0% cpu 0.002 total | |
./bin/clack :foo 2.54s user 0.19s system 104% cpu 2.619 total | |
;; https://pauladamsmith.com/blog/2015/01/how-to-get-started-with-llvm-c-api.html | |
(import LLVM | |
LLVMModuleRef | |
LLVMTypeRef | |
Wrap | |
LLVMBool | |
LLVMLinkage) | |
(def genstr (comp str gensym)) |
bhuga_is_too_long_to_ [8:26 PM] | |
there is no limit to the number of things in a tuple. they are indeed the same as an array | |
bhuga_is_too_long_to_ [8:27 PM] | |
tuple is just a word that expresses that the array is expected to have a given length (2-tuple, 3-tuple, 4-tuple, etc), and that each element of the array is of an expected type in an expected location | |
bhuga_is_too_long_to_ [8:27 PM] | |
you can make a tuple type out of this concept, wrapping the array. nothing wrong with that either | |
bhuga_is_too_long_to_ [8:28 PM] |
;; Datomic sample code | |
;; schema query for attribute types in specified namespaces | |
(q '[:find ?attr | |
:in $ [?include-ns ...] ;; bind ?include-ns once for each item in collection | |
:where | |
[?e :db/valueType] ;; all schema types (must have a valueType) | |
[?e :db/ident ?attr] ;; schema type name | |
[(datomic.Util/namespace ?attr) ?ns] ;; namespace of name | |
[(= ?ns ?include-ns)]] ;; must match one of the ?include-ns |
(ns maze.core) | |
(def *size* 20) | |
(defn walk [start] | |
(iterate (fn [[x y]] | |
(first (shuffle (filter (fn [lst] | |
(every? (fn [k] | |
(< -1 k *size*)) | |
lst)) |
; http://groups.google.com/group/clojure/browse_thread/thread/974e2c7f89e27231/5f4bff3e58dfa36f | |
; output images http://i.imgur.com/gSASS.png (square maze) | |
; http://i.imgur.com/uEqaq.png (hex maze) | |
;; generic Wilson's algorithm implementation | |
(defn maze | |
"Returns a random maze carved out of walls; walls is a set of | |
2-item sets #{a b} where a and b are locations. | |
The returned maze is a set of the remaining walls." | |
[walls] |
ÿØÿà JFIF H H ÿÛ C | |
ÿÛ C ÿÂ @k ÿÄ ÿÄ ÿÚ þ© À 8 Í |
A link dump of new orleans jazz scene, art & restaurants