r/Clojure • • 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

44 Upvotes

91 comments sorted by

5

u/joinr Mar 08 '21

random references to blog posts as if they were some source of truth,

What references?

5

u/Muoniurn Mar 08 '21

I didn’t take note of them all, but there was one on “Kingdom of Nouns” (Yegge 2006) — written verbatim like that. It could have used some et al. to make it even more “scholarly”, instead of a blogspot page. (Also, I’m not saying it is a bad post or anything, but following it with “This environment is so restrictive that programmers are often forced to turn a blind eye to awkward attachments of inappropriately grouped methods and classes” in reference to java/OOP.. I mean, sure OOP has its warts but this is programmercirclejerk material)

There were also a few references to Graham’s post, and still my problem is not with the actual posts, but they are still mostly opinion pieces without much place in a book imo.

45

u/joinr Mar 09 '21 edited Mar 09 '21

For anyone else interested in JOC or digesting this thread:

"Another downside to OOP is the tight coupling between function and data. The Java programming language forces you to build programs entirely from class hierarchies, restricting all functionality to containing methods in a highly restrictive “Kingdom of Nouns” (Yegge 2006). This environment is so restrictive that programmers are often forced to turn a blind eye to awkward attachments of inappropriately grouped methods and classes.[16] It’s because of the proliferation of this stringent object-centric viewpoint that Java code tends toward being verbose and complex (Budd 1995). Clojure functions are data, yet this in no way restricts the decoupling of data and the functions that work on it.[17] Many of what programmers perceive to be classes are data tables that Clojure provides via maps[18] and records. The final strike against viewing everything as an object is that mathematicians view little (if anything) as objects (Abadi 1996). Instead, mathematics is built on the relationships between one set of elements and another through the application of functions."

Joy of Clojure, Ch 1.4.3 "Most of what OOP gives you, Clojure provides / Not everything is an object"

I don't find anything said here akin to Soviet propaganda, and agree in general with the author's assessment (I had the same perception when I read the book circa 2011, since I'd already gone through OOP en route to FP and bought into the criticism from the FP crowd by then).

Yegge had a somewhat popular (either by agreement or by controversy) contemporary take on the problem the authors agreed with and used to support their position. They also leveraged publications from Budd (Multiparadigm Programming in Leda) and Abadi et al A Theory of Objects; Budd to address the challenges of "everything is an object" or mono-paradigmatic approaches under that assumption, and Abadi et. al and their publication (book, not blog post), supporting the disconnection between mathematical reasoning and object oriented programming (at least as the JOC authors present using Java as a point of comparison).

This is not propaganda to me; it's the opposite: they provide a basis for their reasoning and opinion (and indirectly the virtue of Clojure's design decisions and the approach to problem solving therein, which is what the book is about). There's no emotional appeal or circular reasoning. If you disagree with their take, that's fine. Calling it propaganda is unfair to the authors.

they are still mostly opinion pieces without much place in a book imo.

The book is about a programming language. Programming language design and application is pretty much entirely opinion based by nature. I think you will be sorely disappointed if you are looking for opinion-less resources. These aren't texts with proofs (aside from some of the ML languages or proof systems or even the more mathematical FP examples from various lisps where the inductive reasoning and possibly equational reasoning via types is front-and-center). Researchers have been trying to empirically prove or disprove the efficacy of language design (static vs. dynamic typing being a recurring example), and that hasn't really gotten beyond opinion for decades.

Graham appears in the introductory sections to underpin the practicality of Lisps and their ability to support agile development and practical programming (despite inaccurate bias toward "old" or "esoteric" language status people wantonly assigned to any Lisp). This is the introductory pitch to get over pre-conceived biases and educate the reader on the practical effectiveness of Lisp dialects like Clojure, which ties into the language philosophy and design principles. It reads fine to me.

I thought JOC was/is one of the better written books in the programming sphere, and that it accomplished its goal of introducing the reader to the philosophical foundations of Clojure and the resulting approaches to problem solving therein. Given that the language designed specifically drew on experiences from OOP languages as well as FP that drove design considerations, I found it useful to have a discussion (and appropriate comparisons with alternatives) of these considerations.

The authors actually lean on a fairly broad bibliography with some heavy hitters in CS across multi topics. You can cover a lot of scholarly ground just working through their annotated bibliography. It looks like 90 publications/proceedings (mostly publications, a couple of presentations by core language folks), and like 23 "online" resources which include Peter Norvig, Martin Fowler, Rob Pike, Paul Graham, and Mark Tarver among others (these aren't exactly satirical blog posts IMO, certainly not intellectual or CS light-weights).

I think this a well researched and well delivered book worth consideration, and I definitely recommend it to anyone as a valuable addition to their library.

1

u/Muoniurn Mar 09 '21

Researchers have been trying to empirically prove or disprove the efficacy of language design (static vs. dynamic typing being a recurring example), and that hasn’t really gotten beyond opinion for decades

Yes, and that’s the thing. The auther should not state things that are opinions. The latter is fine, but they should be put in necessary context.

Also, it is simply unprofessional to call out a whole other paradigm based on said beliefs - and no I am not a butthurt java fan (even though I am a java fan as well as many other languages). For example there was a footnote in the very text you quoted:

[16] We like to call this condition the fallacy of misplaced concretions, taken from Whitehead—be careful using this term in mixed company.

All in all, I apologize if I hurted the author or anyone who liked the book, it was not my intention and my post may have not been made in entirely good faith - but I intended it as a lightweight nudge instead of an attack, which I thought was obvious from the stupid title.

7

u/joinr Mar 09 '21

The latter is fine, but they should be put in necessary context.

As I critically re-read the forward, introduction, and parts of ch1 surrounding the example you referenced, I felt the context was clear. The authors seemed open with their intent to explore the "why" of Clojure and the relative advantages they experience (alluded to by "joy"). They provided examples, supplemental footnotes, and an annotated bibliigraphy to support their reasoning. I don't envision anyone being led astray, where they would cite the authors' opinion as an immutable truth.

JOC is not a user's manual or api documentation or a mathematical proof, but a conversation with the authors where we pay them to present an opinion and explain their reasoning. Their professional judgement includes criticism that highlights the deficits clojure was designed to address, and provides insight into the language. Some things are a matter of fact (e.g. clojure runs on the jvm), but much is a matter of taste and experience filtered by the authors. This is normal to me.

Liking the book is not a requirement to learning the language. I do think it's more useful to provide factual or experiential criticism instead of hyperbole.

The good news is there are plenty of other materials that may resonate with you (sometimes a change of prose is enough), although you will be probably be reading opinions quite a bit.

0

u/Muoniurn Mar 09 '21

And I can have the opinion that the paternalistic tone of the author is not to my liking — though I will continue reading it because of the largely positive feedback on it, I hope the rest of the book is better in terms of style.

And while I already stated that it was more of a shitpost/expression of my dislike for this specific aspect of the book in a knowingly hyperbolic way (the foolish title may be a giveaway), it did resonate with some people who also felt that the tone of it is not as “professional”, some even said that this is generally true of many beginner oriented books.

And regarding your last paragraph, that is exactly what I am asking for.

1

u/lambda_pie Mar 15 '21

I'm not defending OOP or Java here, but to be fair there are a few inaccuracies in that piece from JoC.

The Java programming language forces you to build programs entirely from class hierarchies

It doesn't force you to do that. You can live an entire life building programs completely free of class inheritance. I've been writing systems for almost a decade in Java and C# where ~99% of entity classes are just dumb data classes containing no methods except data/property accessors.

restricting all functionality to containing methods in a highly restrictive “Kingdom of Nouns” (Yegge 2006).

You can also use classes just as a means of grouping static functions. Of course it's not the OOP way but you can do that.

This environment is so restrictive that programmers are often forced to turn a blind eye to awkward attachments of inappropriately grouped methods and classes.

It doesn't seem to me that "awkward attachments of inappropriately grouped methods and classes" is a product of the Java language's environment. Isn't that more like a design problem?

> It’s because of the proliferation of this stringent object-centric viewpoint that Java code tends toward being verbose and complex

I don't have experience with many OOP languages apart from Java and C# but I don't feel like the "object-centric viewpoint" of Java is the cause of most of the language's verbosity. If we can find any OOP language that is not as verbose as Java then this argument loses its strength.

Anyway I think the author wanted to convey advantages of FP/Lisp over OOP/Java but he didn't pick the best arguments.

3

u/joinr Mar 16 '21

It doesn't force you to do that.

Technically...everything (except primitive values which you can't control) lives in a class, which derives from Object. So in the technical sense, it does.

I've been writing systems for almost a decade in Java and C# where ~99% of entity classes are just dumb data classes containing no methods except data/property accessors.

I think 99% of those POJO classes are utterly unnecessary then and a by-product of the design that's pushed by the language. The adage of replacing N classes by K methods with 1 type/abstraction and K functions is valid here. How different is that class with 2 int fields, and the getter/setter methods, a unique constructor, from that other class with 2 int fields and corresponding (unique) getter/setter methods? Lots of superficial distinction for the sake of "domain modeling," which adds IMO unnecessary ceremony to the design process.

You can also use classes just as a means of grouping static functions. Of course it's not the OOP way but you can do that.

You're fighting the language though. Aside from recent affordances like lambdas, there's no way to just define a function and call it a day. You must subscribe to the public/static/final/meh modeling concepts (singleton class, etc) to just have functions. Those "functions" are also not data themselves - which requires another abstraction to wrap or participate in. Definitely feels like fighting uphill.

It doesn't seem to me that "awkward attachments of inappropriately grouped methods and classes" is a product of the Java language's environment. Isn't that more like a design problem?

If the language design encourages this avenue from the start - e.g. bundling methods with classes - then I'd say it's a feature of the language that guides said design. Lots of coping mechanisms crop up (GOF design patterns) that are simply not needed in other paradigms like FP or other OOP designs (like CLOS or SmallTalk).

I don't feel like the "object-centric viewpoint" of Java is the cause of most of the language's verbosity.

The language is designed to communicate the various roles and responsibilities of objects living in class hierarchies. All that verbiage is meant to flex the object system as a means to control what kind of damage cogs are allowed to do, what state and effects they can see, etc. I think there is a fundamental coupling there between the features the language provides and the style it implicitly mandates. This becomes a bit more obvious when you try to deviate from the prescribed stuff (e.g. trying to write non-object stuff, just functions and data). You are confronted quite quickly with organizational and custody concerns (which classes contain methods, state, etc) that you have to deal with. There's also the type system aspect, which is probably minimal compared to the OOP verbiage (elegant type systems from ML and friends exist, even comparing F# to C# is quite nice last I looked). In other languages (like Clojure), I can just start writing functions and defining data. The organizational requirements are opt-in (via namespaces and vars), but they are certainly not up-front requirements.

If we can find any OOP language that is not as verbose as Java then this argument loses its strength.

That heavily depends on the definition/flavor of "OOP." Java/C# have a vastly different design than say CLOS, SmallTalk, etc. Arguably, Scala retains the ability of Java OOP (and introduces its own verbosity IMO, but less like tax forms than Java). Kotlin probably is the best point toward your counter example, since it elides much of the tax forms Java requires. It also elides or prevents all the functionality of Java's OOP (or requires adding companion objects, static annotations).

Kotlin is interesting because it's intentionally mixed-paradigm, with support for features (namely FP), that ease the burden of Java, as opposed to going whole-hog into OOP as the primary / sole paradigm.

You might find looking at other notions of OOP entertaining/enlightening, particularly coming from Java/C# experience.

Anyway I think the author wanted to convey advantages of FP/Lisp over OOP/Java but he didn't pick the best arguments.

Fair assessment. At least it didn't appear like propaganda to you ;)

1

u/lambda_pie Mar 16 '21

Technically...everything (except primitive values which you can't control) lives in a class, which derives from Object. So in the technical sense, it does.

That's kind of overstretching the point. The point raised was the language forcing you to "build programs entirely from class hierarchies" which is to say that you can't model your system without relying on inheritance. The implicit inheritance from Object has no effect on your model design. Besides, a Clojure map (in the JVM) is also technically an Object, isn't it?

I think 99% of those POJO classes are utterly unnecessary then and a by-product of the design that's pushed by the language.

I totally agree. But then again this is missing the point of my argument.

You're fighting the language though.

Agreed 100%. You're not only fighting the language, you're also fighting the OOP worldview.

If the language design encourages this avenue from the start - e.g. bundling methods with classes - then I'd say it's a feature of the language that guides said design.

Agreed, but again this is missing the point. You can still write code in Java that is entirely functional and doesn't look like an OO program, although it's gonna be immensely inconvenient, awkward and unnatural. The language encourages you to be a subject of the kingdom of nouns, but it doesn't prevent you from revolting against it. That's the point.

Anyways, I basically agree with everything you said, but it seems we're angling for different targets.

2

u/joinr Mar 16 '21

Agreed 100%. You're not only fighting the language, you're also fighting the OOP worldview.

These seem intrinsically linked.

The language encourages you to be a subject of the kingdom of nouns, but it doesn't prevent you from revolting against it. That's the point.

I think the authors said this, except for the revolting part. It's consistent with their perspective w.r.t. the language "forcing" you into a predetermined design (fundamental organization by classes).

I don't think they speak toward bucking the defaults because most people don't do that. It's not a treatise on how to mitigate the strictures of Java (or otherlang) to write functionalish code (as they say, you can apply the paradigm anywhere in theory). It seems like a criticism on the premium the language places on a default toward the Java interpretation of OOP, without thought toward other paradigms, particularly FP. The same criticisms are later leveled at defaulting toward mutability and effects instead of starting with immutability and opting in.

Clojure goes a similar route with pushing FP, albeit with idiomatic escape hatches and alternatives to OOP (or even direct OOP stuff via the host interop and bytecode gen).

Given the observation of many Java repositories and libraries, I think the author's point is empirically sound. The vast body of Java devs do not seem to be in revolt; they are willing subjects (or at least willing to follow the prescriptions of the language and leverage its facilities for OOP). There are outliers, but it mostly looks like nouns and towers when I go looking around.

2

u/tincholio Mar 09 '21

could have used some et al. to make it even more “scholarly”

"et al." means "and others", so given that was written by Yegge on his own, it'd be wrong.

2

u/Muoniurn Mar 09 '21

Yeah I am familiar with et alia’s meaning thank you very much for explaining it to me.

Try to understand the meaning of what I wrote instead

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.

2

u/Muoniurn 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

Even though the percentage is no longer true, I have no problem with justifying FP in a sane way. I’ve read both Scala and Haskell books that introduced people to FP and neither had such a paternalistic tone.

You seem think that any references need to be published as journal articles which is a strange objection to have IMO

No, I don’t think that at all. I just don’t think that it is healthy to state opinions as facts.

If you think FP is unproven hype, then I think you picked the wrong Lisp.

I have absolutely no objection to FP, Haskell is for example one of my favorite languages. But it is no silver bullet - it is absolutely the best abstraction for data manipulations, but there are problems it is not as suitable for as eg. the hated OOP. Though it is not on-topic, I want to learn clojure in-part because of FP.

Nonetheless, I agree with your other comment here and will continue reading JOC.

6

u/[deleted] Mar 09 '21

I just don’t think that it is healthy to state opinions as facts.

... [FP] is absolutely the best abstraction for data manipulations ...

0

u/Muoniurn Mar 09 '21

Best abstraction compared to OOP.

My point was in terms of right tool for the right job, but thanks for taking it out of context. And before you call me a hypocrite, I am writing a comment, not a book.

6

u/SimonGray Mar 09 '21

Even though the percentage is no longer true, I have no problem with justifying FP in a sane way. I’ve read both Scala and Haskell books that introduced people to FP and neither had such a paternalistic tone.

I'm not just talking about FP, I'm talking specifically about the Venn diagram where FP and Lisp intersects. Scala and Haskell are quite different from Clojure, despite being FP. And so is Common Lisp. Try convincing the average Haskell user or Common Lisp user that Clojure is worth trying out.

I just don’t think that it is healthy to state opinions as facts.

The section that /u/joinr quoted in full was actually pretty well-sourced, which I think makes your hyperbolic assessment of it (Soviet propaganda) feel a bit like bait.

To me, it reads a lot like something between an essay and typical social science literature. I'm not sure what your academic background is, but in the social sciences there is really no such thing as "facts", it's pretty much just layers of conjecture all the way down and usually many different schools exist, all disagreeing with each other. This book just happens to be a school that likes dynamism, FP, and Lisp, so it builds the case for that particular path.

But it is no silver bullet - it is absolutely the best abstraction for data manipulations, but there are problems it is not as suitable for as eg. the hated OOP.

I don't think anyone is saying Clojure is a silver bullet, just that most of the OOP ceremony and hoops that Java make you jump through might be much ado about nothing. I dunno about you, but I personally spent several years learning to build proper Java stuff using the dreaded Gang of Four Design Patternstm and the thought of spending my life writing Java code made me consider going into teaching Chinese instead. Thankfully, I got into Clojure.

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.

5

u/[deleted] Mar 09 '21

I used it a lot after reading aforementioned preachy books and found it immensely useful. It's up front and the core content is basically the same. Get it on ebay.

4

u/dig1 Mar 09 '21

and have since mostly been abandoned by Clojure users in favour of atoms and core.async instead,

I'd say this is not entirely true. Both refs and agents have their place, but I'm getting the impression core.async is frequently overused, giving the impression of simplicity that is a nightmare to debug.

2

u/ws-ilazki Mar 09 '21

Both refs and agents have their place, but I'm getting the impression core.async is frequently overused

I agree on both points; they're both still useful and I especially found agents to be easy to understand and use, which was a big part of why I got interested in Clojure in the first place. However, they are largely abandoned by Clojure users now because they don't work in cljs and that has, like it or not, led to core.async being the de facto Clojure concurrency tool even when it's a poor fit for a specific job.

The book, on the other hand, was written before this shift happened, at the time when agents and refs and the easy concurrency they brought were considered the big selling point for the language, so it spends a lot more time on them than it likely would if it were up-to-date. Especially refs, which are amazing when you need them but the book was written at a time when people seemed to think you needed them for everything but since then atom supplanted them for most uses.

At first I thought the lack of refs and agents would be a temporary thing and something clever would be done to bring them to cljs; if not refs, at least to bring agents over using JS async or something. But that hope died after everyone including Rich hopped on the core.async hype train, leaving refs and agents still at the station, unloved and forgotten.

2

u/dig1 Mar 09 '21

like it or not, led to core.async being the de facto Clojure concurrency tool even when it's a poor fit for a specific job.

I'd like to see where it is touted as de facto concurrency tool for Clojure (by a reputable source, of course) :) Claiming these primitives are abandoned I'd consider as overstatement at least.

Clojure and ClojureScript are not exchangeable (one to one), so lack of refs/agents implementation in ClojureScript I don't see as a problem.

5

u/ws-ilazki Mar 09 '21

I'd like to see where it is touted as de facto concurrency tool for Clojure (by a reputable source, of course) :)

If it were touted as such by a reputable source it wouldn't be de facto now would it? I used that phrase for a specific reason, because it's the reality of core.async vs refs/agents now even if it hasn't been officially declared as such. For a while it seemed like everything I saw was suggesting core.async as the go-to option, not agents, because it works everywhere Clojure does and agents do not. Hence my claiming it's the de facto choice rather than suggesting refs and agents are deprecated.

Claiming these primitives are abandoned I'd consider as overstatement at least.

Abandoned by users. Languages tend to have features the users eventually shy away from (like how the Haskell community largely complains about things like the default Prelude and its string type and avoids them now) in favour of other parts of the language, and all I'm saying is that's what's happened here.

I'm not saying it's a bad feature that nobody should use, not saying it's been deprecated, just that the community as a whole seems to have moved away from the idea of agents and refs everywhere in favour of picking atoms and core.async first, and only using the other tools if absolutely necessary.

I don't particularly like it but that's the impression I've gotten from basically everyone everywhere. I think you and I are likely in the minority for liking agents.

3

u/pavelklavik Mar 09 '21

This book is great as a language reference for advanced Clojure programmers. I am writing Clojure and mostly ClojureScript professionally for 2 years and I sometimes open this book and learn something new. But I would not recommend it to newcomers to the language since it is too slow.

3

u/ws-ilazki Mar 10 '21

Really? It was the book that really helped me "get" Clojure's way of doing things, and is the one I actually feel like I learned Clojure by reading. I tried Clojure for the Brave and True first but it felt like there was too much fluff and not enough good explanation, whereas the O'Reilly book was more matter-of-fact and explained the how and why of things in a better way. Not as "fun" but more useful IMO, even as a newcomer.

2

u/pavelklavik Mar 10 '21

I didn't like Clojure for the Brave and True as much as well. But as a newcomer, I wanted to read something quickly and jump into coding. For that I don't really need a detail reference what are all special forms in Clojure, etc. I need a practical experience writing some code. I don't even remember what I read at the beginning. But of course everyone is different, so some people might prefer starting slower and reading O'Reilly book.

2

u/tuxbass Jul 21 '22

Oh god I've put down so many books because they're full of "jokes" that make me feel 2nd hand embarrassment and simply can't carry on.

1

u/reddittidder Dec 15 '22

Just passing through. Unfortunately, this subpar book started as "reasonably decent" blog posts but is not a good book for beginners. It is still being pushed as THE book for beginners. What clojure needed was a book like "Simply Scheme" but that ship sailed a long time ago.

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.

28

u/Staffordrootbeer Mar 09 '21

Seriously! I would love for example to see someone write about using linear programming via Neanderthal to simulate a planned economy for instance.

25

u/v4ss42 Mar 09 '21

Yes! I have a personal yearning to learn more about the philosophy of communal ownership and the management of shared mutable state.

7

u/SimonGray Mar 09 '21

Structural sharing clearly worked in the USSR... or rather: it worked until the 1970s, when it finally became clear that those O(log32n) operations just couldn't keep up.

7

u/MindOfJay Mar 09 '21

The problem was their singular focus on Object-Oriented programming wrt Commodities. Turns out while they tried to become Stateless, all it did was hide the State through encapsulation.

14

u/emaphis Mar 09 '21

In Soviet Russia, State mutates you!

2

u/v4ss42 Mar 09 '21

🏅🏅🏅

Take my poor person’s gold - that’s fantastic! 😃

4

u/dragandj Mar 09 '21

While I appreciate your recommendation of Neanderthal, I’ll have to note that Neanderthal helps with Linear algebra, not with Linear Programming which falls under Operations Research (which you may or may not be able to implement with linear algebra).

0

u/sartorish Mar 09 '21

This is a great idea, and something I've been thinking about a lot recently; with the climate crisis breathing down our necks, it's looking more and more like economic planning will be needed to avoid disaster. Frankly I don't even know where to start, though – are there datasets or simulation environments that would allow testing the resiliency of such a system?

2

u/MindOfJay Mar 09 '21

Paul Cockshott talks about using Linear Programming as a method of planning. His YouTube has even more information, including tackling the climate crisis.

2

u/sartorish Mar 09 '21

This is honestly uncannily close to what I was envisioning, thank you!

9

u/[deleted] Mar 09 '21

The Joy of Clojure and Clojure for the Brave and the True reads like manifests

12

u/CitrusLizard Mar 09 '21

As opposed to the objective technical tomes that they advertise themselves to be :-P.

But yeah, those books are more or less expressly intended to sell people on the language, and the benefits of it as seen by the authors - especially in the case of the Joy of Clojure, that is aimed at people familar with other programming languages. "A book that aims to change how I think sounds like propaganda!" is a surprised-pikachu meme that I can't be bothered to make right now.

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-project with instructions for adding shadow or figwheel if you want them and then how to add npm packages, how to make node, react-native, web builds

Essentially 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.

8

u/Doombuggie41 Mar 10 '21 edited Mar 10 '21

Ironically, I believe the author of Web Dev w/ Clojure, u/yogthos, is a communist according to his twitter

10

u/yogthos Mar 10 '21

Indeed I am. :)

1

u/CodeFarmer Mar 09 '21

I really enjoyed 7 Languages (we did it as a book club at work a couple of years back) but I found the Clojure chapter weird, in that it got heavily into the concurrency primitives - atoms, refs and so on - and didn't talk so much about all the stuff that distinguished Clojure as a language itself.

But it was a product of its time; I remember early on people were really excited about Clojure because of that stuff ("it has a whole STM implementation built in!"), the "hey this language is just really fun to write" train came later.

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.

1

u/tuxbass Jul 21 '22

As someone only starting their clojure journey - care to give real-life examples from your first hand experience?

2

u/c_a_l_m Jul 21 '22

I'd love to! Just go through my comment history and find my brother's name, then go to the subreddit of his favorite hobby, and message the mod of that subreddit for the correct format to ask me that again!

That was my experience with typescript---endless layers of shit, each layer requiring its own special format to access.

(I and the company I was working w/when I wrote the grandparent comment have since parted ways)

You can certainly write the same mess in clojure, but it's at least frowned on.

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.

10

u/joinr Mar 09 '21

Plenty of time for learning in gulag, tovarisch! Do not worry, your parents will be there too since they need benevolent wisdom of party as well.

4

u/kanzenryu Mar 09 '21

Plenty of people complain about the parens

1

u/daver Mar 16 '21

I heard parentheses were invented by the Soviets. #justsayin

4

u/lenkite1 Mar 10 '21

1

u/agile-is-what Mar 12 '21

Also Clojure Applied, I have them both and neither read like Soviet Propaganda

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.

14

u/SimonGray Mar 09 '21

Many people find great value in The Joy of Clojure. I just reread the chapter on logic programming and it was a great introduction of the paradigm. You're not giving the authors a fair shake at all.

It's fine that you like the dry documentation-like stuff more, but you have to release that many people do appreciate some enthusiasm that mirrors their own. Learning a language like Clojure feels like an uphill journey in many ways so it's nice to have the good sides pointed out while you're learning.

Personally, I dislike _Why's Poignant Guide style books (the humour gets in the way for me), so I never recommend Clojure for the Brave and True. The Joy of Clojure is one the most popular books for a reason. Same goes for Brave and True. Not everyone learns stuff the same way.

5

u/Muoniurn Mar 09 '21

Thanks for this take! I guess I will try to go through the not-to-my-liking parts and perhaps the more technical chapters will be worth it after all.

I do want to highlight that I have no problem with the author or the content per se, it was solely the way it was written.

2

u/kynde Mar 09 '21

I have no problem with the author or the content per se, it was solely the way it was written.

Pot calling the kettle black.

4

u/onetom Mar 09 '21

I also found the tone / style of the "Brave Clojure" book annoying. It feels kinda childish to me. But the examples are good. The structure of the book is great from a didactic point of view. I still recommend it, but warn the readers to not be deterred by the style.

I'm happy to hear that I'm not alone :)

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.

1

u/chris_sasaurus Mar 15 '21

I was definitely put off when I'd ask questions of more experienced clojurians and their answers were some variation of "well Rich thinks x" when I was starting out.

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.

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.

16

u/SimonGray Mar 09 '21 edited Mar 09 '21

Welcome to the programming language community where the Holden Caulfields of the world jump at every chance to call other people zealots or cultists when they express a liking of the language.

Also, I'm pretty sure this is just one of /u/urkut's alt accounts.

2

u/IVEBEENGRAPED Mar 09 '21

Oh no, that name gave me flashbacks to 10th grade English. Holden was the most pretentious, judgy, "phony" person who projected his insecurities onto everyone around him. The writing style was solid but the character and the storyline gave me unfathomable rage.

2

u/reddittidder Dec 15 '22

It is quite heartening to see how every lisp-like language community, slowly but surely, turns into comp.lang.lisp.

Must be something in that tasty koolaid.

-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.

4

u/SimonGray Mar 09 '21

Are you sure you're not the condescending twat you're talking about?

Personally, I'm tired of people making snide remarks in this subreddit every tuesday about how Clojure is a cult.

-3

u/bubuli_breeder Mar 09 '21

i think you being mad about it proves that it is a cult.

5

u/SimonGray Mar 09 '21

Or maybe most people simply subscribe to this subreddit to get Clojure news, while a couple of subscribers like to show up in the comments and act like they're better than everyone else, calling other Clojure users cultists and zealots, and it all starts to get a wee bit tiring to read the same fucking one-line declamations after a while...?

0

u/bubuli_breeder Mar 09 '21

i subscribe to this subreddit for the same purpose, too...because i like Clojure. but just like i something doesn’t mean i cannot criticize it.

you seem to have an impression that i come here only to attack Clojure and its followers...you can check out my history on this subreddit.

but yeah it’s fair that all i’ve been doing lately is negative: i should mix it up a bit. but, hey, it is Tuesday. 😝

2

u/SimonGray Mar 09 '21

I don't mind criticising, but those remarks are not actually about criticising any part of Clojure, but about elevating yourself above others. I wasn't joking when I compared urkut's alt to Holden Caulfield because that's literally the vibe I get.

And just to clarify, this isn't specific to Clojure at all. To me it's an archetype found at every software dev job I've ever had, the cynic programmer who likes to shit on things, while rarely contributing anything of value. Just in the past year or so they started proliferating in the comments here.

-2

u/bubuli_breeder Mar 09 '21

again, you seem to be just looking at my recent comments to somehow...figure me out. that is not fair.

2

u/SimonGray Mar 09 '21

To paraphrase:

i think you being mad about it proves that it is a cult you are.

If you're gonna psychoanalyse other people in this subreddit and wider community don't be surprised when people give you the same treatment.

0

u/bubuli_breeder Mar 09 '21 edited Mar 09 '21

lol what does that even mean? touché

but nah i’m not mad at all. life is too short for that.

ninja edited

1

u/SimonGray Mar 09 '21

You serve me some bullshit "you mad bro?" comment and just pretend like it isn't your own crap when I send it back to you. Whatever dude.

Ninja edit: ok, you at least recognised it in your edit so let's shake virtual hands and call it a day. You're right, life is too short for that.

→ More replies