lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
richiardiandrea 2018-05-07T19:06:46.000792Z

@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

mfikes 2018-05-07T19:09:42.000439Z

@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.

👍 1
richiardiandrea 2018-05-07T19:10:31.000295Z

cool thanks for the answer, it would be indeed cool to add

mfikes 2018-05-07T19:11:10.000040Z

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.

richiardiandrea 2018-05-07T19:12:07.000569Z

yeah I think that's the case for completion

mfikes 2018-05-07T19:13:18.000617Z

The implementation is trivial now that eval is a thing:

(let [sym 'cljs.core/map]  (eval `(~'var ~sym)))

🦜 1
richiardiandrea 2018-05-07T19:14:39.000186Z

wow that works also in lumo now, just tried 😄

mfikes 2018-05-07T19:14:46.000616Z

F yeah

richiardiandrea 2018-05-07T19:14:54.000042Z

ah ah!

richiardiandrea 2018-05-07T19:15:15.000432Z

(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}

richiardiandrea 2018-05-07T19:17:00.000002Z

ok, reminder here: https://github.com/anmonteiro/lumo/issues/397 thanks Mike!

mfikes 2018-05-07T19:17:43.000162Z

I'm glad you didn't bowdlerize my speech 🙂

richiardiandrea 2018-05-07T19:18:03.000060Z

lol should I 😄

mfikes 2018-05-07T19:18:31.000374Z

An F bomb every now and then is a good thing, as is juxt

2018-05-09T15:28:17.000232Z

New tagline for apropos clojure?

richiardiandrea 2018-05-07T19:18:58.000272Z

it was very genuine 😄

dominicm 2018-05-07T19:18:58.000660Z

New word, nice. Sticking that one into my toolkit.

mfikes 2018-05-07T19:22:37.000730Z

I think to match find-var you need to check that the argument is a symbol? but not a simple-symbol?

mfikes 2018-05-07T19:24:14.000113Z

I also added one to Planck https://github.com/planck-repl/planck/issues/743

mfikes 2018-05-07T19:26:40.000432Z

Support for Lumo has landed in doo https://github.com/bensu/doo/commit/830f52b3620b24b8351503b6554dd03de1f317d8

richiardiandrea 2018-05-07T19:27:00.000201Z

wow, sorry for my ignorance, but I did not know about simple-symbol?

richiardiandrea 2018-05-07T19:27:05.000267Z

thanks

richiardiandrea 2018-05-07T19:27:08.000251Z

oh nice

richiardiandrea 2018-05-07T19:27:51.000403Z

on another note, I will be porting cljs-tooling to self-host as well: https://github.com/clojure-emacs/cljs-tooling/pull/24

richiardiandrea 2018-05-07T19:28:01.000200Z

it has not been as bad as I thought it would be