This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-05
Channels
- # adventofcode (246)
- # aleph (5)
- # aws (7)
- # beginners (161)
- # boot (3)
- # calva (42)
- # cider (40)
- # clara (10)
- # cljdoc (7)
- # cljs-dev (40)
- # cljsrn (6)
- # clojure (170)
- # clojure-dev (8)
- # clojure-greece (2)
- # clojure-italy (15)
- # clojure-kc (2)
- # clojure-new-zealand (13)
- # clojure-nl (13)
- # clojure-russia (3)
- # clojure-spec (5)
- # clojure-uk (160)
- # clojurescript (72)
- # clojurex (1)
- # cursive (7)
- # data-science (9)
- # datascript (1)
- # datomic (120)
- # devcards (4)
- # emacs (18)
- # figwheel-main (10)
- # fulcro (34)
- # kaocha (3)
- # luminus (1)
- # lumo (6)
- # music (1)
- # nrepl (23)
- # off-topic (2)
- # pedestal (4)
- # re-frame (42)
- # reagent (36)
- # reitit (10)
- # ring-swagger (21)
- # shadow-cljs (124)
- # spacemacs (6)
- # tools-deps (14)
- # unrepl (3)
- # vim (2)
Got it. Thank you for the clarification, @dnolen
Hi Folks, Can I use Clojure for writing a library that can easily (read without glue code) be used by an Android app?
Is there a compiler option to specify assets with an absolute path with :optimizations :none? (goog/deps etc..) I want a development build that I can serve on a different URL
Shouldn't CLJS DevTools also apply formatters in the react tools extension? Do we have a way to present cljs's data well in react tools?
@cheatex If you mean this[1] then I think you would have to fork it and implement support there by hand, I think they display stuff with their own custom code [1] https://github.com/facebook/react-devtools
I did just a brief look and they have a bunch of react components rendering their views, they do not (and technically cannot) defer rendering of js values to devtools https://github.com/facebook/react-devtools/blob/master/frontend/PropVal.js#L54
also they want their code to be portable between chrome and firefox, so this makes sense even if it was possible to re-use internal devtools console rendering machinery
ah, you might want to subscribe to this issue: https://github.com/facebook/react-devtools/issues/989 I think it could be technically possible to implement custom formatters, but it is quite some work. React devtools would have to inspect page’s javascript context for custom formatters, and learn how to render JsonML if present
well, it looks like you are loading cider and bunch of other dependencies, it depends when that code was last updated
if you are on a mac, this could help in your .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
this is how I switch between various java versions depending on project I want to work on
or maybe better use https://direnv.net
yesterday i was able to make a lein new reagent project to work fine with cider when i added the dependencies on a :repl profile
He will be missed 🙏
I’d start by making sure your parens are balanced and that there aren’t any weird symbols that the reader doesn’t expect. Perhaps an opening or closing paren was commented out? Would have to see the code
You could post the file or form you're trying to eval...
It would be easier to figure out.
i will zip the project, since i made it with
lein new re-frame +10x +routes +test +re-com
and updated the version of some dependencies by using lein ancient
, and i also have a repl profile to use piggieback on ~/.lein/ . i will zip everythingi ran
lein repl
then i ran this command: (require '[figwheel-sidecar.repl-api :as figwheel])(figwheel/start-figwheel!)(figwheel/cljs-repl))
to start fighweelthings seems to be working, i’m just curious about this error message because it’s not good to ignore them
there are unbalanced parens in that form which is what the error message is saying
I am trying to do something like this:
(eval (list 'resolve '+))
while requiring cljs.js
.
The reason I’m using eval
is that I want to resolve a function while the symbol is not known at compile time.looking at this discussion now: https://clojurians-log.clojureverse.org/lumo/2017-06-13.html
@borkdude eval in cljs is not so simple, what function exactly are you calling when you say eval
cljs.js/eval
?
I want to resolve a symbol to a function. Now I do it like this:
(defn sym->fn [sym]
#?(:cljs
(let [ns (munge (namespace sym))
nm (munge (name sym))]
(gobject/get (js/eval ns) nm))
:clj (resolve sym)))
which seems to work, since the symbol I’m using is already fully qualifiedi see
(aget js/window "x") ?
https://github.com/hyperfiddle/hyperfiddle/blob/master/src/contrib/cljs_platform.cljc
you can use js/global for node, if that wasnt clear
Is there a reliable, and perhaps even idiomatic way to detect a production build within a macro (so I can for e.g. elide various dev-mode asserts etc?)
@borkdude you will not be able to look up things by name in :advanced
optimized builds. in unoptimized builds you can just use (js/goog.getObjectByName "some.ns.foo")
might be able to get away with it if you ^:export the ns though. also, shameless plug: https://lwhorton.github.io/2018/10/20/clojurescript-interop-with-javascript.html