16 ms·
Clojure 1.6 released
- pjmlp 13y agoA nice pragmatic Lisp, might never use it at work, but it sure is fun to play with. Congratulations on the work.
- TheSmoke 13y agowhy wouldn't you ever use it at work?
- dmix 13y agoBecause it's rare to find companies using it. I'd love to write clojure, but everyone wants me to write ruby or javascript.
- sdegutis 13y agoIt's kinda funny how that worked out.. First, companies demanded employees write in C++, until employees demanded that companies start letting them use Java. Then, companies demanded that employees use Java, until employees demanded that companies start allowing them to use Ruby on Rails. Now companies demand that we use Ruby on Rails. All because we told them to.
- willismichael 13y agoThat just means that the growth in clojure jobs should be here in just a few more years, right?
- mattgreenrocks 13y agoThis presumes Clojure will be accepted by the mainstream. Anything's possible, but Lisp has difficulty here.
- beat 13y agoI don't think the paradigm shifts happened because of programmer demand. Java's dominance came about because JEE (and J2EE) and application servers happened along at the very moment that the burgeoning internet and better browsers were driving architectural change. Firstest with mostest. Really, has anyone written a serious application server in C++? Add in massive enterprise support from IBM, Sun, and Oracle, and you get a winner. Ruby on Rails was the spearhead of the whole convention-over-configuration paradigm, and getting back to simple, less expensive tools that stay out of the way. It's still not market-dominant if you get out of the startup bubble, nor are any of its followers. Java has ruled for over a decade.
- pjmlp 13y ago> Really, has anyone written a serious application server in C++? Lots of them. Before J2EE, there was a world of C++ with CORBA.
- beat 13y agoOkay, how about a serious C++ application server written in the 21st century? CORBA? Really? Why not just hand-roll on raw sockets like a REAL programmer?
- dagw 13y agoI remember, not that many years ago, when all the website jobs wanted you to use perl, and finding a job using ruby was beyond rare.
- adrianm 13y agoReally? I've gotten my fair share of recruiter emails looking for Clojure work. I introduced Clojure into my last job quite easily as well. If you're doing anything Java or JavaScript related, I've found it's pretty easy to get Clojure in the door once people see what you can do with it.
- deleted 13y ago[deleted]
- tom_b 13y agoInteresting - where do you see these recruiter emails coming from, geography-wise? I watch, say indeed.com, and see Clojure mentioned mostly as "nice to have" mainly for what, on the surface, appear to be standard, enterprise Java jobs.
- puredanger 13y agoHere at Clojure/West (350 attendees), almost every company is hiring and looking for Clojure developers.
- pjmlp 13y agoHow many of those are typical medium to large size corporations?
- puredanger 13y agoIt's a mix. For example, Staples Innovation Lab is trying to scale rapidly and hire as many as 300 people this year (https://www.youtube.com/watch?v=bmHTFo2Rf2w https://www.youtube.com/watch?v=bmHTFo2Rf2w). Walmart Labs is here. Climate Corporation is here (recently bought by Monsanto). And lots of others as well, certainly including many small shops or consulting companies.
- pjmlp 13y agoBecause on my work I can only use languages that the whole team is comfortable with. Additionally the project technology stack tends to be specified by the customers. So I will only be able to use something like Clojure when: - Everyone on the team knows it - The customer asked for it So is the life at the big boring world of enterprise consulting.
- cryptolect 13y agoThere's a really informative presentation from Jay Fields who successfully introduced Clojure to his company: http://yow.eventer.com/yow-2013-1080/lessons-learned-from-adopting-clojure-by-jey-fields-1397 http://yow.eventer.com/yow-2013-1080/lessons-learned-from-ad...
- pjmlp 13y agoThanks for the link. I enjoy such type of presentations.
- leccine 13y agoJust don't tell anybody or just tell them it is Java 9. :)
- mark_l_watson 13y agoNice upgrade. I have used Clojure for several customer projects and some of my own little projects like cookingspace.com and my-foc.us Clojure is a very practical language and basically stays out of your way during development.
- thescrewdriver 13y agoA healthy language ecosystem on the JVM is a good thing, glad to see a new Clojure release.
- dj-wonk 13y agoLike many people on the mailing list, I've been using the Clojure 1.6 betas and release candidates. Don't expect dazzling new features; rather, 1.6 is a nice solid step forward.
- Morgawr 13y agoAs it should be, in my opinion :)
- grandalf 13y agoSome of the smartest code I've read lately has come from the Clojure community. It's a great time to live in NYC.
- elwell 13y agoWould be interested in github links...
- fredyr 13y agoHere's two examples I've found to be very interesting: https://github.com/clojure/core.async https://github.com/clojure/core.async Timothy Baldridge has a couple of videos on the go macro internals https://www.youtube.com/channel/UCLxWPHbkxjR-G-y6CVoEHOw https://www.youtube.com/channel/UCLxWPHbkxjR-G-y6CVoEHOw https://github.com/swannodette/om https://github.com/swannodette/om https://www.youtube.com/watch?v=DMtwq3QtddY&index=7&list=PLZdCLR02grLp__wRg5OTavVj4wefg69hM https://www.youtube.com/watch?v=DMtwq3QtddY&index=7&list=PLZ...
- segmondy 13y agoI'm in Detroit, and I'm not missing out on Clojure fun. Might miss out on meetups, but everything is still accessible from the Internet, so I don't see your point about NYC. With that said, a lot of different languages have beautiful code, from C, ie Lua source, PHP Symfony, etc. With that said, I love Clojure as well, and it's all because it's Lispy. :)
- elwell 13y ago"i.e." means "that is" "e.g." means "for example"
- beat 13y agoI've switched my own back end codebase to Clojure. It's just a joy to work with. Building REST with Liberator is a revelation. It's so easy to reason about what the code is doing, and immutability leads to far fewer bugs. Not missing objects, not at all. The stock concern for businesses building with Clojure is the lack of talent and industry acceptance. I have a different angle. I figure that when I'm ready to start hiring other developers, I'll only be hiring developers sophisticated enough to see the benefits of using Clojure over Java/Ruby/Python/etc - and then I'll have the draw of letting them work in the best tools, not making them compromise so it's easier for management to hire less serious programmers.
- platz 13y agoIs it still so easy to maintain Clojure code given it's lack of types? (I know about Typed Clojure; it doesn't seem to have won the hearts of all Clojurians) (Or, do you just test the bejezus out of the thing?)
- lkrubner 13y agoI add :pre and :post assertions to most of my functions, so I know the type of everything coming in, and also what is returned. An example of a function that saves a document to MongoDB: (defn persist-this-item [item] {:pre [ (map? item) (= (type (:item-name item)) java.lang.String) (= (type (:item-type item)) java.lang.String) (if (:created-at item) (= (type (:created-at item)) org.joda.time.DateTime) true) ]} (let [item (if (nil? (:created-at item)) (assoc item :created-at (tyme/current-time-as-datetime)) item) item (assoc item :updated-at (tyme/current-time-as-datetime)) item (assoc item :_id (ObjectId.))] (mc/insert "tma" item))) So this function needs to be given some kind of map, and it needs to have 2 keys, :item-name and :item-type, and both of these need to be strings, and if :created-at is already set, then it needs to be a Joda DateTime. It's not accurate to say that Clojure has no types. It just gives you some flexibility about how strict you want to be. I find that Clojure strikes a perfect balance: its flexibility with types allows me to easily integrate a lot of 3rd party tools without much work, but when I need to I can be as strict as a I like with types. Edit to add: wow, the code is ugly on Hacker News. Funny that this site provides no tools for posting code snippets, given the subject.
- sdegutis 13y agoWe've been using Clojure for our web app at work since day 1. The biggest gain by far is the referential transparency[1] built into the core libraries, which has also been closely adhered to by nearly all third party libraries (with only a few unfortunate outliers). I cannot emphasize enough just how much of a gain this has been. [1]: http://en.wikipedia.org/wiki/Referential_transparency_(computer_science) http://en.wikipedia.org/wiki/Referential_transparency_(compu...
- platz 13y agoAny posts which explain how the referential transparency built into the core libraries helps? My understanding is that Clojure is impure, so a "partially referentially transparent" design is interesting to me. Or are you just referring to the fact that the core data structures are immutable?
- adambard 13y agoClojure strongly encourages referential transparency (e.g. immutable data structures), but doesn't demand it (e.g. STM). The convention is simply to mark any function with side-effects with a !, which almost all external libraries follow. Without the !, you can have some confidence that a given function is pure, since pure functions are sort of the "default".
- platz 13y agoRuby follows this convention too, I believe; but probably to a lesser extent because it's core types aren't immutable
- pi-rat 13y agoNot sure if I like the 'some?' operation. It's short for (not (nil? x)).. And has nothing to do with 'every?' -which checks if every element of a collection matches a predicate - ex (every? odd? [1 3 5]) To check if some elements match you need to use (some odd? [2 3 4]) - note the lack of '?' Bet it will confuse people.
- dpassen1 13y agoAgreed. Seems like a very unnecessary addition.
- puredanger 13y agoThe non-nil checks are particularly useful in core.async code as nil is a special value for channels (indicating they've been closed). This family of functions can be used to more concisely determine if a value from a channel is a value or means "close".
- dpassen1 13y agoThanks!
- emiljbs 13y agoI'd love to hear the reasoning behind that choice if it's Rich Hickey that did it, since it's called some and every in Common Lisp and he's written a great deal in that language.
- puredanger 13y agoThe names were chosen by Rich. Many choices were considered and they all had pros and cons. The new some?/if-some/when-some functions follow the "not nil" notion in "some->" (but break with the meaning in "some"). Naming is hard. :)
- konradb 13y agoAbsolutely loving Clojure. I typically hang out in java-land. I tested it out on an annoying problem to scratch an itch and wow, I'm actually enjoying programming again. I find myself looking forward to solving problems with Clojure in a way I haven't for a long time.
- craigching 13y agoDoes anyone know where the Clojure roadmap is? I'm wondering what I can expect in the next big release :) Congrats on the release!
- puredanger 13y agoHaven't started talking about it yet. :)
- poofyleek 13y agolike the emacs org-mode pprint support. especially the example output claiming the well deserved rock star status.
- elwell 13y agoIt's always hard get a sense of the actual usage presence of Clojure when I spend so much time on HN, where Clojure is disproportionately represented.
- puredanger 13y agoThere are ~9000 people on the Clojure mailing list and ~8000 members of Clojure meetups on Meetup.com. Hopefully those are useful and concrete numbers.
- elwell 13y agoYet, essentially all the web application examples I've seen have been very basic / boilerplate. Is Clojure not considered a good tool for complex web apps?
- puredanger 13y agoI think that's because complex web apps don't make good examples. :) There are many people building very complex web apps in Clojure.
- grayrest 13y agoReact was the missing link for sophisticated clojurescript web apps. The Clojure community discovered it in December. Expect substantial web apps this year. The largest open sourced example I'm aware of in this new wave of apps is Omchaya [1] which isn't that large but shows how large apps could be structured. [1] https://github.com/sgrove/omchaya/ https://github.com/sgrove/omchaya/
- gengstrand 13y agoFor a non-trivial example of a web application, check out http://www.dynamicalsoftware.com/software/architecture/oss/clojure http://www.dynamicalsoftware.com/software/architecture/oss/c... which documents the making of a news feed service that is written in clojure and combines lots of other open source technology such as postgresql, cassandra, solr, redis, and kafka.
- grn 13y agoI plan to learn Clojure this year. What online resources and books can you recommend for learning the language and the tooling?
- puredanger 13y agoBooks - any of the intro Clojure books, they're all good. I prefer the OReilly one but I think it's really a matter of preferred style. Online - Clojure for the Brave and True, Clojure From the Ground Up are great series. Or try the ClojureBridge curriculum https://github.com/ClojureBridge/curriculum https://github.com/ClojureBridge/curriculum. Practice problems - 4clojure, exercism.io, clojure koans Editors - if you want to focus on Clojure not an editor, I'd suggest Nightcode or Light Table. If you like IDEs I'd recommend IntelliJ w/ Cursive or Eclipse Counterclockwise. If you already use Emacs, use CIDER. If you already use Vim, use Fireplace.
- puredanger 13y agoAlso, there are many great videos online - try https://www.youtube.com/user/ClojureTV https://www.youtube.com/user/ClojureTV or http://www.infoq.com/Clojure/presentations/ http://www.infoq.com/Clojure/presentations/
- BadassFractal 13y ago#clojure is your best online resource tbh.
- BadassFractal 13y agoBeen using Clojure in production for our API (core of the system) for close to a year now, it's been a very interesting ride. Like many others pointed out, I do wish I had types though: refactoring is a giant pain in the ass even at our modest codebase's scale (10-15k lines), requiring endless UTs to make sure everything's still sane. Dynamic typing is fun for the simpler cases, but as soon as you go into trickier computations like crunching analytics data, you continuously run into run-time type mismatches that take forever to correctly pinpoint. Also having to continuously keep in your head just what exactly you're threading through functions is a pain and requires a lot of mental overhead. The JVM also doesn't seem to bring much of a benefit to the table, considering that we only ever deploy onto 64bit Ubuntu 12.04, so there's not really a big need for portability. The best part has been how fun it is to work in clojure and the community around #clojure channel with so many of its freakishly smart people. People on there seem to generally be very willing to help explain something if you're being obtuse.