1 hour ago · 10 min read1954 words · Tech · hide · 0 comments

Last week nrepl.org got a makeover. The docs moved to docs.nrepl.org, and nrepl.org itself became a landing page that explains what nREPL is and how its protocol works, with “wire windows” showing real exchanges between a client and a server, as EDN or as the bencode that actually goes over the wire. Reading about a protocol only gets you so far, though, so the page now also has a “Try it” section with a real nREPL server running right in your browser. There’s one in this post as well! In the rest of it I’ll tell you how it came about, why it was harder than it looks, and how you can use the server behind it for your own projects. Here it is: user=> (+ 1 2) (println "Hello from nREPL!") (map inc (range 10)) (doc map) (range) interrupt show the messages Go ahead, evaluate something! Tick “show the messages” to see the requests and the responses going back and forth, and try (range) if you’re curious what happens to code that never finishes. Picking an approach An interactive nREPL…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.