Skip to content

Instantly share code, notes, and snippets.

View jacobemcken's full-sized avatar

Jacob Emcken jacobemcken

View GitHub Profile
@jacobemcken
jacobemcken / hello.cljs
Last active August 29, 2015 14:04
Example to trigger compile warning
(ns example.hello)
;; This function will cause compilation got give the following warning:
;; WARNING: cljs.core/<, all arguments must be numbers, got [js/Date js/Date] instead.
(defn test-lt-operator
[^js/Date t]
(< t (js/Date.)))
@jacobemcken
jacobemcken / init.clj
Last active December 23, 2015 17:49
The following tested using Immutant 1.x.incremental.1009 (PuntoBueno)
(ns immutant.init
(:require [clj-time.core :as dt]
[immutant.messaging :as msg]))
(msg/start "/queue/a-queue")
(msg/listen "/queue/a-queue" #(println "received: " %))
(msg/publish "/queue/a-queue" {:created (dt/now)}) ; gives a stacktrace