This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-13
Channels
- # aleph (15)
- # announcements (4)
- # babashka (36)
- # babashka-sci-dev (1)
- # beginners (15)
- # biff (2)
- # calva (15)
- # cider (3)
- # clj-kondo (8)
- # clojure (149)
- # clojure-europe (14)
- # clojure-norway (13)
- # clojure-switzerland (1)
- # clojure-uk (1)
- # clojurescript (21)
- # community-development (5)
- # cursive (20)
- # data-science (2)
- # datomic (7)
- # duct (5)
- # emacs (19)
- # etaoin (3)
- # events (2)
- # fulcro (11)
- # introduce-yourself (2)
- # jobs (4)
- # jobs-discuss (19)
- # joyride (1)
- # leiningen (11)
- # malli (7)
- # membrane (131)
- # nbb (12)
- # nginx (1)
- # off-topic (33)
- # pathom (8)
- # polylith (28)
- # re-frame (8)
- # sci (7)
- # shadow-cljs (225)
- # spacemacs (10)
- # specter (1)
- # vim (10)
- # xtdb (8)
Haven’t tested it yet, but saw you made a repo: https://github.com/borkdude/hato-native . Does that mean I cannot use the original hato directly with babashka? @borkdude
Doesn't seem to be there on https://github.com/babashka/babashka/blob/master/doc/projects.md#projects and the recommendation is https://github.com/schmee/java-http-clj I think.
Nice!
The hato native project was just a way to check if it ran with Graal. It does but it yields a big binary. But now we include java net http so it runs from source
Another question, possible to run jsonista on bb? It complains``: Unable to resolve classname: jsonista.jackson.DateSerializer```
Is it possible to get a list of supported packages that can be imported from babashka script?
I was wondering that if I'll start using it I could avoid going into docs and finding how to import what I want to.
Maybe CLI command could do that?
Something like bb --list-included-packages
What do you think? This could be accompanied by a link to the docs then :thinking_face:
What about:
bb -e '(run! prn (remove #(str/includes? % "impl") (map ns-name (all-ns))))'
Nice. It gave me the packages. But can we have a short cli switch? I can't remember this a command. Then you could have it as part of the CLI help.
Actually all-ns
is already useful but I'll probably forget it.
It's not that I need it but I was just wondering.
It ties into this issue: https://github.com/babashka/babashka/issues/1156 I think bb could print a list of libraries it includes with links to their respective doc pages
There is also this page: https://book.babashka.org/_/libraries.html But it may not be up to date. If you spot missing libs in there, please let me know
Links to doc pages are findable from the library's package name. But you could then get bb
version and find the possible imports this way too.
Yeah, kind of low priority feature.
I bet you can write a script that goes through the deps information, finds the version control link and then spits out an HTML page :)
also, I want to make something like https://www.clojure-toolbox.com/ but for babashka. The clojure toolbox website code is already ported to babashka here: https://github.com/borkdude/clojure-toolbox.com-babashka We should just fill it with content
Clojars sometimes links to sources. I don't know if they have an API but it's probably easy to create a client-side script that would try to get the link for a JAR and open it. But then that probably can't be included into babashka.
I don't know if the JARs themselves carry the information where the source is located at. At least I don't add this to my local uberjars that I build. So then it either has to be a hand-maintained list or it has to come from a third party such as Clojars (because authors of the libraries put the links there and you don't need to maintain a list yourself). So yes, you could make a crawler but I'm not in a position where I know that you can crawl Clojars. You could do it but I don't know, maybe they could give you an API or something. This way your script could download the source links and make a webpage for you. :thinking_face: OR if you build the libraries yourself you could have a buildscript that includes the URL of the source.
I don't know what we're talking about anymore 😄
I don't think that I want to compile that webpage myself if I freshly installed bb
from an older repository just to find that I can't use malli
for this specific version of babashka :thinking_face:
Here is an example for clj-kondo:
$ bb -e "(babashka.deps/add-deps '{:deps {clj-kondo/clj-kondo {:mvn/version \"2022.06.22\"}}})" -e "(require '[ :as io])" -e '(def xml (slurp (io/resource "META-INF/maven/clj-kondo/clj-kondo/pom.xml")))' -e '(second (re-find #"<url>(.*)</url>" xml))'
""
so given print-deps output, you could combine it with the above to get to the github repo
Nice. So that would solve your issue with the unknown links. This one: https://github.com/babashka/babashka/issues/1156 At least it could solve it temporarily. You could hardcode this command into CLI and then run it for all found JARs :thinking_face:
For a built-in one I would just curate the content myself manually. Just some ideas for a hack script in user space ;)
Dear hackers!
I've put up https://babashka.org/toolbox/ now which is a direct port of clojure toolbox!
All we need now is PRs that take info from this page: https://github.com/babashka/babashka/blob/master/doc/projects.md
to here: https://github.com/babashka/toolbox, before a more public announcement will be made.
If you see anything worth mentioning on projects.md or elsewhere, PR away!