* refer clojure core ns from sci.impl.vars instead of sci.impl.namespaces * add :ns meta to dynamic vars in b.i.clojure.core
This commit is contained in:
parent
f1ebc854fe
commit
05e963bb6f
1 changed files with 10 additions and 6 deletions
|
|
@ -7,8 +7,8 @@
|
||||||
[clojure.core :as c]
|
[clojure.core :as c]
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[sci.core :as sci]
|
[sci.core :as sci]
|
||||||
[sci.impl.namespaces :refer [copy-core-var clojure-core-ns]]
|
[sci.impl.namespaces :refer [copy-core-var]]
|
||||||
[sci.impl.vars :as vars]))
|
[sci.impl.vars :as vars :refer [clojure-core-ns]]))
|
||||||
|
|
||||||
(defn locking* [form bindings v f & args]
|
(defn locking* [form bindings v f & args]
|
||||||
(apply @#'locking/locking form bindings v f args))
|
(apply @#'locking/locking form bindings v f args))
|
||||||
|
|
@ -22,10 +22,14 @@
|
||||||
(prn (str "Elapsed time: " (/ (double (- (. System (nanoTime)) start#)) 1000000.0) " msecs"))
|
(prn (str "Elapsed time: " (/ (double (- (. System (nanoTime)) start#)) 1000000.0) " msecs"))
|
||||||
ret#))
|
ret#))
|
||||||
|
|
||||||
(def data-readers (sci/new-dynamic-var '*data-readers* nil))
|
(defn core-dynamic-var
|
||||||
(def command-line-args (sci/new-dynamic-var '*command-line-args* nil))
|
([sym] (core-dynamic-var sym nil))
|
||||||
(def warn-on-reflection (sci/new-dynamic-var '*warn-on-reflection* false))
|
([sym init-val] (sci/new-dynamic-var sym init-val {:ns clojure-core-ns})))
|
||||||
(def math-context (sci/new-dynamic-var '*math-context* nil))
|
|
||||||
|
(def data-readers (core-dynamic-var '*data-readers*))
|
||||||
|
(def command-line-args (core-dynamic-var '*command-line-args*))
|
||||||
|
(def warn-on-reflection (core-dynamic-var '*warn-on-reflection* false))
|
||||||
|
(def math-context (core-dynamic-var '*math-context*))
|
||||||
|
|
||||||
;; (def major (:major *clojure-version*))
|
;; (def major (:major *clojure-version*))
|
||||||
;; (def minor (:minor *clojure-version*))
|
;; (def minor (:minor *clojure-version*))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue