Is there any documentation of how joker reads external sources ?
This is the best doc I know currently for it
Thanks
there is also https://github.com/candid82/joker/blob/master/docs/misc/lib-loader.md. In general this area is not well documented mostly because it's not yet used much. This will need to change if the adoption grows. Confession: I have not written a single multi file Joker program yet (outside of test examples).
Useful to know youβre not considering the current working directory.
FWIW, I've been using joker a ton to do scripting and infrastructure type stuff alongside bigger clojure projects. AWS, Vault, Kubernetes and many others have json apis that I find are pretty straight forward to interact with. I'll typically make a simple utility lib that wraps the api calls and appreciate json conversions (and possibly credentials) -- then share this code amongst many scripts that either run as cron jobs ore one offs. It's been a huge increase to efficiently because I can quickly ship the joker file and joker binary to remote nodes and run them without the ceremony of a full project.clj / uberjar and what not. If there's any issues I can edit right there and re-run. It's one of the best infrastructure management scripting experiences that I've had (which is usually in bash). Having http / yaml / json built in is a game changer. It's a digression, but the point was the wrapper / utility lib gets shared across the other sctipts
If you have a microservice style architecture -- the ns-sources allow the individual projects to share (versioned) libs
Could you clarify what you mean by "external sources" (if not also "read")?
I mean there is a mention of ns-sources
. Where is this documented?
Also, if you have a project with multiple namespaces, how should you start it and how are the namespaces loaded relatively to each other?
And is there a notion of a classpath or not at all? I guess these are 3 questions π
Do you know about (doc joker.core/*classpath*)
? I added that stuff myself awhile back, but haven't kept close track of just how newer stuff (like ns-sources
) works or interacts with it.
And I agree, Joker should (if it doesn't already) have a good overview doc of how to use these facilities and how to organize one's external (3rd-party) libraries!
Maybe this isn't used a lot?
It seems interest in using such facilities might be slowly increasing, and that might happen going forward as Joker continues to improve.
Even if somebody just provided an overview of, or recipe for, how they used these features to solve their particular situation, that could be a good starting-point for others.
I've tried to keep a list (some of which is in my head) of related matters so I might be better poised to use this myself and do it right the first time, and/or document it for others.