Fork me on GitHub

I wonder why the signature for resolve is [[_ sym]]? Naively I'd expect it to be just [sym] or [_ sym] to match Clojure. Can someone explain this?


Right, okay, calling it actually works as I expected... (resolve 'cljs.core/first) returns #'cljs.core/first


Although ((resolve 'cljs.core/first) [1 2 3]) fails


'cljs.core/first expands to (quote cljs.core/first) so the [_ sym] just drops the quote since it is a macro. In Clojure you’d get the actual symbol since its a function.


I'm trying to setup emacs + cider + figwheel for development, having a hard time get cider to start figwheel without having to manually start it up (use 'figwheel-sidecar.repl-api) ...etc..etc, have tried to follow docs on a few blogs and cider docs, but still having trouble. using emacs 25, would appreciate any help


@dasibre are you talking about invoking cider-jack-in-clojurescript not doing what you expect ?


my preferred way is to start the repl from command line using lein repl and then use cider-connect to get the repl inside emacs. It is also ok to use the cider-jackin to have the repl in emacs. Then use the simple command (fig-start) in the repl to start the server. You can use (fig-stop) to stop the server if you wish. To get the cljs repl, there is another command (cljs-repl). These 3 functions are available with the figwheel project template. You can just create a new app lein new figwheel app and then copy the folder dev from it to your project. That will make this functions available in user namespace.


@gmercer right, I was hoping it would automatically start figwheel without me having to do it manually


thanks @pradyumna will try that


@dasibre just one point, if you copy the dev folder then ensure it is added to the :source-paths in project.clj


@dasibre it is definitely possible - looking for the incantation now (BTW we could move over to #cider )


moving to cider


@miikka that’s just a bug


(the part about the resulting var not being invokeable)


fixed now in master


How do I extend IPrintWithWriter to functions? This has the desired effect:

(extend-protocol IPrintWithWriter js/Function (-pr-writer [new-obj writer _] (write-all writer "#function[]")))
but produces the warning "Extending an existing JavaScript type - use a different symbol name instead of js/Function e.g function". On the other hand,
(extend-protocol IPrintWithWriter function (-pr-writer [new-obj writer _] (write-all writer "#function[]")))
doesn't produce the warning, but fails to produce the desired effect (tested with (prn identity))


Using IFn doesn't seem to work either


@pesterhazy there’s already a case for functions and you can’t override - there’s an issue for this in JIRA


@pesterhazy yep, someone should just drop a table with before and after perf numbers

Pablo Fernandez16:06:07

I added this to my clean-targets: [:cljsbuild :builds :renderer-test :compiler :output-to] and I'm getting the error: Deleting non-target project paths ["test-app/renderer/renderer.js%s"] is not allowed. How can it be a non-target path? How do I make it a target path?

Pablo Fernandez16:06:53

Where does figwheel take the list of files to compile?


@thheller is it possible to start a repl server during development of a node.js library with shadow-cljs?


myguidingstar: assuming you have shadow-cljs watch your-build running you can shadow-cljs cljs-repl your-build or shadow-cljs clj-repl


or just shadow-cljs node-repl and go from there


has anyone been able to get cljs spec with generators to work inside vim-fireplace using evaluators like cpp? I never can seem to get it working


And since vim-fireplace with clojurescript has never reported correct error messages, it’s really tough to debug. I have to go over to using a cljs-repl and manually entering my loaded namespace, requiring the spec and generator namespaces, then doing the repl work over there instead of right inline with vim.