Fork me on GitHub
#unrepl
<
2018-03-20
>
cgrand10:03:59

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)

cgrand10:03:19

(`/N` are elisions)

kotarak06:03:33

Is /N a valid symbol?

kotarak06:03:31

According to the EDN spec it is explicitly forbidden. Why go away from the #unrepl/...?

cgrand08:03:28

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

cgrand10:03:06

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.

cgrand10:03:25

And it effectively solves printing datomic transactions

kotarak21:03:12

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

kotarak21:03:22

(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.)

dominicm21:03:37

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

dominicm21:03:23

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

kotarak21:03:02

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

kotarak21:03:51

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.

kotarak21:03:23

And in VimL. evillaughter

dominicm21:03:28

OSGi is an alliance. Oh boy.

dominicm21:03:39

Can unrepl be an alliance? or an initiative?

dominicm21:03:38

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

dominicm21:03:41

I'm onto something here.

cgrand21:03:04

Look at the github organization: unrepl is an union!

dominicm21:03:40

Maybe unrepl should be the empire.

cgrand22:03:44

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

seancorfield22:03:56

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

seancorfield22:03:53

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

seancorfield22:03:10

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

seancorfield23:03:24

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

cgrand23:03:16

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

cgrand23:03:33

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

seancorfield23:03:32

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.

seancorfield23:03:45

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

cgrand23:03:32

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

seancorfield23:03:00

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

seancorfield23:03:28

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

pesterhazy23:03:32

Yes master or 0.3.0-beta should work better

pesterhazy23:03:18

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

seancorfield23:03:18

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

seancorfield23:03:38

(! 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=> (require '[clojure.java.jdbc :as jdbc] '[ :as ws])
nil
user=> (jdbc/query
jdbc/query  -------------
clojure.java.jdbc/query
user=> (jdbc/query
Working as expected now!

seancorfield23:03:50

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

pesterhazy23:03:06

Glad you got it to work