12 ms·
Clojure for the Brave and True (2015)
- bronz 10y agobrave clojure is really straight forward and well written
- bronz 10y agobrave clojure is really straight forward and well written
- agumonkey 10y agoOne of the most practical yet detailed clojure "book". Thanks again.
- ff_ 10y agoThis is by far the best book around for learning Clojure from scratch (IMO). If you always wanted to learn Clojure but never had the time, 2017 is the right year, and Clojure for the Brave and True is your companion. Buy it, or just read it for free on the website. (Disclaimer: I'm not in any way associated to the book or the author, I'm just super thankful for all the times this book has helped me to learn new things and solve issues :)
- pacomerh 10y agoI can corroborate :) The book is well organized and pleasant to read. If you want to hear from the author about this book and other stuff, check out this episode http://blog.cognitect.com/cognicast/098?rq=brave%20and%20true http://blog.cognitect.com/cognicast/098?rq=brave%20and%20tru...
- steveax 10y agoPlus: "cuddle zombies" :-)
- bitemix 10y agoAgree! My team all uses Clojure/ClojureScript for product development, and this has repeatedly been hailed as the most inviting book for getting started.
- joelbirchler 10y agoThis is a fantastic book-- but it's hardly news. It was released in 2015.
- bootload 10y ago"hardly news" still ^interesting^ though. news is such a low bar these days, I'll settle for interesting over news.
- severine 10y agoThat's what I thought... Now I see there was an interesting discussion (https://news.ycombinator.com/item?id=10426106 https://news.ycombinator.com/item?id=10426106) when it went free online and so actual news.
- decebalus1 10y agoI don't know what's wrong with me but I gave Clojure 3 tries in the past and every time I try to actually build something (aside from 4clojure and solving hackerrank problems with it) I get lost in the tooling and just give up then fallback to familiar frameworks\languages. It just doesn't click with me and the whole leinengen\ring\compojure just seems weird and backhanded.
- bmillare 10y agoI've found boot http://boot-clj.com/ http://boot-clj.com/ to be a better than leiningen for tooling. There's no magic, just simple scripting.
- atarian 10y agoIt's not just you. I also find it very difficult to make anything useful with Clojure outside of practice problems.
- mac01021 10y agoWhat have you tried to make?
- madmax96 10y agoMind if I ask what isn't clicking? I've had the exact opposite experience, and have found it very easy to incorporate different libraries. Do you have experience with other lisps? There's certainly a learning curve with clojure and its frameworks.
- throwaway7645 10y agoEverything assumes you're a Java expert.
- justinhj 10y agoI think that's fine. I wouldn't recommend serious use of a language that targets the jvm without a decent knowledge of Java
- bootload 10y agoReally appreciate the access to the book online http://www.braveclojure.com/clojure-for-the-brave-and-true/ http://www.braveclojure.com/clojure-for-the-brave-and-true/ more likely to buy products that you can see. This years challenge, learn two new languages. Clojure might be one of them. The reason? Lisp based and in spite of the fact it uses cough, Java (JVM), it runs on JavaScript. A better language to run/work with JavaScript. That is a good enough reason to learn and use.
- shadowmint 10y agoI hear this a lot, but it totally mystifies me. You lose all the good parts of clojure when you go into the js runtime; stm, parallel processing, java interop, hot reloading, and it pulls in some really quite large js dependencies, and it's impossible to debug. Even console logging becomes a case of 'convert to readable object and log' using special helpers. What's the benefit? I don't see any meaningful reason to use clojure in this context; what's the draw? Why would you bother over any other compiles-to-js language? You.. just like the syntax? That's the best answer I've gotten so far.
- chrisoakman 10y agoI'm not sure when your last exposure to the ClojureScript ecosystem was, but almost nothing you mention is a problem as of 2016: debugging, hot reloading, large JS deps, etc. I'm biased, but I think ClojureScript is the best way to use the JavaScript platform today. Awesome core library, consistent build process, best of breed tooling, persistent data structures, flexible syntax (JSX is madness compared to hiccups); I could go on. JavaScript the platform may have it's warts, but ClojureScript is all beauty :)
- bootload 10y ago"I'm biased, but I think ClojureScript is the best way to use the JavaScript platform today. ... JavaScript the platform may have it's warts, but ClojureScript is all beauty :)" I've been slow to this, but yes this summarises why this particular language is good to use as a better JavaScript.
- jstewartmobile 10y agoThis was a good book. It would have been better if he had a more critical perspective of the language. As much as I love Rich Hickey and Clojure, the language does have pitfalls and rough edges, and this book was a little too starry-eyed to tackle them head-on like Crockford's book on JavaScript.
- JamesLeonis 10y ago"The Joy Of Clojure" is more in line with Crockford's book. It goes into what Clojure does well and what you should avoid. I especially liked how it broke down it's different concurrency primitives and the pitfalls. I consider Brave and True to be Clojure's version of _why's Poignant Guide to Ruby.
- jraines 10y agoI agree. A sibling comment recommends "Joy of Clojure" but I feel that's better as a second or third book. My personal recommendation, YMMV as always, is Kyle Kingsbury's "Clojure from the Ground Up" series https://aphyr.com/tags/Clojure-from-the-ground-up https://aphyr.com/tags/Clojure-from-the-ground-up, then "Clojure Applied", then "Joy of Clojure". Hard to say an ideal order for the last two -- "Clojure Applied" is more approachable IMO, but "Joy of Clojure" is more comprehensive and covers more "cool" applications that spark curiosity and creative thinking.
- somedudetbh 10y agoI agree. I think this book and a lot of others fall into the _why's Poignant Guide to Ruby which i still totally don't understand the appeal of if you already know how to program. I mean, _why is an interesting dude, who did a lot of interesting things, but (1) the whole 'chunky bacon' thing just is not my cup of bacon smoothie and (2) it was not really a great book for people who already know a lot about programming. More broadly, I feel like _why's Poignant Guide to Ruby is an example of what I call John Bonhamization. John Bonham plays drums in Led Zeppelin. His whole style is crazy: rope-a-dope with the beat, playing mostly with the singer, playing "lead drums" and it's awesome! It's so good! It really, really works in the context of Led Zeppelin because John Bonham was a freak of nature and it just went along with their band in a magical way. But it works for almost no one else ever. It's exactly the wrong thing to copy. It's like when people in Silicon Valley are like "well, Steve Jobs was rude as shit, I'LL be rude as shit and then *I'LL invent the next iPod!!" And then you have generation after generation of people trying to copy someone else's magic and not hitting it, when they'd've been better served trying to do the normal thing and, maybe, if they were lucky, finding their own magic. I also think there's a bigger problem with people not writing books for people who know about programming. Odds are, if you are reading a book about a programming language, you already know a fuck ton about programming languages, but most programming language books fall into one of two categories: - Books that try to teach programming via the language in question. - Books about advanced techniques or exhaustive library documentation, cookbooks, etc. for people who already know the language. The overwhelmingly most common case of someone reading a PL book (for a language that's not one of the world's ten most popular) is "I know a dozen other programming languages but don't know this one." Only fairly advanced programmers even bother reading books about Clojure, or D, or Rust, or Dylan, or Self, or Racket, or Julia... Personally, I really like the Joy of Clojure. If I had to compare it to another PL book tough it would be the Matz Ruby book, not Crockford. It's pretty good though.
- bronz 10y agobrave clojure is really straight forward and well written
- idobai 10y agoThese terrible bloated script languages and their ads...
- olieidel 10y agoApart from learning Clojure, Daniel's humor made it a really fun read for me. If you enjoyed the style of the book, it's also worth checking out his talk on parallel programming [1], I caught myself laughing out loud and actually learning something at the same time. Thanks, Daniel! [1] https://youtube.com/watch?v=eRq5UBx6cbA https://youtube.com/watch?v=eRq5UBx6cbA
- bleah_yuck 10y agoThis book is painfully unfunny, filled with corny drawings and poorly structured with weak examples. I have the book, and I do not like it. I read it while learning, and returned to it only to realize what it did wrong, and why I learned nothing from it. It saddens me to see this post.
- macmac 10y agoI would agree with you on unfunny and corny points, but I guess it is very much a personal taste issue. On the matter of substance I have found the book to be quite OK. Could you point to any specific examples of what it does "wrong"?
- bleahYuck 10y agoComing at clojure as a java developer with a firm grasp of programing necessities, trying to bootstrap my awareness of the language, and re-apply existing experience and establish a frame of reference by reading this book alone was not possible. The book was not written for consumption by java developers. Having been a novice programmer in the past, as a natural starting point, trying to start with clojure as a blank slate using this book as an introduction was also ineffective. When I tried to read the book and approach clojure on its own terms, as if I knew nothing and would not be aided by prior experience, the book's attempts at cuteness were tangential and distracting. It's examples did not build on each other. This was one of the first books on the book shelf at the book store that I noticed as being specifically about clojure. After getting nothing out of the book, I went elsewhere and searched other books that gave me the information that I needed. After gaining further awareness of the language, and establishing competancy through the use of other resources, I revisited the book, to figure out why it didn't help me. One of the books that did bootstrap my core concepts was: https://pragprog.com/book/btlang/seven-languages-in-seven-weeks https://pragprog.com/book/btlang/seven-languages-in-seven-we... In the first sentence it plainly states clojure is a lisp. In its forty pages on clojure, that book gave me most of what this book did not provide in 300 pages. Knowing now that clojure is a lisp, I went and got Land of Lisp: http://landoflisp.com http://landoflisp.com That is an example of a book with jokes that are clever and informative. I was able to approach lisp on its own terms in isolation with that book. That book's table of contents are properly structured for reference, rather than as a framework for layered jokes. Only after I was able to bootstrap the fundamentals of lisp, and drawn parallels with java, was I able to see where this book goes wrong. It is not written for new or non developers. It is not written for developers familiar with other languages. It's written for people who already know clojure, and might applreciate the cute inside jokes it makes, that you might get if you already know clojure. I don't envision anyone else gaining anything from it. New developers are not informed of why data structures are useful and when. Things like primitive data types (booleans, integers, characters, strings) are not highlighted as foundational building blocks. Execution scoping is not properly addressed. Project structure and source code files trees, and namespacing are poorly explained. An entire chapter on emacs is inadequate for practical learning, and actual essentials for handling lisp or clojure, within an editor like emacs is beyond the scope of the book. Based on these details, I have no use for the book as a reference manual, and I also cannot recommend it as starting point for first time programmers, or even inexperienced programmers searching for more learning exercises. I can't even recommend it to other clojure developers for the jokes, because even the jokes are not funny.
- sbov 10y agoAfter learning syntax, the most valuable Clojure book to me was "Clojure Applied". Most books seem to cover the what of a language, Clojure Applied focused more on when and why. Which is extremely important, because I found that there tended to be lots of similar ways to tackle something in Clojure, which created mental gridlock whenever I tried to code a larger project.
- thom 10y agoI love Clojure, and have spent most of the last seven years in a Clojure REPL inside Emacs. But it still doesn't feel like critical mass has been reached. If anything, large efforts like Incanter have mostly died off, because most Clojure people are smart and resourceful enough to build their own stuff. There's an aversion to frameworks and a reliance on gluing together smaller libraries, which is totally valid as a philosophy. Me, I'm fairly dumb and lazy, and basically at the point where I wish I'd stuck with something like Python all along.
- base698 10y agoKind of reminds me of this: http://web.archive.org/web/20160304105922/http://www.lambdassociates.org/blog/bipolar.htm http://web.archive.org/web/20160304105922/http://www.lambdas... "Another feature about this guy is his low threshold of boredom. He'll pick up on a task and work frantically at it, accomplishing wonders in a short time and then get bored and drop it before its properly finished. He'll do nothing but strum his guitar and lie around in bed for several days after. That's also part of the pattern too; periods of frenetic activity followed by periods of melancholia, withdrawal and inactivity. This is a bipolar personality."
- westoncb 10y agoThat's a very nice essay—and unfortunately, I found myself described very accurately in it. I'm currently unemployed, sitting adjacent to a large pile of empty Indian food takeout bags, skimming a book on Abstract Algebra to better understand a paper on theory of deep neural networks—all of which has no connection to any lasting thing I'm doing aside from not working on a side project which happens to be at a local minimum of interest at the moment. I wonder if anyone here has figured out good ways of compensating for this personality type, who has managed to somehow turnout relatively well-adjusted in spite of it ;)
- mos_basik 10y agoAn ADD diagnosis in my twenties and an Adderall prescription have done wonders for my depression (gone), unemployment (working), self esteem (good), ability to maintain interest in projects (more fun than video games), sleep schedule (regularish) and social life (I now actually initiate plans to do things with humans now and then). Before consulting with professionals, I'd never considered this might be my problem because I've never been hyperactive... But after doing some reading, it seems that this sort of disorder can present in a variety of ways, only one or two of which include hyperactivity. If you are reading abstract algebra books because you want to, maybe this would encourage you as much as it did me - many people with various presentations of ADD are diagnosed in grade school because they "hit the wall" - they reach a significant level of dysfunction re: attention span, etc. and people around them are able to notice. However, the more a student is able to rely on their own natural intelligence to carry them (rather an ability to study), the longer it can take for a problem to appear. I was a junior in a CS degree at an excellent university when I finally hit my wall and realized I had to change something or everything would fall apart.
- pyrrhic 10y agoAfter reading that book, I also suggest trying this free MOOC, http://iloveponies.github.io/120-hour-epic-sax-marathon/ http://iloveponies.github.io/120-hour-epic-sax-marathon/ It really helped solidfy some concepts for me by presenting concepts one at a time with built in unit tests to provide fast feedback.
- GigaMos 10y agoI can confirm that. I did the same route. Afterwards I read the "Living Clojure" book and solved the Wonderland Katas (https://github.com/gigasquid/wonderland-clojure-katas https://github.com/gigasquid/wonderland-clojure-katas)
- shadowmint 10y agoI didn't enjoy this book; the examples used clojure constructs before introducing what they did making them arcane and difficult to understand, and it focused on the language without showing why you would use it or how to use it for real world projects. It's like... a detailed guide to the language, for people who already know clojure. I recommend 'Living Clojure' by Carin Meier for new comers. (Also, avoid the clojure cookbook; it's just a list of 'how to do X' for a bunch of X questions, kind of like a FAQ of best practices; it's in no way an introduction to the language) Like rust, I feel if you want to push someone into using clojure you have to pitch it at them with more than just 'hey look at this syntax. So functional!'. I know the clojurescript people are all enthusiastic these days, but the strength of clojure is its concurrency and seemless interop with the java ecosystem; if you don't need those, it's just another lisp. You lose both of those with clojurescript, and I fail to any benefit in it. /shrug
- pjmlp 10y agoThis is why I find Apple's decision to go Swift, despite all the hurdles, is very positive. Sometimes developers are like children, they need to be force feeded their vegetables. You see this specially in the games industry, where language adoption is driven by OS vendor SDKs.
- smnplk 10y agoI agree with you about the book, it's not for everyone. > I know the clojurescript people are all enthusiastic these days, but the strength of clojure is its concurrency and seemless interop with the java ecosystem; if you don't need those, it's just another lisp. You lose both of those with clojurescript, and I fail to any benefit in it. No, it's not just another lisp. There are very compelling reasons why one would chose Clojure even if it didn't have those nice concurrency abstractions. Built in persistent data structures give you the ability to separate values with identities, because of awesome sequence abstraction you usually don't have to care about the exact type of some sequence, the same functions just seem to magically work on all of them, which enables you to think on a higher level, about data streams and transformations. Lazy sequences are also a big benefit, when you want to deal with data that is just too large to fit into memory. Then there are transducers, the decoupling that OO can only dream about. So I beg to differ.
- dorsatum 10y agoI love this book. Can someone recommend something similar for Go or Elixir?
- jasonm23 10y agoFor Elixir try The Little Elixir OTP Guidebook https://www.manning.com/books/the-little-elixir-and-otp-guidebook https://www.manning.com/books/the-little-elixir-and-otp-guid...
- dorsatum 10y agothanks!
- VexorLoophole 10y agoAlso on the search for something like this book for Go or Rust. I liked the book. An easy first step into the language. Sadly i don't want to write everything in jvm and somehow i got hooked on safety concepts like type-safety or even more like ownership in Rust (also when i dont really understand Rust till now).
- LargeWu 10y agoThe entire second chapter is devoted to learning emacs. I find this to be a baffling editing decision. "Thanks for reading this book, but before we cover what you came for, let's do this other completely orthogonal thing first."
- chrisoakman 10y agoI totally agree the overhead of learning Emacs is orthogonal from learning Lisp. IMO, it's a shame that there is such a strong association between that tooling ecosystem and Lisp languages. I think it pushes a lot of newcomers away from the learning process. One of the design goals of Parinfer[1] is to help reduce the cognitive load of Lisp syntax for newcomers. Hopefully more introductory texts adopt it as part of their environment setup. [1]:https://shaunlebron.github.io/parinfer/ https://shaunlebron.github.io/parinfer/
- snowcrshd 10y agoWow, those docs are pretty good!
- ekzy 10y agoYou are free to skip the chapter and there is not a single reference to emacs in the rest of the book. I did it with another editor, I think the emacs chapter could be an annexe. It's only bonus and I can only be grateful as the book is free
- joeevans1000 10y agoI think Clojure is so much better with emacs, and teaching working tooling is the key to teaching a language. That's because actually doing the coding is the key to understanding the language. Emacs is by far the best editor out there for this language. One of the trickiest aspects to picking up emacs is the emacs init files, which the author provided. I just think it's awesome that he takes you from zero to a working development environment and doesn't leave getting code running as an exercise for the reader (which would mean many wouldn't get it running).
- babbeloski 10y agoTry spacemacs everyone, it's incredible, and the cider repl for clojure is the real deal. I was a long time vim user who tried to switch to emacs for a month but abandoned it for intelli j, and then atom for while. The spacebar mechanism to trigger the top level navigation that you drill into is an amazing mechanism for memorizing key short cuts (or not remembering and being able to use the menu to get what you need). spc p f inside a project has changed my life, I can't go back to a tree directory for navigation. Frees a lot of my working memory up. Kind of a rant and off topic, but I think it's the bees knees and it's ace for clojure / common lisp / javascript / flow / anything else.
- luck_fenovo 10y agoI use Spacemacs for Clojure at the moment and I quite enjoy it. My only problem is there doesn't seem to be a way to insert a newline in the repl without submitting the line for evaluation (I want to be able to structure a function definition for readability, for example, rather than having to have a single huge line). I did also have to stop smart-parens from auto-closing backticks, but that was a simple fix.
- jivux 10y agoUse C-j to insert a newline in the repl.
- luck_fenovo 10y agoThanks!
- plinkplonk 10y agoThe best Clojure book in my personal experience (and fwiw) is O'Reilly's "Clojure Programming" by Chas Emerick, Brian Carper, and Christophe Grand. Extremely clear writing, and very knowledgeable authors. I really enjoyed working through the book. Due Disclosure: 1. I was an experienced Haskell and Java programmer, when I read the books, so I didn't have to go through any culture shocks wrt either Java or FP. 2. I have used Clojure only for toy projects. My 'daily use' tools are Haskell, C and Lua. 3. I am not in the audience targeted by 'cute cartoons and corny jokes' books. the _why style, nothing wrong with that, I just find most of this 'cute' style to be wasting my time. If it works for you that is awesome 4. I found the tooling around Clojure weird and unintuitive, especially Leiningen. Apparently there are better alternatives now All that said, if I had to work on the JVM again, I'd use Clojure in a heartbeat. If I start a Clojure based company, Clojure Programming would be what I ask new employees who are unfamiliar with Clojure to work through. I can't recommend the book enough. There was some talk of an updated edition, which I'd buy the instant it came out.
- snowcrshd 10y agoJust adding my 2 cents. I've found the writing of Clojure Programming to be very dull, to be honest. Sure, it is clear and detailed, but it gets boring after a while. I think the Joy of Clojure is a better read (at least for me). The upside about Clojure Programming is that it covers the language's syntax right upfront, which (IIRC) Joy of Clojure does not.
- ekzy 10y agoThis is a very good intro book. I skipped the emacs chapter and there was no dependency to emacs through the rest of the book. I used light table. I enjoyed the exercises, there is a good level of complexity and the author often suggests and helps to reimplement some core functions of clojure. It took me about two weeks to complete the book entirely (on the evenings and a bit more on the weekends) with no previous experience in functional programming. I was dragged into the book really quickly, more than 2 other books I started to read about Clojure (on which I gave up quickly). I also bought the paperback version to support the author but I was a bit disappointed on the quality. Overall I highly recommend this book as an intro to FP with clojure. Thanks a lot for writing this book.
- joeevans1000 10y agoI found the jokes and humor in Clojure for the Brave and True actually hilarious, to where I just read it now occasionally just to laugh a bit. I don't know why I like his humor and writing so much, but I suspect that it's the same way some people at a party will laugh at my jokes and some will not. It's all about finding your audience. The book (I did the online version) actually 'unstuck' me from where I had bogged down in learning Clojure. It's the humor that made it less intimidating a subject. I am deeply grateful to this book and it actually made a big difference in my life. My brain is wired for a book like this, and so I'm very, very glad he took the time to put it all together.
- mbrodersen 10y agoIt's funny how most programming languages have die hard fans that truly believe (and will tell any stranger they meet in the street) that language X is "the best". There is no such thing as "the best" programming language for any given task. I like Clojure and Haskell and Javascript and Erlang and C++ for different reasons. They all have strengths and weaknesses, depending on the context and task at hand. And given the choice, I pick the language I use depending on the context and task that I need to solve.
- codygman 10y ago> There is no such thing as "the best" programming language for any given task. I think there is definitely a language that is the best "general" language, however general differs for everyone. I'm not sure it's possible to get an average of everyone's definition of general and make a test to measure languages with though. For me though, Haskell has been the best "general use" language.