lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
pesterhazy 2017-11-24T07:59:57.000249Z

@rauh, the new Map object has a .size property:

> var m = new Map(); m.set("a", "b"); m.size
1

pesterhazy 2017-11-24T08:07:27.000121Z

although that again is not mandated to be O(1) in the spec

pesterhazy 2017-11-24T08:23:40.000037Z

Oh, and there's even WeakMap!

2017-11-24T10:13:49.000156Z

Hi there. I'm just wondering if anyone has experience of using Lumo from Vim. Been going around in circles, and considering switching editor, which I really don't want to do, but... Anyway, any advice really appreciated.

mfikes 2017-11-24T16:03:48.000053Z

@pjullah It may be possible to first connect Vim to a Clojure REPL, and then from there connect that REPL to Lumo using Socket REPL and Tubular https://github.com/mfikes/tubular

mfikes 2017-11-24T16:04:51.000045Z

(Lumo supports Socket REPL via its -n / --socket-repl command line args.)

pesterhazy 2017-11-24T16:05:04.000106Z

you can also watch for changes using watchexec and just netcat everything into the socket repl

pesterhazy 2017-11-24T16:05:10.000469Z

it's a bit crude but works-ish

mfikes 2017-11-24T16:05:25.000188Z

There is also Unrepl, right?

pesterhazy 2017-11-24T16:05:36.000248Z

Unrepl doesn't work with clojurescript hosts... yet

pesterhazy 2017-11-24T16:05:55.000226Z

@cgrand did some work but it's not complete

2017-11-24T16:05:58.000247Z

Thanks @mfikes & @pesterhazy

2017-11-24T16:07:19.000038Z

All I'm trying to do is write a few utility scripts in cljs. Currently editing, file then dropping to cli to run it. Anything that allows me to eval in the editor would be great.

2017-11-24T16:08:41.000174Z

@mfikes just so I understand. 1. start Lumo repl server, 2. start boot repl 3. vim-fireplace -> boot repl 4. run tubular/repl -> Lumo

mfikes 2017-11-24T16:08:41.000394Z

Yeah, if you know how to fire up and interoperate with a Clojure REPL from vim, then Tubular can definitely then be used for that.

2017-11-24T16:09:14.000158Z

then everything I evaluate should get evaluated by Lumo socket repl?

mfikes 2017-11-24T16:09:32.000209Z

Yes, for step 1, I would start Lumo passing -n for a port, and -c to the folder containing your script source

mfikes 2017-11-24T16:10:46.000109Z

Then, once you have connected Tubular to Lumo, you can (require ...) on your script source namespace, (in-ns ...) to that namespace if you like, or make a change to the file, save it (require .... :reload). In other words, just like conventional Clojure dev.

mfikes 2017-11-24T16:11:14.000062Z

If vim sends a form to your REPL, it should be evaluated in Lumo

2017-11-24T16:11:29.000365Z

Nice. Thanks so much.

2017-11-24T16:12:00.000158Z

Will give it a try.

mfikes 2017-11-24T16:12:05.000086Z

Tubular is definitely not magic. See https://github.com/mfikes/tubular/blob/master/src/tubular/core.clj

mfikes 2017-11-24T16:13:15.000436Z

Just be sure to start the Clojure as a plain REPL, without nREPL involved.

2017-11-24T16:14:55.000208Z

ah

2017-11-24T16:16:10.000293Z

That might be a bit of a sticking point. The plugin that I'm using - which is de-facto way of doing things, vim-fireplace - uses nrepl.

2017-11-24T16:16:27.000178Z

de-facto from a vim perspective.

mfikes 2017-11-24T16:16:36.000289Z

Yeah, that is probably a show-stopper

2017-11-24T16:18:16.000190Z

Thank you though.