Fork me on GitHub
#cider
<
2017-05-17
>
dpsutton05:05:53

saavik.unification> (time (def v (vrange 1000000)))
"Elapsed time: 71.227628 msecs"
#'saavik.unification/v
saavik.unification> 

dpsutton05:05:59

just timed it. it was fast

dpsutton05:05:16

make sure not to eval the `vrange 10000..) as this will print to the repl and that will get really nasty

dpsutton05:05:50

saavik.unification> (time (def v2 (vrange2 1000000))) "Elapsed time: 45.889161 msecs" #'saavik.unification/v2

stardiviner05:05:26

Weird? How to debug this issue?

dpsutton05:05:55

is it printing out a bunch of stuff to your repl?

stardiviner05:05:13

No, I ue (def v (vrange 1000000)).

stardiviner05:05:29

I have (set! *print-length* 20) in REPL.

dpsutton05:05:46

what does (time (def v2 (vrange2 1000000))) say?

stardiviner05:05:08

Both Emacs and Leiningen are running. Can't type in code.

dpsutton05:05:26

did you jack in or cider-connect?

stardiviner05:05:15

lein repl, then cider-connect.

stardiviner05:05:33

I pressed [C-c] in Lein repl, now typed your code.

dpsutton05:05:55

so what does it say in the lein repl?

stardiviner05:05:03

No responding.

dpsutton05:05:09

well that's a problem with lein then. i'm not sure what to say

dpsutton05:05:34

but we aren't touching CIDER, so it can't be a problem with that, if i'm understanding the situation correctly

stardiviner05:05:58

Well, Maybe I need to debug this http://deeper.Do you know know to debug this?

dpsutton05:05:14

i don't i'm sorry. maybe head to the #clojure channel

dpsutton05:05:25

i've got to get to sleep tonight. i'm sorry

stardiviner05:05:41

Ok, bye, thanks.

stardiviner08:05:25

I used to use CIDER's apropos to search, but don't know hot to specify the regexp pattern. Does anybody knows this? For example I want to apropos search string in function name and function docstring by regexp matching "first n". Then what should I type in CIDER doc apropos prompt?

tatut10:05:42

how can I automatically truncate a cider repl buffer when it gets too long?

tatut10:05:11

after a long running repl session, the buffer itself is becoming slow and I don’t really care about output that happened days ago

hans11:05:27

C-c M-o is what I use

xiongtx00:05:58

hans: You mean cider-repl-clear-output, C-u C-c C-o? By default, C-c M-o is cider-repl-switch-to-other

hans10:05:36

Oh, yes. C-c M-o was the default binding in an ancient cider release and I've come to grow accustomed to it:

(add-hook 'cider-repl-mode-hook
          '(lambda ()
            (define-key cider-repl-mode-map (kbd "C-c M-o") 'cider-repl-clear-buffer)))

tatut11:05:29

but there’s no setting to automatically truncate lines over some limit?

tatut11:05:37

like to automatically keep at most max 1000 lines

dpsutton12:05:24

@tatut i could swear i've seen code like that. let me look

tatut12:05:50

standard feature in comint buffers

tatut12:05:03

but I couldn’t find the same for cider repl

xiongtx00:05:37

tatut: CIDER does not use comint, it’s derived from SLIME’s custom REPL. https://github.com/slime/slime

dpsutton13:05:40

i was mistaken. it's not there.

dpsutton13:05:20

i think bbatsov has wanted more comint features for a while. and there's some inclination on his part to switch to a comint buffer but it would be a lot of work

bozhidar22:05:25

That’s in the past now.

bozhidar22:05:48

I decided I don’t want to use comint at all. You get some things for free, but you also get a lot of limitations.

bozhidar22:05:22

Implementing some output truncation feature is trivial anyways.

bozhidar22:05:59

We’ve mostly been suggesting the use of Clojure’s own truncation mechanisms, but if people want something CIDER specific - that’s an option.

xiongtx00:05:59

bozhidar: clj truncation applies to output for a particular expression; @tatut is talking about the REPL buffer specifically

bozhidar07:05:17

Yeah, I get this. Btw, it’s easy to have different value for Clojure’s truncation for the REPL and source buffers. We just haven’t implemented something like this.