dt

duct tape for your unix pipes


dt 0.10.0 standard library

doexecute a command or quote
pushmove an item into a quote
versionprint the version of the interpreter
statusstatus
deqremove an item from the first position of a quote
%modulo two numeric values
charschars
pipe-thru-argspipe-thru-args
dupduplicate the top value
*multiply two numeric values
swapswap the top two values
lenthe length of a string or quote or 1 for single values
quotequote a value
gte?consume two numbers and return true if the most recent is greater
readfread a file as a string
joinconsume a quote of strings and a delimiter, and produce a string with the delimiter interspersed
epprint a value to stderr
to-floatcoerce value to floating-point number
run-argsrun-args
doinexecute a command or quote in a previous quote
even?even?
neq?neq?
divisor?divisor?
firstfirst
enlprint a newline to stderr
parse-csvparse-csv
.sprint the stack
dropdrop the top value
+add two numeric values
to-boolcoerce value to boolean
assert-trueassert-true
plpl
printlnprintln
def!define a new command
mapapply a command to all values in a quote
upcaseconvert a string to uppercase
undef?undef?
eacheach
lte?consume two numbers and return true if the most recent is less
lastlast
->->
cwdcurrent working directory
writefwrite a string as a file
def?return true if a name is defined
to-quotecoerce value to quote
whilewhile
absconsume a number and produce its absolute value
defsproduce a quote of all definition names
notconsume a booleans and produce its logical not
read-linesget lines from standard input (until EOF)
rotrotate the top three values
argsget command-line args
interactive?determine if the input mode is interactive (a TTY) or not
do!execute a command or quote
concatconcatenate two quotes. Values are coerced into quotes. (For String concatenation, see join)
unwordsunwords
to-stringcoerce value to string
nandnand
main-replmain-repl
read-lineget a line from standard input (until newline)
quote-allquote all current context
print-versionprint-version
to-errorcoerce value to an error
wordswords
eplsepls
--version--version
downcaseconvert a string to lowercase
lslist contents of current directory
orconsume two booleans and produce their logical or
unlinesunlines
exitexit with the specified exit code
pwdpwd
cdchange directory
defdef
evaleval
eq?consume two values and return true if they are equal
any?return true if any value in a quote passes a predicate
unquoteunquote
gt?consume two numbers and return true if the most recent is greater
plspls
:bind variables
lt?consume two numbers and return true if the most recent is less
ends-with?consume a string and a suffix, and return true if the string has the suffix
execexecute a child process. When successful, returns stdout as a string. When unsuccessful, prints the child's stderr to stderr, and returns boolean false
to-cmdcoerce value to a deferred command
shebang-argsshebang-args
starts-with?consume a string and a prefix, and return true if the string has the prefix
eprintlneprintln
popmove the last item of a quote to top of stack
odd?odd?
printprint
procnameget name of current process
splitconsume a string and a delimiter, and produce a quote of the string split on all occurrences of the substring
revreverse a quote or string
eplepl
timestimes
handle-flagshandle-flags
.qquit, printing a warning if there are any values left on stack
to-intcoerce value to integer
quitquit
handle-flaghandle-flag
/divide two numeric values
lineslines
-subtract two numeric values
contains?consume a string and a substring, and return true if the string contains the substring
eprinteprint
...expand a quote
print-helpprint-help
usageprint the usage notes of a given command
andconsume two booleans and produce their logical and
?consumes a command/quote and a value and performs it if the value is truthy
nornor
filteronly keep values in that pass a predicate in a quote
--help--help
replrepl
pprint a value to stdout
nlprint a newline to stdout
enqmove an item into the first position of a quote