Fork me on GitHub
#beginners
<
2020-09-12
>
Chris K05:09:54

What are the best online free resources to start learning web development with Clojure?

seancorfield06:09:42

@sunchaesk There's probably some Practicalli stuff about that...?

Chris K06:09:20

Thanks 😄

Chris K06:09:50

It says that the content is being updated and would it be fine to just follow?

seancorfield06:09:46

@U05254DQM would be the one to provide more detail... He's in the UK so it's early morning Saturday for him right now.

Chris K06:09:56

alright... I think they are changing it from lein to something and because I use lein, I think I should be fine

Chris K06:09:10

but maybe I misunderstood some stuff so I'll try to get things clear

seancorfield06:09:42

I suspect John is updating it all to use the official Clojure CLI stuff

seancorfield06:09:05

(but if it still uses lein in the examples you'll be fine)

Chris K06:09:19

alright thank you so much

practicalli07:09:16

Hi Chris, the ToDo app is an example of a webapp using Leiningen build tool. All new content is predominately Clojure CLI tools based, however, this makes no difference to the actual code. The main difference is using the tooling, Clojure CLI and community tools vs leiningen and plugins. There is a #practicalli channel if you want to discuss any content or have questions, or you can send me a direct message through slack.

Chris K08:09:57

oh alright thanks for the clarification

vncz13:09:58

Anybody fancy to help a beginner with Spec? I am having some troubles on why something is passing the validation

vncz13:09:25

Why is this true? The ::children — is supposed to be a ::node and it's missing the required property ::value 🤔

vncz15:09:46

Anybody can help me with this? 🙂

andy.fingerhut15:09:06

When I try evaluating that in a REPL, the call to s/valid? returns false.

andy.fingerhut15:09:09

What do you see?

vncz15:09:35

🤔 false , as it should be.

vncz15:09:59

I guess I just messed up something while testing stuff facepalm

vncz13:09:57

Curiously enough, it returns false if I'm passing a non numeric ::value

vncz13:09:11

(s/valid? ::children [{::value 10 ::children [{::value "osso"}]}]) => false

vncz14:09:10

Oh ok interesting, opt does not seem to do what I was expecting

nivekuil18:09:34

I have a foo.cljc requiring some symbol defined in bar.cljc, for which the same namespace also has a bar.clj. If I eval bar.cljc first then foo.cljc will eval just fine, but if I integrant.repl/reset it can't find the symbol -- it seems to only look in bar.clj. is this expected?

Michael W18:09:22

Yes that should be expected. cljc files have the lowest precedence. Any reason you want a clj and a cljc with the same name? cljc files are for combined clj/cljs code, so typically you would have a cljs and a clj file, or 1 cljc file using reader conditionals to split out the clj from the cljs in the 1 cljc file.

nivekuil18:09:57

aesthetics, really. reader conditionals are generally ok but when the imports are really different all the #[email protected] get noisy, and copy pasting across separate files is of course a non-starter

Michael W18:09:49

Well it's the nature of the beast, 2 files, or 1 file and reader conditionals...

Michael W18:09:20

If clj and cljc exists, clojure will take the clj and ignore the cljc file afaik.

nivekuil18:09:39

yeah I see we can't actually have the same (ns foo) across multiple files, so there's no way this could work the way I'm imagining it, with some kind of ns merging ability. thanks for the info!

Michael W18:09:29

That guide shows a pretty clean way to have requires split without having to splice everywhere.

az22:09:16

Hi all, wondering what the solutions are when it comes to authorization for a a clojurescript app. Are there any libs for dealing with this?

shivekkhurana17:09:01

If you have an SPA, any JS solution should work just fine.

dorab22:09:05

@az You could try looking at https://www.clojure-toolbox.com/ and see if you find anything there.