Fork me on GitHub
#cider
<
2019-02-07
>
Chase19:02:36

It seems my tweaking and pruning of my cider config didn't help my locking up emacs completely problem. This time I eval'ed the following function:

(defn get-eligible-user-ids-3
  [users]
  (->> users
       (filter (fn [user] (>= (get user :age) 21)))
       (map (fn [user] (get user :id)))
       (into [])))
with C-c C-e. Why do you think this would do anything to lock it up?

Chase19:02:31

now before that, I had failed to put in the (into []) portion and got a real, long nasty spec kind of error message. Could that have made emacs trip over something?

dpsutton19:02:59

how many users were it? how big is a single user. You're (presumably) running into long lines problem

dpsutton19:02:06

which just makes emacs crawl

Chase19:02:41

super short if you ask me:

(def users
  [{:id 1 :age 31
    :first-name "Daniel" :last-name "King"}
   {:id 2 :age 16
    :first-name "Angel" :last-name "Herrera"}
   {:id 3 :age 31
    :first-name "Jane" :last-name "Smith"}
   {:id 4 :age 20
    :first-name "Ruth" :last-name "Langley"}]) 

Chase19:02:00

but i didn't even have it print. I just eval'ed the function

Chase20:02:09

the error message I got before that was brutal though. Super long with spec alpha things in there. I wish I could recreate because maybe that was something.

dpsutton20:02:28

yeah. hit , (comma) and clear your repl

Chase20:02:30

It seems it locks after I do something really dumb and then try to go back to normal behavior. I'm wondering if I need to be clearing stuff

dpsutton20:02:33

long lines just make the entire buffer slow

Chase20:02:37

I keep forgetting you telling me that!

Chase20:02:07

, clear then when something really ugly happens?

dpsutton20:02:06

not following

Chase20:02:58

I was just trying to reiterate your instructions. If I get a bad ugly long repl message or anything of the sort, clear my repl with , clear and hope I don't get locked again

dpsutton20:02:26

i thought you meant something ugly happened when you tried to clear the repl

Chase20:02:28

thank you. I'm kind of concerned I keep experiencing this while others aren't. All I'm trying to do is solve tutorial exercises and such but I must be doing some really dumb mistakes that others don't encounter

Chase20:02:23

or if repl messages are getting too much for emacs to handle wouldn't we need to look into containing those messages so they aren't long lines?

dpsutton20:02:08

i don't know. i've never felt this amount of pain before

dpsutton20:02:12

i clear things often though

Chase20:02:49

fair enough. I'll stop whining! hahaha. clear the repl doesn't sound like a bad solution. especially when my crazy brain is going more drastic like "do i need to leave emacs?!" silly stuff.

futuro20:02:08

I used to have an issue where my repo would cause Emacs to lag/freeze, and it seemed to happen around the 4000 lines mark.

futuro20:02:38

This was a while ago, so the specific limits escape me, but the resolution was to clear the repo buffer as well.

futuro20:02:10

I have no idea why it happened, but since clearing the repo buffer fixed it, I presumed that font locking had something to do with it.

futuro20:02:18

This was with spacemacs.

dpsutton20:02:57

yes font locking can get quite slow

futuro20:02:00

It would happen unexpectedly, so evaling a defn for example, but only if I was over that rough line limit.

futuro20:02:18

I wish I knew exactly why it happened, and could figure out a better solution than “clear your repl often”, as I only did that as a matter of pragmatism.

futuro20:02:06

Oddly, font locking a file with 100k lines of pretty printed edn map worked fine.

futuro20:02:29

Having cider do the pretty printing inline, however, did not.

dpsutton20:02:16

correct. i guess edn has no locals so its easier? its all just keywords