planck

Planck ClojureScript REPL
bherrmann 2017-03-23T14:59:02.251812Z

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

mfikes 2017-03-23T14:59:54.275750Z

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

mfikes 2017-03-23T15:00:50.303612Z

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

bherrmann 2017-03-23T15:02:52.360249Z

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

bherrmann 2017-03-23T15:03:22.374131Z

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

mfikes 2017-03-23T15:04:38.408043Z

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

bherrmann 2017-03-23T15:06:12.449718Z

quick question, since I have your brain.

bherrmann 2017-03-23T15:06:13.450326Z

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

bherrmann 2017-03-23T15:06:25.456064Z

what is the namespace for String?

mfikes 2017-03-23T15:09:30.538256Z

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

mfikes 2017-03-23T15:09:54.549199Z

You can check to see how ClojureScript implements string?

bherrmann 2017-03-23T15:09:59.551399Z

yea, thats what I did.

bherrmann 2017-03-23T15:11:47.599417Z

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

bherrmann 2017-03-23T15:12:11.610191Z

and that seems to show (instance? String x)

mfikes 2017-03-23T15:12:31.619043Z

That's Clojure

mfikes 2017-03-23T15:12:55.629950Z

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

bherrmann 2017-03-23T15:13:46.652360Z

well… started from http://cljs.info/cheatsheet/

bherrmann 2017-03-23T15:14:02.659271Z

so I didnt expect to land in clojure

bherrmann 2017-03-23T15:14:27.670465Z

Thanks,!!

mfikes 2017-03-23T15:15:25.696368Z

👍