Fork me on GitHub

We cut a first release of lambdaisland/nrepl-proxy, an nREPL introspection and debugging tool. It sits in between an nREPL client and server and prints out the messages that are going back and forth.

👍 5
👀 4
clojure-spin 10
🙏 3
gratitude 6

Example output:

nil ---> 1 clone {}
J <=== 1 #{:done} {:new-session "002914a8-db79-408d-807a-c5b3955ab6f9"}
nil ---> 2 clone {}
X <=== 2 #{:done} {:new-session "6a7e7b99-1b8e-4008-bbe5-ddddf46672a9"}
Y ---> 3 describe {}
Y <=== 3 #{:done} {:aux {:current-ns "user"}, :ops {:stdin {}, :add-middleware {}, :lookup {}, :swap-middleware {}, :sideloader-start {}, :ls-middleware {}, :close {}, :sideloader-provide {}, :load-file {}, :ls-sessions {}, :clone {}, :describe {}, :interrupt {}, :completions {}, :eval {}}, :versions {:clojure {:incremental 3, :major 1, :minor 10, :version-string "1.10.3"}, :java {:version-string "17"}, :nrepl {:incremental 0, :major 0, :minor 9, :version-string "0.9.0"}}}
Y ---> 4 eval {:nrepl.middleware.print/buffer-size 4096, :file "*cider-repl lambdaisland/nrepl-proxy:localhost:5424(clj)*", :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/print "cider.nrepl.pprint/pprint", :column 1, :line 10, :code "(clojure.core/apply clojure.core/require clojure.main/repl-requires)", :inhibit-cider-middleware "true", :nrepl.middleware.print/stream? "1", :nrepl.middleware.print/options {:right-margin 80}}
G ---> 5 eval {:code "(seq (.split (System/getProperty \"java.class.path\") \":\"))"}
Y <--- 4 #{:nrepl.middleware.print/error} #:nrepl.middleware.print{:error "Couldn't resolve print-var cider.nrepl.pprint/pprint"}
Y <--- 4 #{} {:value "nil"}
Y <--- 4 #{} {:ns "user"}
Y <=== 4 #{:done} {}


OMG. Yesterday I asked on the REPL-y repository if I could have a log like this from it. IIuc, you just solved it, in the most elegant and composable way. Thanks! 🙏 ❤️


It's been around for a year, @U051BLM8F just had to poke me to put out a release.

🙇 4

@U07FP7QJ0 This is very useful for reverse engineering the nREPL protocol or rather, implementations thereof -- thank you!


I've also mentioned nrepl-proxy on the nREPL site, so that people would find it easier

metal 2

The deployed jar file doesn't contain any .clj files:

$ ls_jar.clj /Users/borkdude/.m2/repository/com/lambdaisland/nrepl-proxy/0.1.4-alpha/nrepl-proxy-0.1.4-alpha.jar


@U07FP7QJ0 hence, I can't use it ;)


of course I could just use it as a git dep


hmmm let me see


a bug in our lambdaisland/open-source release tooling. How can it be!


It happens :)


ok, looks better


I'll try, thanks plexus


Now made a bb script which wraps nrepl proxy and you can install it using bbin:

bbin install 


oh excellent, I had not expected it to be babashka compatible


this is just a CLI wrapper which executes clojure


Awesome, @U04V15CAJ! As I just had a need to see the logs when using REPL-y, I think ”your editor” is a bit limiting in the usage string. But maybe it is still less mysterious than ”your nREPL client”...


There's a new #calva version in town. Rather a lot of changes since un update was last announced. Here's the latest: • Fix test running issue: For users of #joyride (and VS Code extension developers): This Calva build also has some new API. • There's an calva/editor.replace. function that will replace a range in a document with the new text you provide. See • A calva/pprint.prettyPrint function will take a string with Clojure code/data and return a string with a prettier version of the same code. See

calva 9
joyride 4
🎉 2
Daniel Jomphe14:09:26

Personally I fail to understand what is new for the end-user about formatting. We could already TAB before a form and have it reformatted. Is it just that we can, with this, use a different tool behind the scenes to reformat some selections/forms?


Thanks for asking this! It is subtle until you have the use case. 😃 In the issue linked above (all Calva Changelog items link to issues with the problem statement) there is a link to a question on Clojure Ask: It's about that the Calva formatter won't turn this:

[[1 2 3] [4 5 6] [7 8 9]]
Into this:
[[1 2 3]
 [4 5 6]
 [7 8 9]]
This is by design, but we still sometimes have the need to do this kind of formatting. That is what this new command does. (If your pretty printer settings are configured to break lines that short.) It's just a first version of the feature, it might turn a bit more versatile going forward. Does this answer your question?


I should have narrated the screencast... 😃

Daniel Jomphe14:09:16

Oh, I see, so this lays the ground work so we could e.g. cycle through different config sets for reformatting stuff differently. Let me then say: neat! :star-struck: 🙏:skin-tone-3: Thanks for this and the explanation!

Jakub Holý (HolyJak)11:09:21

awesome, I was missing formatting of data for a long time...


Cool! The key here is static formatting of data. We've been able to do it with the REPL all this time, but that isn't always a feasible option.

Felipe Reigosa14:09:54

Hey guys, MockMechanics (the sandbox mechanical building game/visual programming language) is now officially open source. It's written and scripted (optionally) in clojure. There is a visual way to program the things you build but using clojure as an scripting language is also an option, so you could build a robot hand like the one in the video (it's very easy, kind of building it with lego) and then use clojure to make it pick up objects and so on. There's also the channel where I post the things I build (and if you build something send it to me and I will consider adding it there).

💯 23
wow 17
clojure-spin 15
metal 12
gratitude 2
🆒 4
🔥 7

Thanks for open sourcing it! I remember thinking it was really cool when you first posted about it, and it looks even cooler now! 🎉


Thanks for open sourcing this, @U01JSRSH4V7! It is an amazing and generous gift!


This is the best advert for Clojure I've ever seen 👏 (the vibe, if not the language itself)


i love this community. people are doing SUCH COOL SHIT!


This is probably the coolest Clojure project I have ever seen. KUDOS

Felipe Reigosa19:09:55

Thanks @UBRV1HXPD, you are too kind.


Are the call for papers for the next Conj closed? I would just love to see you present this project and the ideas behind it.

💯 1
Felipe Reigosa21:09:59

@U0ETXRFEW Really? Thanks. Someone else asked me just the other day about the experience and history behind the project. I'm not sure if I would like to present it though, we'll see, if someone invites me to speak at something I'll think about it.


Here’s hoping someone invites you to speak!

😀 1

Quickdoc: Quick and minimal API doc generation for Clojure v0.1.1 • Skip vars defined in comments • Quickdoc ignores arglists metadata • Change toc var descriptions to be the first sentence of their doc Channel: #quickdoc

🎉 13
🙏 3

Nice! Thanks 🙂


This is great! But would it be possible to have the source inline in a <details> tag? I'd find that more convenient than having to hit github.


I think it could be done, but the source has to be extracted manually. Here is a snippet for that: I'm open to a PR for this