Yeah, without middleware it works, but it has just some basic eval functionality.
A bit more things can be implemented to work without middleware, if needed (in the early days CIDER was just evaluating hardcoded clojure forms that did some of the ops that were transferred to middleware). That was limiting in many ways, but it gets the basic things done.
I agree that self-hosted nREPL server would be something ideal, and this was a big part of the reason I volunteered to work on the nREPl transition out of clojure-contrib. Now it’s perfectly possible for someone to make this happen.
And, of course, if people are willing to just add orchard
to their projects, the fallback mode would be much simpler than it was before.
This one is not well suited to decoding streams, like from the network.
There's only one I've found that does that, and it can't handle negative numbers.
It can’t handle negative numbers? That’s really curious.
does the nrepl protocol use negative numbers? seems like a pretty big defect for such a popular lib
@dominicm what stream decoding bencode library was this?
@richiardiandrea bencode is used to serialize all nREPL output/input, so that could include negative numbers from user input, like (* 20 -1)
There's commonly quite a few subtle bugs where Unicode isn't supported properly and other such things.
Is that a problem with bencode as a standard, or just implementations?
from the bittorrent spec: > Integers are represented by an 'i' followed by the number in base 10 followed by an 'e'. For example i3e corresponds to 3 and i-3e corresponds to -3. Integers have no size limitation. i-0e is invalid. All encodings with a leading zero, such as i03e, are invalid, other than i0e, which of course corresponds to 0.
so in the case of negative numbers it is an impl problem
Ahh, fantastic; thanks for digging that up 😄
I wonder what it'd take for a pure cljs bencode library. All of the clojure libraries I've looked at are tied pretty tightly to the jvm, but multi-methods are a common pattern.