unrepl

discussing specification of an edn-based repl and its implementations.
2018-03-20T10:03:19.000173Z

cgrand 2018-03-20T10:03:59.000227Z

Ok, so (repeat (range)) now outputs:

((0 1 2 3 4 5 6 7 8 9 /1) (0 1 2 3 4 5 6 7 8 9 /2)
 (0 1 2 3 4 5 6 7 8 9 /3) (0 1 2 3 4 5 6 7 8 9 /4)
 (0 1 2 3 4 5 6 7 8 9 /5) (0 1 2 3 4 5 6 7 8 9 /6) (0 1 2 3 /7) /8)

cgrand 2018-03-20T10:04:19.000488Z

(`/N` are elisions)

cgrand 2018-03-21T08:15:28.000232Z

It’s a rendering thing on the client I was testing with

cgrand 2018-03-20T10:06:06.000452Z

Currently the “print budget” is set to (* print-length print-level). I thunk it’s a good thing to not introduce yet another explicit limit. However the function (here simple product) to determine the printing budget may be discussed.

cgrand 2018-03-20T10:06:25.000393Z

And it effectively solves printing datomic transactions

💯 1
2018-03-20T21:17:20.000182Z

2018-03-20T21:18:12.000336Z

Shading is not really a unrepl issue by itself. However every client should clearly think about it.

2018-03-20T21:20:22.000530Z

(AFAIC, I'd like to shade the unrepl blob as well, to 1) keep the shading scheme identical and 2) be able to provide access to a shaded unrepl.core if necessary.)

dominicm 2018-03-20T21:20:37.000159Z

Yeah. We've discussed this in the past. It's definitely something unrepl should be shouting at clients to do if they don't.

dominicm 2018-03-20T21:21:23.000631Z

> we can try to minimise our impact to the outer world and protect > ourselves from the sun by putting on proper SHAdes. However that only > moves the battle ground from the backend process to the client. lmao.

2018-03-20T21:22:02.000039Z

I think I'd might have gone a bit overboard. @cgrand was mumbling something about OSGi being reinvented. coughcough

2018-03-20T21:22:51.000355Z

Anyway, the compliment completion part is a small proof-of-concept that it actually works. On the fly. And without special props in the code itself.

2018-03-20T21:23:23.000342Z

And in VimL. evillaughter

dominicm 2018-03-20T21:31:28.000103Z

OSGi is an alliance. Oh boy.

dominicm 2018-03-20T21:36:39.000173Z

Can unrepl be an alliance? or an initiative?

dominicm 2018-03-20T21:38:38.000310Z

The unrepl alliance, rising against the empire of ???

dominicm 2018-03-20T21:38:41.000515Z

I'm onto something here.

cgrand 2018-03-20T21:41:04.000330Z

Look at the github organization: unrepl is an union!

dominicm 2018-03-20T21:47:40.000304Z

Maybe unrepl should be the empire.

cgrand 2018-03-20T22:40:44.000030Z

It’s going to be a middle war… :drum_with_drumsticks:

seancorfield 2018-03-20T22:55:56.000013Z

Does unrepl/unravel support some sort of symbol completion? Or just the inline docstring display as each symbol is typed in?

seancorfield 2018-03-20T22:56:53.000369Z

Hmm, the readme says yes, TAB should work. It wasn't for me. Goes off to try again

seancorfield 2018-03-20T22:58:10.000452Z

Ah, it doesn't work for aliased symbols it seems?

seancorfield 2018-03-20T23:03:24.000063Z

(re<TAB><TAB> ; shows available options
(req<TAB> ; auto-completes to require
(require '[clojure.java.jdbc :as jdbc])
(jdbc/qu<TAB><TAB> ; does not show any options
(clojure.java.jdbc/q<TAB><TAB> ; DOES show options
(clojure.java.jdbc/que<TAB><TAB> ; does show the only possible completion -- but does NOT auto-complete
Is this expected behavior?

cgrand 2018-03-20T23:07:16.000179Z

Looking at the source, unravel is moving to compliment. Try —flag compliment

cgrand 2018-03-20T23:08:33.000323Z

The legacy completion use find-ns on the namespace of the symbol: it explains there are no alias recognized

seancorfield 2018-03-20T23:10:32.000097Z

Ah, OK. --flag compliment doesn't seem to work at for me -- pressing TAB completely locks up unravel and I have to kill the process to get out of it.

seancorfield 2018-03-20T23:15:45.000333Z

I guess it doesn't auto-add compliment as a dependency so it breaks if that isn't already on your classpath?

cgrand 2018-03-20T23:21:32.000285Z

That reminds me of something that @pesterhazy said indeed you must be right.

seancorfield 2018-03-20T23:25:00.000344Z

Ah, there's a fix for compliment in master, since the last beta release! That's the problem.

seancorfield 2018-03-20T23:27:28.000094Z

Workaround: do (require 'compliment.core) in the REPL before trying to use completion! (as long as compliment is on the target's classpath)

pesterhazy 2018-03-20T23:29:32.000284Z

Yes master or 0.3.0-beta should work better

pesterhazy 2018-03-20T23:30:18.000005Z

You still need to add the jar to the classpath manually though

seancorfield 2018-03-20T23:30:18.000348Z

I'm on 0.3.0-beta.2 -- but that predates the require fix for compliment.

seancorfield 2018-03-20T23:31:38.000221Z

(! 798)-> unravel --flag compliment -c ~/.m2/repository/compliment/compliment/0.3.6/compliment-0.3.6.jar localhost 50505
Unravel 0.3.0-beta.2 connected to localhost:50505

Type ^O for full docs of symbol under cursor, ^D to quit,
^up and ^down to navigate history, ^C to interrupt current evaluation.
Enter #__help for help

user=> (require 'compliment.core) ; <=== workaround for 0.3.0-beta.2
nil
user=&gt; (require '[clojure.java.jdbc :as jdbc] '[<http://worldsingles.data.ws|worldsingles.data.ws> :as ws])
nil
user=&gt; (jdbc/query
jdbc/query  -------------
clojure.java.jdbc/query
user=&gt; (jdbc/query
Working as expected now!

seancorfield 2018-03-20T23:33:50.000280Z

I'm just starting to use unravel against the Socket REPL in one of our production servers (that does not have compliment on its classpath) -- it makes the process so much nicer! Thank you @pesterhazy (and @cgrand for the --flag hint).

pesterhazy 2018-03-20T23:47:06.000383Z

Glad you got it to work