This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-19
Channels
- # arachne (1)
- # beginners (108)
- # boot (50)
- # cljs-dev (7)
- # clojure (76)
- # clojure-ireland (1)
- # clojure-romania (1)
- # clojure-russia (7)
- # clojure-spec (33)
- # clojure-taiwan (1)
- # clojure-uk (36)
- # clojurescript (46)
- # core-async (13)
- # datomic (146)
- # defnpodcast (1)
- # editors (1)
- # garden (2)
- # hoplon (1)
- # jobs (1)
- # lumo (7)
- # off-topic (21)
- # om (9)
- # pedestal (1)
- # re-frame (25)
- # reagent (5)
- # specter (2)
- # testing (3)
- # unrepl (3)
- # untangled (9)
- # vim (1)
hi, does anyone know a graph library for CLJS? It doesn't appear at first glance that either loom or ubergraph support CLJS...
but am getting
user=> (require 'cljs.build.api)
nil
user=> (cljs.build.api/build "src" {:main 'piggieback-project.core :output-to "out/main.js" :verbose true})
CompilerException java.lang.RuntimeException: No such var: cljs.build.api/build, compiling:(/private/var/folders/7c/lk5290b554q0231v96w3fk9c0000gn/T/form-init5643262653961972147.clj:1:1)
what does (dir cljs.build.api)
print out?
user=> (clojure.repl/dir cljs.build.api)
cljs-dependents-for-macro-namespaces
cljs-ns-dependents
mark-cljs-ns-for-recompile!
parse-js-ns
src-file->goog-require
src-file->target-file
target-file-for-cljs-ns
nil
acc to https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/build/api.clj those are like the 'utilities' but the actual public API isn't here :thinking_face:
the only thing I can suggest is changing the org.clojure/clojurescript version to a recent release, running lein clean
then trying again
cljs has been moving pretty fast, I think the latest stable was one of the 1.9 releases
oh yeah, definitely run clean between changing dep versions - the cache can get into pathological states when versions change in my experience
thanks for the help tho @noisesmith !
@nikki - the other simple thing is to look at lein cp
, see where it is getting cljs.build.api from, and checking the source it is loading
perhaps it is getting a version that doesn't define the functions you need?
your editor should be able to open the jar file as if it were a directory
to answer my own question: loom has very recently had CLJS support added although ubergraph still lags behind. for my purposes, loom is good enough however.
Does anyone have an example of adding a custom Chrome devtools formatter for a 'new' type of object? I can't make head nor tail of the documentation, or see anything in the source that suggests how its done. I have an object that it would be very convenient not to see as "[object Object]".
@sandbags https://github.com/thheller/shadow-devtools/blob/master/src/main/shadow/devtools/client/console.cljs
https://github.com/binaryage/cljs-devtools/blob/master/src/lib/devtools/formatters.cljs
why does cljs take so long to compile ?
(b/compile nil '(+ 1 2))
takes 2s on my laptopI’m trying to use cljs-ajax
like this: (GET url)
to download a simple text file for further parsing on the client side, when I println
the value returned from this, it shows the body of the response with CLJS-AJAX response:
prepended
@qqq yes nil options is implicitly :optimizations :none
having some strange issues with figwheel
I thought it was related to cider, but also doing lein figwheel
does the same,
it gets stuck here even if I open the browser and the console
Exit: Control+C or :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application
previously on the same project it was working fine
@andrea.crotti did you try restarting the browser already, seemed to have helped for me when I had similar problems.
ah right that worked thanks @gklijs
didn't think that could have been the problem
I have some problems with ia fuctions used in clojurescript, I read here, https://numergent.com/2015-01/ClojureScript-vs-CoffeeScript-for-Processing-sketches.html:
The initial ClojureScript implementation used maps for everything, which was horribly slow - I got about 9fps for 100 circles. A quick profile showed that a lot of time was being spent on accessing the map elements, and changing it so that the circle information was passed as a datatype improved performance by 300%.
I asume that is stil the case. I also saw you can make types mutable, would that be a good idea? For example I now store some information in a map, which I update as I ‘predict’ the next step, I could also update the values in the type.main usually refers to a method in a class, a fn in a file, or sth similar. with cljs compilation, it refers to a namespace. if you do not use :main, you must goog.require the ns. from which i infer that cljs namespaces get wrapped somehow, such that merely importing them with <script...> does by itself not entail execution of their content, in contrast to what happens with raw js. is that close?