This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-15
Channels
- # aatree (1)
- # atlanta-clojurians (3)
- # beginners (112)
- # boot (4)
- # boot-dev (1)
- # bristol-clojurians (1)
- # cider (55)
- # cljs-dev (23)
- # cljsjs (1)
- # cljsrn (7)
- # clojars (24)
- # clojure (84)
- # clojure-brasil (1)
- # clojure-china (1)
- # clojure-italy (27)
- # clojure-norway (17)
- # clojure-romania (1)
- # clojure-spec (109)
- # clojure-uk (92)
- # clojurescript (94)
- # community-development (1)
- # core-matrix (1)
- # cursive (12)
- # datascript (1)
- # datomic (23)
- # figwheel (1)
- # fulcro (17)
- # hoplon (11)
- # jobs-discuss (3)
- # keechma (6)
- # lein-figwheel (4)
- # leiningen (79)
- # lumo (32)
- # mount (42)
- # off-topic (22)
- # onyx (13)
- # parinfer (30)
- # portkey (47)
- # powderkeg (1)
- # programming-beginners (24)
- # protorepl (3)
- # re-frame (16)
- # reagent (100)
- # ring-swagger (7)
- # shadow-cljs (134)
- # spacemacs (3)
- # sql (1)
- # tools-deps (48)
- # uncomplicate (1)
- # unrepl (14)
- # yada (1)
Getting pretty close to replacing http-kit with Java_WebSocket in weasel. Can't get it to take input yet but the browser is connecting back to the server.
I wrote up a short explanation regarding the new cljs.core/eval
that might answer the inevitable question "Does ClojureScript support eval
now?" https://gist.github.com/mfikes/66a120e18b75b6f4a3ecd0db8a976d84
When I run the clj command listed in the gist, the browser launches and connects back but the repl hangs and it never drops to the prompt
I suspect people are going to rush to think the presence of cljs.core/eval
means what they want it to mean, rather than what it really means.
Yeah, I wonder if people will think that simply requiring cljs.js
will make it work. If you try it, you will quickly find out "no" because it also ends up throwing (in a different way) if you are in JVM ClojureScript.
I’m not too concerned about it, the docstring should probably be clarified it’s for bootstrap if it isn’t already
Wohoo, testing new main and REPL stuff for training, and this really cool. I can use this to demonstrate e.g. node modules:
❯ cljs -d out --repl
ClojureScript 1.10.145
cljs.user=> (require '[left-pad :as left-pad])
cljs.user=> (left-pad "foo" 5)
" foo"
(`cljs` is two line script which calls clj
, I didn't check if something like that already exists)
btw. Node modules don't work on repl without output-dir:
❯ cljs
ClojureScript 1.10.145
cljs.user=> (require '[left-pad :as left-pad])
cljs.user=> (left-pad "foo" 5)
ReferenceError: module$home$juho$tmp$sdfsdf$node_modules$left_pad$index is not defined
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -6
Full stacktrace:
ReferenceError: module$home$juho$tmp$sdfsdf$node_modules$left_pad$index is not defined
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -6
at java.lang.String.substring(String.java:1931)
at clojure.core$subs.invokeStatic(core.clj:4926)
at clojure.core$subs.invoke(core.clj:4921)
at cljs.repl$file_display.invokeStatic(repl.cljc:384)
at cljs.repl$file_display.invoke(repl.cljc:380)
at cljs.repl$print_mapped_stacktrace$fn__6277.invoke(repl.cljc:397)
at cljs.repl$print_mapped_stacktrace.invokeStatic(repl.cljc:394)
at cljs.repl$print_mapped_stacktrace.invoke(repl.cljc:387)
at cljs.repl$display_error.invokeStatic(repl.cljc:471)
at cljs.repl$display_error.invoke(repl.cljc:451)
at cljs.repl$repl_caught.invokeStatic(repl.cljc:797)
at cljs.repl$repl_caught.invoke(repl.cljc:788)
at cljs.repl$repl_STAR_$fn__6479$fn__6488.invoke(repl.cljc:996)
at cljs.repl$repl_STAR_$fn__6479.invoke(repl.cljc:993)
at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:953)
at cljs.repl$repl_STAR_.invoke(repl.cljc:832)
at cljs.cli$repl_opt.invokeStatic(cli.clj:258)
at cljs.cli$repl_opt.invoke(cli.clj:247)
at cljs.cli$main.invokeStatic(cli.clj:577)
at cljs.cli$main.doInvoke(cli.clj:564)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$apply.invoke(core.clj:652)
at cljs.main$_main.invokeStatic(main.clj:61)
at cljs.main$_main.doInvoke(main.clj:52)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.core$apply.invokeStatic(core.clj:657)
at clojure.main$main_opt.invokeStatic(main.clj:317)
at clojure.main$main_opt.invoke(main.clj:313)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
@juhoteperi there are a couple of issues open for :npm-deps
not working in the new repl, I have been meaning to look at those but did not have much time
I glanced through "node repl" issues and didn't find anything that looked like this so I created new issue: https://dev.clojure.org/jira/browse/CLJS-2666 Could be something simple on how main works when output-dir is not set, but the stacktrace doesn't tell me anything.
made a quick demo showing that web workers now work with :target :webworker
https://github.com/kommen/clojurescript-webworker-demo and a PR to add it to the compiler options reference https://github.com/clojure/clojurescript-site/pull/193
^ :target :webworker
added to the comprehensive doc list: https://gist.github.com/mfikes/bdbe214f03abac88ae384adb1ac26490