- Make sure you've installed hy or put it in requirements.txt
- Put
hy.py
inmanagement/commands/hy.py
./manage.py hy
hy 0.11.0 using CPython(default) 2.7.6 on Linux
=> (import [yourapp [settings]])
=> settings.DEBUG
True
; uses a web worker background thread | |
(let [metronome-worker-js "self.onmessage=function(e){setTimeout(function(){postMessage(e.data);},e.data.interval);};console.log('Metronome worker loaded.');" | |
worker-blob (js/Blob. (clj->js [metronome-worker-js]) {:type "application/javascript"}) | |
worker (js/Worker. (.createObjectURL js/URL worker-blob)) | |
call-id (atom 0)] | |
(defn make-worker-listener [id callback] | |
(fn [e] | |
(when (= e.data.id id) | |
(callback) |
hy.py
in management/commands/hy.py
./manage.py hy
hy 0.11.0 using CPython(default) 2.7.6 on Linux
=> (import [yourapp [settings]])
=> settings.DEBUG
True
I would expect this: | |
(defn x [] | |
(try | |
(some-call) | |
(catch [e Exception] 1) | |
(else 2))) | |
To compile to this: |
I hereby claim:
To claim this, I am signing this object: