This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-19
Channels
- # admin-announcements (1)
- # beginners (26)
- # boot (6)
- # cider (14)
- # cljsjs (29)
- # cljsrn (19)
- # clojure (87)
- # clojure-austin (5)
- # clojure-belgium (10)
- # clojure-brasil (2)
- # clojure-dusseldorf (15)
- # clojure-greece (17)
- # clojure-russia (51)
- # clojure-sanfrancisco (4)
- # clojure-sweden (20)
- # clojure-uk (31)
- # clojurescript (111)
- # core-matrix (2)
- # cursive (9)
- # datascript (15)
- # datomic (41)
- # dirac (1)
- # emacs (8)
- # flambo (1)
- # funcool (4)
- # hoplon (72)
- # lein-figwheel (3)
- # off-topic (2)
- # om (79)
- # om-next (2)
- # onyx (17)
- # other-languages (16)
- # re-frame (62)
- # reagent (26)
- # remote-jobs (1)
- # rum (3)
- # spacemacs (5)
- # untangled (120)
My Clojurescript project root folders seem to fill up with files with names like "f8bfd138da7f43d585080167a45259c083e99eb4-init.clj". What's the popular remedy for that? Does everybody just clean up manually before committing?
Has anyone used prismatic schema definitions to generate an application debugger for a global app state? Basically, my app is a hash-map backed by a schema but id like to generate an editable component tree for each section of the schema. Ex. a property in the schema is of type s/Str
. I'd like to convert that into an input component so you can edit the state that way as well for debugging. Generating the tree is fine but I cant seem to take a definition in the schema say an s/Str and determine what type it is. It seems like there should be a helper func in prismatic but I just cant seem to find one
I can obviously also just do this in a repl but Id like to do it in the web app itself
Looks like I can just do a simple equality check (=
so nvm folks 🙂
@nathansmutz: that doesn’t sound normal, can you post your cljsbuild config and that file? I have a feeling that that file is coming from an editor/IDE, not CLJS.
does anyone experience the problem in figwheel that when I hit browser's refresh, the console just shows this Figwheel: trying to open cljs reload socket utils.cljs:38 Figwheel: socket connection established
then nothing shows on browser. somehow it just hangs there. Restart the project with lein figwheel works, but then it takes too much time. [lein-figwheel "0.5.3-1"]
@nathansmutz: Can you post 8bfd138da7f43d585080167a45259c083e99eb4-init.clj
too?
yeah that does look like Figwheel, haven’t seen that before, maybe try in #C1A38UB5X ?
Thanks @danielcompton 🙂
Is there any way to use ->>
with assoc
?
what are you trying to do
why not just use ->?
I know that this not right, and that ->>
insert db
as last argument
How ->
help me?
because that would thread it as the first arg
Ow, I got it, thx!😄
I mean there probably is a way to make it work with ->> using an anon fn or something
to swap the args
What is it anon fn?
Can you show an example please?
I mean this works but id never use this in code (->> {} (#(assoc % :a :b)))
I'm just trying to understand all this things, thx)
if I were to do something like that id probably make a swap fn or something
but id just use -> 😛
I have one more question) It’s about anon fn) Why if I use this, for example with swap!
like this (swap! atom #({:a 1}))
then have error - Invalid arity
?
you cannot call a hash-map with that syntax in an anonymous function
youd need to use hash-map
that goes the same for vectors, sets, etc
That mean that error for hash-map as fn, not for anon fn?
(swap! atom #(hash-map :a 1))
should work
that would change the value of the atom to be that hashmap
the % in this case would be the previous atom state
or current*
thx a lot, I got it)
cool have fun!
Hey guys, how you work with js promises from cljs?
But this doesn’t look good for cljs) Is there more idiomatic way for cljs?
but when you receive promises from js from a library, you need to extract the promise result with .then; then transform it into the re-frame model
@thachmai: Right now I’m doing such thing with promises and re-frame, but anyway this doesn’t look good to me)
@savelichalex: You can also do (js/Promise.then (fn [result] ...))
or convert the promise to a channel and just use core.async
, though you could probably skip that step and do a channel for a callback instead
@risto: core.async
looks better)
@plexus: tagged literal
@savelichalex: I agree
what percentage of your users use Opera?
@fasiha: I think Vivaldi is gaining some traction, it's from some of the people behind Opera.
@bhauman: it would be nice if I could load figwheel-sidecar without the nREPL dependency - is there any reason this is necessary?
@bhauman: yeah it’s not a big deal but it would be nice to not need to declare it since I’m not using it
@dnolen: and figwheel can launch a nREPL server if you supply an :nrepl-port in the fighweel-options
@bhauman: yes playing around with something, if it works I will probably write something about it
@dnolen: for editor tooling and such, it seems like you could provide a special function that dispatches commands
@bhauman: how I can make the figwheel connection work if I’m running my own webserver thing? Is this documented anywhere?
simple debugging (clear descriptive error messages) is underrated in clojure land even though immutability/pure functions/and all the FP goodness make things 'simple' as per Rich Hickey terminology. Errors messages are insane, it adds to the complexity 😕
@lewix it’s not so much that error messages are not valued - they are - the question is about whether hiding all the information is actually desirable - for newcomers sure - for experienced users not so much
I have no complaints with cljs errors personally. I guess in the first 2 weeks of using cljs I found the errors to be hard to understand but that was more so from a lack of understanding the language
@lewix also you have a problem with specific error message or case - better to describe it - then we can actually fix something 🙂
The only problems I could probably even callout are react component rendering issues and I'm pretty sure thats just because I'm not using a development version of react 😛