Fork me on GitHub
#clojurescript
<
2023-10-27
>
pmros07:10:47

I cant remember a cli tool for passing shell output to clojurescript code (something like nbb). Can you help me?

p-himik08:10:33

Sounds rather vague. What exactly do you need to achieve?

1
pmros08:10:04

I got it! ls | bb -i '(filter fs/directory? *input*)'

p-himik08:10:09

I'd say it's Clojure code though, not ClojureScript.

ingesol19:10:54

Is it possible for a macro to read the full namespace and name of an arg? like this:

(ns some.ns)

(defn some-fn [])

;=================
  
(ns some-other.ns
  (:require [some.ns :as s])

(defmacro fn->kw [f] :the-impl)

(fn->kw s/some-fn) ;; ==> :some.ns/some-fn

p-himik19:10:19

And then (select-keys (meta the-resolved-var) [:name :ns]).

thheller19:10:30

in cljs thats cljs.analyzer.api/resolve taking the macro &env and symbol as args. IIRC that also just returns a map, so no meta

p-himik19:10:47

Ah, right. Thought we were in #C03S1KBA2.

ingesol20:10:49

thanks folks, that works!