@mfikes @anmonteiro do you folk think that we are ready to add something like find-var
in self-host implementations? I don't see why not but maybe I am missing something. In particular I was looking at porting cljs-tooling
to self-host and that's the only thing I am missing
@richiardiandrea I can't see how it wouldn't work. In fact, you might be able to use cljs.core/resolve
for now even without it.
cool thanks for the answer, it would be indeed cool to add
Planck also has a (slightly more dynamic) planck.core/resolve
if you need to support the case where the symbol isn't a compile-time constant.
yeah I think that's the case for completion
The implementation is trivial now that eval
is a thing:
(let [sym 'cljs.core/map] (eval `(~'var ~sym)))
wow that works also in lumo
now, just tried 😄
F yeah
ah ah!
(meta (let [sym 'cljs.core/filter] (eval `(~'var ~sym))))
{:ns cljs.core,
:name filter,
:file "cljs/core.cljs",
:end-column 13,
:top-fn {:variadic false,
:max-fixed-arity 2,
:method-params ([pred] [pred coll]),
:arglists ([pred] [pred coll]),
:arglists-meta (nil nil)},
:column 1,
:line 5099,
:end-line 5099,
:arglists ([pred] [pred coll]),
:doc "Returns a lazy sequence of the items in coll for which\n (pred item) returns true. pred must be free of side-effects.\n Returns a transducer when no collection is provided.",
:test nil}
ok, reminder here: https://github.com/anmonteiro/lumo/issues/397 thanks Mike!
I'm glad you didn't bowdlerize my speech 🙂
lol should I 😄
An F bomb every now and then is a good thing, as is juxt
New tagline for apropos clojure?
it was very genuine 😄
New word, nice. Sticking that one into my toolkit.
I think to match find-var
you need to check that the argument is a symbol?
but not a simple-symbol?
I also added one to Planck https://github.com/planck-repl/planck/issues/743
Support for Lumo has landed in doo
https://github.com/bensu/doo/commit/830f52b3620b24b8351503b6554dd03de1f317d8
wow, sorry for my ignorance, but I did not know about simple-symbol?
thanks
oh nice
on another note, I will be porting cljs-tooling
to self-host as well: https://github.com/clojure-emacs/cljs-tooling/pull/24
it has not been as bad as I thought it would be