5 ms·
Throw in Clojure into the mix, and you get superpowers!
by dragandj 1y ago
Throw in Clojure into the mix, and you get superpowers!
- exabrial 1y agoI'm still trying to mentally grok the Clojure model and syntax hah. On my todo list. Clojure users seem to love it though. Do you have a tutorial that could sell it to me?
- dragandj 1y agoMany Clojure tutorials are free! It's difficult to say without knowing nothing about your preference and experience. Everyone's welcome to join Clojure Slack community (for example) which has several tens of thousands of members and dedicated beginners channel. I'm sure if you asked there, you'd get tons of recommendations tailored to you. https://clojurians.slack.com/ https://clojurians.slack.com/ (BTW Clojure, as a Lisp dialect, has almost no syntax. You can learn THAT in 5 minutes. The challenge is in training your programming mind to think in totally new concepts)
- wry_discontent 1y agoStart doing any year of Advent of Code with Clojure and you'll get it. They're really amenable to the REPL.
- mark_l_watson 1y agoMy Clojure AI book won't teach you the language, but afterward you read through a tutorial my book contains interesting examples; read it online https://leanpub.com/clojureai/read https://leanpub.com/clojureai/read
- dan_fornika 1y ago"Clojure for the Brave and True" is free online: https://www.braveclojure.com/clojure-for-the-brave-and-true/ https://www.braveclojure.com/clojure-for-the-brave-and-true/
- Zambyte 1y agoFor syntax, maybe this general Lisp advice will help: consider a normal function call, like f(a, b). To make this into a Lisp function call, drop the unnecessary comma (whitespace is enough to separate tokens) like f(a b), and then move the function name inside the parentheses, like (f a b). Applying operators that are considered "primitive" in other languages are syntactically treated the same as functions. So imagine an add function like add(a, b), but instead of being named 'add', it's just named '+', like +(a, b). Applying the same transformation as before, this turns into (+ a b). Using the function application syntax for primitives like + is nice because you get the same flexibility of normal functions, like variable argument length: (+ a b c). Clojure is a little bit less uniform than other Lispy languages in that it has special brackets for lists (square brackets) and for maps (curly brackets), but that's pretty much it.
- fuzztester 1y agoit also has the threading operator or macro. i am not a clojure or lisp expert, just saying.
- shawn_w 1y agoClojure style threading macros are readily available for common lisp and scheme. Probably emacs lisp too.
- fuzztester 1y agointeresting, thanks.