Clojure cheat sheet

128 views
Skip to first unread message

Steve Tayon

unread,
Jul 8, 2009, 5:04:56 AM7/8/09
to Clojure
Hello everyone,

while looking around for a modern lisp, I discovered Clojure and was
instantly infected by the new possibilities to write software. Since
then I watched the screencasts and read several tutorials. Finally I
bought "Programming Clojure" by Stuart and I was impressed by his
clean and well-structured writing style.

There are many many great tutorials about Clojure out there, but I was
interested in a summary of the available Clojure functions and macros.
So I decided to hack together a Clojure cheat sheet in the style of
the Latex cheat sheet by Winston Chang (http://www.stdout.org/~winston/
latex). Consequently the sheet should not contain more than two pages.

At first, I though about the following arrangement: function | short
description | example. Quickly I realized, that the sheet would become
a book. Therefore I mostly used the categories in the Clojure Wiki on
http://www.clojure.org.

For example, when you are working with sequences, you can look up,
which function could be used to get your things done. Most names are
self-explaining and in doubt (doc <function>) will help you out with
parameters and description. Sometimes an example for a complicated
function would be useful, but in that case, you have to look up
elsewhere. Sorry...

You find the cheat sheet in the Clojure group file section (clojure-
cheat-sheet.zip). Hope you find this useful! Still, the credit goes to
the Clojure Wiki. If you are missing something, tell me!

Thank you Rich for developing this excellent piece of software.

Steve

Mark Volkmann

unread,
Jul 8, 2009, 9:15:44 AM7/8/09
to clo...@googlegroups.com
Looks good! You might get some additional ideas for categories from
http://java.ociweb.com/mark/clojure/ClojureCategorized.html.
--
R. Mark Volkmann
Object Computing, Inc.

Steve Tayon

unread,
Jul 8, 2009, 10:30:51 AM7/8/09
to Clojure
Mark Volkmann schrieb:
> Looks good! You might get some additional ideas for categories from
> http://java.ociweb.com/mark/clojure/ClojureCategorized.html.

Thanks for the hint. I will look for missing commands and merge them
into the sheet.

Steve

Laurent PETIT

unread,
Jul 8, 2009, 12:21:52 PM7/8/09
to clo...@googlegroups.com
Hi, interesting, thanks for doing this !

Maybe you could add also the reader syntax for lists (), vectors [],
sets #{}, maps {} or do you think they are too trivial to be in the
cheat sheet ?

Regards,

--
Laurent

2009/7/8 Steve Tayon <steve...@googlemail.com>:

Wilson MacGyver

unread,
Jul 8, 2009, 1:03:50 PM7/8/09
to clo...@googlegroups.com
Great idea, maybe you should talk to dzone.com about turning this into
a refcard.

On Jul 8, 2009, at 5:04 AM, Steve Tayon <steve...@googlemail.com>
wrote:

>

Steve Tayon

unread,
Jul 8, 2009, 1:49:28 PM7/8/09
to Clojure
Laurent PETIT schrieb:
> Hi, interesting, thanks for doing this !
>
> Maybe you could add also the reader syntax for lists (), vectors [],
> sets #{}, maps {} or do you think they are too trivial to be in the
> cheat sheet ?

Although the initialisation of lists, vectors etc. is a reader task, I
will put them into their relevant data structures section, if there
are no complaints. Thanks for pointing this out!

On 8 Jul., 19:03, Wilson MacGyver <wmacgy...@gmail.com> wrote:
> Great idea, maybe you should talk to dzone.com about turning this into
> a refcard.

You don't like the design, huh? I find it a little bit annoying, that
I have to register to get their cheat sheets. So it is not as fast
accessible as I would wish for.

-------------------------------------------------

Since I don't want to spam the Files section in this clojure group
with one single file for every new revision. Is there a way to
overwrite or remove files?

Wilson MacGyver

unread,
Jul 8, 2009, 6:17:44 PM7/8/09
to clo...@googlegroups.com
No no, that's not it. I merely suggested dzone.com because they generally
promote their refcards, and I thought it would be a good way for clojure to
get some press, and for you to get some fame. :)

On Wed, Jul 8, 2009 at 1:49 PM, Steve Tayon<steve...@googlemail.com> wrote:
> On 8 Jul., 19:03, Wilson MacGyver <wmacgy...@gmail.com> wrote:
>> Great idea, maybe you should talk to dzone.com about turning this into
>> a refcard.
>
> You don't like the design, huh? I find it a little bit annoying, that
> I have to register to get their cheat sheets. So it is not as fast
> accessible as I would wish for.
>
--

Omnem crede diem tibi diluxisse supremum.

tmountain

unread,
Jul 9, 2009, 10:52:01 AM7/9/09
to Clojure
This is very cool. I will definitely be keeping a copy on my laptop as
a quick reference. Thanks for putting it together.

Travis

On Jul 8, 5:04 am, Steve Tayon <steve.ta...@googlemail.com> wrote:
> Hello everyone,
>
> while looking around for a modern lisp, I discovered Clojure and was
> instantly infected by the new possibilities to write software. Since
> then I watched the screencasts and read several tutorials. Finally I
> bought "Programming Clojure" by Stuart and I was impressed by his
> clean and well-structured writing style.
>
> There are many many great tutorials about Clojure out there, but I was
> interested in a summary of the available Clojure functions and macros.
> So I decided to hack together a Clojure cheat sheet in the style of
> the Latex cheat sheet by Winston Chang (http://www.stdout.org/~winston/
> latex). Consequently the sheet should not contain more than two pages.
>
> At first, I though about the following arrangement: function | short
> description | example. Quickly I realized, that the sheet would become
> a book. Therefore I mostly used the categories in the Clojure Wiki onhttp://www.clojure.org.

Steve Tayon

unread,
Jul 10, 2009, 10:27:23 AM7/10/09
to Clojure
Hi all,

I uploaded a new revision.

What's new?
- filled tables with colours (grey version also included)
- attempt to categorize zippers and parallel
- added and removed a few commands

In short, if you like the last revision, you will love this one.

As always, suggestions and comments are welcome!

Steve

Sean Devlin

unread,
Jul 10, 2009, 2:30:22 PM7/10/09
to Clojure
Okay, I just printed the color version... Damn! This is awesome! I
need to find some really heavy paper now, or a laminator machine, or
both.

Good job.
Reply all
Reply to author
Forward
0 new messages