Skip to content

Commit

Permalink
add clojure.java.process and clojure.java.basis to other libs
Browse files Browse the repository at this point in the history
  • Loading branch information
puredanger committed Dec 18, 2023
1 parent e64b3fc commit e73a79b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion content/reference/other_libraries.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ toc::[]

== Java Utilities (clojure.java.*)

**https://clojure.github.io/clojure/clojure.java.basis-api.html[clojure.java.basis]**

Access to the initial and current runtime basis, which specifies the libraries and versions
currnently loaded on the JVM classpath.

**https://clojure.github.io/clojure/clojure.java.io-api.html[clojure.java.io]**
Contains polymorphic I/O utility functions for Clojure backed by Java classes.

**https://clojure.github.io/clojure/clojure.java.javadoc-api.html[clojure.java.javadocs]**

Provides the function https://clojure.github.io/clojure/clojure.java.javadoc-api.html#clojure.java.javadoc/javadoc[javadoc] that attempts to display the appropriate Javadocs for a class or instance class.

**https://clojure.github.io/clojure/clojure.java.process-api.html[clojure.java.process]**

Support for launching and communicating subprocesses. This namespace supersedes clojure.java.shell and uses the latest Java process APIs.

**https://clojure.github.io/clojure/clojure.java.shell-api.html[clojure.java.shell]**

Provides a https://clojure.github.io/clojure/clojure.java.shell-api.html#clojure.java.shell/sh[sh] function that facilitates launching and managing subprocesses. See the function documentation for details on its expected arguments.
Expand All @@ -33,7 +42,7 @@ Provides a https://clojure.github.io/clojure/clojure.java.shell-api.html#clojure

The parallel library (namespace _**parallel**_, in parallel.clj) wraps the http://gee.cs.oswego.edu/dl/concurrency-interest/index.html[ForkJoin library]. This lib is now deprecated.

You'll need `jsr166y.jar` in your classpath in order to use this library. The basic idea is that Clojure collections, and most efficiently vectors, can be turned into parallel arrays for use by this library with the function par, although most of the functions take collections and will call _**par**_ if needed, so normally you will only need to call par explicitly in order to attach bound/filter/map ops.
The basic idea is that Clojure collections, and most efficiently vectors, can be turned into parallel arrays for use by this library with the function par, although most of the functions take collections and will call _**par**_ if needed, so normally you will only need to call par explicitly in order to attach bound/filter/map ops.

Parallel arrays support the attachment of bounds, filters and mapping functions prior to realization/calculation, which happens as the result of any of several operations on the array (pvec/psort/pfilter-nils/pfilter-dupes). Rather than perform composite operations in steps, as would normally be done with sequences, maps and filters are instead attached and thus composed by providing ops to _**par**_. Note that there is an order sensitivity to the attachments - bounds precede filters precede mappings. All operations then happen in parallel, using multiple threads and a sophisticated work-stealing system supported by fork-join, either when the array is realized, or to perform aggregate operations like preduce/pmin/pmax etc.

Expand Down

0 comments on commit e73a79b

Please sign in to comment.