This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-07
Channels
- # beginners (71)
- # boot (25)
- # cider (204)
- # clara (18)
- # cljs-dev (10)
- # cljsrn (64)
- # clojure (50)
- # clojure-dev (2)
- # clojure-dusseldorf (1)
- # clojure-india (5)
- # clojure-italy (1)
- # clojure-nl (21)
- # clojure-poland (65)
- # clojure-spec (41)
- # clojure-uk (10)
- # clojurescript (4)
- # core-async (5)
- # cursive (2)
- # datomic (17)
- # duct (8)
- # emacs (8)
- # fulcro (1)
- # graphql (21)
- # hoplon (2)
- # javascript (3)
- # lumo (25)
- # mount (5)
- # off-topic (5)
- # onyx (3)
- # portkey (6)
- # re-frame (15)
- # reagent (5)
- # rum (1)
- # shadow-cljs (198)
- # spacemacs (19)
- # specter (2)
@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 😄
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!
lol should I 😄
it was very genuine 😄
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