unrepl

discussing specification of an edn-based repl and its implementations.
richiardiandrea 2017-07-25T10:53:04.491376Z

just to give a bit of context around why I would use compliment for completions: https://github.com/alexander-yakushev/compliment/wiki/Examples

pesterhazy 2017-07-25T10:55:47.540456Z

@richiardiandrea is it possible to squish all of it into a blob?

dominicm 2017-07-25T10:56:53.560838Z

All clojure can go in a blob right? something something the network something something lisp machines

richiardiandrea 2017-07-25T10:57:32.572591Z

probably yes, no deps there https://github.com/alexander-yakushev/compliment/blob/master/project.clj

pesterhazy 2017-07-25T10:57:36.573896Z

the compilment project's project.clj is very encouraging - it's essential empty

pesterhazy 2017-07-25T10:57:40.574801Z

jinx

richiardiandrea 2017-07-25T10:57:44.576187Z

lol

richiardiandrea 2017-07-25T10:58:23.587908Z

we should probably think about a lein/boot little thing to create blobs 😄

richiardiandrea 2017-07-25T10:59:16.603985Z

I did something back in the days for collecting source files for bootstrapped cljs: https://github.com/Lambda-X/boot-pack-source

pesterhazy 2017-07-25T10:59:25.606860Z

there already is https://github.com/cgrand/unrepl/blob/master/tasks/leiningen/unrepl_make_blob.clj

richiardiandrea 2017-07-25T10:59:26.607334Z

do not if it can work, will try for sure

richiardiandrea 2017-07-25T11:00:25.626206Z

well this does resolution and filtering of source files: https://github.com/Lambda-X/boot-pack-source/blob/master/src/replumb/boot_pack_source.clj#L136

pesterhazy 2017-07-25T11:01:26.645492Z

we also need gensym'ed namespaces for isoluation

richiardiandrea 2017-07-25T11:01:48.652027Z

yeah...that is true

richiardiandrea 2017-07-25T11:02:54.671944Z

I wonder if https://github.com/typedclojure/mranderson code can come in handy as well

richiardiandrea 2017-07-25T13:40:27.252933Z

The more I think of it, the more I like the idea of a boot-unrepl lib containg basically only the adapted code from the Christoper above that concatenates the blob, it would be also a good idea so that we can test how slow the bootstrap of complicated things is. I hope I will have some time soon.

richiardiandrea 2017-07-25T13:41:04.273393Z

Also the gensym thing can be actually a problem in case of compliment: we cannot then use the gensym-ed namespace from tooling

richiardiandrea 2017-07-25T13:42:13.310941Z

The blob could do some self-check in order to be able to detect if the namespace is already required server side...and avoid doing the eval if positive

pesterhazy 2017-07-25T14:13:42.426474Z

that'd be cool, though what about different concurrent blobs included at the same time?

pesterhazy 2017-07-25T14:14:04.439911Z

unrepl.el using v1, unrepl.vim using v2

dominicm 2017-07-25T14:16:22.525576Z

an unrepl extension could provide access to the compliment api by providing forms in the hello

dominicm 2017-07-25T14:22:48.769615Z

essentially wrap the blob'ed api in something consistent for that particular repl session

richiardiandrea 2017-07-25T14:48:01.741856Z

cool idea too, it complicates things a bit because now you need to wrap eval so that it reads namespace mappings from the state (if I understand the idea correctly)

dominicm 2017-07-25T14:50:27.836478Z

Not sure how clients are looking. But I was thinking you would reach into the :unrepl/hello to find the functions you want from compliment.

dominicm 2017-07-25T14:50:57.856362Z

with message templates https://github.com/cgrand/unrepl#message-templates

richiardiandrea 2017-07-25T15:02:08.301707Z

in any case yes, it looks like the extension model needs to be per session if we want to send different blobs per client, did not think about that

cgrand 2017-07-25T20:19:57.561176Z

Things to note about the current implementation: • gensyms are static • they should not be random but content-dependent so as to reflect a whole configuration.

cgrand 2017-07-25T20:20:05.565302Z

So more hashsyms than gensyms.