sci
sci copied to clipboard
Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs
This works in self-hosted CLJS: ``` (let [x #js {:foo #js {:bar 1}} y x.foo.bar] y) ``` Not sure if it is officially supported. This also works: ``` user=> (def...
This can have benefits on JS output size. Using the backtick generates an unbelievable amount of code.
This is equivalent to `(set! (.-foo goog/global) 1)` which might be more idiomatic. One approach could be to convert `(set! js/foo)` to `(set! (.-foo js) ..)` and then process that...
Repro: ``` clojure (ns user (:require [clojure.pprint :as pprint])) (defprotocol Schema) (defrecord ASchema [] Schema) (defrecord Foo [x]) (defmethod clojure.pprint/simple-dispatch user.Schema [_] (println "PRETTY")) (prefer-method clojure.pprint/simple-dispatch user.Schema clojure.lang.IRecord) (prefer-method clojure.pprint/simple-dispatch...
**version** "0.3.5" **platform** linux, guix **problem** Cryptic error message when I compile a code that contains a bad namespace form. **repro** I have put in a bad ns form. The...
Promising approach in https://github.com/babashka/sci/pull/547 See https://github.com/babashka/sci/issues/345
In this issue we will identity issues that have to be solved for ClojureDart support. /cc @pfeodrippe
Make one more release to `borkdude/sci` and print warning when `sci.core` is required that people should upgrade to `org.babashka/sci` instead since there were quite a few problems with having both...
- [x] https://github.com/babashka/sci/issues/705
``` user=> (def f (sci/eval-string "(fn [] (Math/sin 3.14))" {:classes {'Math Math}})) #'user/f user=> user=> (defn foo [] (Math/sin 3.14)) #'user/foo user=> (time (dotimes [i 1000000] (f))) "Elapsed time: 2171.718646...