Fork me on GitHub
#joker
<
2019-12-03
>
borkdude17:12:18

Is there any documentation of how joker reads external sources ?

jcburley19:12:49

Could you clarify what you mean by "external sources" (if not also "read")?

borkdude21:12:24

I mean there is a mention of ns-sources. Where is this documented?

πŸ‘ 4
borkdude21:12:58

Also, if you have a project with multiple namespaces, how should you start it and how are the namespaces loaded relatively to each other?

πŸ‘ 4
borkdude21:12:38

And is there a notion of a classpath or not at all? I guess these are 3 questions πŸ˜‰

πŸ‘ 4
jcburley21:12:14

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.

jcburley21:12:52

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!

borkdude21:12:14

Maybe this isn't used a lot?

jcburley21:12:20

It seems interest in using such facilities might be slowly increasing, and that might happen going forward as Joker continues to improve.

jcburley21:12:12

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.

jcburley21:12:09

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.

didibus16:12:02

This is the best doc I know currently for it

Candid21:12:14

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

borkdude22:12:21

Useful to know you’re not considering the current working directory.

Charles11:12:51

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

πŸ‘ 8
Charles11:12:21

If you have a microservice style architecture -- the ns-sources allow the individual projects to share (versioned) libs

πŸ‘ 4