unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2018-03-19T15:12:49.000619Z

Current print limits are not enough

cgrand 2018-03-19T15:13:16.000647Z

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

cgrand 2018-03-19T15:15:17.000402Z

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

cgrand 2018-03-19T15:16:42.000563Z

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

pesterhazy 2018-03-19T15:26:27.000345Z

like an absolute maximum per print?

pesterhazy 2018-03-19T15:27:45.000730Z

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

cgrand 2018-03-19T15:28:05.000814Z

cough set! cough

pesterhazy 2018-03-19T15:29:29.000291Z

🙂

cgrand 2018-03-19T15:32:04.000011Z

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

cgrand 2018-03-19T15:33:07.000122Z

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

pesterhazy 2018-03-19T15:39:10.000654Z

oh yeah I remember having that problem too

pesterhazy 2018-03-19T15:39:41.000178Z

not with unrepl but before

cgrand 2018-03-19T15:46:08.000513Z

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

cgrand 2018-03-19T15:47:22.000451Z

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

pesterhazy 2018-03-19T15:48:20.000587Z

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

pesterhazy 2018-03-19T15:48:30.000789Z

although it should still close quotes, parentheses etc..

pesterhazy 2018-03-19T15:49:55.000391Z

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

cgrand 2018-03-19T15:49:59.000220Z

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

cgrand 2018-03-19T15:50:36.000045Z

we have a setting for string elision already

pesterhazy 2018-03-19T15:52:27.000732Z

right forgot about that

cgrand 2018-03-19T15:52:49.000938Z

but a super long symbol or keyword would do the trick

cgrand 2018-03-19T15:53:46.000458Z

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

gcast 2018-03-19T15:59:10.000413Z

hahaha

pesterhazy 2018-03-19T15:59:23.000133Z

🙂

2018-03-19T21:38:53.000088Z

2018-03-19T21:41:14.000132Z

Multiple shading units in effect.

2018-03-19T21:41:48.000023Z

Sunscreen just bumped up in SPF.

2018-03-19T21:54:10.000413Z

dominicm 2018-03-19T21:58:03.000537Z

@kotarak I think compliment is the maintained completion library

dominicm 2018-03-19T21:59:12.000247Z

Ownership was very recently transferred, so that may change

dominicm 2018-03-19T21:59:40.000505Z

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

2018-03-19T22:01:50.000514Z

One would assume that completion was solved years ago.

2018-03-19T22:02:12.000111Z

compliment seems to do a lot of things.

2018-03-19T22:02:27.000488Z

eg. sorting. Which is done again by asyncomplete.

2018-03-19T22:04:04.000217Z

It does also caching?

dominicm 2018-03-19T22:06:31.000439Z

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

2018-03-19T22:10:27.000422Z

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

dominicm 2018-03-19T22:32:14.000176Z

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

dominicm 2018-03-19T22:32:55.000282Z

The matching done by ncm and deoplete break that though.

2018-03-19T22:38:07.000122Z

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

2018-03-19T22:38:21.000276Z

That I already noticed.

dominicm 2018-03-19T22:43:15.000370Z

Asyncomplete forked from NCM, so no surprise

2018-03-19T23:18:50.000285Z

2018-03-19T23:19:25.000138Z

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