This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-06-29
Channels
- # admin-announcements (25)
- # announcements (1)
- # beginners (29)
- # boot (2)
- # cider (4)
- # clojure (92)
- # clojure-berlin (1)
- # clojure-france (45)
- # clojure-germany (3)
- # clojure-india (1)
- # clojure-japan (4)
- # clojure-russia (78)
- # clojure-uk (11)
- # clojurebridge (7)
- # clojurescript (73)
- # datomic (6)
- # editors (39)
- # euroclojure (83)
- # jobs (3)
- # ldnclj (80)
- # om (9)
- # onyx (7)
- # reading-clojure (1)
- # reagent (2)
@jamiei: do you have example code?
seems dependent on what you’re doing in the defroutes
Hey guys is there a library or a tutorial that I can use for learning how to handle touch events in clojurescript?
My reagent components only have on-click events and I am wondering if I should use something like this: http://benhowdle.im/touche/
@kidpollo: I’ve used the popular hammer.js for touch events in cljs
cljsjs has it packaged here: https://github.com/cljsjs/packages/tree/master/hammer
@shaunlebron: Something like this example: http://pastebin.com/iaHCRCMh - Do I need to use shared state to communicate which contact id is being viewed to the component view?
@sander, thank you! The :nrepl-port setting was commented out in my project.clj.
I refactored a util namespace into a folder, so that qt.utils
-> qt.utils.core
, and now I'm seeing Uncaught ReferenceError: goog is not defined
in the browser console on force-reload, but everything compiled OK. I have tried lein clean
, a bazooka rm -rf of public resources and (reset-autobuild)
.
What am I doing wrong?
Looks like this was related to trying to run a cljs-repl from Cursive 😕
@cfleming: when I stopped my Cursive cljs-repl and relied on the repl in lein figwheel
only, it started working again. But it could have been some weird repl state.
Does anyone have a "time remaining" function lying around that humanises seconds to "5 days", "4 hours", "32 minutes"? Would save me some time.
@petrus: There was a lib mentioned in the Clojure Cookbook, but I don’t remember the name - humanize, perhaps?
@petrus: https://github.com/google/closure-library/blob/eb26f425dbd99a70d2955d8fcc892f2fd0178acb/closure/goog/date/duration_test.js
wow this is #3 on HN right now: https://news.ycombinator.com
@jonpither: if you want more upvotes, note that votes that come from a direct link to stories on HN don't count directly (it's better to direct folk to /newest or the homepage) 😉
@rauh: that’s neat, do you generally find useful things in goog
by looking through tests?
@shaunlebron: Actually, yes that's the first think I consult. Github's search made a few things obsolete for me. The goog closure docs are aweful all together. I just entered "hours minutes" in the search box in the closure github repo and it came right up
haha cool
I thought this was a good attempt: http://www.closurecheatsheet.com/
A global github search with "extension:cljs" or "filename:project.clj" is done many times a day
missing some things though
noted + changed link: thanks @tcrayford
@shaunlebron: Yeah that cheat sheet is cool indeed. I always like examples. I bookmakred that the other day. But I forgot it exists already
@rauh, I guess the global search you just mentioned is not related to your closure searching?
@shaunlebron: No, i sometimes use one or the other. When I need more examples for cljs then I do a global wide search limited to extension and search for "require goog.foo.bar" for instance
wow, that’s powerful, never thought to do that
anything I tag with :create ends up sending the whole :coll to the server, not only the element I tagged ([:create new-element])
and anything I tag with :delete sends nothing, even if I tag it with [:delete thing-i-just-deleted]
added a new wiki entry for using Google Closure Library in ClojureScript (based on @bostonou’s blogs, and @rauh’s searching strategies): https://github.com/clojure/clojurescript/wiki/Google-Closure-Library
corrections and stuff appreciated!
@jamiei: it has to go in your app state somewhere or shared state when your defroute is executed
check out #C06DT2YSY chan to see what they say
If you are interested in beta testing Replete, doing signups now. https://github.com/mfikes/replete/wiki/Beta
when I’m chasing down an advanced compilation bug, I typically have to lein do clean, cljsbuild once prod
, i.e. auto prod
doesn’t seem to pick up changes to my externs.js file. Is there a faster way?
@mfikes just sent email
@mfikes awesome! Running it now, I might have to make a lisp keyboard for this...
@brettevans: That would be useful!
I'm struggling to run my cljs tests using is
from cljs.test
. Trying to run tests from the REPL throws: cljs.test Cannot read property 'do_report' of undefined> clojure.core/ex-info (core.clj:4591)
. Running lein test
runs zero tests.
How do I get lein test
to run my ClojureScript tests or fix my code so I can run tests from the REPL?
@petrus I think it's should be "lein cljsbuild test" instead
You can make an alias in your project.clj
@arohner: I would verify that built-in auto-building (a la Quick Start) exhibits the same issue.
that said, ~120s to build seem excessive to me (I've never seen it take that long even for super massive projects).
If you're not compiling 60,000 lines of ClojureScript, usually means you need to tweak your JVM settings.
@dnolen: are there any CLJS-specific optimizations, or just the usual stuff about -server, Xmx, GC algo?
@arohner: Google Closure advanced compilation is very RAM hungry. Try 1g, then 2g etc.
@arohner: would also use the :verbose
compiler option to get a view into where things are stalling. There are a couple of other known issues if your project is large.
the other issue, a known polynomial problem with :recompile-dependents
. Try setting this to false
.