Fork me on GitHub
#clojurescript
<
2016-08-22
>
danielcompton00:08:46

cljs.reader/read-string?

danielcompton00:08:51

I think that ones safe

ramji01303:08:42

Hi All, I am new to Clara and clojure. Trying to implement a simple rule. Experiencing below issues, 1) created a global variable using def. But the variable not accessible inside defrule. 2) The output of QueryResult, how to set into a Java object. 3) how to access inner object parameter in defrule. In detail, a parent object having several child object, I.e. cobj1, cobj2. one of the rule check is based on parameter available in cobj1. I have to access field x. The transferal from parent to child object field not happening. Please suggest

shaunlebron05:08:02

hi @ramji013, welcome 🙂 I’d try asking that question in the #clara channel

rauh07:08:44

Has anybody written a "restore scroll position" when figwheel reloads code?

jethroksy07:08:37

quick question: How do you people resolve circular dependencies in clojurescript? I have a situation i can't seem to resolve view (cljc) -> history (html5) -> routes -> view (cljc)

jethroksy07:08:47

is there a better way to organize my code?

am-a_metail07:08:09

Not really a clojurescript problem - Can happen in any code. Usually means you need to refactor code so A->B->A becomes A->C, B->C

jethroksy07:08:37

thanks, I'll see what I can do

andrewtropin09:08:45

Hey, guys, how you compile scss -> css?

kokos09:08:09

hi everybody, when trying to compile clojurecript with

lein cljsbuild once
i get
lein cljsbuild once
Compiling ClojureScript...
and stops. The project.clj file is found here https://gist.github.com/kokosro/2ae855d03a34f85abec7cf128ae2fab4 This has worked before and now stopped all of a sudden. I have removed all of my ~/.m2/reposotory/* and tried again with same result, the compilation doesn't go through and outputs no errors. Any idea why is this happening or how I can debug this further? thank you

jethroksy10:08:40

@kokos have you run lein clean?

kokos10:08:22

yes @jethroksy with same result

jethroksy10:08:13

your configuration looks fine to me

kokos10:08:06

is there any other way i could debug this, to see where the compilation stops ? the :verbose true option doesn't display an information at this point

jethroksy10:08:28

not quite the clojurescript expert unfortunately

jethroksy10:08:47

I use luminus' config

kokos10:08:14

@jethroksy i'm going to try the configuration found here

and see what it does

jethroksy10:08:41

you probably have to add in the externs stuff again

jethroksy10:08:14

optimizations none seems to be the choice of people at Adzerk

jethroksy10:08:25

it's always been good enough for them

kokos10:08:41

@jethroksy i've changed to :optimizations :none new project.clj is now looking like this https://gist.github.com/kokosro/2ae855d03a34f85abec7cf128ae2fab4 and it's starting to compile with

lein cljsbuild auto
but
lein cljsbuild once
isn't working still, also no luck on :optimizations :advanced . ty for your input

anmonteiro10:08:30

@andrewtropin: I use Boot-SASS in my pipeline

molstt12:08:33

does anyone know about any smooth setups for working with different clojurescript libraries at a time without too much hackery and custom scripting? I have a very ordinary cljs app, but also a cljs lib in a different project. When I work on the lib, I would like my cljs app boot process (with cljs compilation) to pick it up immediately and rebuild the necessary parts as it would do if the namespaces of the library were in the app project..

martinklepsch13:08:17

@molstt check the checkout task boot checkout -h

molstt13:08:47

looks like a nice solution. It will require a transition from lein to boot in the lib project, but it's probably a good investment anyway. Thanks!

martinklepsch13:08:43

a slightly hacky approach would be to add the lib to :source-paths but that doesn't account for an transitive deps

juhoteperi13:08:14

no need to move the lib from lein to boot, checkout task works fine with libs build using lein

juhoteperi13:08:15

btw. checkout task is replaced by checkout env property in 2.6

martinklepsch13:08:26

right but you don't have the watch install stuff

martinklepsch13:08:08

haha, confused them 🙈

juhoteperi13:08:15

yeah, there is benefit in using Boot for lib project

molstt13:08:17

always nice to know the optoins! 🙂

tianshu14:08:36

does macroexpand-1 always expand macro with the namespaces in clojure? I call macroexpand-1 in CLJS, then I saw clojure.core/let, clojure.core/->>, and this macro can not work in CLJS, but it works in CLJ. there's no third party library dependencies in it.

dnolen14:08:50

@doglooksgood: it’s not clear to me what your question is? namespaced symbols is from using syntax-quote, the backtick

tianshu14:08:59

I try to macroexpand-1 in .cljs, and I got, for example, clojure.core/->> instead of cljs.core/->>

dnolen14:08:24

@doglooksgood right that’s because we reuse some macros from Clojure

dnolen14:08:47

and also clojure.core is treated as an alias for cljs.core in the ClojureScript compiler

dimovich15:08:39

does anyone have a good tutorial on compiling / deploying boot projects (cljs / clj) ?

martinklepsch15:08:50

@dimovich I've only heard praise for @magomimmo's modern-cljs tutorials: https://github.com/magomimmo/modern-cljs

dimovich15:08:27

another question.... on compiling cljs with advanced compilation, the js/mina easing functions seem to stop working

dimovich15:08:34

should I include an externs fil?

dimovich15:08:41

*externs file

pesterhazy15:08:22

where does mina come from?

pesterhazy15:08:51

as a workaround you can use ((aget js/global "mina") ...)

pesterhazy15:08:24

but yeah, an externs file is the proper solution

dimovich16:08:18

(aget (aget js/window "mina") "backout")

dimovich16:08:27

seems to do the trick

shaunlebron16:08:00

@dimovich: (aget js/window “mina” “backout”) is fine too

shaunlebron16:08:15

(goog.object/getValueByKeys js/window “mina” “backout”) is good too: http://cljs.github.io/api/cljs.core/aget

moxaj21:08:50

If I have a cljc namespace in which I define a macro, I cannot use that macro later in the same namespace right?

anmonteiro21:08:09

having a foo/core.cljc CLJC file where you have (CLJ) macros and CLJS code is no different than having separate foo/core.clj and foo/core.cljs files

anmonteiro21:08:42

you just need to #?(:cljs (:require-macros foo.core))

moxaj21:08:16

@anmonteiro thanks for the help, turns if it was an other issue (or a host of issues...)

dimovich22:08:07

some svg with clojurescript ... https://dimovich.github.io

moxaj22:08:13

@anmonteiro hmm... I have

...
#?(:clj (defmacro foo <...>))

(foo <...>)
When compiling, I get "can't take value of macro foo ...". 😞 Edit: nvm .. sigh

shaunlebron23:08:12

@dimovich: nice color filters 🙂, not seeing how that works with opacity: 1...