Fork me on GitHub
#clojurescript
<
2016-11-15
>
mikeb00:11:38

Has anyone tried to use clojurescript with vuejs? Does the vuejs state/rendering model fit well with clojurescript or work against it?

dnolen00:11:53

@mikeb if it’s like React - mostly functional - then it probably will work great

Pablo Fernandez05:11:51

Is it possible to increase the timeout in a figwheel repl? I’m getting: Eval timed out!

kauko06:11:32

try lein do clean, compile, repl

kauko06:11:40

mostly compile before repl

kauko06:11:59

but I also think it is possible to increase the timeout, don't remember the config though

rmoehn07:11:45

@pupeno Not sure if you mean this, but I once had to put (defproject … :repl-options {:timeout 180000}) in a project.clj.

Pablo Fernandez07:11:57

@rmoehn I’ll give it a try. Thanks.

fifigyuri09:11:09

Hi, I’d like to put clojurescript project to production with digested file names generated, how can I do that?

darwin09:11:22

@fifigyuri I’m afraid assets bundling is out of the scope of clojurescript compiler. You have to use some other tool to post-process your production build.

fifigyuri10:11:21

thanks, I wanted to make sure, I have to use another tool for that then

anmonteiro15:11:25

^ discuss in #lumo

zalky15:11:08

Hi all, would anyone know of any resources or example projects for making clojurescript libraries for use in javascript? (The one I'm aware of is datascript)

dnolen16:11:21

@zalky DataScript is a good example - there’s really not that much to it

dnolen16:11:43

export the stuff you want JavaScript people to use

tom18:11:26

are there any examples of how to write up cljs tests? Can they be run with lein test?

anmonteiro18:11:24

@tom there are a number of CLJS tests in the ClojureScript repository itself: https://github.com/clojure/clojurescript/tree/master/src/test/cljs/cljs

anmonteiro18:11:47

I normally use Doo (https://github.com/bensu/doo) for tooling integration

ag18:11:24

can I use (:import ,, in .cljc file? what the correct syntax?

dnolen18:11:02

@ag you can but they don’t mean the same thing

ag18:11:38

I know.. I think I found examples on GH with reader conditionals

ag18:11:52

it this correct way? :

(:import
   #?@(:cljs
       [[goog.i18n.NumberFormat]
        [goog.i18n.NumberFormat.Format]]))

ag19:11:06

I think maybe wrapping each import in a vector unnecessary

dnolen19:11:45

@ag yes if you want to splice those in

ag19:11:43

another, related question, as I understand there’s no way to define more than one function inside #?(:cljs block, right?

ag19:11:57

it’s gotta be:

#?(:cljs
   (defn foo [ ],,,))

#?(:cljs (defn bar [] ,,,))

Geoffrey Gaillard19:11:27

I'm facing a strange behaviour in ClojureScript. I'm trying to destructure a namespaced map, let's say #:user {:foo "bar"}. But it appears that this code: (let [{::user/keys [foo]} my-ns-map] …) works while this one (let [{:user/keys [foo]} my-ns-map]…) doesn't. Notice the difference between ::user/keys and :user/keys. Is there a difference between ::some/ns-kw and :some/ns-kw ? Documentation and examples seems to only talk about the single-column form as in :user/foo

Geoffrey Gaillard19:11:34

@ag Ok I understand now. I thought that :some-ns/some-name was the right form, but I understand that after a (require '[some.ns :as alias]) the right way to write it is ::alias/some-name. Thank you ! 🙂

dnolen19:11:32

@ag I don’t remember if you can splice at the top level

cigitia20:11:10

I could have sworn that I had once read that you can pass arguments to the ClojureScript compiler that could be checked at compile time: e.g., a flag indicating whether it is compiling a build for development or a build for release. Now I can't find any documentation about this. Was I remembering incorrectly?

cigitia20:11:47

…Ah, I think I was thinking of—yes.

tom21:11:08

A follow up to my earlier question, are there any examples of lein doo and phantomjs?

mulchy22:11:34

Not sure if I should ask this here or in #emacs, but I want to use cider to connect to a running nREPL server that is started using https://github.com/martinklepsch/tenzing If I cider-connect to it and run (start-repl) things work great and I can drive the browser, but cider doesn’t think this is a cljs repl, so I can’t do things like C-c C-k to eval the cljs file in the repl. Am I going about this the wrong way?

ag23:11:46

hmm… guys… I have just added a .cljc file with some defmacros and boot-cljs task apparently now runs quite a bit slower. Adding .cljc file with macros seems to be grinding gears of cljs-compiler. Is that possible?

ag23:11:08

@mulchy bulk of CIDER functionality does not work with cider-connect, you gotta jack-in