C
Clojure Blog
clojure.com · Company blog · on HN since 2010
The official Clojure blog, run by the Clojure/core team, covers language features, libraries, and community events.
What HN saysHN links it for core.async, reducers, and ClojureScript announcements. Many comments are Relevance job posts, and others discuss CSP and state in concurrency.
31HN people shared it
22linked it in comments
32stories submitted
1.7Kstory points
9 years agolast shared
2010people per year2026
Most-shared posts
- 1Clojure core.async Channels9 people · 211 points · first shared 2013 · 44 comments on HN
- 2Rich Hickey: Reducers - A Library And Model For Collection Processing8 people · 242 points · first shared 2012 · 79 comments on HN
- 3Clojure/core — Functional Relational Programming with Cascalog4 people · 96 points · first shared 2012 · 4 comments on HN
- 4Anatomy of a Reducer4 people · 77 points · first shared 2012 · 7 comments on HN
- 5Homepage4 people · first shared 2010
- 6Introducing ClojureScript2 people · 81 points · first shared 2011 · 16 comments on HN
- 7First Clojure Conj 2011 Videos Available1 people · 122 points · first shared 2012 · 2 comments on HN
- 8Avout: Distributed State in Clojure1 people · 121 points · first shared 2011 · 5 comments on HN
- 9Clojure/core — (second conj)1 people · 113 points · first shared 2011 · 9 comments on HN
- 10All Conj 2011 Videos Available1 people · 100 points · first shared 2012 · 10 comments on HN
- 11UnConj1 people · 83 points · first shared 2011 · 19 comments on HN
- 12Clojure and Logic: Lojic Part Two1 people · 81 points · first shared 2011 · 10 comments on HN
- 13Clojure/core Reading List: Rationale, tutorials, resources1 people · 71 points · first shared 2011 · 8 comments on HN
- 14(take 5 kevin-lynagh)1 people · 65 points · first shared 2012 · 10 comments on HN
- 15(take 6 carin-meier)1 people · 58 points · first shared 2011 · 2 comments on HN
What HN people wrote when they linked it
donmullen · 2011-09-01
Durham NC (main office) - REMOTE full-time and contractors
Relevance, Inc.
http://thinkrelevance.com
http://thinkrelevance.com/jobs
We are Clojure/core (http://clojure.com).
Relevance has been voted as one of the Best Places to Work in the Triangle (Triangle Business Journal). We have a fantastic work environment that includes 20% Fridays (work on open source, giving back to the community, or internal projects), and a fantastic benefits package.
Relevance is increasingly a virtual company and have many remote full-time developers around the country. We're now opening up the project manager positions to being remote as well.
Come work with some of the best Ruby/Rails and Clojure developers on solving interesting, hard problems that make a difference.
rsanheim · 2010-09-03
Ruby/Clojure/Lisp/Javascript - dev and PM - Durham, NC, Washington DC, and Columbus, OH areas
Relevance (http://thinkrelevance.com) is hiring. We are the guys behind Clojure/Core (http://clojure.com/). We do a lot of Ruby with and without Rails, we are doing at least two production Clojure apps right now (I'm having a hard time keeping track), and we've also done Java, .NET, C, or Javascript as the project dictates.
We have a fantastic culture, are small (~25 folks) but growing, and generally kick ass.
Email me at rob AT thinkrelevance.com. Tell me your github username, your HN username, and anything else I should know.
lynngrogan · 2011-12-01
Durham NC (main office) - REMOTE full-time and contractors
Relevance, Inc.
www.thinkrelevance.com
Rails or Clojure Developers, Project Managers
http://thinkrelevance.com/jobs
We are Clojure/core (http://clojure.com).
Relevance has been voted as one of the Best Places to Work in the Triangle both 2010 and 2011 (Triangle Business Journal). We were also ranked #739 in this year's Inc 500|5000 list. We have a fantastic work environment that includes 20% Fridays (work on open source, giving back to the community, or internal projects) and a great benefits package.
Relevance is increasingly a virtual company and have many remote full-time developers around the country. We're now opening up the project manager positions to being remote as well.
Come work with some of the best Ruby/Rails and Clojure developers on solving interesting, hard problems that make a difference.
email us: jobs [at] thinkrelevance [dot] com
Include Hacker News in the subject line
pron · 2013-07-23
Then why not both CSP and immutability? You can't really have serious concurrency without giving serious thought to managing state.
Erlang is really all about managing, and isolating, state. Clojure, too, has great support for CSP (with care for state) in core.async[1] and Pulsar[2].
[1] http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
[2] http://puniverse.github.io/pulsar/
soc88 · 2012-05-04
I disagree with that. There is great attention between language features and functionality shipped in the standard library. This http://clojure.com/blog/2012/04/19/take5-daniel-spiewak.html might also be of interest.
bcoates · 2014-08-07
If I understand right (I may not):
In Python, the (complex, generic) iter() protocol is how every container provides a method to iterate itself, and reduce is a trivial application of a reducer (like your add function) to a container by using the iter protocol.
In Clojure, it's the opposite: there is a reduce() protocol and every reducible container knows how to reduce itself. the traditional reduce function just takes a reducer and a reducible and performs the reduce protocol on it.
As there's a bunch of different kinds of containers with different rules, the best way to implement the reduce protocol on them is different for each, and there might be weird specialized reducers that are parallel or asynchronous or lazy or whatever.
Transducers allow you to composibly transform reducers into different reducers, which can then be handed to the reduce protocol. As it turns out, most (all?) normal container->container operations, like map and filter, have corresponding transducers.
Here's the good part: if you have a reduce protocol and a complete set of tranducers, containers don't need to be mappable. The map(fn, iterable) function needs to know how to iterate; mapping(fn) doesn't care about containers at all, and is fully general to mapping any reducible for free. So you can write a transducer to produce the effect of any map or filter-like operation without touching iter().
As an added bonus, the code is more efficient:
reduce( add, map( lambda x: x + 1,…
sgrove · 2013-08-01
San Francisco, CA - Zenbox. Software Engineer. [LOCAL | RELOCATE OK]
We're a YC company wrangling SaaS to work together (as they should), starting by bringing the biggest apps our customers use right into Gmail. We've been growing our team over the past few months, and looking to add even more awesome people.
We work with dozens of API's to show our users profiles of their customers without having to jump out of the email flow - imagine having http://www.youtube.com/watch?v=WtzqRSlgqkw available when helping customers.
Thousands of people use it every day for hours on end, and are happy to pay for it to make sure they can continue using it. But there's still so much polish and improvement possible.
We also spend time improving our tooling, and tools for other developers. As one example we've recently vastly improved the source-map capabilities of the ClojureScript compiler. We do it because we want to give back to the communities that have enabled us, because it helps us, and because it's interesting.
Looking for an engineer who loves the craft, who cares about building product, and is excited about helping customers.
We also explore some pretty awesome ways to escape from getting crushed under the heel of complexity, and we're all excited to start toying around with ideas like http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html for the frontend.
This is both UI and backend work.
Languages: Clojure, Clojurescript, Ruby, Javascript.
sean @…
sirn · 2012-04-24
I don't know if the initial announcement still applies today; but I think ClojureScript encourages using Google Closure library for DOM manipulation and event handling[1]:
> The ClojureScript compiler emits JavaScript which follows Google Closure's code conventions, and then invokes the Google Closure compiler to generate compact, optimized JavaScript for delivery to clients. ClojureScript also makes use of the Google Closure library for capabilities such as event handling, DOM manipulation, and user interface widgets.
> It is possible to use ClojureScript with JavaScript libraries other than Google Closure, but those libraries typically do not follow the conventions of the Google Closure compiler and therefore will not be able to take full advantage of its optimizations.
They even have few wrappers to Google Closure Library under the `clojure.browser` namespace[1] (although from my testing, some of them, such as `clojure.browser.event`, is not compatible with ADVANCED_OPTIMIZATIONS.)
[1]: http://clojure.com/blog/2011/07/22/introducing-clojurescript.html
[2]: https://github.com/clojure/clojurescript/tree/master/src/cljs/clojure/…
alrex021 · 2010-05-25
Commercial site url:
http://clojure.com/
oskarth · 2017-01-20
Surprised that a thread about CSP in Lisp doesn't mention Clojure's core.async. CSP in Clojure is implemented as just another library and it's rock solid. While I don't claim to understand the implementation in detail, it's one of the more interesting and high leverage uses of macros I've seen in Clojure. It makes concurrent programming a breeze in Clojurescript as well, despite JS being single-threaded.
As someone who programs in both Clojure and Go there's absolutely nothing I miss from CSP in Go, and I would much rather do concurrent programming in Clojure.
Rationale: http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
Code: https://github.com/clojure/core.async/blob/master/examples/walkthrough…
Presentations: https://github.com/clojure/core.async#presentations
juliangamble · 2016-04-10
Rich Hickey's (of Clojure fame) Datomic database uses Datalog as its query language.
http://docs.datomic.com/query.html
http://blog.datomic.com/2015/01/datalog-enhancements.html
Nathan Marz's (of Twitter startup fame) Cascalog library (also implemented in Clojure) uses Datalog as its query engine to generate Hadoop jobs.
http://alexrobbins.github.io/cascalog-intro/#/step-14
http://clojure.com/blog/2012/02/03/functional-relational-programming-w…
patrickthebold · 2015-12-02
Clojure's core.async has "go routines", (this is more or less the same as in go), basically you can put and take messages on a channel. These operations will block the green thread, so you end up writing synchronous code. The idea is that synchronous, blocking code is easier to understand then async code. Since these are lightweight threads it will scale better than using real threads. I'm pretty sure it's fine to have hundreds of thousands of go routines.
This abstraction sits on top of java's real threads, so you can have several real threads doing the work and they can switch between the go routines once the go routine hits one of the blocking operations.
Or something like that... read this: http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
sindux · 2015-07-01
Adding to weavejester comment, back-pressure is to be handled with core.async channels [1]. I guess in Rich's terms, RX/FRP "complects" the communication of messages with flow of control [2]. Although this last statement may not be true anymore given that RX now has many functions to control the scheduler (eg. observeOn/buffer/delay, etc).
[1] http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
[2] http://stackoverflow.com/questions/20632512/comparing-core-async-and-f…
coding4all · 2015-01-10
This can be done in Clojure with core.async [1] and transducers [2]
[1] http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
[2] https://www.youtube.com/watch?v=6mTbuzafcII
dragonwriter · 2014-04-05
> For example, the paper "Out of the Tar Pit" suggests "Functional Relational Programming" as a method of reducing complexity in software. Unfortunately, I can't evaluate the efficacy of FRP in practice because there is no language allowing for it
Are you sure?
http://clojure.com/blog/2012/02/03/functional-relational-programming-w…
berdario · 2014-02-10
If I haven't misunderstood you, Clojure does: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-co…
Also, this talk that I found on HN some time ago explains some of the gory details behind the idea: http://vimeo.com/6624203
rsanders · 2013-09-16
Quite a few members of the Clojure core team and community work there, as evidenced by the intersection of http://thinkrelevance.com/team and http://clojure.com/about.html.
brandonbloom · 2013-07-13
I didn't realize Dart supports such an actor-like primitive. Neat.
That said, I agree with Rich's analysis in the "Wither actors?" section of the core.async announcement:
"They still couple the producer with the consumer. Yes, one can emulate or implement certain kinds of queues with actors (and, notably, people often do), but since any actor mechanism already incorporates a queue, it seems evident that queues are more primitive."
See: http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
It should be noted that actors better fit in a distributed system, which is a step above and beyond concurrent systems.
prospero · 2013-06-26
For those of you playing along at home, this is because of Clojure's reducers framework [1]. If we were to extend 'clojure.core.protocols.CollReduce' to ArrayList, we'd get similar performance, but the important point is that efficient iteration across immutable collections is very much possible.
http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-co…
EDIT: and my response is just a little redundant now
manaskarekar · 2013-03-01
Reducers look interesting! The linked blog post by Rich hickey is an interesting read: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-co…
sax · 2012-05-15
If you haven't read his introductory post check it out here: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-co…
My understanding is this: the genesis for fold (as opposed to foldl) is from the linked talk: http://vimeo.com/6624203.
If fold (a concurrent reduce) is used instead of foldl (a sequential reduce), then the mapping function can be pushed down and applied concurrently to the various elements. A generic mechanism can then be used for dispatching concurrent operations. These functional operation are composed of first mapping (and/or) filtering and then reducing.
[EDIT: typo and re-phrase]
junke · 2017-01-19
Of course not, lazy is opt-in in CL, that wouldn't be idiomatic.
Besides, the semi-lazy approach of Clojure's pmap (allocate futures consecutively) doesn't seem to convince everyone:
https://stackoverflow.com/questions/2103599/better-alternative-to-pmap…
https://www.reddit.com/r/Clojure/comments/20lxmv/just_what_is_the_over…
On the one hand, when you want to parallelize, you are delegating tasks to workers and you want them to do what they need, independently of you. But on the other hand, laziness introduce a dependency from you, because workers cannot produce a result before they are sure you really need it. This basically slows down parallelization and that's why I am not sure Clojure's pmap is a good general solution.
Note that Clojure Reducers, mentioned here in Zombie Metaphysics (ppmap:
http://www.braveclojure.com/zombie-metaphysics) and documented at https://clojure.org/reference/reducers, use strict sequences.
Laziness is great when you need it, but when you don't you shouldn't have to pay for it.
http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-co…