This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-17
Channels
- # beginners (51)
- # boot (31)
- # cider (14)
- # clara (13)
- # cljs-dev (15)
- # cljsjs (2)
- # cljsrn (53)
- # clojure (18)
- # clojure-dusseldorf (1)
- # clojure-russia (4)
- # clojure-uk (9)
- # clojurescript (53)
- # cursive (3)
- # datomic (5)
- # docs (1)
- # figwheel (2)
- # fulcro (42)
- # hoplon (3)
- # lein-figwheel (3)
- # leiningen (53)
- # off-topic (1)
- # om (4)
- # re-frame (11)
- # shadow-cljs (8)
@dfcarpenter what version of ClojureScript? 1.9.908?
1.9.908
@dfcarpenter probably means we can’t resolve packages like animated yet
@dnolen Ahh ok. Thanks! ill stick to transition group for now
RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
EXPR_RESULT 86 [length: 6] [source_file: node_modules/animated/lib/index.js]
Node(NAME spring): node_modules/animated/lib/index.js:86:4
var spring=function spring(
Parent(VAR): node_modules/animated/lib/index.js:86:0
var spring=function spring(
com.google.common.base.Preconditions.checkState (Preconditions.java:444)
com.google.javascript.rhino.IR.assign (IR.java:424)
com.google.javascript.jscomp.ProcessCommonJSModules$RewriteModule.updateNameReference (ProcessCommonJSModules.java:1100)
com.google.javascript.jscomp.ProcessCommonJSModules$RewriteModule.maybeUpdateName (ProcessCommonJSModules.java:982)
com.google.javascript.jscomp.ProcessCommonJSModules$RewriteModule.visit (ProcessCommonJSModules.java:727)
seems like closure can’t quite compile it yet (that a closure compiler error when importing)
Hi i'm trying to connect to figwheel from a external computer, so that i could see the result of my app on this external computers screen. I use luminus as a base for my app . I tried setting :server-ip in project.clj but i see in the browser console on the external computer that it still tries to connect to localhost:3449. How do i configure the figwheel server ip?
@danielsu give :websocket-host "0.0.0.0"
a try 🙂
Thanks, actually setting server-ip to 0.0.0.0 and websocket-host to the actual ip of the server did work :)
hi, suddenly the emacs command cider-jack-in-clojurescript
throws me this error Failed to compile "target/cljsbuild/public/js/app.js" in 5.551 seconds. OutOfMemoryError PermGen space [trace missing]
Are you on the latest version of Java?
You can give the JVM more memory in project.clj
via :jvm-opts ["-Xmx1G"] ;; or more
Oh wait, that gives more memory for the project’s JVM. You need to give the compiler more memory.
Ah that jvm-opts
settings also works for the compiler. See https://github.com/clojure-emacs/refactor-nrepl/issues/94
So that will fix it for now. Next up might be finding out why your code is using so much memory.
if I do lein figwheel
and lein repl
from powershell, the project inits well with no such error
looking for some resources about performance comparison between cljs and js any suggestion ?
@lxsameer I doubt anyone could produce general performance comparison which would stay relevant and useful. 1) javascript engines are moving targets 2) google closure compiler is a moving target as well 3) coding style is a big factor a well - you can write code in cljs which would compile into plain straightforward javascript (e.g. interop or raw loop-recur) or you could write code which will rely heavily on persistent data structures, laziness and dynamic protocol dispatch and similarly on the js side you can write old-school vanilla javascript or use more modern functional approach or libraries.
well, "cljs performance is good and acceptable" is not generally true, you wrote it because you have some use-case in mind
there are some issues which is not related to performance but it's good with d3 , I don't know about webgl usage though
sure, we can find specific use-cases where the performance is ok, but if you need to push browser to the limits you need to go to raw javascript without persistent data
but this is not my point, I just wanted to say that you cannot make general statement that "cljs performance is good" without saying the other half of the sentence "for what exactly"
I personally don't care about it, because I know that I can always benchmark my own cljs code and rewrite performance bottlencecks in js in case of performance problems
but I don't write much performance critical code anyways, I suspect rewriting in js would be last resort, first thing would be to try to redesign the algorithm or write more interoppy cljs 🙂
@lxsameer you can write performant code directly in CLJS - not particularly idiomatic but that’s how the persistent data structures are implemented
@dnolen I see, I'm totally agree with you, I'm going to give a talk on clojurescript in a ruby community, I'm looking for some comparisons or facts to show them that clojurescript code can be really performant
guys, I'm playing around with cljs and I came to the point that I need a humanized string representation of a time delta (inseconds)
is there any cljs library I can use for the purpose?
I'm using the reagent leiningen template, is there any recommendation for including js stuff in the project?
thanks @U2DART3HA!
https://dev.clojure.org/jira/browse/CLJS-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel After this fix I tried again to build a clojurescript (with 1.9.930) project where a CLJS file requires a JS :es6 file, which again requires another JS :es6 file in the same folder. JS -> JS require still doesn't work for me. Am I doing it wrong?
First JS file: import worldy from 'world'; export var main = function() { console.log("hello/main here") };
Second JS file, named world.js in same folder: export var worldy = function() { console.log("world.worldy here") };
The error: Compiling "resources/public/js/compiled/splort.js" from ["src"]... Installing Node.js dependencies events.js:160 throw er; // Unhandled 'error' event ^ Error: Can't resolve 'world' in '/Users/inge/dev/hng/splort' at onError (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/Resolver.js:61:15) at loggingCallbackWrapper (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) at runAfter (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/Resolver.js:158:4) at innerCallback (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/Resolver.js:146:3) at loggingCallbackWrapper (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) at next (/Users/inge/dev/hng/splort/node_modules/tapable/lib/Tapable.js:252:11) at innerCallback (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/Resolver.js:144:11) at loggingCallbackWrapper (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) at next (/Users/inge/dev/hng/splort/node_modules/tapable/lib/Tapable.js:249:35) at resolver.doResolve.createInnerCallback (/Users/inge/dev/hng/splort/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:44:6)