Tips for a Clojure workshop, for people who don't use emacs?

131 views
Skip to first unread message

Tj Gabbour

unread,
Apr 13, 2013, 7:46:44 AM4/13/13
to clo...@googlegroups.com
Hello!

I am helping run a Clojure workshop for a company's employees. (We will use Quil to program Conway's Game of Life, in pairs or small teams. We'll first show people how to use a cheatsheet of Clojure forms, which they can cut & paste and mold; and give them a repo with a basic framework for programming Game of Life.)

They will generally use: vim, Sumblime Text, TextMate.

I'm sure my concerns are a bit overblown, but I'd like to at least visualize myself helping participants have a tight edit-run-debug cycle, if they wish. Hopefully something nicer than pasting code into a terminal's REPL, and more interactive than constantly running from the commandline. Any tips?


Thank you!
 Tj


PS: I'll try out fireplace.vim and Sublime Text's REPL.

Wolodja Wentland

unread,
Apr 13, 2013, 9:25:56 AM4/13/13
to clo...@googlegroups.com
On Sat, Apr 13, 2013 at 04:46 -0700, Tj Gabbour wrote:
> I am helping run a Clojure workshop for a company's employees. (We will use
> Quil to program Conway's Game of Life, in pairs or small teams. We'll first
> show people how to use a cheatsheet of Clojure forms, which they can cut &
> paste and mold; and give them a repo with a basic framework for programming
> Game of Life.)
>
> They will generally use: vim, Sumblime Text, TextMate.
>
> I'm sure my concerns are a bit overblown, but I'd like to at least visualize
> myself helping participants have a tight edit-run-debug cycle, if they wish.
> Hopefully something nicer than pasting code into a terminal's REPL, and more
> interactive than constantly running from the commandline. Any tips?

vim, at least, supports Clojure development quite nicely. Take a look at:

http://clojure-doc.org/articles/tutorials/vim_fireplace.html

to learn how to set it up. So you could prepare the environment for vim (as
you already have done for Emacs) and make it easier for vim users to learn the
actual language. I am not sure about Sublime Text or TextMate though, but a
short query on google revealed at least:

http://wbond.net/sublime_packages/package_control and
https://github.com/wuub/SublimeREPL

The equivalent for TextMate seems to be no longer maintained, but you might be
able to dig up something.

All that being said: I wouldn't necessarily focus too much on these specific
tools (also /not/ Emacs), but simply show them how to load files in the lein2
nrepl and take it from there. That way they can edit Clojure files with a
tool of their choice and concentrate on learning the actual language rather
than the tooling. It would still be nice if you installed the
respective syntax files for various editors beforehand so that syntax
highlighting and indentation works (maybe even paredit) as expected.

I can recommend Brian's jp-oo book [0] as a good example of this style of
teaching (and in general as well).

[0] https://leanpub.com/fp-oo
--
Wolodja <bab...@gmail.com>

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc

Tj Gabbour

unread,
Apr 13, 2013, 3:06:06 PM4/13/13
to clo...@googlegroups.com
Thank you, good points! I lacked the imagination to seriously consider load-file. :) I'll practice using it.

Definitely will buy Brian Marick's book. [1] Pleasantly surprised to look through clojure-doc.org; probably confused it earlier with clojuredocs.org. :)


All the best,
  Tj

[1] Coincidentally, this week I'll be discussing Midje — very positively — at the local Clojure meeting group. I'd suspected that Clojure's unit-testing story was less than top-notch, but I was wrong — Midje easily dealt with everything I threw at it.
Reply all
Reply to author
Forward
0 new messages