I edited some local source at /Users/mfikes/Documents/Projects/hello-ambly/src/hello_ambly/core.cljs
(ns hello-ambly.core)
(defn i-m-gonna-throw []
(ffirst 1))
(defn make-my-day []
(i-m-gonna-throw))| Default impl: | |
| ClojureScript:cljs.user> (hello-ambly.core/test-exception-one) | |
| Error: 1 is not ISeqable | |
| cljs.core/seq (out/cljs/core.cljs:727:13) | |
| cljs.core/first (out/cljs/core.cljs:736:7) | |
| cljs.core/ffirst (out/cljs/core.cljs:1155:3) | |
| hello-ambly.core/test-exception-two (out/hello_ambly/core.cljs:16:3) | |
| hello-ambly.core/test-exception-one (out/hello_ambly/core.cljs:19:3) |
| ClojureScript:cljs.user> (first (js/Date.)) | |
| Error: Fri Feb 13 2015 14:58:06 GMT-0500 (EST) is not ISeqable | |
| seq (/private/var/mobile/Containers/Data/Application/A3C9B969-ADB6-435A-967E-EB79E858CF23/Documents/cljs/core.js:4212:17) | |
| first (/private/var/mobile/Containers/Data/Application/A3C9B969-ADB6-435A-967E-EB79E858CF23/Documents/cljs/core.js:4242:22) | |
| nil |
I edited some local source at /Users/mfikes/Documents/Projects/hello-ambly/src/hello_ambly/core.cljs
(ns hello-ambly.core)
(defn i-m-gonna-throw []
(ffirst 1))
(defn make-my-day []
(i-m-gonna-throw))| (repl/repl* (jsc/repl-env) | |
| {:output-dir "out" | |
| :watch "out" | |
| :cache-analysis true | |
| :source-map true}) | |
| (repl/repl* (jsc/repl-env) | |
| {:output-dir "out" | |
| :watch "/Users/mfikes/Documents/Projects/hello-ambly/src" | |
| :cache-analysis true |
| # No UI yet to let user pick if there are multiple | |
| # devices or a simulator discovered, so it is picking | |
| # the first on behalf of the user. | |
| orion:Clojure mfikes$ ./script/jscrepljs | |
| To quit, type: :cljs/quit | |
| Connecting to Mike's iPod touch | |
| ClojureScript:cljs.user> (+ 3 4) | |
| 7 | |
| ClojureScript:cljs.user> |
If Ambly honors the default of :print being println then this sample below would be the behavior. Perhaps this is a non-issue because Ambly startup can override this default so that :print is print.
(As an aside, flush is often only needed in combination with print, as oftentimes streams will flush on newlines.)
ClojureScript:cljs.user> (print "Hi")
Hi
nil
ClojureScript:cljs.user> (println "Hi")
Hi
This is a test with the current masters of ClojureScript, Weasel, Piggieback and simple-brepl of the example sequence at https://github.com/mfikes/shrimp
I made a slight modificaiton to the example sequence to (require 'shrimp.detail-view-controller) here so that symbols in that namespace are available in Weasel.
The error about "cljs.user" being already declared is perhaps a minor concern.
user=> (simple-brepl)
<< Started Weasel server on ws://127.0.0.1:9001 >>
Type `:cljs/quit` to stop the ClojureScript REPL
First test. Looks good:
ClojureScript:shrimp.detail-view-controller> (my-call)
Error: 1 is not ISeqable
cljs.core/seq (jar:file:/Users/mfikes/.m2/repository/org/clojure/clojurescript/0.0-2974/clojurescript-0.0-2974.jar!/cljs/core.cljs:731:13)
cljs.core/first (jar:file:/Users/mfikes/.m2/repository/org/clojure/clojurescript/0.0-2974/clojurescript-0.0-2974.jar!/cljs/core.cljs:740:7)
cljs.core/ffirst (jar:file:/Users/mfikes/.m2/repository/org/clojure/clojurescript/0.0-2974/clojurescript-0.0-2974.jar!/cljs/core.cljs:1159:3)
shrimp.detail-view-controller/throw-down (file:/Users/mfikes/Documents/Projects/shrimp/ClojureScript/src/shrimp/detail_view_controller.cljs:10:3)
shrimp.detail-view-controller/call-throw-down (file:/Users/mfikes/Documents/Projects/shrimp/ClojureScript/src/shrimp/detail_view_controller.cljs:13:3)
| Mike-Fikess-MacBook-Pro:clojurescript mfikes$ script/uberjar | |
| ++ git --no-replace-objects describe --match v0.0 | |
| + REVISION=v0.0-3002-g195b254 | |
| + REVISION=3002-g195b254 | |
| + REVISION=3002 | |
| ++ mktemp /tmp/compiler.clj.XXXXXXXXXXX | |
| + COMP_FILE=/tmp/compiler.clj.TFJAWu0Gx3G | |
| + sed -e 's/^.def ^:dynamic \*clojurescript-version\*.*$/(def ^:dynamic *clojurescript-version* {:major 0, :minor 0, :qualifier 3002})/' src/clj/cljs/util.clj | |
| + mv /tmp/compiler.clj.TFJAWu0Gx3G src/clj/cljs/util.clj | |
| ++ mktemp /tmp/core.cljs.XXXXXXXXXXX |
| [{:file "react-native/Libraries/Animation/LayoutAnimation.js", | |
| :provides ["LayoutAnimation"], | |
| :requires | |
| ["ReactPropTypes" | |
| "NativeModules" | |
| "createStrictShapeTypeChecker" | |
| "keyMirror"]} | |
| {:file "react-native/Libraries/Animation/POPAnimationMixin.js", | |
| :provides ["POPAnimationMixin"], | |
| :requires ["POPAnimation" "invariant" "warning"]} |