Skip to content

Instantly share code, notes, and snippets.

@jamesmintram
jamesmintram / SampleRoute.clj
Created July 29, 2015 17:56
Is there a better way to write this?
(defroutes thin-app
(GET "/" [] "")
(POST "/foo" req
(if (= [:failed :default] (async/alts!! [[event-sink (slurp (:body req))]] :default :failed))
(println "FULL - 503")
(println "OK - 201"))
""))
package
{
/*
Type checking on the assignments....
*/
import loom.Application;
import loom2d.Loom2D;
import loom2d.animation.Transitions;
(defn diag-diff
[data]
(let [width (Math/sqrt (count data))
right-seq (take-nth (+ 1 width) data)
right-diag (take width right-seq)
left-data (drop (- width 1) data)
left-seq (take-nth (- width 1) left-data)
left-diag (take width left-seq)
;; Given the following app state:
(def state {:items/list [{:item/id 0 :item/type :foo :foo/value 42}
{:item/id 1 :item/type :bar :bar/value 43}]})
;; Foo has property `:foo/value`
(defui Foo
static om/Ident
(ident [this {:keys [item/type item/id]}]
[type id])
static om/IQuery
----- core.js:130:8
Read Data {:selected-user [:user/by-name Jimmy], :users [[:user/by-name Jimmy] [:user/by-name Robby] [:user/by-name Bobby]]} core.js:130:8
Read Query [{:selected-user [:userName]} {:users [:userName]}] core.js:130:8
Call (om/db->tree query data (clojure.core/deref state)) core.js:130:8
----- core.js:130:8
Props of a user list [{:userName Jimmy} {:userName Robby} {:userName Bobby}] core.js:130:8
-----
Error: Invalid arity: 1
G__9743()
core.js:21275
rabug$core$main_area/<()
core.js:81
executeDispatch()
react.inc.js:3297
[91]</SimpleEventPlugin.executeDispatch()
react.inc.js:15709
forEachEventDispatch()
# -----------------------------
# PipelineDB configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed

Keybase proof

I hereby claim:

  • I am jamesmintram on github.
  • I am jamesmintram (https://keybase.io/jamesmintram) on keybase.
  • I have a public key ASCnq8mErt5CZZi07XPUZDAw5QgdNlBQ01c0ZO_7wiZqygo

To claim this, I am signing this object:

2017-08-03 11:48:32.018 example-16-shadowmapsDebug[240:15925] /Users/james/bgfx/bgfx/bgfx/src/bgfx.cpp (2650): BGFX Init...
2017-08-03 11:48:32.036 example-16-shadowmapsDebug[240:15925] /Users/james/bgfx/bgfx/bgfx/src/bgfx.cpp (1329): BGFX Application called bgfx::renderFrame directly, not creating render thread.
2017-08-03 11:48:32.036 example-16-shadowmapsDebug[240:15925] /Users/james/bgfx/bgfx/bgfx/src/bgfx.cpp (1345): BGFX Running in multi-threaded mode
2017-08-03 11:48:32.140 example-16-shadowmapsDebug[240:15877] /Users/james/bgfx/bgfx/bgfx/src/glcontext_eagl.mm (197): BGFX Screen size: 480 x 320
2017-08-03 11:48:32.150 example-16-shadowmapsDebug[240:15877] /Users/james/bgfx/bgfx/bgfx/src/glcontext_eagl.mm (349): BGFX Import:
2017-08-03 11:48:32.151 example-16-shadowmapsDebug[240:15877] /Users/james/bgfx/bgfx/bgfx/src/glimports.h (462): BGFX 0x26308ac9 glVertexAttribIPointer (glVertexAttribIPointer)
2017-08-03 11:48:32.152 example-16-shadowmapsDebug[240:15877] /Users/james/bgfx/bgfx/bgfx/src/glimports.h
2017-08-03 11:55:21.104 example-16-shadowmapsDebug[243:17096] /Users/james/bgfx_new/bgfx/src/bgfx.cpp (2680): BGFX Init...
2017-08-03 11:55:21.125 example-16-shadowmapsDebug[243:17096] /Users/james/bgfx_new/bgfx/src/bgfx.cpp (1353): BGFX Application called bgfx::renderFrame directly, not creating render thread.
2017-08-03 11:55:21.125 example-16-shadowmapsDebug[243:17096] /Users/james/bgfx_new/bgfx/src/bgfx.cpp (1369): BGFX Running in multi-threaded mode
2017-08-03 11:55:21.352 example-16-shadowmapsDebug[243:17052] /Users/james/bgfx_new/bgfx/src/glcontext_eagl.mm (197): BGFX Screen size: 960 x 640
2017-08-03 11:55:21.366 example-16-shadowmapsDebug[243:17052] /Users/james/bgfx_new/bgfx/src/glcontext_eagl.mm (349): BGFX Import:
2017-08-03 11:55:21.367 example-16-shadowmapsDebug[243:17052] /Users/james/bgfx_new/bgfx/src/glimports.h (462): BGFX 0x26308ac9 glVertexAttribIPointer (glVertexAttribIPointer)
2017-08-03 11:55:21.367 example-16-shadowmapsDebug[243:17052] /Users/james/bgfx_new/bgfx/src/glimports.h (463):