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
ki macro (export $name $val) | |
(js exports.$name = $val) | |
ki require core | |
// Ported from https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/data.cljs | |
ki (ns diff |
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
ki -o react_ki.out.js react_ki.js |
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 asyncatom.core | |
(:require [clojure.core.async :refer [chan go <! >! <!!]]) | |
(:refer-clojure :exclude [atom swap! reset! compare-and-set! deref])) | |
(defn atom [v] | |
(let [c (chan)] | |
(go | |
(loop [v v] | |
(let [[cmd oc & args] (<! c) | |
v (condp = cmd |
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
(defproject archimedes-test "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[com.orientechnologies/orient-commons "1.3.0"] | |
[com.orientechnologies/orientdb-core "1.3.0"] | |
[com.tinkerpop.blueprints/blueprints-orient-graph "2.3.0"] | |
[clojurewerkz/ogre "2.3.0.1"] |
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
(defmacro let-map | |
"Takes a binding form (as in let) and returns a map of (keywordized) | |
binding names and bound values. It allows to construct a map sequentially. | |
Usage: | |
(let-map [a 1 b (+ a 1)]) | |
=> {:a 1 :b 2}" | |
[kv] | |
(let [ks (map keyword (take-nth 2 kv))] | |
`(let [~@kv] | |
(into {} (map vec (partition 2 (interleave '~ks (take-nth 2 ~kv)))))))) |
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
# Copyright (c) 2010, Luca Antiga, Orobix Srl. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# |
NewerOlder