The examples used in my Clojure Conj 2013
JavaScript Clojure
Latest commit 2dcd169 Jan 2, 2014 @halgari Merge pull request #1 from greywolve/patch-1
Update README.md
Permalink
Failed to load latest commit information.
src/clojure_conj_talk updates for CodeMesh.io Dec 5, 2013
.gitignore initial commit Oct 4, 2013
LICENSE initial commit Oct 4, 2013
README.md Update README.md Jan 1, 2014
app.js updated deps Nov 7, 2013
index.html latest changes Nov 1, 2013
project.clj updated deps Nov 7, 2013

README.md

clojure-conj-talk

Here is are the code examples used in the 2013 Clojure Conj talk on core.async. The core.clj file in this project contains the examples, and expects that users will eval the forms one at a time, top to bottom.

Usage

In the talk, I used a binding (CTRL-`) and this emacs code to run each form one at a time in a repl.

(defun nrepl-eval-expression-at-point-in-repl ()
  (interactive)
  (let ((form (nrepl-expression-at-point)))
    ;; Strip excess whitespace
    (while (string-match "\\`\s+\\|\n+\\'" form)
      (setq form (replace-match "" t t form)))
    (set-buffer (nrepl-find-or-create-repl-buffer))
    (goto-char (point-max))
    (insert form)
    (nrepl-return)))

If you are using CIDER below is the equivalent.

(defun cider-eval-expression-at-point-in-repl ()
  (interactive)
  (let ((form (cider-sexp-at-point)))
    ;; Strip excess whitespace
    (while (string-match "\\`\s+\\|\n+\\'" form)
      (setq form (replace-match "" t t form)))
    (set-buffer (cider-find-or-create-repl-buffer))
    (goto-char (point-max))
    (insert form)
    (cider-repl-return)))

License

Copyright © 2013 Timothy Baldridge

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.