Fork me on GitHub
#unrepl
<
2018-03-19
>
cgrand15:03:49

Current print limits are not enough

cgrand15:03:16

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

cgrand15:03:17

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

cgrand15:03:42

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

pesterhazy15:03:27

like an absolute maximum per print?

pesterhazy15:03:45

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

cgrand15:03:05

cough set! cough

cgrand15:03:04

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

cgrand15:03:07

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

pesterhazy15:03:10

oh yeah I remember having that problem too

pesterhazy15:03:41

not with unrepl but before

cgrand15:03:08

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

cgrand15:03:22

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

pesterhazy15:03:20

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

pesterhazy15:03:30

although it should still close quotes, parentheses etc..

pesterhazy15:03:55

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

cgrand15:03:59

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

cgrand15:03:36

we have a setting for string elision already

pesterhazy15:03:27

right forgot about that

cgrand15:03:49

but a super long symbol or keyword would do the trick

cgrand15:03:46

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

dominicm21:03:03

@U08KSP3CL I think compliment is the maintained completion library

dominicm21:03:12

Ownership was very recently transferred, so that may change

dominicm21:03:40

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

kotarak22:03:50

One would assume that completion was solved years ago.

kotarak22:03:12

compliment seems to do a lot of things.

kotarak22:03:27

eg. sorting. Which is done again by asyncomplete.

kotarak22:03:04

It does also caching?

dominicm22:03:31

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

kotarak22:03:27

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

dominicm22:03:14

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

dominicm22:03:55

The matching done by ncm and deoplete break that though.

kotarak22:03:07

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

kotarak22:03:21

That I already noticed.

dominicm22:03:15

Asyncomplete forked from NCM, so no surprise

kotarak23:03:25

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

kotarak21:03:14

Multiple shading units in effect.

kotarak21:03:48

Sunscreen just bumped up in SPF.