clojure-cheatsheets icon indicating copy to clipboard operation
clojure-cheatsheets copied to clipboard

What symbols to add from Clojure 1.12.0 ?

Open jafingerhut opened this issue 8 months ago • 5 comments

Below is a list of new vars def'd in Clojure 1.12.0 that were not present in Clojure 1.11.1. The namespace is clojure.core if it is not explicitly shown.

I already have a good idea where partitionv, partitionv-all, and splitv-at should go. Please add a comment if you have a suggestion for where other new vars should go in the cheatsheet, if you think they should be added at all (note: not all vars are in the cheatsheet, nor need they be).

*repl*

clojure.core.protocols/iterator-reduce! - Considered implementation detail, and therefore best not to include in  cheatsheet (Alex Miller).

clojure.java.basis.impl/init-basis - Considered implementation detail, and therefore best not to include in cheatsheet (Alex Miller).
clojure.java.basis.impl/the-basis - Considered implementation detail, and therefore best not to include in cheatsheet (Alex Miller).
clojure.java.basis.impl/update-basis! - Considered implementation detail, and therefore best not to include in cheatsheet (Alex Miller).

clojure.java.basis/current-basis
clojure.java.basis/initial-basis

clojure.java.process/exec - Top two proposals: (a) add all of these vars to the existing "Other / Browser/Shell" section, or (b) add these, and also remove all existing vars in the cheatsheet from namespace clojure.java.shell
clojure.java.process/exit-ref
clojure.java.process/from-file
clojure.java.process/io-task - Considered implementation detail, and therefore best not to include in cheatsheet (Alex Miller).
clojure.java.process/start
clojure.java.process/stderr
clojure.java.process/stdin
clojure.java.process/stdout
clojure.java.process/to-file

clojure.repl.deps/add-lib - Possibilities: (a) add these 3 vars to existing Other / REPL section (b) Make what is now Other / REPL subsection into its own top-level section.
clojure.repl.deps/add-libs
clojure.repl.deps/sync-deps

clojure.tools.deps.interop/invoke-tool

partitionv - Added to same one section where partition was.
partitionv-all - Added to same two sections where partition-all was.
splitv-at - Added to same one section where split-at was.

stream-into! - Consider adding a new "Streams" section as a subsection of "Java Interoperation", since Java interop is the reason these streams functions were created.
stream-reduce!
stream-seq!
stream-transduce!

List of new namespaces from Clojure 1.11.1 to 1.12.0:

  • clojure.java.basis
  • clojure.java.basis.impl
  • clojure.java.process
  • clojure.repl.deps
  • clojure.tools.deps.interop

jafingerhut avatar Apr 09 '25 03:04 jafingerhut

In general, public functions with docstrings MAY be doc'ed. Alternately, if it shows up in https://clojure.github.io/clojure.

The following are implementation and should NOT be doc'ed:

  • iterator-reduce!
  • everything in clojure.java.basis.impl
  • clojure.java.process/io-task

puredanger avatar Apr 09 '25 12:04 puredanger

I think having a streams section would be good, maybe a subsection of interop?

Adding the add-libs/sync-deps would be great in the repl subsection (which might be promoted to full section).

Maybe the high level vars from process could be added to the same section as sh?

NoahTheDuke avatar Apr 09 '25 13:04 NoahTheDuke

To my mind, the new process ns supersedes the sh stuff so could even replace that.

puredanger avatar Apr 09 '25 15:04 puredanger

This PR: https://github.com/clojure/clojure-cheatsheets/pull/56

Makes the changes it describes at the beginning of its CHANGELOG.txt file, here: https://github.com/clojure/clojure-cheatsheets/pull/56/files#diff-f7b49a1753d620c71bb5025133592b107d8c5cd8c458aa8d6be2df146e8f2bc7

jafingerhut avatar Apr 10 '25 12:04 jafingerhut

And you can see a preview of the cheatsheet with these proposed changes here: https://jafingerhut.github.io/

jafingerhut avatar Apr 10 '25 20:04 jafingerhut