

Clojure.core: Batteries Almost Included - michaelochurch
http://adambard.com/blog/clojure-batteries-included/

======
jared314
Why did the author mention core.typed, but leave out core.contracts?

[https://github.com/clojure/core.contracts](https://github.com/clojure/core.contracts)

~~~
adambard
I started writing a bit on contracts, but it was 2am and I really wanted to be
done. (I thought I had a little more time between then and HN front page.)
You're right, though, I should at least give it a shout and let people know
about it.

------
fhd2
Nice writeup, wish this existed back when I worked with Clojure. The migration
away from clojure.contrib caused quite the mess. Back then (about a year ago),
looking for a function you want (things you would expect in the standard
library) was like this:

00:05 Found it in clojure.contrib

01:05 Figured out which standalone library it has moved to (or conclude that
it has disappeared)

01:15 Figured artefact/group ID and current version out

That was a bit annoying.

------
trothoun
The core.match example uses python-style triple quotes. Is that actually
possible in clojure? I would be enormously excited if it is.

~~~
tobik
why? in clojure strings can be multiline already. so there is no point in
triple quotes.

~~~
michaelochurch
Triple quotes tend to come up for two purposes:

1\. Long regular expression strings that have quote marks involved. I'm not a
fan of large, complex regexes, but a lot of people dislike the line-noise
added by escaping.

2\. Docstrings that may have quotes in them.

It's to remove the string escaping that makes literals look different from the
strings they describe.

~~~
tobik
Thanks.

Thinking about it, I guess triple-quoted strings also facilitate doctests
involving strings that would otherwise be really awkward to read/write.

------
landhar
I often find myself having to spend more time than necessary to track down how
to add these libraries to the dependencies of my leiningen projects.

I think this post would be a lot more useful if it included a link to clojars
for each one of these libraries.

~~~
weavejester
They're not on Clojars; the Maven repository they use is build.clojure.org.
The project source code for all the contrib libraries is on Github at
[https://github.com/clojure](https://github.com/clojure)

~~~
landhar
Thanks for clarifying !

------
tieTYT
I still have no idea what core.unify does.

~~~
adambard
Give it two patterns with some unknowns and it tries to get values for the
unknowns via pattern-matching. That's all it does! It's one of those things
that humans do very well but computers have trouble with, so I'm afraid it
doesn't look too impressive.

~~~
tieTYT
You mean like those problems that prolog is good at solving? Such as those
describe here? [http://dangoldin.com/2013/06/07/fun-with-prolog-
priceonomics...](http://dangoldin.com/2013/06/07/fun-with-prolog-priceonomics-
puzzle/)

~~~
adambard
Cool, thanks!

------
olenhad
Quite an awesome whirlwind tour. Didn't know about core.unify, which seems
quite impressive.

~~~
adambard
I suspect core.logic is the more practical library in many cases. I wrote a
disproportionate amount on core.unify because I couldn't find any official
docs that approached it from the perspective of someone (e.g. me) who didn't
already know all about Prolog and unification in general.

