Fork me on GitHub
#clojurescript
<
2018-12-12
>
sova-soars-the-sora00:12:26

a user could trigger a sorting action on the atom and that would also update the ui according to what the new result was.

sova-soars-the-sora00:12:54

interesting idea to sort posts by more than just rating, like post length, or some blend of timestamp delta and score

borkdude12:12:31

in 2013 dnolen wrote: https://stackoverflow.com/a/16670400/6264 is the currently an API for this to get the macro caller’s namespace?

borkdude12:12:13

probably I should do something like (:ns (ana/analyze &env &form))

Dustin Getz14:12:08

Just posted massive braindump about clojure and graphs and UI if anyone has thoughts or contributions: https://www.reddit.com/r/Clojure/comments/a576pp/clojure_graphs/

john15:12:43

I did ~(ns-name *ns*) in a cljc file recently and I think it just worked in cljs

john15:12:53

I'll find the code when I'm back at my computer

borkdude15:12:45

@john this seems to work yeah: (println "NS" '~(ns-name *ns*)) thanks!

john15:12:14

yeah, this is what I had ~(str (ns-name *ns*))

john15:12:25

the stringification resolves it

john15:12:12

you might not actually need the ns-name... but otoh, that form may work across clj/cljs

john15:12:18

needs some experimentation

borkdude15:12:27

~(str *ns* #_(ns-name *ns*)) also seems to work, but that’s maybe because toString on ns just does ns-name?

john15:12:56

I'm guessing. But does that also work in clj?

john15:12:43

Yeah, seems to

john15:12:48

on first try

borkdude15:12:56

I think that’s an implementation detail I don’t want to rely on, so I’ll keep ns-name

john15:12:17

should always work in cljc

john15:12:38

The ns-name form

john15:12:47

rather than the shortcut

hansw20:12:24

hi all, newbie here. I am working on lein / figwheel /clsjs / reagent codebase and would like to include some npm-lib. I got it to work, except the last thing I need to do is make sure the corresponding css gets loaded. I have found this piece of documentation: https://github.com/cljsjs/packages/wiki/Non-JS-Assets The project doesn't currently use sass, but it looks like that is my only option to make sure I can pull the css out of the clojar. Am I correct or have other options come up since that document was written? (circa 2016)

Braden Shepherdson20:12:00

I'm having the same problem and found the same doc. I'm using cljsjs/codemirror under lein and figwheel. its docs give a couple of Boot tasks, but I'm not using Boot and it's entirely unclear what the analogue should be in Leiningen.

Braden Shepherdson21:12:14

I suppose I can just grab the CSS from CDNJS, but that's unsatisfying 😄

Dustin Getz21:12:34

i use webpack for css pipeline

Dustin Getz21:12:02

And npm deps, also, don't really care about cljs npm support

dnolen22:12:05

otherwise those CLJSJS docs should be accurate for any tool, as long your dep is from there and has those assets

hansw22:12:40

thanks all

Dante T. M.23:12:17

Trying to build a single page app with a login. I have a user pool set up in AWS cognito and I know how to handle the form, but not sure how to best make the calls to cognito. Seen references to using aws-amplify, but not sure how to use a react library in my app. Using lein and reagent. Anyone have experience with cljs serverless and cognito?

Dante T. M.23:12:48

To be more specific, should I be doing this through :npm-deps since aws-amplify is available via npm, or directly through :foreign-libs?