Fork me on GitHub
#clojure-europe
<
2020-11-10
>
plexus07:11:40

Good morning! After a sunny weekend in Berlin we are back in Dauergrau territory ☁️

dharrigan08:11:35

Good Morning!

plexus08:11:29

is anyone else confused about the breaking changes in Clojure CLI around the -M alias?

3
borkdude08:11:03

@plexus There have been discussions about this in #tools-deps.

borkdude08:11:22

Are you confused about why they made a breaking change or about the change itself?

genRaiy09:11:14

@plexus yeah seems pointless to change letters. I had a look on the #tools-deps channel but parsing Slack for meaning is pointless

genRaiy09:11:28

pointless good morning

genRaiy09:11:26

but I guess everything is alpha now, so it’s permitted under Rich law

borkdude09:11:10

The clojure CLI was never marked alpha anywhere. The library it is using under hood, tools.deps.alpha, is.

genRaiy09:11:09

is there a write up somewhere that explains all of the changes?

borkdude10:11:23

the most important change: aliases are only used to change the classpath, to invoke clojure.main you have to explicitly use -M

borkdude10:11:53

so if you wrote clojure -A:test before,

borkdude10:11:02

to run tests, this should now become clojure -M:test

borkdude10:11:34

note that the -M option was already there the whole time, they just enforced this more

genRaiy10:11:51

given that this conversation will go away next week … a link would be nice if you have one

genRaiy10:11:35

my understanding is that you should also do group/dep for maven assets now too

genRaiy10:11:26

which is a different part of the tooling but still it’s linked

borkdude10:11:19

true. the latest clj-kondo will help you with that part btw

❤️ 3
thomas10:11:04

morning

👋 3
plexus11:11:40

right, but now someone in #kaocha wants to have the dependencies from their :server alias, but not the :main-opts, so I thought then you just use -A, but then you get a warning that you're not supposed to do that

dominicm16:11:47

This warning will go away

dominicm16:11:07

It's to help people who are doing the wrong thing transition

plexus11:11:01

and that confuses me, I thought you could use -A to get the dependencies but not the main opts from an alias

plexus11:11:38

so yes I'm confused both about the fact that they are making breaking changes. I thought we had collectively been indoctrinated into not doing that. I'm also confused about the change itself, and the point thereof...

plexus11:11:14

but I'll wait until someone does a write-up of the discussion in #tools-deps 😊

borkdude11:11:29

@plexus The change can be annoying in situations like that

borkdude11:11:18

If you ask about the reasons behind this, then you hear "we are trying to free up arg space for other things"

plexus12:11:51

And this is why you don't start with single letter command line flags when designing a CLI interface :)

borkdude12:11:09

@plexus Am I wrong, or does tools.cli enforce this?

borkdude12:11:22

Not that the Clojure CLI is using this

pez12:11:43

This change is creating confusion for Calva users. And it's also not super easy to fix it. It will be one more thing for the users to be aware of and take action on...

plexus12:11:01

tools.cli does not enforce this, you can have long options only if you want. Kaocha mostly has long options, just a few one letter options for common things

borkdude12:11:58

@plexus Then I have misunderstood tools.cli. How can you have options without short options?

plexus12:11:36

Just put a nil in the first spot

borkdude13:11:16

Thanks, TIL

mpenet15:11:39

I am reaching a point where I am thinking that giant "state" datastructure I am juggling with everywhere should maybe be better as a datascript db

mpenet15:11:14

it's one of the rare cases where it would actually be handy in process, the thing I am messing with is growing and growning and we query it in various ways (and that's growing too)

mpenet15:11:36

doesn't warrant a real db tho, we're still in tiny-data scope

val_waeselynck15:11:53

Seems sensible.

val_waeselynck15:11:39

I think many people would gain from seeing DataScript not as an in-memory db, but really as a rich immutable data structure

val_waeselynck15:11:51

That said, be aware that the current Datalog engine has a slow startup time.

val_waeselynck15:11:23

I'm actually considering to start work on AOT compilation of Datalog queries

val_waeselynck15:11:31

It's a pity to have eliminated network calls, and to still have a 100µs "startup time" on your query engine, even for very dumb queries.

val_waeselynck15:11:03

(you might already know this stuff of course)

mpenet15:11:21

good to know, but it's a case where we can cache heavily if needed I think

mpenet15:11:32

but the domain is tricky, state can change outside of our control/visibility

val_waeselynck15:11:06

Isn't that last problem orthogonal to choosing the supporting data structure?

mpenet15:11:26

yes, I meant about the caching bit, might not be reliable to cache in that case.