This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-17
Channels
- # admin-announcements (4)
- # beginners (35)
- # boot (183)
- # cider (28)
- # cljs-dev (4)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (52)
- # clojure-austin (4)
- # clojure-russia (83)
- # clojure-sdn (1)
- # clojure-uk (18)
- # clojurescript (48)
- # core-matrix (5)
- # cursive (4)
- # datomic (23)
- # devcards (2)
- # dirac (43)
- # editors (2)
- # emacs (4)
- # events (5)
- # funcool (2)
- # hoplon (81)
- # immutant (3)
- # juxt (3)
- # ldnclj (1)
- # luminus (12)
- # off-topic (6)
- # om (72)
- # onyx (32)
- # parinfer (2)
- # pedestal (1)
- # proton (6)
- # protorepl (3)
- # re-frame (30)
- # reagent (2)
- # spacemacs (2)
- # specter (1)
- # testing (1)
- # uncomplicate (3)
- # untangled (15)
- # yada (10)
@smw Thank you! Glad to hear I am not alone
Why would I get WARNING: no :cljsbuild entry found in project definition.
when running lein cljsbuild
while I have a :cljsbuild
entry in my project, and it does its job?
I’m using pushState and need to keep track of the scroll position of any page in the navigation history. (So that I can restore the scroll position when the user navigates using history.back()
and next()
. Seems I can add custom state to the history object - http://loganlinn.com/blog/2014/05/26/push-state-and-clojurescript/ - but that makes my SPA to unload and reload from scratch. Not sure if that’s specific to how I have set up routing, but before I start to investigate that I’d thought I could ask you guys if you’ve had this problem? And of course, I’m super curious about how you maintain scroll position in these scenarios!
I'm trying to synthesize the reasons why CLJS package management / build toolchain is preferable to existing JS tooling; if anyone has any input or links to technical discussions of the merits of e.g. maven vs npm, I'd appreciate it
urbanslug: since javascript is inherently asynchronous, it couldn’t exist because you can’t block in javascript
vs in clojure, it blocks the thread until the data can be put into the channel
yeah, use >! inside go blocks, or use put!
put! can be called outside a go block, but its possible to lose data if the channel isn’t ready for data
you almost certainly want a go block then
cljs core match error "#object[TypeError TypeError: Cannot read property 'backtrack' of undefined]" in figwheel repl:
(require '[cljs.core.match :refer-macros [match]])
(let [x true
y true
z true]
(match [x y z]
[_ false true] 1
[false true _ ] 2
[_ _ false] 3
[_ _ true] 4))
hey guys, im looking to transcribe the following js to cljs but I cant seem to figure it out, help would be appreciated!! $('html,body').animate({ scrollTop: element.offset().top }, 'slow');
@flyboarder: (-> (js/$ "html,body") (.animate #js {:scrollElement (.-top (.offset element))} "slow"))
can be a first approach maybe
fair enough, im basically just trying to implements a smooth scroll to the bottom when content expands
I suggest just not using jquery and start using google closure facilities or maybe some library that wraps it like https://github.com/plumatic/dommy
It there are also https://github.com/ibdknox/jayq jquery wrapper that makes jquery usage in cljs a little bit more idiomatic
Yeah i tried jayq and couldnt really figure it out, im using hoplon right now
dommy is interesting
@flyboarder: this is probably what I would do: https://gist.github.com/oakmac/a54e4e6ddd435173637a
assuming you have access to element
in that scope
@chrisoakman: thanks! looks like Hoplon already supports what I was looking for, it’s just not working how I expected 😛