nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
pez 2020-04-12T11:38:02.017800Z

If I place a breakpoint on line 8 here: https://github.com/PEZ/clojurecism/blob/master/meetup/src/meetup.clj#L8 things lock up when I evaluate something that should hit it.

bozhidar 2020-04-12T14:00:19.018500Z

@pez Seems like a pretty ordinary function to me. Do you want me to test it in CIDER?

pez 2020-04-12T14:32:17.018800Z

Thatโ€™s what I did.

pez 2020-04-12T14:38:18.019100Z

Calva is bug compatible. ๐Ÿ˜ƒ

pez 2020-04-12T15:11:24.019500Z

Should I file this as an issue?

bozhidar 2020-04-12T15:14:29.020Z

@pez Yep, you should.

bozhidar 2020-04-12T15:15:59.021100Z

Actually, on second thought I think the problem is pretty simple. I assume you donโ€™t set any print lenth limit, but (range) is infinite and and when you try to realize it in the debugger nothing good can come out of this.

bozhidar 2020-04-12T15:16:40.021800Z

Iโ€™m wondering if it doesnโ€™t make sense to add some special handling for range and other forms like it that we know are going to cause a lockup without some additional configuration.

pez 2020-04-12T15:23:24.022900Z

Ah, I see. The thing is that the problem seemed a bit intermittent , so I never suspected the range thing, which we have discussed recently somewhere.

pez 2020-04-12T15:25:03.024100Z

Maybe the default should be that the implementing side sets some non-locking print length?

bozhidar 2020-04-12T15:31:35.025100Z

Well, thatโ€™s certainly an option, although I think itโ€™s better for editor clients to set some default, as this is more visible to the end users. Otherwise they might wonder where some limit is coming from.

bozhidar 2020-04-12T15:31:59.025300Z

> The thing is that the problem seemed a bit intermittent

bozhidar 2020-04-12T15:32:22.025900Z

What happens when you step over it and it doesnโ€™t blow up? Without some print limit I canโ€™t expect how this can work in some cases. ๐Ÿ™‚

pez 2020-04-12T15:37:39.026900Z

With implementing side, I meant editor clients. ๐Ÿ˜ƒ

bozhidar 2020-04-12T15:38:40.027300Z

๐Ÿ˜„

bozhidar 2020-04-12T15:39:05.027900Z

CIDER used to have separate print options configs for regular evaluation and for the debugger but at some point we folded those together .

bozhidar 2020-04-12T15:39:41.028100Z

(defcustom cider-print-options nil
  "A map of options that will be passed to `cider-print-fn'.
Here's an example for `pprint':

  '((\"length\" 50) (\"right-margin\" 70))"
  :type 'list
  :group 'cider
  :package-version '(cider . "0.21.0"))

bozhidar 2020-04-12T15:39:46.028400Z

You can add something like this.

bozhidar 2020-04-12T15:40:13.029100Z

Funny enough, when those options had defaults people were complaining there were defaults, and when we removed them - people were complaining there were no defaults. ๐Ÿ˜„

pez 2020-04-12T15:42:55.029500Z

I have had many moments like that with Calva!

pez 2020-04-12T15:43:26.030200Z

But generally, Calva comes with a lot of defaults, so people are more used to it there. ๐Ÿ˜ƒ

pez 2020-04-12T15:44:26.031400Z

The intermittent thing might have been my testing. Probably was my testing. There were a lot of branches and versions involved... I easily get confused.

pez 2020-04-12T15:47:38.033Z

@brandon.ringe maybe we should consider debug defaults like ^ that ^? I might not be the only one not realizing the implications of attempting to realize and infinite sequence. ๐Ÿ˜ƒ

bringe 2020-04-12T20:26:36.034600Z

Yeah, or even a default that is used everywhere, like Bozhidar said. This is related to the large result set issue I think. So a fix there could fix the debug issue perhaps

bringe 2020-04-12T20:27:03.035200Z

I think I saw this same issue being discussed elsewhere just the other day, in this slack workspace, but I don't remember where.

bringe 2020-04-12T20:27:22.035800Z

Related to infinite sequences and print length

pez 2020-04-12T20:27:38.036200Z

Same here. I know we discussed it somewhere, but where... a slack syndrome.

๐Ÿ˜„ 1
pez 2020-04-12T20:29:23.037700Z

But it makes sense to me to have a default of infinite generally, but for debug, something finite, and to have settings where both can be changed by the user.

bringe 2020-04-12T20:30:17.038Z

Yeah, more settings with reasonable defaults is usually better, imo

pez 2020-04-12T20:30:44.038300Z

Less settings is my usual goto. ๐Ÿ˜ƒ

pez 2020-04-12T20:31:51.038600Z

But this does come to mind. https://youtu.be/QHZ48AE3TOI

๐Ÿ˜† 1