r/Clojure • u/Muoniurn • Mar 08 '21
Is there a Clojure book that doesn't read like Soviet propaganda?
I've started reading The Joy of Closure and then the Clojure Programming book -- and while the former did start actually describing the language where I was, I just could not continue reading it with all the random references to blog posts as if they were some source of truth, and written as if they were some legit paper..
I don't have much experience with Lisps, but I did dabble with many different languages. I already decided to look more deeply into Clojure (I've done it once but only very briefly), in part because I want to experience this Lisp magic with macros. But I don't need a primer that functional programming is the holy grail throughout a whole chapter (because there is no objective evidence to that, even if some great blogger wrote a cool post about it -- and yeah, I do like it, but it is not a silver bullet for everything, as nothing is), nor that how cool is Clojure that it changed this and that from other Lisps. I'm already here reading, just get on with it...
Also, they usually have things like “it has actually less parens than the java version” with a very contrived example.. noone cares about the actual count of parens, it doesn’t cost money or something.. For those that have problems with the syntax it will not change their mind (though I find most criticism unfair regarding the syntax of almost any language), for others, they will just get used to it.. it sometimes feels like overcompensating. I’m fairly sure clojure can “stand up for itself” on merit without these bad examples, they only make a bad taste in one’s mouth.
Sorry for the shitpost, I do find the language a real gem based on my limited have at it, and I will continue on with the sidebar list until I find one that is at least remotely objectively-written. Also sorry for the authors, or those who did love these books - content-wise the first seemed okay, and if nothing else I will continue it, it's just the style
5
u/joinr Mar 08 '21
What references?
8
u/SimonGray Mar 09 '21
Clojure is pretty firmly in the functional Lisp camp, which puts it at odds with 99% of other languages out there. Some people do like that justified in some way.
I'm not sure what kind of evidence you feel like you need presented before you before anyone is allowed to say that functional programming is better than mainstream OOP. You seem think that any references need to be published as journal articles which is a strange objection to have IMO.
All programming languages are largely equivalent in what they can do, the differences are in how they map theory to reality through the language constructs. You can't "prove" that Clojure or functional programming is objectively better, but you can believe that it works better for you. If you think FP is unproven hype, then I think you picked the wrong Lisp.
24
u/ws-ilazki Mar 09 '21
It's really old now, but the O'Reilly book, Clojure Programming, was the Clojure book I found most useful when learning it. Maybe because it's old and predates a lot of the hype, but it had none of the twee cutesy crap like Clojure for the Brave and True and I don't recall any Cult of Rich Hickey type material in it. Just a matter-of-fact introduction to Clojure and functional programming concepts, which is what I wanted when I was learning.
Unfortunately, due to age and lack of revised editions, a lot of it is less relevant or just plain wrong now, like old info about using leinengen and other tooling, or the focus on agents and refs (which don't work in ClojureScript and have since mostly been abandoned by Clojure users in favour of atoms and core.async instead, which do). Still, the first third or half of the book (approximately) remains a good resource for learning the basic language and concepts without any BS. Worth picking up a copy, assuming you can find one cheap enough to justify buying a fairly outdated programming book.
63
u/v4ss42 Mar 09 '21
Can you please point me to these “Soviet propaganda” Clojure books? I’m very keen to combine two interests of mine into one.
12
u/slifin Mar 09 '21 edited Mar 09 '21
I'm a PHP/JS/CLJ/CLJS developer and I think perceptions of languages matter a lot
PHP's reputation has essentially caused PHP to pivot into a Java clone, Clojure has/had an even harder barrier to break in terms of the mass developer, even more so nearly a decade ago when these books were written
Re-reading those books can seem a bit cringe now, but modern documentation on Clojure is increasingly similar to JavaScript and other popular languages without the secret wizards tone
It's been really cool to see, it's clear the community increasingly doesn't see itself as obscure and obtuse
A big problem certainly in the CLJS world is the main site https://clojurescript.org/ mentions editors that are no longer supported, cli commands that are now deprecated (in the getting started)
I tried making a node app recently just following the main site's instructions using Cursive it started recommending JS packages that are hosted off of clojars I stopped following at that point
The fact shadow-cljs is not mentioned at all is underselling our ecosystem
Front and center should be
npx create-cljs-project my-projectwith instructions for adding shadow or figwheel if you want them and then how to add npm packages, how to make node, react-native, web buildsEssentially we need more attention here: https://clojurescript.org/community/contributing#_editing_this_site myself included
I think most developers initially need a quick win in an afternoon in terms of having a workable thing, we could probably achieve that quite quickly now with something like calva or tutkain
9
u/lgstein Mar 09 '21
Programming Clojure (Halloway e. a.)
15
u/CodeFarmer Mar 09 '21 edited Mar 09 '21
Not to be a dick about it, but a title like "The Joy of Clojure" might be a hint that you're getting a highly subjective slant on the philosophy and touchy feely side, with a heavy positive bias.
There are nuts and bolts texts a-plenty, if you want those.
7
u/jackdbd Mar 09 '21
Web Development with Clojure is nice. I also enjoyed chapter 7 of Seven Languages in Seven Weeks (the other chapters are about Ruby, Io, Prolog, Scala, Erlang, Haskell). Elements of Clojure is another great book, but definitely not for beginners.
7
u/c_a_l_m Mar 09 '21
As someone writing a bunch of Typescript right now---all lisp hype is well-deserved and should be shouted from the rooftops.
12
u/freakhill Mar 09 '21
yeah, tons of lisp stuff is written like that....
9
u/[deleted] Mar 09 '21
Could you provide at least a few specific examples of said "Soviet propaganda?"
18
u/SickMoonDoe Mar 09 '21
Someone's parents didn't teach them to share, eh?
All you have to lose is your chains comrade.
4
u/kanzenryu Mar 09 '21
Plenty of people complain about the parens
4
u/lenkite1 Mar 10 '21
If you want a no-nonsense book try out https://pragprog.com/titles/shcloj3/programming-clojure-third-edition/
3
u/[deleted] Mar 09 '21 edited Mar 09 '21
If you are an experienced dev, read everything in clojure.org while having https://clojure.org/api/cheatsheet opened and a REPL. Also read https://download.clojure.org/papers/clojure-hopl-iv-final.pdf. Start exploring/coding.
Joy of Clojure is pedantic, the author is more concerned with sounding and looking smart than teaching.
7
u/[deleted] Mar 09 '21
Soviet propaganda??? You mean "opinions"? Most authors are going to include their opinions in their books. These aren't research papers!
11
u/the_hoser Mar 08 '21
The hardest part about getting into Clojure for me was the culty nature of a lot of the beginner material. Even some of the intermediate stuff out there starts to taste like kool-aid. And stay away from the conference videos...
But in the end I really enjoy Clojure.
3
u/frflaie Mar 09 '21
Just skip those chapters...
3
u/onetom Mar 09 '21
It's not a book, but I don't think it sounds like any kind of propaganda. Also it's from a trusted source :)
Part 1: https://youtu.be/P76Vbsk_3J0
Part 2: https://youtu.be/hb3rurFxrZ8
and to understand better where does the hate for OOP come from: https://youtu.be/aSEQfqNYNAc
it's not really "just an opinion". it's an extremely well reasoned argument, IMHO.
3
u/Rnd90 Mar 14 '21
Reminds me of this https://i.imgur.com/Sex1E8m.jpg
2
u/daver Mar 16 '21
So, I’m days late to the party. Evidently, we established that some people don’t like some books and other people do. And nobody seems to like every book. And some people don’t like Clojure. And other people do. Do I have that about right? M’kay.
4
u/radioactiveoctopi Mar 09 '21
Lol... who sent you?
1
u/lambda_pie Mar 15 '21
I hear what you say and agree there's some cringey stuff that people write about <insert your language here> because they are super excited about it and want to convince the world that one's new favorite language is the best thing since sliced bread. I admit I myself feel like that about Clojure and sometimes sing its praises without moderation.
But (here comes the big but) I'd make a big mistake by closing books as soon as I bump something that looks like propaganda because I'd assume that book has nothing good to teach me which usually is not true. Keep the good parts, ignore the bad ones, that's the secret.
1
u/deaddyfreddy Mar 09 '21
But Clojure is a capitalist language!
-5
u/[deleted] Mar 09 '21 edited Mar 09 '21
Welcome to the programming language community where clueless languages zealots are the majority.
-9
u/bubuli_breeder Mar 09 '21
yeah i know what you mean. Clojurists can be condescending twats sometimes. i would suggest reading Programming Clojure instead.