File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 1
1
# clojure-conj-talk
2
2
3
- A Clojure library designed to ... well, that part is up to you.
3
+ Here is are the code examples used in the 2013 Clojure Conj talk on core.async. The core.clj
4
+ file in this project contains the examples, and expects that users will eval the forms one
5
+ at a time, top to bottom.
4
6
5
7
## Usage
6
8
7
- FIXME
9
+ In the talk, I used a binding (CTRL-`) and this emacs code to run each form one at a time in a repl.
10
+
11
+
12
+
13
+ (defun nrepl-eval-expression-at-point-in-repl ()
14
+ (interactive)
15
+ (let ((form (nrepl-expression-at-point)))
16
+ ;; Strip excess whitespace
17
+ (while (string-match "\\`\s+\\|\n+\\'" form)
18
+ (setq form (replace-match "" t t form)))
19
+ (set-buffer (nrepl-find-or-create-repl-buffer))
20
+ (goto-char (point-max))
21
+ (insert form)
22
+ (nrepl-return)))
23
+
8
24
9
25
## License
10
26
11
- Copyright © 2013 FIXME
27
+ Copyright © 2013 Timothy Baldridge
12
28
13
29
Distributed under the Eclipse Public License either version 1.0 or (at
14
30
your option) any later version.
Original file line number Diff line number Diff line change 481
481
482
482
; ;;; Actors ;;;;
483
483
484
- ; ; Please don't do this:
485
484
486
485
(defprotocol IActor
487
486
(! [this msg]))
524
523
; ; 3) specify how to handle the next message
525
524
526
525
527
- ; ; <pontificate>
528
-
529
526
; ; My critique of this system
530
527
; ; 1) unbounded queue (mailbox)
531
528
; ; 2) internal mutating state (hidden in function closures)
532
529
; ; 3) must send message to deref (mailbox could be backed up)
533
530
; ; 4) couples a queue, with mutating state, with a process
534
531
; ; 5) basically async OOP
535
532
536
- ; ; </pontificate >
533
+ ; ; </critique >
537
534
538
535
539
536
You can’t perform that action at this time.
0 commit comments