babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Tomas Brejla 2021-03-26T01:13:28.199700Z

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

borkdude 2021-03-26T09:29:50.200400Z

nice!!

pez 2021-03-26T09:38:37.200600Z

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.

borkdude 2021-03-26T09:39:33.200900Z

The info op doesn't seem to be documented. https://nrepl.org/nrepl/ops.html @bozhidar should it be?

Tomas Brejla 2021-03-26T11:01:06.201100Z

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

bozhidar 2021-03-26T11:20:49.201500Z

@borkdude There's no info op in nREPL - that's in cider-nrepl. The nREPL op is named lookup.

borkdude 2021-03-26T11:22:37.201700Z

@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.

borkdude 2021-03-26T11:23:13.201900Z

Is lookup the same as info?

bozhidar 2021-03-26T11:23:40.202100Z

Everyone should use lookup if info is not available. As for the :info map - I agree it needs more documentation.

grazfather 2021-03-26T12:44:08.202400Z

I want to do this at work but there would be too much opposition 😢

onetom 2021-03-26T15:39:48.202600Z

@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✅
onetom 2021-03-26T15:45:56.203Z

@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.

grazfather 2021-03-26T15:47:12.203200Z

just bringing in a new language is always difficult. I use babashka for my own purposes

2021-03-26T16:20:05.203500Z

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.

borkdude 2021-03-26T16:32:22.203700Z

This is the case in many companies, it's always nice to have escapes

2021-03-26T18:09:24.204600Z

Anyone doing devops with babashka? especially anyone using kubernetes too?

borkdude 2021-03-26T19:02:12.205100Z

Maybe @heow since he mentioned kubernetes yesterday?

2021-03-26T19:07:02.205500Z

absolutely! ...and looking to hire!

2021-03-26T19:08:57.206Z

https://www.ata-uas.com/

2021-03-26T19:09:36.206400Z

the last link is ONE of the things we do

1😎