Does Planck currently offer asynchronous file read/write?
No.
It imitates the <http://clojure.java.io|clojure.java.io>
system.
Cool, just wanted to double check my brief tour through the source
How do you feel about adding asynchronous counterparts to the synchronous file operations?
I've been thinking more about the point of threading in the nREPL server, and I believe the reason there's no async i/o is because you just wrap things in thread or future calls
However, JavaScript doesn't have that ability, instead opting for callbacks and event loops
I see no issue with that. (Planck already has support for an async variant of clojure.shell
, for example.)
s/has//
(Turns out I can just edit my comments)
Cool; I'll mess around with abio and see if I can come up with a prototype
Hi! I’m trying to hack around in planck and stuck with adding external dependencies.
@achikin Have you seen http://planck-repl.org/dependencies.html ?
Works great with clojurescript.csv
but things like clojure.data.xml
or clj-http
refuse to load.
planck has http suport
and I’d be surprised if clojure.data.xml has (standalone)clojurescript support
@achikin Looks like some of the libraries you are trying to load are Clojure libs
For HTTP, require
the planck.http
namespace and then do (dir planck.http)
hmm, there is a cljc file in clojure.data.xml
A small example is at the bottom of http://planck-repl.org/planck-namespaces.html for HTTP
@mfikes it works perfectly, but I wanted to use planck to explore several “native” libraries.
What kind of error do you get with clojure.data.xml
? (Perhaps it is not compatible with self-hosted ClojureScript.)
From the docs of clojure.data.xml
The Clojurescript implementation uses the same namespace as the Clojure one clojure.data.xml.
@achikin what version are you using?
the docs suggest 0.0.8 as the latest stable, which doesn’t seem to contain cljc stuff.
@slipset is right. It only contains clojure/data/xml.clj
Current alpa seems to be at 0.2.somethingrather.
Since you’re here @mfikes, what do you think of https://github.com/mfikes/planck/issues/466
If you’re interested, I could code up a suggestion for this...
Won’t be happening on this side of easter though (I think)
Issue #446 seems reasonable. I bet to pull it off you'd have to convey it via a well-known JavaScript variable.
maybe, but you’ve got in-ns
as a special thing in planck, right?
@slipset you’re right - i’m on 0.0.8
so I was thinking something like *repl-capabilities*
or some such
If it were exposed at the ClojureScript level, I wonder what namespace it would be in.
How’s it done with in-ns
? Because I found that lumo has lumo.repl/in-ns
whereas planck has it as in-ns
(and it seems to live in clojure.core
in, well clojure.
I don't understand the in-ns
question. FWIW, in-ns
is a REPL special that switches to, or creates a namespace.
ah,
my point is that in lumo and clojure, you need to prefix in-ns
.
in lumo it’s lumo.repl/in-ns
in clojure it’s clojure.core/in-ns
.
Whereas in planck it doesn’t hava a ns, it seems to live at some top-level, since it’s only called by issuing in-ns
My thought was that if you had a function/var which lived in the same place as plancks in-ns
, it could be the same place for all repls.
Oh. Right. You are effectively saying *repl-capabilities*
could be a REPL special. Gotcha.
🙂
I’m not a standalone-repl-native speaker 🙂
Hah.
Actually, FWIW, in the regular ClojureScript REPL, in-ns
is a REPL special as well.
also, planck is lagging behind lumo, since lumo has get-arglists
😛
What is get-arglists
?
I've seen the ticket. I've just never heard of it...
I imagine it’s a way to ask the arguments of a function?
It is a function defined in Clojure?
nope
hang on.
user=> (-> 'println resolve meta :arglists)
([& more])
user=>
That’s from my clojure repl.
user=> (-> '+ resolve meta :arglists)
([] [x] [x y] [x y & more])
user=>
resolve
doesn’t, err, resolve in planck.
cljs.user=> (require '[planck.core :refer [resolve]])
nil
cljs.user=> (-> 'println resolve meta :arglists)
([& objs])
cljs.user=> (-> '+ resolve meta :arglists)
([] [x] [x y] [x y & more])
aha 🙂
So, what did Lumo do?
(lumo.repl/get-arglists \”%s\")
(I'm on Lumo 1.1.0 which doesn't seem to have it.)
that’s from inf-clojure.el
funny, doesn’t seem to exist
but the inf-clojure.el
(the emacs lisp for implementing inf-clojure) mentions it.
Ah. Interesting. With Planck, I took the approach of porting Clojure core functions by putting them in the planck.core
namespace. The planck.repl
namespace has some things that are in cljs.repl
(like source
, doc
, pst
, etc.)
I guess this is too much, but looking through here (searching for either planck or lumo) you see the problem I’m trying to solve with 466
https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el