Fork me on GitHub
#planck
<
2017-03-23
>
bherrmann14:03:02

can planck do an exec? one where it passes the input/out/err to subprocess… like bash does in an exec ?

mfikes14:03:54

Planck has a planck.shell namespace that mimics clojure.java.shell

mfikes15:03:50

(So, you can't feed the subprocess a stdin for example.)

bherrmann15:03:52

sure, the usecase I have in mind is that planck do somethings, but then invoke another program to continue.... like setting up a file with some contents and then launching vi to edit the file

bherrmann15:03:22

I suppose I can wrap a bash script to do this.

mfikes15:03:38

Correction to the above: Planck's sh imitation lacks the ability to pass a stream in for the :in parameter.

bherrmann15:03:12

quick question, since I have your brain.

bherrmann15:03:13

cljs.user=> (instance? String "ff") ⬆️ WARNING: Use of undeclared Var cljs.user/String at line 1 Right hand side of instanceof is not an object

bherrmann15:03:25

what is the namespace for String?

mfikes15:03:30

An alternative answer: Use (string? "ff")

mfikes15:03:54

You can check to see how ClojureScript implements string?

bherrmann15:03:59

yea, thats what I did.

bherrmann15:03:47

(def ^{:arglists '([x]) :doc "Return true if x is a String" :added "1.0" :static true} string? (fn ^:static string? [x] (instance? String x)))

bherrmann15:03:11

and that seems to show (instance? String x)

mfikes15:03:31

That's Clojure

mfikes15:03:55

cljs.user=> (source string?)
(defn ^boolean string?
  "Returns true if x is a JavaScript string."
  [x]
  (goog/isString x))

bherrmann15:03:02

so I didnt expect to land in clojure