Fork me on GitHub
#clojurescript
<
2018-11-27
>
richiardiandrea00:11:43

my biggest pain-point around ClojureScript server side for a while has been tooling - having said that we have been running ClojureScript Azure functions for about 6 months now - mvp stage - using shadow-cljs and we are really really happy with the workflow

richiardiandrea00:11:25

so I would say that shadow solved all our problems with npm deps that were not working

richiardiandrea00:11:07

and this is mostly because I prefer to use shadow over webpack, which would probably achieve the same result with the vanilla compiler

richiardiandrea00:11:23

so it also boils down to a personal tooling choice

dustingetz01:11:36

@jesse.wertheim hyperfiddle is serverless (because datomic cloud is serverless)! it doesn’t have to be more complicated, but new idioms take time. immutable database is one missing thing from most serverless stacks

jaawerth01:11:47

it definitely makes sense (or at least CAN make sense) for that kind of usecase

jaawerth01:11:42

but for more general applications I think right now it's got a bit of that aforementioned "easy isn't simple" trap going on

jaawerth01:11:06

so yeah I guess it's not the technology itself that gives me pause so much as the marketing and rapid adoption regardless of usecase

jaawerth01:11:13

the whole mongodb thing

Tessy Thomas04:11:25

I am new to ClojureScript. I would like to embed video (Youtube) to the hybrid mobile app using ClojureScript and React Native. I have tried to implement react-native-video and react-native-youtube plugins in ClojureScript for achieving this. But, both of these didn't work. I don't know whether there is something wrong with referring to the library or not. Using react-native-video: (def Video (js/require "react-native-video")) (def video-view (r/adapt-react-class (oget Video "default"))) The component reference: [video-view {:style {:position "absolute" :top 0 :bottom 0 :left 0 :right 0} :source {:uri "https://www.youtube.com/watch?v=M8Fn8SfXw3M"}}] There is no error. But, the component is not rendered on the page. I am using lein for compiling ClojureScript Re-Natal for building this ClojureScript-based React Native app. Is there anything wrong with the above code? Anyone, please help?

piotr-yuxuan09:11:56

Hello ClojureScript, do you know how to reduce generated js bundle size? I’ve tried various naive tricks -> https://github.com/piotr-yuxuan/shadow-cljs-wireframe/commits Finally I’ve open a issue on shadow-cljs but it’s not specific to it -> https://github.com/thheller/shadow-cljs/issues/412 Any input would be greatly appreciated.

sova-soars-the-sora14:11:12

how common are CSRF attacks? i'm tempted to just disable the CSRF protection

bronsa14:11:46

they're a lot more common with CSRF protection disabled :)

😂 1
sova-soars-the-sora14:11:48

i'll put a note on my website 😉

sova-soars-the-sora14:11:13

it's actually really easy to access the token so .. nevermind ^.^

sova-soars-the-sora14:11:54

with something like cljs-ajax how should I pass the anti forgery token? i'm wondering what the special name is.

idiomancy17:11:30

isn't there some way to define macros in cljs files, provided they're not defined in the same namespace they're used in? I though I recalled seeing that somewhere, but I can't find it again...

dnolen17:11:23

it’s not supported in any official way

dnolen17:11:32

and it’s not going to be either

idiomancy17:11:37

gotcha, gotcha. and do clj files have to live in different source directories, or are they allowed to coexist in the same package?

dnolen17:11:41

by convention people keep them separate

dnolen17:11:51

src/clj src/cljc src/cljs or something like that

dnolen17:11:05

due to client/server splits

dnolen17:11:15

but they don’t need to be of course

dnolen17:11:25

ns resolution is file extension aware

idiomancy17:11:08

gotcha, phenomenal. Thanks!

Whiskas18:11:41

is it possible to debug clojurescript from VSCode?

Whiskas18:11:49

running on browser

Whiskas18:11:34

I tried the standard VSCode Google Chrome debugger, but the breakpoints are not triggering

Whiskas18:11:23

This is my launch.json

exit218:11:58

is it common practice to initialize an atom as a js object? i.e. (def foo (atom #js{})) I’m trying to set it to Stripe.js’ object after I have public key data. That seems to be working but referencing the object now doesn’t work. I.e. (.someMethod @foo)

dnolen18:11:35

@njj not recommended

dnolen18:11:42

generally you put immutable stuff in an atom

dnolen18:11:30

@mateus.pimentel.w pretty sure someone needs to write support for that to work

exit218:11:46

@dnolen how would you recommend storing that Stripe global variable?

dnolen19:11:08

just store it in a regular var

dnolen19:11:15

skip the atom

dnolen19:11:22

(def foo #js {})

sova-soars-the-sora19:11:31

Hi I have my clojurescript project being all cool and groovy and i'm trying to get the CSRF token into my app... so I'm loading it into the HTML of the page into a div, and using cljs to ask what's in the div. but, on repeated page dispensing the token does not change, although I suspect every page refresh actually makes a brand new token.

sova-soars-the-sora19:11:11

(moving my newbness to beginners )

Whiskas19:11:16

@dnolen, wow, i watched your talks, they were very good, haha, thanks for that, man!

dnolen19:11:02

no problem

danielstockton20:11:16

Can people please throw out some css in cljs solutions that I may not have heard of? I want it to work with om/sablono and hiccup. I found shadow.markup which looks like it would do the job.

danielstockton20:11:04

Garden syntax, automatic class generation (optionally minified?), supporting media queries, keyframes, et al..

danielstockton22:11:16

Thanks, not too familiar with emotion, I'll look into it. I was hoping to use garden syntax because there is a good chance I'll be playing with the css programatically.