unrepl 2018-03-19

Current print limits are not enough

That’s something I had on my mind to the point I thought I implemented it.

10-wide, 7-deep by default is still huge: if one prints a bomb (a tree with a branching factor of 10) it yields 10^7 nodes without a single elision....

There should be a limit on the number of values printed, no?

like an absolute maximum per print?

is it even possible to have a global max, given that print is implemented recursively?

cough set! cough

or you can be pure and gives each recursive call its allowance (which will be dubdivided etc.)

The actual problem is that @gcast reports hanging all clients with the return value of datomic/transact.

oh yeah I remember having that problem too

not with unrepl but before

Rather than sprinkling (set! bottle-of-beers (dec bottle-of-beers)) everywhere is to use the output stream

once more than N chars have been printed, elide everything else

I think that's a good "last resort" thing

although it should still close quotes, parentheses etc..

it would still crash on super-long strings...

sure: it’s not that the output stram would refuse printing but it would set a flag (that the printer would check in the same way it checks other limits) before recursing

we have a setting for string elision already

right forgot about that

but a super long symbol or keyword would do the trick

draws a line in the sand

(keyword (apply str (repeat 1e6 "unrepl0wn3d!")))

@kotarak I think compliment is the maintained completion library

Ownership was very recently transferred, so that may change

@kotarak But compliment is what cider uses, all very well tested

One would assume that completion was solved years ago.

compliment seems to do a lot of things.

eg. sorting. Which is done again by asyncomplete.

It does also caching?

It does superior sorting in my opinion. It caches things to make them faster for subsequent calls.

I hope one can turn off asyncomplete sorting. I haven't investigated that, yet.

I really hate that I haven't been able to turn it off for deoplete and ncm. Compliment does nice stuff like j.u.d => java.util.Date

The matching done by ncm and deoplete break that though.

Yeah. VimClojure did that too. And doesn't work with asyncomplete neither.

That I already noticed.

Asyncomplete forked from NCM, so no surprise

@dominicm There you go. Not well tested. Late night commit....

Multiple shading units in effect.

Sunscreen just bumped up in SPF.