unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2018-01-12T14:12:00.000153Z

I’ve (re)watched Stu H “repl/sidecars” talk and I’m wondering to which extent using main/repl is advisable.

cgrand 2018-01-12T14:14:04.000139Z

It’s ok for a quick personal hack but it doesn’t compose well.

volrath 2018-01-12T14:27:29.000196Z

@cgrand not sure if on the same topic, but moving to an own unrepl/repl implementation may be beneficial for cljs as well, since there's no main/repl template afaik -- it'd be great if we could duplicate some code there

cgrand 2018-01-12T14:31:15.000169Z

@volrath I was thinking about the idea of people shipping specialized repl tools based on repl upgrade (`main/repl` being used most of the time): this approach doesn’t compose.

cgrand 2018-01-12T14:31:49.000334Z

As for having a main/repl equivalent to share code with cljs, I’m not sure

cgrand 2018-01-12T14:32:40.000220Z

the blocking/async chasm makes it difficult to share code that low

volrath 2018-01-12T14:34:33.000043Z

I think some of the async mess could be abstracted away, but it's only a hunch, I do not have a well formed understanding of all the details of cljs repl yet

volrath 2018-01-12T14:34:58.000257Z

re. specialized repl tools, could you give an example?

cgrand 2018-01-12T14:35:19.000358Z

the trick is that here is not such a thing as “the cljs repl” 🙂

volrath 2018-01-12T14:35:50.000309Z

^right...

cgrand 2018-01-12T14:37:05.000402Z

re “specialized repl tools”, well you can’t have one tool that upgrades to have a pretty printer, one to have nicer exceptions etc.

cgrand 2018-01-12T14:37:28.000332Z

all you can do is provide things and let the user build its own repl from this

volrath 2018-01-12T14:39:45.000140Z

got it..

volrath 2018-01-12T14:41:00.000699Z

definitely main/repl could become a roadblock soon when moving in that direction

volrath 2018-01-12T14:42:16.000634Z

what I wonder right now is if it's really useful to go that way, instead of making a dictatorship. I mean, I'm all in favor of extensibility always, but I don't know to which point people would really build this type of features themselves

cgrand 2018-01-12T14:47:41.000081Z

I 👍 I think his premise his wrong at least twice: • technically upgrading the repl doesn’t scale below 1 tool, • socially that clojure doesn’t need tools because you can just hack them on the spot

volrath 2018-01-12T14:52:27.000615Z

agree

ghadi 2018-01-12T15:36:40.000165Z

I tried SPIRAL for the first time yesterday. So cool

ghadi 2018-01-12T15:36:47.000424Z

first thing I did was (range)

ghadi 2018-01-12T15:37:35.000908Z

thanks everyone but especially @cgrand & @volrath

👍 1
cgrand 2018-01-12T15:42:57.000073Z

@ghadi be brave, try (iterate repeat (range))

cgrand 2018-01-12T15:49:50.000398Z

it’s a bad case: assuming defaults (max length 10 and max depth 8), first value has one elision, second value has 11 elisions, third value has 111 elisions etc.

cgrand 2018-01-12T15:50:28.000447Z

it’s going to send the GC trashing

cgrand 2018-01-12T15:51:41.000101Z

In addition to depth and length, an upper bound on number of collections should be considered

volrath 2018-01-12T16:40:09.000391Z

all feedback you can give me would be super appreciated 🙂

cgrand 2018-01-12T22:34:58.000358Z

@volrath a while back I mentioned I wasn’t happy with how the unrepl protocol handles further upgrades.

cgrand 2018-01-12T22:41:41.000278Z

Currently on upgrade a :bye is emitted and we revert to a plain repl while providing many ways to still get messages on another connection. I believe it’s both complex and wrong.

cgrand 2018-01-12T22:44:40.000447Z

A plain repl doesn’t allow to downgrade to a pair of bytes streams; you are stuck with chars streams.

cgrand 2018-01-12T22:47:41.000379Z

Likewise it shouldn’t be able to escape from stream of unrepl messages (for output).