The code for these namespaces is included directly in the Planck binary, so they are always available—you just need to
These namespaces comprise
To explore these namespaces, you can evaluate
(dir planck.core), for example, to see the symbols in
planck.core, and then use the
doc macro to see the docs for any of the symbols.
This namespace primarily collects functions that are part of Clojure's
clojure.core but are not part of ClojureScript. This includes basic I/O capabilities like
read-line as well as functions useful for console scripting like
file-seq (directory listing),
read-password (password input) and
exit (exit values).
The I/O facilities are expressed in protocols defined in
planck.core modeled after those in Clojure, like
IOutputStream, etc., and these capabilities cooperate with facilities defined in
planck.core namespace also defines dynamic functions like
intern. Some dynamic vars of interest like
*out* are defined here as well.
This namespace provided access to environment variables, modeled after Environ. For example
will access the
HOME environment variable.
This namespace provides facilities for interacting with HTTP servers. For example:
will fetch the main page of the Planck website, returning the status code, headers, and body in a map structure.
This namespace defines a lot of the
IOFactory machinery, imitating
clojure.java.io. File system facilities like
file-attributes are also made available.
This namespace includes a few macros that are useful when working at the REPL, such as
This namespace imitates
clojure.shell, and defining the
sh function and
with-sh-env macros that can be used to execute external command-line functions.
With this escape hatch, you can do nearly anything: move files to remote hosts using