It took me a while to figure out how to prepare a REPL-driven-development experience where I can make modifications to the code and see the result in a few seconds, but it's slowly starting to work. It's a bit buggy, but quite awesome. Developing scripts against bb --nrepl-server
with calva will be way better with parameter support and docs.
Found posible issues:
1. when you use (:require
with :as
aliasing of some namespace, function name completion of that namespace will get duplicated. Perhaps there's already some error present in current version in :complete
message handling or something similar?
2. if I use such aliasing, (such as s/includes?
where s is alias for clojure.string), this new info
functionality works fine in function name completions only when you use full namespace, not when you use the prefix form. If prefix is used, a bit weird combination of namespace and symbol seems to be passed in the message. In mentioned case namespace=clojure.string
and symbol=s/includes?
. I don't know what's the contract of this message, but this combination doesn't feel right (I'd expect that the symbol shouldn't include the s/
prefix). But as I said, I don't know the contract.
3. some of the functions seems to be missing their docs, such as <http://clojure.java.io/as-file|clojure.java.io/as-file>
, possibly because protocols are implemented in a bit different way in babashka?
It might also be possible to get some really basic information about java class methods (even without reflection), such as the types and positions of their parameters. But I'll have to look more into that.
Here's a short video of current status. Will need to clean that up a bit tomorrow or some following day and file a PR.
https://www.youtube.com/watch?v=MmZps7FvMSg
nice!!
Awesome. Don’t hesitate to ask me for help if there is anything on the VS Code end of that that you think I can shed some light on. The nrepl “contract” I don’t know as much about as one would think. It has mostly just worked for me and I’ve been reverse engineering CIDER when I wonder about how to do some particular thing.
The info op doesn't seem to be documented. https://nrepl.org/nrepl/ops.html @bozhidar should it be?
I was mostly trying to look up the structure and value types from cider-nrepl
's tests
https://github.com/clojure-emacs/cider-nrepl/blob/a7d24bc91028b78eda2f73a6d3f17c53495a84da/test/clj/cider/nrepl/middleware/info_test.clj#L85-L255
@borkdude There's no info
op in nREPL - that's in cider-nrepl
. The nREPL op is named lookup
.
@bozhidar should calva then use the lookup op if info is not available? and what should be in this map? > Returns :info A map of the symbol’s info. The doc is pretty handwavey here.
Is lookup the same as info?
Everyone should use lookup
if info
is not available. As for the :info
map - I agree it needs more documentation.
I want to do this at work but there would be too much opposition 😢
@jkrasnay this sounds like a niche problem caused by social/organizational issues ("We can’t install WLS2 on our work machines"). instead of silently trying to overcome a social issue with software workarounds (further complicating the existing software, what's already hyper complicated, i guess), i would try to attack this problem from a social angle and solve it that way. and if you can't change the organization around you, then u should probably start looking for other ventures, which value your lifetime more and let you solve more impactful problems. these kind of rigid companies deserve to wither away; better u don't help keeping them alive... :)
1✅@grazfather sounds like you are at the wrong place 🙂 what's your opposition's reasoning, btw? maybe there wouldn't be that much opposition, you are just assuming it? also, try it for yourself first on some of the work problems you have and maybe you will realize that some of the reluctance is well-founded... for example in the company i work for, we still have tension because of the different editors and the lack of consistent code-formatting tools for clojure.
just bringing in a new language is always difficult. I use babashka for my own purposes
I dunno, I think restricting admin access is just prudent security policy, not necessarily the sign of a rigid company that deserves to wither away.
This is the case in many companies, it's always nice to have escapes
Anyone doing devops with babashka? especially anyone using kubernetes too?
Maybe @heow since he mentioned kubernetes yesterday?
absolutely! ...and looking to hire!
https://www.linkedin.com/jobs/view/full-stack-engineer-at-ata-llc-2455575149
the last link is ONE of the things we do
1😎