Fork me on GitHub

@bozhidar: I have a this stupid limitation in Calva where I can only send one nRepl request at a time. This is because I have so far dodged dealing with message IDs. When looking at this now I took a look at the CIDER code and find this:

(defun nrepl--mark-id-completed (id)
  "Move ID from `nrepl-pending-requests' to `nrepl-completed-requests'.
It is safe to call this function multiple times on the same ID."
  ;; FIXME: This should go away eventually when we get rid of
  ;; pending-request hash table


Which got me very curious, since a hash table (well, map of course) was what I had in mind. 😃 Can I read somewhere on what you plan to do instead, or maybe just throw me some bones I can chew on?


interesting implementation. I don't really track open requests, I send them out, and if they never return then their callback never runs. If I want to timeout I'd probably need to do this though I guess.

👍 4

@pez I tracked them mostly to know what to interrupt. Haven’t touched this code in a while, so I don’t recall off the top of my head what did I have in mind as the evolution of the code.


Thanks, both of you. Appreciated!


Do you guys have to do something special for long/big responses from the nREPL server? I get bencode decode errors and am not sure where it is messed up.


What is long/big seems to vary, but evaluating something like (map #(str %) (range 10000)) usually renders me a decode error.


Which javascript library are you using? I've found bugs in quite a few now.


I would like to be using clojurescript libraries, but haven't found any that looks maintained or complete enough. So, yes, using js libraries. bencoder and Buffer are the relevant ones here. I'm actually using the npm Buffer, even though there is one built in to node (which I only realized earlier today).