clojurescript

Rez 2025-06-14T11:33:10.421559Z

hi, quick question, new to clj, is it a must to learn clj before cljs? i am a full stack developer but i feel i can get quick feedback by tinkering with a reagent cljs project than getting into backend/api level code in clj

fricze 2025-06-18T11:25:01.560859Z

is replicant API for React? or does it have its own rendering engine?

gaverhae 2025-06-18T13:07:30.406919Z

It has its own.

1
đź’Ş 1
Roman Liutikov 2025-06-14T11:35:41.984519Z

Not required, I was doing cljs exclusively for about 4 years before diving into clj/jvm stuff

gaverhae 2025-06-14T12:10:49.386549Z

Slightly off topic but if you're starting today I'd highly recommend starting with https://github.com/cjohansen/replicant instead of reagent, it's a much cleaner approach that I think will be easier to learn.

đź’Ż 3
gaverhae 2025-06-14T12:11:21.824349Z

And if you do, don't hesitate to pop in #replicant and ask any question you might have there.

gaverhae 2025-06-14T12:12:06.015739Z

(I also recommend starting with shadow-cljs, in case that's not what you're using already; also #shadow-cljs for help.)

fricze 2025-06-19T08:55:19.037159Z

nice, have to check it out then!

Krishnansh Agarwal 2025-06-14T04:42:48.069889Z

Just a quick question, I was seeing the ClojureScript quickstart; we have named our folder hello_world, and our file path is hello_world/core.cljs but the namespace used in program is hello-world.core ?! Why use - instead of of _

p-himik 2025-06-14T11:02:56.405299Z

Just in case, there's also #beginners.

p-himik 2025-06-14T11:03:55.984739Z

Even if - in paths works in CLJS (no clue), using _ still makes sense to keep it the same as in CLJ. And in CLJ you can't use - because namespaces translate into classes and you can't have dashes in class and package names.

gaverhae 2025-06-14T12:08:14.181369Z

It's an unfortunate historical quirk you'll have to learn to live with: your src directory should not contain anything with a -, and all of the _ will be mapped to - in Clojure(Script) (be they in dir names or file names).

gaverhae 2025-06-14T12:13:49.569499Z

Note that the quickstart, while worth going through, is a bit bare in terms of the tools it leaves you with by the end. I would consider following up with learning shadow-cljs at some point.

Krishnansh Agarwal 2025-06-14T13:08:21.024639Z

Okiee

raspasov 2025-06-14T06:28:58.395379Z

It’s just a convention; likely won’t work otherwise (but I haven’t tried)

raspasov 2025-06-14T06:30:58.740869Z

Traditionally, LISPs don’t use _ for symbols/names inside the program, defaulting to - instead; directories traditionally do use _

👍 1