deps-new

Chip 2023-09-24T19:29:44.577059Z

I’m going through https://youtu.be/gIoadGfm5T8?si=5poCMJBFPKaPO8KH&t=697 (thank you again for making it). I’m trying to use the clojure -A functionality instead of the clojure -X in the video. Is that appropriate? Also, is this seemingly non-idempotent behavior expected?

% clojure -Ttools install-latest :lib io.github.seahcorfield/deps-new :as new
Cloning: 
Downloading: io/github/seahcorfield/deps-new/maven-metadata.xml from datomic-cloud
new: Did not find versions for io.github.seahcorfield/deps-new
% clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
new: Installed io.github.seancorfield/deps-new v0.5.2 {:git/tag "v0.5.2", :git/sha "253f32a"}
I’m pretty sure I ran the same command.

practicalli-johnny 2023-09-24T19:56:00.681139Z

My guess is a newer version of the Clojure CLI tool is required, to support the install-latest version

Chip 2023-09-24T19:56:46.323659Z

Ah. That makes sense. Thank you.

seancorfield 2023-09-24T20:28:26.526919Z

clojure -X means eXecute a Clojure function (and pass the EDN arguments from the command-line as a single hash map) • clojure -M means run the Main function (`clojure.main`) and pass all the command-line arguments as a sequence of strings • clojure -T means use a Tool: which means without the context of the project -- either a named tool -Tname that was installed via -Ttools install or an alias-based tools -T:my-tool where :my-tool is in your :aliases (either in your project deps.edn or your user deps.edn) • clojure -A is intended to mean "start a REPL" (that it still runs clojure.main right now is a legacy artifact and will go away at some point). Does that help @two.stewards?

seancorfield 2023-09-24T20:29:32.597349Z

So -A and -M are "similar" right now (both go through clojure.main), and -X and -T are "similar" (both invoke a Clojure function with a single hash map as its argument).

Chip 2023-09-24T20:36:14.002799Z

That helps, Sean. Thank you. I’m not sure why it took me so long to run clojure --help. Your words put meat on the bones from that output. Thanks again for the video. The REPL really is a different world.

seancorfield 2023-09-24T20:37:00.720679Z

If you have any Qs about anything in that video, hit me up any time.

1
seancorfield 2023-09-24T20:38:02.612559Z

But it's how I work all the time: jacked-in to a REPL in the background, eval'ing code continuously as I go along, including running tests from the editor via the REPL. Even with our 200 subproject, 140k line codebase at work 🙂

Chip 2023-09-24T20:38:49.632909Z

That you jack-in to production systems is mind blowing. I think Biff is setup that way.

seancorfield 2023-09-24T20:38:52.879209Z

(I often work for quite a while without even saving code, since I can eval a top-level form without saving the file!)

Chip 2023-09-24T20:39:42.793079Z

Watching you guys is like watching trapeze artists

seancorfield 2023-09-24T20:40:14.969989Z

Yeah, I have a Joyride script that starts an ssh tunnel to QA or production and connects to an nREPL server running there (plus a Portal server), so I can have the same edit/eval experience against QA or production as I have locally (mostly -- I don't have CIDER middleware enabled on QA/production, just a bare nREPL).

seancorfield 2023-09-24T20:40:52.361559Z

(Portal is a fairly "heavy" dependency so I only have that in one app on QA/production)

Chip 2023-09-24T20:41:48.779579Z

🎼 He floats through the air with the greatest of ease… 🎵

Chip 2023-09-24T20:42:15.234109Z

Thank you for knowing your stuff. It helps those of us who don’t.

seancorfield 2023-09-24T20:42:38.844459Z

13 years of Clojure and I'm still learning new/better stuff all the time. It's a process 🙂

Chip 2023-09-24T20:43:39.114639Z

Amen. I’m seaside with a teaspoon.

Chip 2023-09-24T22:02:21.151399Z

Ask more about the video here or in #beginners?

seancorfield 2023-09-24T22:26:48.996459Z

You can ask via DM if you want, or in #solo-full-stack or #beginners depending on how wide an audition you want for the question (and the answers).

Chip 2023-09-24T22:27:30.036129Z

Thanks. I just found that #beginners thread that seemed to make sense.