clojure

teodorlu 2026-03-13T11:48:36.020529Z

When iterating over an IPersistentSet, do the values always come out in the same order?

Alex Miller (Clojure team) 2026-03-13T11:49:25.390079Z

Yes

Alex Miller (Clojure team) 2026-03-13T11:49:56.228499Z

Assuming you mean a particular instance of a set

teodorlu 2026-03-13T11:50:37.438879Z

Yes — the set value is unchanged.

teodorlu 2026-03-13T11:50:39.118119Z

Thank you!

Alex Miller (Clojure team) 2026-03-13T11:51:02.131239Z

In general, any kind of iteration should happen in seq order

👍 2
💯 1
Yevgeni Tsodikov 2026-03-13T12:51:41.944639Z

Where do you mean "always"? The iteration order within the same JVM process might be the same, but it might be different across JVM builds.

teodorlu 2026-03-13T13:28:06.181649Z

different JVM would mean different instance, no?

Yevgeni Tsodikov 2026-03-13T14:48:25.576889Z

Yes. I don't know how you're using this seq order, but if you're relying on a similar order across (for example) replica sets in k8s, it could surprise you.

teodorlu 2026-03-13T15:01:40.897669Z

no, I meant a particular instance of a set, as Alex asked about above.

👍 1
technomancy 2026-03-13T17:21:20.594199Z

has the core team made a public statement yet about whether they would accept or reject patches to Clojure that are generated by an LLM?

roklenarcic 2026-03-16T08:29:01.884199Z

Sean, are you saying that the ownership of LLM generated code is not with the developer (which is the default ownership of written code in absence of additional contractual stipulations)? That would have deep ramifications for all the companies using LLMs to write their platforms.

seancorfield 2026-03-16T13:24:48.551459Z

@roklenarcic I think there are probably some legal grey areas. Even tho' you "own" the generated code, licensing may still trip you up -- if, say, chunks of GPL code end up in what is generated. And copyright is also an issue in the US, since copyright only protects works authored by humans. There have already been some test cases where folks have been denied copyright protection in a court of law for works generated entirely by AI. For the former, licensing, issue, you can in theory instruct some LLMs to not reproduce publicly available code fragments. GitHub Business allows you to disable public code inclusion -- but the free GitHub plan does not, for example. Some of this stuff has not been tested in court... yet.

➕ 2
roklenarcic 2026-03-16T13:26:27.766669Z

I understand the “accidental copy of existing code” thing, but I was mostly talking about copyright, I didn’t know this has been denied in the past

seancorfield 2026-03-16T13:30:14.527599Z

I don't know about other countries' copyright law -- only US law, which has been tested a little in the courts.

technomancy 2026-04-16T18:10:45.969659Z

https://clojure.org/dev/contributor_agreement#_no_generated_code <- it looks like we did get an explicit policy on this posted at some point; thanks to whoever did that!

🎉 4
seancorfield 2026-04-16T18:26:33.459719Z

@alexmiller since clarified (on http://clojureverse.org, I believe), that this would extend to AI-generated autocomplete as "LLM-generated code" as well, so folks who want to contribute patches need to be careful about the settings in their editor.

seancorfield 2026-03-13T17:44:51.050929Z

Given how tightly QA'd those patches are, would it matter whether the code in the patch was human- or AI-generated? (Genuine Q). And it would depend on the submitter disclosing the use of AI... (Is the Q is more about the copyright / provenance of the code, rather than the quality? Doesn't the CLA make the submitter liable should any issue arise in future?)

➕ 2
technomancy 2026-03-13T17:50:19.853439Z

yes, it matters

technomancy 2026-03-13T17:50:42.848609Z

for ethical reasons if none other

technomancy 2026-03-13T17:52:07.717639Z

"the contributor can always lie" is not a good argument; the contributor can always lie about license compatibility or any other requirement. just because a policy isn't bulletproof against bad-faith attackers doesn't mean it's not worth having.

technomancy 2026-03-13T18:03:00.844359Z

hm; the CLA says you agree that "to the best of your knowledge, each contribution will not violate any third party's copyrights" so I would interpret that to mean it's already prohibited to use an LLM, because that claim would be impossible to make for LLM-generated code.

technomancy 2026-03-13T18:03:20.904939Z

but you see why clarification from the author of said document would be important?

seancorfield 2026-03-13T18:04:58.838959Z

Right, and the CLA also specifically says "each contribution that you submit is and shall be an original work of authorship and you can legally grant the rights set out in this RHCA".

technomancy 2026-03-13T18:05:28.615989Z

but still, I'm sure you'd find LLM users who would argue with that

technomancy 2026-03-13T18:05:33.917829Z

even tho it seems clear to me

seancorfield 2026-03-13T18:06:12.374269Z

If you generate code with an LLM, is it "an original work of authorship" and can you, as the submitter, "legally grant the rights set out in this RHCA"? I would say "no" to both. But IANAL.

technomancy 2026-03-13T18:06:26.998149Z

I'd rather tell them to argue with Rich than argue with me

seancorfield 2026-03-13T18:06:50.337849Z

Hah, yes, and I think we know how Rich would feel about this 🙂

Alex Miller (Clojure team) 2026-03-13T18:13:35.315119Z

we don't have any public policy. of course, we have no plans to move the goalposts of what we expect from a patch or a contributor.

technomancy 2026-03-13T18:15:43.994789Z

what about clarifications regarding ambiguity in said goalposts?

technomancy 2026-03-13T20:42:26.889259Z

at least knowing if it's "we need to think about this more" vs "we don't think this is important" would be helpful