Fork me on GitHub
#clojurescript
<
2020-01-20
>
Kamuela00:01:14

What's the best way to dive into CLJS for Node.js specifically?

enforser00:01:57

I'd recommend getting shadow-cljs setup to run on node https://shadow-cljs.github.io/docs/UsersGuide.html#target-node

Kamuela13:01:24

Hey thanks for this. I hadn't heard of shadow-cljs, and I'm definitely looking into it now

sudakatux13:01:06

probably a quick quesiton. How does one call click on an element

sudakatux13:01:30

I have react ref of a input file. Which i would like to call click on

sudakatux13:01:42

(.click theElement)

sudakatux13:01:09

and it does not work. If i console.log it i can clearly see the element.

Lu13:01:32

Are you trying to programmatically simulate a click event?

sudakatux13:01:10

sorry i just figured out my problem. I was doing something silly

carocad14:01:19

quick question, if I am trying to package my cljs library with some js files inside and I have the foreign-libs on figwheel edn files … do I also need to create a deps.cljs file with the same foreign-libs content :thinking_face: ?

Roman Liutikov14:01:41

yes, figwheel config is just for figwheel

carocad14:01:54

oh, I was hoping that there would be some kind of hook or so. Then I dont get why I see the js files inside the jar 😕

Roman Liutikov14:01:46

probably because they are on class path, so they are also packaged with everything else

carocad14:01:10

ah ok. Thanks for the info 🙂

carocad15:01:25

mmmm it seems that this is not entirely correct. After creating a deps.cljs file with the duplicate info on it. The compiler started complaining about "Duplicate module path after resolving: .../parcera/src/javascript/clojure.reader.bundle.js", . It seems that if I have a deps.cljs file I dont need to put the info on figwheel

Roman Liutikov15:01:54

I think it depends on how you are compiling the project. deps.cljs is what ClojureScript compiler consumes, but Figwheel is a separate tooling, maybe Figwheel is reading both files, I dunno.

carocad16:01:24

> but Figwheel is a separate tooling, maybe Figwheel is reading both files, I dunno. yeah I guess that this is what is happening since figwheel still work even with that info “missing” i.e. on the deps.cljs file

abdullahibra19:01:32

is there anybody using materialize UI with reagent ?

flowthing06:01:04

I haven't used this and have no experience with Material UI, but I saw this a while back, might be of interest to you: https://github.com/arttuka/reagent-material-ui

Roman Liutikov20:01:07

I feel like there should be a link pinned to the channel, this question pops up at least once every month

☝️ 8
andy.fingerhut20:01:09

Submitting, then answering, the question on http://ask.clojure.org is probably very welcome, if anyone would like to do so.

Rory21:01:35

hi everybody, i'm looking for a clojurescript resource for beginners to web development. does anything like that exist? i didn't find anything in the link in the topic. i really want to use lisp for webapp development 🙂 .

athomasoriginal21:01:37

You can always checkout this front end specific guide https://betweentwoparens.com/start-a-clojurescript-app-from-scratch - The great thing about ClojureScript is that if you are familiar with front end development most things are 1:1. One of the initial hurdles is just starting a project. For examples of simple CLJS apps: https://github.com/tkjone/clojurescript-30

💯 4
athomasoriginal21:01:36

As for learning the language, the best resources are often actually Clojure resources because both languages are so close to one another.

athomasoriginal21:01:50

And if your looking for information on Clojure Text Editors there is a post in the above blog and this video series. https://www.youtube.com/channel/UCfBUN43AQoyGiQxmCIDZe2w

Rory22:01:36

thanks a ton! i just opened all those links in new windows... reading now.

👍 4
oliver18:01:25

Here's a video resource you might find helpful : https://www.jacekschae.com/learn-reagent-free

Rory21:01:17

(i asked the beginners channel and was sent here 😬 )

dazld21:01:28

Hey Rory, I guess it depends what you mean by beginner?

Rory21:01:44

sure – i'm a data scientist by trade and a python hacker

dazld21:01:01

If you’re starting from scratch, jumping into cljs might not be a great idea

dazld21:01:14

Cool, welcome :)

dazld21:01:35

I can point you at a template I made?

Filipe Silva15:01:41

I've also a starter that should have a familiar structure if you come from a JS background

Filipe Silva15:01:52

it's meant to be similar to create-react-app

dazld21:01:49

But it won’t help with basics!

dazld21:01:57

So, caveats, caveats

Rory21:01:44

Very helpful, sure. My problem has been getting up and running with the language. Not incredibly accessible.

jsa-aerial23:01:10

If you want to try Clojure(Script) in a local turnkey setting take a look at this: https://github.com/jsa-aerial/saite#uberjar

jsa-aerial23:01:48

It is mostly intended as a turnkey system for data science types needing to explore datasets and create visualization documents, but I've been told by more than a few that it could be a great intro system for new users (of Clj(Cljs)), such as Clojure Bridge.

jsa-aerial23:01:56

All you need is Java8 (9+ breaks the dynamic dependency resolver - can be fixed but for now low priority). Then just grab the jar and off you go.

jsa-aerial23:01:43

You can write code that you can then run in Clojure (server), ClojureScript (client) or even mix them together.

dazld21:01:54

Know what you mean.

dazld21:01:10

So, one mo

andy.fingerhut21:01:16

That book covers Clojure/JVM on a web server, I know. Does it cover ClojureScript development in a browser?

👍 4
dazld21:01:21

https://github.com/dazld/shadow-cljs-sass is the repo for the template

👍 4
dazld21:01:17

This creates a deps project, just uses Leiningen as a way to scaffold it, for reference.

shaun-mahood21:01:44

The new version (linked above) does cover ClojureScript as well

👍 4
dazld21:01:57

If you have Leiningen installed already you can just follow the instructions and get going..

dazld21:01:35

There’s loads of others, so, feel free to discard if that doesn’t work for you

dazld21:01:11

We can take this to beginners if you like too.

Rory21:01:54

thanks everybody. i'll try to get up and running and document my steps.

dazld21:01:09

Enjoy! :)