std.lib.env

*debug*

dynamic

*local*

dynamic

+debug+

+local+

+sys:resource-content+

close

added in 3.0

(close obj)

closes any object implementing java.io.Closable

dbg

macro

added in 4.0

(dbg & body)

TODO

dbg-global

added in 4.0

(dbg-global)(dbg-global flag)

TODO

dbg-print

added in 4.0

(dbg-print ns-str {:keys [line column]} & args)

TODO

dbg:add-filters

added in 4.0

(dbg:add-filters & filters)

TODO

dbg:remove-filters

added in 4.0

(dbg:remove-filters & filters)

TODO

dev?

added in 3.0

(dev?)

checks if current environment is dev

do:pl

macro

added in 4.0

(do:pl v)

doto pl

do:pp

macro

added in 4.0

(do:pp v)

doto pp

do:prn

macro

added in 4.0

(do:prn & args)

doto prn

docker-daemon-available?

added in 4.0

(docker-daemon-available?)

checks if the docker daemon is reachable

explode

macro

added in 3.0

(explode & body)

prints the stacktrace for an exception

(explode (throw (ex-info “Error” {})))

local

added in 3.0

(local k & args)

applies the local function

local:clear

added in 3.0

(local:clear k & more)

clears the local functions

local:set

added in 3.0

(local:set k v & more)

sets the local functions

match-filter

added in 4.0

(match-filter filt id)

matches given a range of filters

meter

macro

added in 3.0

(meter label & body)

meter-out

macro

added in 4.0

(meter-out & body)

measures and output meter

ns-get

added in 3.0

(ns-get sym)(ns-get ns k)

gets a symbol in the current namespace

ns-sym

added in 3.0

(ns-sym)

returns the namespace symbol

p

added in 3.0

(p & args)

shortcut to (local :println)

pl

macro

added in 3.0

(pl body)(pl body range)

print with lines

pl-add-lines

added in 3.0

(pl-add-lines body)(pl-add-lines body [start end])(pl-add-lines body [start end] [pad-h pad-v])

helper function for pl

pl:fn

macro

added in 4.0

(pl:fn)

creates a pl function

pp

macro

added in 3.0

(pp & body)

shortcut to (local :pprint)

pp-fn

added in 4.0

(pp-fn & body)

the pp print function

pp-str

added in 4.0

(pp-str & args)

pretty prints a string

pr

added in 3.0

(pr & args)

shortcut to (local :println)

prf

added in 4.0

(prf v & [no-pad])

pretty prints with format

prfn

macro

added in 3.0

(prfn & body)

prn but also includes namespace and file info

prn

macro

added in 3.0

(prn & body)

prn but also includes namespace and file info

prn:fn

macro

added in 4.0

(prn:fn)

creates a prn function

program-exists?

added in 4.0

(program-exists? exec)

checks if an executable exists on PATH

(program-exists? “ls”) => true

program-version

added in 4.0

(program-version exec)(program-version exec args)

returns the version output of a program, or nil if unavailable

(program-version “ls”) => string?

require

added in 3.0

(require sym)

a concurrency safe require

sys:ns-dir

added in 4.0

(sys:ns-dir)(sys:ns-dir ns)

gets the dir for ns

sys:ns-file

added in 4.0

(sys:ns-file)(sys:ns-file ns)

gets the file for ns

sys:ns-url

added in 4.0

(sys:ns-url)(sys:ns-url ns)

gets the url for ns

sys:resource

added in 3.0

(sys:resource n)(sys:resource n loader)

finds a resource on class path

sys:resource-cached

added in 4.0

(sys:resource-cached atom path f)

caches the operation on a resource call

sys:resource-content

added in 3.0

(sys:resource-content path)

reads the content

throwable-string

added in 3.0

(throwable-string t)

creates a string from a throwable

(throwable-string (ex-info “ERROR” {})) => string?

version-ints

added in 4.0

(version-ints s)

parses a version string into a vector of integers

(version-ints “docker version 24.0.7, build afdd53b”) => 24 0 7

version>=

added in 4.0

(version>= a b)

checks if version a is greater than or equal to version b. Accepts version strings or integer vectors.

(version>= “1.2.3” “1.2.0”) => true

with-out-str

macro

added in 3.0

(with-out-str & body)

gets the local string

(print/with-out-str (print/print “hello”)) => “hello”

with-system

macro

added in 3.0

(with-system & body)

with system print instead of local

with:dbg

macro

added in 4.0

(with:dbg flag & body)

TODO

wrap-print

(wrap-print f & [format-fn])