This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-15
Channels
- # alda (4)
- # beginners (9)
- # boot (2)
- # cider (56)
- # cljsrn (6)
- # clojure (29)
- # clojure-belgium (2)
- # clojure-gamedev (1)
- # clojure-russia (19)
- # clojure-uk (3)
- # clojurescript (7)
- # core-async (2)
- # datomic (16)
- # hoplon (96)
- # lein-figwheel (4)
- # om (2)
- # om-next (3)
- # other-languages (6)
- # planck (11)
- # reagent (9)
- # rethinkdb (1)
- # ring-swagger (1)
- # spacemacs (1)
Is there any support for *in*
and *out*
in planck? I would like to create a cmd line tool, but I'd need at least *in*
.
@mfikes: the irony is that cljs-http bases a lot of what it does on core.async, which was not available when I started the work on http in planck.
@jonas: Yes. The intent is to support as much of that as feasible. So for example, you can do the following:
cljs.user=> (require '[planck.core :refer [*in* read-line] :refer-macros [with-open]]
#_=> '[ :refer [reader]])
nil
cljs.user=> (with-open [rdr (reader "/Users/mfikes/Desktop/foo.txt")]
#_=> (binding [*in* rdr]
#_=> (read-line)))
"This is the first line."
cljs.user=> (read-line)
this is typed in directly
"this is typed in directly"
cljs.user=>
The big picture is that stuff you’d find in clojure.core
may be in planck.core
and stuff you’d find in
would be in
.
@slipset: Yeah. With respect to baking core.async
into the API, I think I agree with Eric’s post: http://www.lispcast.com/core-async-code-style In other words, it argues that an optional callback in the planck.http
API would be cleaner.