Fork me on GitHub
#clojurescript
<
2018-02-10
>
qqq15:02:08

Is there a site similar to https://webglfundamentals.org/ , except written in CLJS instead ?

bhauman17:02:53

OK I've opened my new readline library and deployed snapshot jars.

bhauman17:02:32

I would absolutely love it if folks could kick the tires and see if it works in their terminal of choice.

Chris Bidler17:02:24

Coming soon: “What’s your favorite Clojure dev environment?” “zsh, why?”

Chris Bidler20:02:00

Well, instead of testing out in my favorite terminal, I fired up a spot EC2 instance and connected to it with Prompt 2 on my iPad. After remembering that you still, in the year of our Lord the two thousand eighteenth, have to manually upgrade to JDK8, I can report that Prompt 2 -> Amazon Linux AMI -> lein trampoline run with the sample repl launcher in -main allows you to do all the things in the README (apropos, doc, source, inline eval) perfectly.

bhauman23:02:53

This is amazing news! Thanks so much for trying this out and for the report!!

quang22:02:23

Hi, I'm new to cljs. Do you think AWS-Amplify can be used with cljs, re-frame or reagent https://github.com/aws/aws-amplify

quang22:02:11

🔫 The thought of using JS.

justinlee22:02:51

@quang yes, cljs interoperates just fine with javascript libraries. reagent is a cljs binding to react, so you can interoperate with react-based libraries, though it can be a bit tricky to learn the details of react interop

justinlee22:02:04

if you are just starting out and don’t have a lot of existing baggage, I’d recommend going straight to shadow-cljs, which makes interop much easier and also lets you drop the baggage of a dependency management tool like lein or boot, at least initially

quang22:02:06

shadow-cljs, cool, never heard of it...

justinlee22:02:33

also join #shadow-cljs if you go that route

quang22:02:41

so shadow-cljs will help me interop aws-amplify with reagent, and that's how I can use cljs with aws-amplify?

justinlee22:02:36

not quite. shadow-cljs will make it easier to import any npm module. in fact, you just use npm to install the module, and then import it. it’s not always 100% perfect, but it is really smooth for most modules. reagent interop is just a skill you have to learn--there are a set of functions you need to call to when you are using a javascript-provided react component in a reagent project

quang22:02:20

cool, thanks Justin...

quang22:02:53

do you think aws-amplify will work with re-frame? I was going to use re-frame before I heard about aws-amplify

justinlee22:02:24

i don’t see why not. i messed around with re-frame and decided i don’t need the complexity involved in it. i just use straight reagent

justinlee22:02:53

again, i’m not sure if it makes sense to use both. but it is technically possible.

justinlee22:02:14

i’ve never heard of amplify until now. i just looked at the docs for 2 minutes

quang22:02:37

> i’m not sure if it makes sense to use both by both you mean, re-frame and reagent?

quang22:02:45

I think re-frame uses reagent? But I might be wrong

justinlee22:02:28

no i mean using amplify and re-frame

justinlee22:02:15

re-frame is an event-based state management framework that sits atop of reagent.

quang22:02:03

yeah I'm not sure what aws-amplify is yet 🙂

justinlee22:02:45

first learn reagent. then worry about cloudy deployment things later 🙂

quang22:02:46

I'm glad it could be possible to use cljs with aws-amplify. Thanks for pointing me in the right direction. @lee.justin.m

Chris Bidler23:02:23

The other thing to keep in mind @quang is that you can always start out using the “raw” AWS javascript SDK and then move to Amplify later as a DRY/cleanup refactoring

Chris Bidler23:02:28

in much the same way you might first write out a more-verbose form where every piece is explicit, and then once you’re happy with it, make another pass or two replacing (fn [x] ...) with #(...), reordering forms with ->, and so forth

Chris Bidler23:02:54

you could always start with the uglier-but-less-intrusive stock SDK and then go back and put in Amplify goodness later

quang23:02:36

yeah I'm not sure what Amplify is, it seems kind of like create-react-app which is like webpack ... and it also seems to wrap the SDK?

quang23:02:29

so it seems like you can definitely used HOC libs written in JS, with cljs/reagent ..?

justinlee23:02:13

you can definitely use HOCs with cljs/reagent. join #reagent too if you start going that way because it’s hella confusing just reading the docs. i just worked through this problem with someone today in #reagent and we talked about how somebody oughta write a blog post 🙂

Chris Bidler23:02:48

yeah, I too am new to Amplify but it appears to me to be just a bunch of syntactic sugar to ease the process of using AWS services in React apps

Chris Bidler23:02:18

which, speaking as someone who prototyped getting Cognito and per-user S3 running in a React Native app the sugar-free way a few months back, is super welcome

Chris Bidler23:02:37

but I don’t think it’s giving you any net-new capabilities, it’s just wrapping AWS services for you