I hereby claim:
- I am shilder on github.
- I am dshilov (https://keybase.io/dshilov) on keybase.
- I have a public key ASBxIx6H68ImTZJyXsrVUE1JXF7Cs6DpTS1eiwXOGpmEywo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| (ns repl.pitfalls | |
| (:require [clojure.core.async :as async]) | |
| (:import (java.util.concurrent DelayQueue Delayed TimeUnit))) | |
| ; some interesting repl behaviour | |
| ; this are not bugs, but just some counterintuitive behaviour | |
| ; all of the described issues are caused by some state (thread/queue/defonce) | |
| ; fn-caching | |
| (defn foo [a] |
| # generate java sources for WSDL | |
| # http://fias.nalog.ru/WebServices/Public/DownloadService.asmx?WSDL | |
| wsimport -B-npa -Xnocompile -s src/java -encoding utf-8 -p ru.nalog.fias resources/DownloadService.xml |
| (require '[aleph.http :as http]) | |
| (require '[manifold.stream :as s]) | |
| (require '[manifold.deferred :as d]) | |
| ;; connection will hold duplex stream | |
| ;; deref will block while client is connecting | |
| (defonce connection @(http/websocket-client "wss://url/")) | |
| ;; calls provided callback with every message on websocket | |
| (s/consume |