Skip to content

Instantly share code, notes, and snippets.

View skrat's full-sized avatar

Dušan Maliarik skrat

View GitHub Profile
clojure.lang.ExceptionInfo: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil
data: {:file
"C:\\Users\\Tim\\AppData\\Local\\Temp\\boot.user8061578760721422574.clj",
:line 23}
java.lang.IllegalArgumentException: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil
clojure.core/-cache-protocol-fn core_deftype.clj: 554
boot.tmpdir/fn/G tmpdir.clj: 25
boot.core/tmp-file core.clj: 381
var viewer = new Cesium.Viewer('cesiumContainer', {
infoBox : false,
selectionIndicator : false,
shadows : true
});
function createModel(url, height) {
viewer.entities.removeAll();
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
@skrat
skrat / foo.clj
Created September 27, 2016 21:09
(-> spec
(assoc-in
[:uniforms :view]
(-> (mat/look-at ...)
(g/rotate-y ...)))
(update-in
[:uniforms :model]
g/* (-> M44 (g/rotate-x HALF_PI))))
### Building ClojureScript
Leiningen 2.7.0 on Java 1.8.0_92 OpenJDK 64-Bit Server VM
Building
Done building
### Bundling 1st Stage ClojureScript
### Building 1st Stage Binary
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is GNU 6.1.1
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ xxx ---
[INFO] xxx:xxx:jar:1.0.5-SNAPSHOT
[INFO] +- org.clojure:clojure:jar:1.9.0-alpha12:compile
[INFO] +- org.clojure:clojurescript:jar:1.9.211:compile
(go-loop [[c & chs] (all-ma-channels)]
(if c
(let [x (<! c)]
...
(recur chs))
return-val))
(print
(string/join
"\n" (->> (range 12)
(partition 3)
(map (fn [[a b c]] (str "xxx" a " " b " " c))))))
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/GLTF/GLTFCleanupEvaluator.cpp.o
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/profiles/webgl-1.0/GLTFWebGL_1_0_Profile.cpp.o
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/shaders/commonProfileShaders.cpp.o
[ 95%] Building CXX object CMakeFiles/collada2gltfConvert.dir/helpers/geometryHelpers.cpp.o
/home/skrat/Workspace/xxx/glTF/glTF/COLLADA2GLTF/helpers/geometryHelpers.cpp: In function ‘bool GLTF::__RemapPrimitiveVertices(std::shared_ptr<GLTF::GLTFPrimitive>, std::vector<std::shared_ptr<GLTF::GLTFAccessor> >, GLTF::MeshAttributeVector, GLTF::MeshAttributeVector, unsigned int*, std::shared_ptr<GLTF::GLTFPrimitiveRemapInfos>, unsigned int*)’:
/home/skrat/Workspace/xxx/glTF/glTF/COLLADA2GLTF/helpers/geometryHelpers.cpp:260:74: error: ‘memcpy’ was not declared in this scope
memcpy(ptrDst, ptrSrc, bufferInfos->elementByteLength);
(def lookup-sentinel #?(:clj ::not-found :cljs (js-obj))
(def pending-sentinel #?(:clj ::pending :cljs (js-obj))
(defn memoize-async
[f]
(let [>in (chan)
pending (pub >in :args)
mem (atom {})]
(letfn
[(memoized [& args]
(defn memoize-async
"Returns a memoized version of a referentially transparent function. The
memoized version of the function keeps a cache of the mapping from arguments
to results and, when calls with the same arguments are repeated often, has
higher performance at the expense of higher memory use.
http://stackoverflow.com/questions/24698536/"
[f]
(let [mem (atom {})]
(fn [& args]
(go